Index: main.mk ================================================================== --- main.mk +++ main.mk @@ -139,12 +139,14 @@ SRC += \ $(TOP)/ext/fts2/fts2.c \ $(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 @@ -271,10 +273,13 @@ sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl tclsh $(TOP)/tool/mksqlite3c.tcl cp sqlite3.c tclsqlite3.c 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 $(BCC) -o lemon $(TOP)/tool/lemon.c ADDED mkextu.sh Index: mkextu.sh ================================================================== --- /dev/null +++ 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 ADDED mkextw.sh Index: mkextw.sh ================================================================== --- /dev/null +++ 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