aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-04-28 15:04:49 -0400
committerRob Austein <sra@hactrn.net>2015-04-28 15:04:49 -0400
commita18c0d41a606e8ff02f1457e9a0ac996132a2445 (patch)
tree17b949ad4a02ac3c3aaf2b971208fa5936ea9f9f /GNUmakefile
Initial commit of SQLite3 port.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..cb10c3f
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,33 @@
+# 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