# $Id$ # ftp://xmlsoft.org/libxml2/libxml2-2.6.32.tar.gz LIBXML2_VER?=2.7.3 LIBXML2_DIR?=libxml2-${LIBXML2_VER} LIBXML2_GZ?=${LIBXML2_DIR}.tar.gz LIBXML2_URL?=ftp://xmlsoft.org/libxml2/${LIBXML2_GZ} LIBXML2_PATCH=libxml2-2.7.3-mingw.patch LIBXML2_PATCH_URL?=http://smithii.com/files/${LIBXML2_PATCH} OSNAME:=$(shell uname | perl -ne 'tr/A-Z/a-z/; /([a-z]+)/ && print $$1;') AUTOCONF?=autoconf BUNZIP2?=bunzip2 GUNZIP?=gunzip MAKE?=make PATCH?=patch PERL?=perl STRIP?=strip --strip-all SUDO?= TAR?=tar WGET?=wget -N CONFIGURE=./configure ifeq ('${OSNAME}', 'linux') CONFIGURE=./configure \ --host=i586-mingw32msvc \ --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \ --prefix=/usr/i586-mingw32msvc \ --without-python MAKE=PATH=/usr/i586-mingw32msvc/bin:$$PATH \ make \ PREFIX=/usr/i586-mingw32msvc \ AR=i586-mingw32msvc-ar \ AS=i586-mingw32msvc-as \ CC=i586-mingw32msvc-gcc \ LD=i586-mingw32msvc-ld \ RC=i586-mingw32msvc-windres endif LIBXML2_TAR_TOUCH=${LIBXML2_DIR}/.tar.touch LIBXML2_AUTOCONF_TOUCH=${LIBXML2_DIR}/.autoconf.touch LIBXML2_CONFIGURE_TOUCH=${LIBXML2_DIR}/.configure.touch LIBXML2_MAKE_TOUCH=${LIBXML2_DIR}/.make.touch LIBXML2_INSTALL_TOUCH=${LIBXML2_DIR}/.install.touch LIBXML2_PATCH_TOUCH==${LIBXML2_DIR}/.patch.touch .PHONY: all clean configure install make nuke remove rmdir unconf untar wget all: make ${LIBXML2_GZ}: ${WGET} ${LIBXML2_URL} touch $@ wget: ${LIBXML2_GZ} ${LIBXML2_TAR_TOUCH}: ${LIBXML2_GZ} ${TAR} -xzvf $< touch $@ untar: ${LIBXML2_TAR_TOUCH} ${LIBXML2_PATCH}: ${WGET} ${LIBXML2_PATCH_URL} ${LIBXML2_PATCH_TOUCH}: ${LIBXML2_PATCH} ${LIBXML2_TAR_TOUCH} cd ${LIBXML2_DIR} && \ ${PATCH} -p1 <../${LIBXML2_PATCH} touch $@ patch: ${LIBXML2_PATCH_TOUCH} #${LIBXML2_CONFIGURE_TOUCH}: ${LIBXML2_PATCH_TOUCH} ${LIBXML2_CONFIGURE_TOUCH}: ${LIBXML2_TAR_TOUCH} cd ${LIBXML2_DIR} && \ ${CONFIGURE} touch $@ configure: ${LIBXML2_CONFIGURE_TOUCH} ${LIBXML2_MAKE_TOUCH}: ${LIBXML2_CONFIGURE_TOUCH} cd ${LIBXML2_DIR} && \ ${MAKE} touch $@ make: ${LIBXML2_MAKE_TOUCH} ${LIBXML2_INSTALL_TOUCH}: ${LIBXML2_MAKE_TOUCH} cd ${LIBXML2_DIR} && \ ${SUDO} ${MAKE} install touch $@ install: ${LIBXML2_INSTALL_TOUCH} unconf: rm -f ${LIBXML2_CONFIGURE_TOUCH} clean: unconf rm -fr \ ${LIBXML2_AUTOCONF_TOUCH} \ ${LIBXML2_MAKE_TOUCH} \ ${LIBXML2_INSTALL_TOUCH} cd ${LIBXML2_DIR} && \ ${MAKE} clean rmdir: rm -fr ${LIBXML2_DIR} nuke: rmdir rm -f ${LIBXML2_GZ}