Skip to content
Browse files

Updates to build scripts. Added scripts for building FTS2 shared libr…

…aries. (CVS 4171)
  • Loading branch information...
1 parent 2cd692c commit 0d642848001f2d80730760b99aa2b83c25e633b0 Unknown committed Jul 20, 2007
Showing with 40 additions and 0 deletions.
  1. +5 −0 main.mk
  2. +13 −0 mkextu.sh
  3. +22 −0 mkextw.sh
View
5 main.mk
@@ -141,8 +141,10 @@ SRC += \
$(TOP)/ext/fts2/fts2.h \
$(TOP)/ext/fts2/fts2_hash.c \
$(TOP)/ext/fts2/fts2_hash.h \
+ $(TOP)/ext/fts2/fts2_icu.c \
$(TOP)/ext/fts2/fts2_porter.c \
$(TOP)/ext/fts2/fts2_tokenizer.h \
+ $(TOP)/ext/fts2/fts2_tokenizer.c \
$(TOP)/ext/fts2/fts2_tokenizer1.c
SRC += \
$(TOP)/ext/icu/icu.c
@@ -274,6 +276,9 @@ sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
tclsh $(TOP)/tool/mksqlite3internalh.tcl
+fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
+ tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
+
# Rules to build the LEMON compiler generator
#
lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
View
13 mkextu.sh
@@ -0,0 +1,13 @@
+#!/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.
+#
+CFLAGS=-O2 -Wall
+make fts2amal.c
+echo gcc $CFLAGS -shared fts2amal.c -o fts2.so
+gcc $CFLAGS -shared fts2amal.c -o fts2.so
+strip fts2.so
View
22 mkextw.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# This script is used to compile SQLite extensions into DLLs.
+#
+make fts2amal.c
+PATH=$PATH:/opt/mingw/bin
+OPTS='-DTHREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1'
+CC="i386-mingw32msvc-gcc -O2 $OPTS -Itsrc"
+NM="i386-mingw32msvc-nm"
+CMD="$CC -c fts2amal.c"
+echo $CMD
+$CMD
+echo 'EXPORTS' >fts2.def
+echo 'sqlite3_extension_init' >>fts2.def
+i386-mingw32msvc-dllwrap \
+ --def fts2.def -v --export-all \
+ --driver-name i386-mingw32msvc-gcc \
+ --dlltool-name i386-mingw32msvc-dlltool \
+ --as i386-mingw32msvc-as \
+ --target i386-mingw32 \
+ -dllname fts2.dll -lmsvcrt fts2amal.o
+zip fts2dll.zip fts2.dll fts2.def

0 comments on commit 0d64284

Please sign in to comment.
Something went wrong with that request. Please try again.