2004-08-28 20:19:00 +04:00
|
|
|
#!/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
|
2006-10-08 22:56:57 +04:00
|
|
|
OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DHAVE_DLOPEN=1'
|
2004-08-28 20:19:00 +04:00
|
|
|
for i in *.c; do
|
2005-01-08 21:42:28 +03:00
|
|
|
if test $i != 'keywordhash.c'; then
|
|
|
|
CMD="cc -fPIC $OPTS -O2 -I. -I$TCLDIR -c $i"
|
|
|
|
echo $CMD
|
|
|
|
$CMD
|
|
|
|
fi
|
2004-08-28 20:19:00 +04:00
|
|
|
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 ..
|