diff options
Diffstat (limited to 'lang/sql/odbc/mf-sqlite.mingw-cross')
| -rw-r--r-- | lang/sql/odbc/mf-sqlite.mingw-cross | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/lang/sql/odbc/mf-sqlite.mingw-cross b/lang/sql/odbc/mf-sqlite.mingw-cross new file mode 100644 index 00000000..f35f298a --- /dev/null +++ b/lang/sql/odbc/mf-sqlite.mingw-cross @@ -0,0 +1,146 @@ +#!/usr/make +# +# Makefile for SQLITE, use in conjunction with mingw-cross-build.sh +# since some patches are needed (libshell.c etc.) + +#### The toplevel directory of the source tree. This is the directory +# that contains this "Makefile.in" and the "configure.in" script. +# +TOP = ../sqlite + +#### C Compiler and options for use in building executables that +# will run on the platform that is doing the build. +# +BCC = gcc -g -O2 +#BCC = /opt/ancic/bin/c89 -0 + +#### If the target operating system supports the "usleep()" system +# call, then define the HAVE_USLEEP macro for all C modules. +# +USLEEP = +#USLEEP = -DHAVE_USLEEP=1 + +#### If you want the SQLite library to be safe for use within a +# multi-threaded program, then define the following macro +# appropriately: +# +THREADSAFE = -DTHREADSAFE=1 +#THREADSAFE = -DTHREADSAFE=0 + +#### Specify any extra linker options needed to make the library +# thread safe +# +#THREADLIB = -lpthread +THREADLIB = + +#### Leave MEMORY_DEBUG undefined for maximum speed. Use MEMORY_DEBUG=1 +# to check for memory leaks. Use MEMORY_DEBUG=2 to print a log of all +# malloc()s and free()s in order to track down memory leaks. +# +# SQLite uses some expensive assert() statements in the inner loop. +# You can make the library go almost twice as fast if you compile +# with -DNDEBUG=1 +# +#OPTS = -DMEMORY_DEBUG=2 +#OPTS = -DMEMORY_DEBUG=1 +#OPTS = +OPTS = -DNDEBUG=1 -DSQLITE_SOUNDEX=1 + +#### The suffix to add to executable files. ".exe" for windows. +# Nothing for unix. +# +EXE = .exe +#EXE = + +#### C Compile and options for use in building executables that +# will run on the target platform. This is usually the same +# as BCC, unless you are cross-compiling. +# +#TCC = gcc -O6 +#TCC = gcc -g -O0 -Wall +#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage +TCC = /opt/mingw64/bin/x86_64-w64-mingw32-gcc -m32 -march=i386 -mtune=i386 \ + -O2 -DNO_TCL -DNO_OLDNAMES -D_off_t="long long" -D_OFF_T_=1 +#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive + +#### Tools used to build a static library. +# +#AR = ar cr +AR = /opt/mingw64/bin/x86_64-w64-mingw32-ar cr +#RANLIB = ranlib +RANLIB = /opt/mingw64/bin/x86_64-w64-mingw32-ranlib + +#### Extra compiler options needed for programs that use the TCL library. +# +TCL_FLAGS = +#TCL_FLAGS = -DSTATIC_BUILD=1 +#TCL_FLAGS = -I/home/drh/tcltk/8.4linux +#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 +#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux + +#### Linker options needed to link against the TCL library. +# +LIBTCL = +#LIBTCL = -ltcl -lm -ldl +#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl +#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt +#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc + +#### Compiler options needed for programs that use the readline() library. +# +READLINE_FLAGS = +#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline + +#### Linker options needed by programs using readline() must link against. +# +LIBREADLINE = +#LIBREADLINE = -static -lreadline -ltermcap + +#### Should the database engine assume text is coded as UTF-8 or iso8859? +# +# ENCODING = UTF8 +ENCODING = ISO8859 + +#### Special libshell target +LIBOBJ += libshell.o + +libshell.o: $(TOP)/src/libshell.c sqlite.h + $(TCCX) -c $(TOP)/src/libshell.c + +# You should not have to change anything below this line +############################################################################### +include $(TOP)/main.mk + +ifeq ($(MSVCRT),70) + TCCX += -D__MSVCRT_VERSION=0x0700 + LMSVCRT = -nodefaultlibs -lmingw32 -lgcc_eh -lmoldname -lmingwex -lgcc -lmsvcr70 +endif +ifeq ($(MSVCRT),80) + TCCX += -D__MSVCRT_VERSION=0x0800 + LMSVCRT = -nodefaultlibs -lmingw32 -lgcc_eh -lmoldname -lmingwex -lgcc -lmsvcr80 +endif +ifeq ($(MSVCRT),90) + TCCX += -D__MSVCRT_VERSION=0x0900 + LMSVCRT = -nodefaultlibs -lmingw32 -lgcc_eh -lmoldname -lmingwex -lgcc -lmsvcr90 -lmsvcrt +endif +ifeq ($(MSVCRT),100) + TCCX += -D__MSVCRT_VERSION=0x0A00 + LMSVCRT = -nodefaultlibs -lmingw32 -lgcc_eh -lmoldname -lmingwex -lgcc -lmsvcr100 -lmsvcrt +endif +ifeq ($(LMSVCRT),) + LMSVCRT = -lmsvcrt +endif + +sqlite.dll: $(LIBOBJ) + rm -f libsqlite.a + $(TCC) $(CFLAGS) -shared -Wl,--kill-at \ + -Wl,--out-implib,libsqlite.a -Wl,--strip-all \ + -o sqlite.dll $(LIBOBJ) $(LMSVCRT) \ + -lcomdlg32 -lkernel32 -luser32 + +sqliteu.dll: $(LIBOBJ) + rm -f libsqlite.a + $(TCC) $(CFLAGS) -shared -Wl,--kill-at \ + -Wl,--out-implib,libsqlite.a -Wl,--strip-all \ + -o sqliteu.dll $(LIBOBJ) $(LMSVCRT) \ + -lcomdlg32 -lkernel32 -luser32 |
