1#!/bin/sh 2# 3# This script is used to compile SQLite into a shared library on Linux. 4# 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. 8# 9make target_source 10cd tsrc 11rm shell.c 12TCLDIR=/home/drh/tcltk/846/linux/846linux 13TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a 14OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1' 15for i in *.c; do 16 if test $i != 'keywordhash.c'; then 17 CMD="cc -fPIC $OPTS -O2 -I. -I$TCLDIR -c $i" 18 echo $CMD 19 $CMD 20 fi 21done 22echo gcc -shared *.o $TCLSTUBLIB -o tclsqlite3.so 23gcc -shared *.o $TCLSTUBLIB -o tclsqlite3.so 24strip tclsqlite3.so 25rm tclsqlite.c tclsqlite.o 26echo gcc -shared *.o -o sqlite3.so 27gcc -shared *.o -o sqlite3.so 28strip sqlite3.so 29cd .. 30