diff options
Diffstat (limited to 'ext/pdo_sqlite/sqlite/mkdll.sh')
| -rw-r--r-- | ext/pdo_sqlite/sqlite/mkdll.sh | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/ext/pdo_sqlite/sqlite/mkdll.sh b/ext/pdo_sqlite/sqlite/mkdll.sh index 50dd60b711..ed1e741ca6 100644 --- a/ext/pdo_sqlite/sqlite/mkdll.sh +++ b/ext/pdo_sqlite/sqlite/mkdll.sh @@ -6,39 +6,41 @@ # library. "tclsqlite3.dll" contains the TCL bindings and is the # library that is loaded into TCL in order to run SQLite. # -make target_source -cd tsrc +make sqlite3.c PATH=$PATH:/opt/mingw/bin TCLDIR=/home/drh/tcltk/846/win/846win TCLSTUBLIB=$TCLDIR/libtcl84stub.a -OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DTHREADSAFE=1 -DBUILD_sqlite=1' -CC="i386-mingw32msvc-gcc -O2 $OPTS -I. -I$TCLDIR" -rm shell.c -for i in *.c; do - CMD="$CC -c $i" - echo $CMD - $CMD -done +OPTS='-DUSE_TCL_STUBS=1 -DSQLITE_THREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1' +OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1" +CC="i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR" +NM="i386-mingw32msvc-nm" +CMD="$CC -c sqlite3.c" +echo $CMD +$CMD +CMD="$CC -c tclsqlite3.c" +echo $CMD +$CMD echo 'EXPORTS' >tclsqlite3.def -echo 'Tclsqlite3_Init' >>tclsqlite3.def -echo 'Tclsqlite_Init' >>tclsqlite3.def -echo 'Sqlite3_Init' >>tclsqlite3.def -echo 'Sqlite_Init' >>tclsqlite3.def +$NM tclsqlite3.o | grep ' T ' >temp1 +grep '_Init$' temp1 >temp2 +grep '_SafeInit$' temp1 >>temp2 +grep ' T _sqlite3_' temp1 >>temp2 +echo 'EXPORTS' >tclsqlite3.def +sed 's/^.* T _//' temp2 | sort | uniq >>tclsqlite3.def i386-mingw32msvc-dllwrap \ --def tclsqlite3.def -v --export-all \ --driver-name i386-mingw32msvc-gcc \ --dlltool-name i386-mingw32msvc-dlltool \ --as i386-mingw32msvc-as \ --target i386-mingw32 \ - -dllname tclsqlite3.dll -lmsvcrt *.o $TCLSTUBLIB -#i386-mingw32msvc-strip tclsqlite3.dll -rm tclsqlite.o + -dllname tclsqlite3.dll -lmsvcrt tclsqlite3.o $TCLSTUBLIB +$NM sqlite3.o | grep ' T ' >temp1 +echo 'EXPORTS' >sqlite3.def +grep ' _sqlite3_' temp1 | sed 's/^.* _//' >>sqlite3.def i386-mingw32msvc-dllwrap \ --def sqlite3.def -v --export-all \ --driver-name i386-mingw32msvc-gcc \ --dlltool-name i386-mingw32msvc-dlltool \ --as i386-mingw32msvc-as \ --target i386-mingw32 \ - -dllname sqlite3.dll -lmsvcrt *.o -#i386-mingw32msvc-strip sqlite3.dll -cd .. + -dllname sqlite3.dll -lmsvcrt sqlite3.o |
