From 7bb481fda9ecb134804b49c2ce77ca28f7eea583 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 30 Mar 2012 20:42:12 -0400 Subject: Imported Upstream version 2.0.3 --- mkso.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 mkso.sh (limited to 'mkso.sh') diff --git a/mkso.sh b/mkso.sh new file mode 100644 index 0000000..6f2e8e2 --- /dev/null +++ b/mkso.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# +# This script is used to compile SQLite into a shared library on Linux. +# +# Two separate shared libraries are generated. "sqlite3.so" is the core +# library. "tclsqlite3.so" contains the TCL bindings and is the +# library that is loaded into TCL in order to run SQLite. +# +make target_source +cd tsrc +rm shell.c +TCLDIR=/home/drh/tcltk/846/linux/846linux +TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a +OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DHAVE_DLOPEN=1' +OPTS="$OPTS -DSQLITE_THREADSAFE=1" +OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1" +OPTS="$OPTS -DSQLITE_ENABLE_COLUMN_METADATA=1" +for i in *.c; do + if test $i != 'keywordhash.c'; then + CMD="cc -fPIC $OPTS -O2 -I. -I$TCLDIR -c $i" + echo $CMD + $CMD + fi +done +echo gcc -shared *.o $TCLSTUBLIB -o tclsqlite3.so +gcc -shared *.o $TCLSTUBLIB -o tclsqlite3.so +strip tclsqlite3.so +rm tclsqlite.c tclsqlite.o +echo gcc -shared *.o -o sqlite3.so +gcc -shared *.o -o sqlite3.so +strip sqlite3.so +cd .. -- cgit v1.2.3