aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC_OLD-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh b/libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh
new file mode 100644
index 0000000..e1e6d98
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/mkdll.sh
@@ -0,0 +1,45 @@
1#!/bin/sh
2#
3# This script is used to compile SQLite into a DLL.
4#
5# Two separate DLLs are generated. "sqlite3.dll" is the core
6# library. "tclsqlite3.dll" contains the TCL bindings and is the
7# library that is loaded into TCL in order to run SQLite.
8#
9make sqlite3.c
10PATH=$PATH:/opt/mingw/bin
11TCLDIR=/home/drh/tcltk/846/win/846win
12TCLSTUBLIB=$TCLDIR/libtcl84stub.a
13OPTS='-DUSE_TCL_STUBS=1 -DTHREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1'
14CC="i386-mingw32msvc-gcc -O2 $OPTS -Itsrc -I$TCLDIR"
15NM="i386-mingw32msvc-nm"
16CMD="$CC -c sqlite3.c"
17echo $CMD
18$CMD
19CMD="$CC -c tclsqlite3.c"
20echo $CMD
21$CMD
22echo 'EXPORTS' >tclsqlite3.def
23$NM tclsqlite3.o | grep ' T ' >temp1
24grep '_Init$' temp1 >temp2
25grep '_SafeInit$' temp1 >>temp2
26grep ' T _sqlite3_' temp1 >>temp2
27echo 'EXPORTS' >tclsqlite3.def
28sed 's/^.* T _//' temp2 | sort | uniq >>tclsqlite3.def
29i386-mingw32msvc-dllwrap \
30 --def tclsqlite3.def -v --export-all \
31 --driver-name i386-mingw32msvc-gcc \
32 --dlltool-name i386-mingw32msvc-dlltool \
33 --as i386-mingw32msvc-as \
34 --target i386-mingw32 \
35 -dllname tclsqlite3.dll -lmsvcrt tclsqlite3.o $TCLSTUBLIB
36$NM sqlite3.o | grep ' T ' >temp1
37echo 'EXPORTS' >sqlite3.def
38grep ' _sqlite3_' temp1 | sed 's/^.* _//' >>sqlite3.def
39i386-mingw32msvc-dllwrap \
40 --def sqlite3.def -v --export-all \
41 --driver-name i386-mingw32msvc-gcc \
42 --dlltool-name i386-mingw32msvc-dlltool \
43 --as i386-mingw32msvc-as \
44 --target i386-mingw32 \
45 -dllname sqlite3.dll -lmsvcrt sqlite3.o