# $Id$ # http://www.zlib.net/zlib-1.2.3.tar.gz ZLIB_VER?=1.2.3 ZLIB_DIR?=zlib-${ZLIB_VER} ZLIB_GZ?=${ZLIB_DIR}.tar.gz ZLIB_URL?=http://www.zlib.net/${ZLIB_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 ifeq ('${OSNAME}', 'mingw') # mingw's tar doesn't handle symlinks # TAR=c:/cygwin/bin/tar endif CONFIGURE=./configure ifeq ('${OSNAME}', 'linux') CONFIGURE=AR="i586-mingw32msvc-ar rc" \ AS=i586-mingw32msvc-as \ CC=i586-mingw32msvc-gcc \ LD=i586-mingw32msvc-ld \ RC=i586-mingw32msvc-windres \ ./configure \ --prefix=/usr/i586-mingw32msvc MAKE=PATH=/usr/i586-mingw32msvc/bin:$$PATH \ make \ PREFIX=/usr/i586-mingw32msvc \ AR="i586-mingw32msvc-ar rc" \ AS=i586-mingw32msvc-as \ CC=i586-mingw32msvc-gcc \ LD=i586-mingw32msvc-ld \ RC=i586-mingw32msvc-windres endif ZLIB_TAR_TOUCH=${ZLIB_DIR}/.tar.touch ZLIB_CONFIGURE_TOUCH=${ZLIB_DIR}/.configure.touch ZLIB_MAKE_TOUCH=${ZLIB_DIR}/.make.touch ZLIB_INSTALL_TOUCH=${ZLIB_DIR}/.install.touch .PHONY: all clean configure install make nuke remove untar wget all: make ${ZLIB_GZ}: ${WGET} ${ZLIB_URL} touch $@ wget: ${ZLIB_GZ} ${ZLIB_TAR_TOUCH}: ${ZLIB_GZ} -${TAR} -xzvf $< touch $@ untar: ${ZLIB_TAR_TOUCH} ${ZLIB_CONFIGURE_TOUCH}: ${ZLIB_TAR_TOUCH} cd ${ZLIB_DIR} && \ ${CONFIGURE} touch $@ configure: ${ZLIB_CONFIGURE_TOUCH} ${ZLIB_MAKE_TOUCH}: ${ZLIB_CONFIGURE_TOUCH} cd ${ZLIB_DIR} && \ ${MAKE} touch $@ make: ${ZLIB_MAKE_TOUCH} ${ZLIB_INSTALL_TOUCH}: ${ZLIB_MAKE_TOUCH} cd ${ZLIB_DIR} && \ ${SUDO} ${MAKE} install touch $@ install: ${ZLIB_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}