blob: 2d1b6d133537727e74a779933ea831f6b88328d8 [file] [log] [blame]
drhd6e78a22007-07-20 13:42:26 +00001#!/bin/sh
2#
3# This script is used to compile SQLite extensions into DLLs.
4#
5make fts2amal.c
6PATH=$PATH:/opt/mingw/bin
danielk197729bafea2008-06-26 10:41:19 +00007OPTS='-DTHREADSAFE=1 -DBUILD_sqlite=1 -DSQLITE_OS_WIN=1'
drhd6e78a22007-07-20 13:42:26 +00008CC="i386-mingw32msvc-gcc -O2 $OPTS -Itsrc"
9NM="i386-mingw32msvc-nm"
10CMD="$CC -c fts2amal.c"
11echo $CMD
12$CMD
13echo 'EXPORTS' >fts2.def
14echo 'sqlite3_extension_init' >>fts2.def
15i386-mingw32msvc-dllwrap \
16 --def fts2.def -v --export-all \
17 --driver-name i386-mingw32msvc-gcc \
18 --dlltool-name i386-mingw32msvc-dlltool \
19 --as i386-mingw32msvc-as \
20 --target i386-mingw32 \
21 -dllname fts2.dll -lmsvcrt fts2amal.o
22zip fts2dll.zip fts2.dll fts2.def