blob: 447589d95b7790c902e6ed7089679c5b83d41398 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# 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})
SHA256SUM := $(firstword $(wildcard /usr/local/bin/sha256sum /usr/local/bin/gsha256sum /usr/bin/sha256sum))
all: ${TARGETS}
clean:
rm -rf ${BUILD} ${TARGETS}
distclean: clean
rm -f ${TARBALL}
${TARBALL}:
wget ${URL}
${BUILD}/.build_done: ${TARBALL} GNUmakefile
ifeq "" "${SHA256SUM}"
@echo "Couldn't find sha256sum, not verifying distribution checksum"
else
${SHA256SUM} --check Checksums
endif
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
|