# $Id$ SQLITE3_VER?=3.6.16 SQLITE3_DIR?=sqlite-${SQLITE3_VER} SQLITE3_GZ?=sqlite-amalgamation-${SQLITE3_VER}.tar.gz SQLITE3_URL?=http://www.sqlite.org/${SQLITE3_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=LIBS="-lws2_32" \ ./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 SQLITE3_TAR_TOUCH=${SQLITE3_DIR}/.tar.touch SQLITE3_CONFIGURE_TOUCH=${SQLITE3_DIR}/.configure.touch #SQLITE3_PATCH_TOUCH=${SQLITE3_DIR}/.patch.touch SQLITE3_MAKE_TOUCH=${SQLITE3_DIR}/.make.touch SQLITE3_INSTALL_TOUCH=${SQLITE3_DIR}/.install.touch .PHONY: all clean configure install make nuke patch rmdir unconf untar wget all: make ${SQLITE3_GZ}: ${WGET} ${SQLITE3_URL} touch $@ wget: ${SQLITE3_GZ} ${SQLITE3_TAR_TOUCH}: ${SQLITE3_GZ} ${TAR} -xzvf $< touch $@ untar: ${SQLITE3_TAR_TOUCH} ${SQLITE3_CONFIGURE_TOUCH}: ${SQLITE3_TAR_TOUCH} cd ${SQLITE3_DIR} && \ ${CONFIGURE} touch $@ configure: ${SQLITE3_CONFIGURE_TOUCH} ${SQLITE3_MAKE_TOUCH}: ${SQLITE3_CONFIGURE_TOUCH} cd ${SQLITE3_DIR} && \ ${MAKE} touch $@ make: ${SQLITE3_MAKE_TOUCH} ${SQLITE3_INSTALL_TOUCH}: ${SQLITE3_MAKE_TOUCH} cd ${SQLITE3_DIR} && \ ${SUDO} ${MAKE} install touch $@ install: ${SQLITE3_INSTALL_TOUCH} unconf: rm -f ${SQLITE3_CONFIGURE_TOUCH} clean: unconf rm -fr \ ${SQLITE3_MAKE_TOUCH} \ ${SQLITE3_INSTALL_TOUCH} cd ${SQLITE3_DIR} && \ ${MAKE} clean rmdir: rm -fr ${SQLITE3_DIR} nuke: rmdir rm -f ${SQLITE3_GZ}