3 # This script is used to compile SQLite into a shared library on Linux.
5 # Two separate shared libraries are generated. "sqlite3.so" is the core
6 # library. "tclsqlite3.so" contains the TCL bindings and is the
7 # library that is loaded into TCL in order to run SQLite.
12 TCLDIR=/home/drh/tcltk/846/linux/846linux
13 TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a
14 OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DHAVE_DLOPEN=1'
15 OPTS="$OPTS -DSQLITE_THREADSAFE=1"
16 OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1"
17 OPTS="$OPTS -DSQLITE_ENABLE_COLUMN_METADATA=1"
19 if test $i != 'keywordhash.c'; then
20 CMD="cc -fPIC $OPTS -O2 -I. -I$TCLDIR -c $i"
25 echo gcc -shared *.o $TCLSTUBLIB -o tclsqlite3.so
26 gcc -shared *.o $TCLSTUBLIB -o tclsqlite3.so
28 rm tclsqlite.c tclsqlite.o
29 echo gcc -shared *.o -o sqlite3.so
30 gcc -shared *.o -o sqlite3.so