# Download and build SQLite3 from source with the options we want. URL := http://sqlite.org/2015/sqlite-autoconf-3080900.tar.gz OPTIONS := --enable-static --disable-shared CFLAGS=-fPIC LDFLAGS=-fPIC TOP := $(shell pwd) TARBALL := ${TOP}/$(notdir ${URL}) BUILD := ${TOP}/build OUTPUT := ${BUILD}/sqlite3.h ${BUILD}/.libs/libsqlite3.a ${BUILD}/sqlite3 TARGETS := $(notdir ${OUTPUT}) all: ${TARGETS} clean: rm -rf ${BUILD} ${TARGETS} distclean: clean rm -f ${TARBALL} ${TARBALL}: wget ${URL} ${BUILD}/.build_done: ${TARBALL} GNUmakefile sha256sum --check Checksums rm -rf ${BUILD} mkdir ${BUILD} cd ${BUILD}; tar -xf ${TARBALL} --strip-components=1 cd ${BUILD}; ./configure ${OPTIONS} cd ${BUILD}; make ln -f ${OUTPUT} . touch $@ ${TARGETS}: ${BUILD}/.build_done