# $Id$ CPPUNIT_VER?=1.12.1 CPPUNIT_DIR?=cppunit-${CPPUNIT_VER} CPPUNIT_GZ?=${CPPUNIT_DIR}.tar.gz CPPUNIT_URL?=http://voxel.dl.sourceforge.net/sourceforge/cppunit/${CPPUNIT_GZ} OSNAME:=$(shell uname | perl -ne 'tr/A-Z/a-z/; /([a-z]+)/ && print $$1;') 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 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 CPPUNIT_TAR_TOUCH=${CPPUNIT_DIR}/.tar.touch CPPUNIT_CONFIGURE_TOUCH=${CPPUNIT_DIR}/.configure.touch CPPUNIT_MAKE_TOUCH=${CPPUNIT_DIR}/.make.touch CPPUNIT_INSTALL_TOUCH=${CPPUNIT_DIR}/.install.touch .PHONY: all clean configure install make nuke remove untar wget all: make ${CPPUNIT_GZ}: ${WGET} ${CPPUNIT_URL} touch $@ wget: ${CPPUNIT_GZ} ${CPPUNIT_TAR_TOUCH}: ${CPPUNIT_GZ} ${TAR} -xzvf $< touch $@ untar: ${CPPUNIT_TAR_TOUCH} ${CPPUNIT_CONFIGURE_TOUCH}: ${CPPUNIT_TAR_TOUCH} cd ${CPPUNIT_DIR} && \ ${CONFIGURE} touch $@ configure: ${CPPUNIT_CONFIGURE_TOUCH} ${CPPUNIT_MAKE_TOUCH}: ${CPPUNIT_CONFIGURE_TOUCH} cd ${CPPUNIT_DIR} && \ ${MAKE} touch $@ make: ${CPPUNIT_MAKE_TOUCH} ${CPPUNIT_INSTALL_TOUCH}: ${CPPUNIT_MAKE_TOUCH} cd ${CPPUNIT_DIR} && \ ${SUDO} ${MAKE} install touch $@ install: ${CPPUNIT_INSTALL_TOUCH} unconf: rm -f ${CARES_CONFIGURE_TOUCH} clean: unconf rm -fr \ ${CARES_MAKE_TOUCH} \ ${CARES_INSTALL_TOUCH} cd ${CARES_DIR} && \ ${MAKE} clean rmdir: rm -fr ${CARES_DIR} nuke: rmdir rm -f ${CARES_GZ}