]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update MSVC makefile to allow targets to be built with support for ICU.
authormistachkin <mistachkin@noemail.net>
Sun, 2 Oct 2011 05:23:16 +0000 (05:23 +0000)
committermistachkin <mistachkin@noemail.net>
Sun, 2 Oct 2011 05:23:16 +0000 (05:23 +0000)
FossilOrigin-Name: eb5da5e1dbe9c198095036827318fb381441cbd0

Makefile.msc
manifest
manifest.uuid

index 1521ceb5aed6deb3d6029023d62a7a4ffbaf3f13..f40936d91569b28a9e3c81a18b74c3252682a00f 100644 (file)
@@ -11,6 +11,10 @@ TOP = .
 #
 USE_AMALGAMATION = 1
 
+# Set this non-0 to use the International Components for Unicode (ICU).
+#
+USE_ICU = 0
+
 # Set this to non-0 to create and use PDBs.
 #
 SYMBOLS = 1
@@ -31,8 +35,8 @@ DEBUG = 0
 # Version numbers and release number for the SQLite being compiled.
 #
 VERSION = 3.7
-VERSION_NUMBER = 3007008
-RELEASE = 3.7.8
+VERSION_NUMBER = 3007009
+RELEASE = 3.7.9
 
 # C Compiler and options for use in building executables that
 # will run on the platform that is doing the build.
@@ -109,6 +113,23 @@ TCLLIBDIR = c:\tcl\lib
 LIBTCL = tcl85.lib
 !endif
 
+# The locations of the ICU header and library files.  These variables
+# (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
+# prior to running nmake in order to match the actual installed location on
+# this machine.
+#
+!if "$(ICUINCDIR)" == ""
+ICUINCDIR = c:\icu\include
+!endif
+
+!if "$(ICULIBDIR)" == ""
+ICULIBDIR = c:\icu\lib
+!endif
+
+!if "$(LIBICU)" == ""
+LIBICU = icuuc.lib icuin.lib
+!endif
+
 # This is the command to use for tclsh - normally just "tclsh", but we may
 # know the specific version we want to use.  This variable (TCLSH_CMD) may be
 # overridden via the environment prior to running nmake in order to select a
@@ -136,7 +157,9 @@ TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
 
 # Any target libraries which libsqlite must be linked against
 #
+!if "$(TLIBS)" == ""
 TLIBS =
+!endif
 
 # Flags controlling use of the in memory btree implementation
 #
@@ -179,6 +202,13 @@ TCC = $(TCC) -O2
 TCC = $(TCC) -Zi
 !ENDIF
 
+# If ICU support is enabled, add the compiler options for it.
+!IF $(USE_ICU)!=0
+TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
+TCC = $(TCC) -I$(TOP)\ext\icu
+TCC = $(TCC) -I$(ICUINCDIR)
+!ENDIF
+
 # libtool compile/link
 LTCOMPILE = $(TCC) -Fo$@
 LTLIB = lib.exe
@@ -198,6 +228,16 @@ LTLIBOPTS = /MACHINE:$(PLATFORM)
 LTLINKOPTS = $(LTLINKOPTS) /DEBUG
 !ENDIF
 
+# Start with the Tcl related linker options.
+LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
+LTLIBS = $(LIBTCL)
+
+# If ICU support is enabled, add the linker options for it.
+!IF $(USE_ICU)!=0
+LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
+LTLIBS = $(LTLIBS) $(LIBICU)
+!ENDIF
+
 # nawk compatible awk.
 NAWK = gawk.exe
 
@@ -528,12 +568,12 @@ libsqlite3.lib:   $(LIBOBJ)
        $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
 
 libtclsqlite3.lib:     tclsqlite.lo libsqlite3.lib
-       $(LTLIB) $(LTLIBOPTS) /LIBPATH:$(TCLLIBDIR) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
+       $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
 
 sqlite3.exe:   $(TOP)\src\shell.c libsqlite3.lib sqlite3.h
        $(LTLINK) $(READLINE_FLAGS) \
                $(TOP)\src\shell.c \
-               /link $(LTLINKOPTS) libsqlite3.lib $(LIBREADLINE) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBREADLINE) $(LTLIBS) $(TLIBS)
 
 # This target creates a directory named "tsrc" and fills it with
 # copies of all of the C source code and header files needed to
@@ -804,7 +844,7 @@ tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
 
 tclsqlite3.exe:        tclsqlite-shell.lo libsqlite3.lib
        $(LTLINK) tclsqlite-shell.lo \
-               /link $(LTLINKOPTS) /LIBPATH:$(TCLLIBDIR) libsqlite3.lib $(LIBTCL)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LTLIBS) $(TLIBS)
 
 # Rules to build opcodes.c and opcodes.h
 #
@@ -915,7 +955,7 @@ testfixture.exe:    $(TESTFIXTURE_SRC) $(HDR)
        $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
                -DBUILD_sqlite -I$(TCLINCDIR) \
                $(TESTFIXTURE_SRC) \
-               /link $(LTLINKOPTS) /LIBPATH:$(TCLLIBDIR) $(LIBTCL) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) $(LTLIBS) $(TLIBS)
 
 fulltest:      testfixture.exe sqlite3.exe
        .\testfixture.exe $(TOP)\test\all.test
@@ -935,7 +975,7 @@ sqlite3_analyzer.c: sqlite3.c $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TO
 
 sqlite3_analyzer.exe:  sqlite3_analyzer.c
        $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
-               /link $(LTLINKOPTS) /LIBPATH:$(TCLLIBDIR) $(LIBTCL) $(TLIBS)
+               /link $(LTLINKOPTS) $(LTLIBPATHS) $(LTLIBS) $(TLIBS)
 
 clean:
        del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
@@ -962,4 +1002,4 @@ sqlite3.def: libsqlite3.lib
                | sort >> sqlite3.def
 
 sqlite3.dll: $(LIBOBJ) sqlite3.def
-       link $(LTLINKOPTS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ)
+       link $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LTLIBS) $(TLIBS)
index 1d18abb52264c3f3dd2f8c007a3aab77494d8558..916f02c3419e98788b0044eb4cd68a4f0573f31c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Disable\sthe\sxfer\soptimization\sif\s"PRAGMA\scount_changes=1"\sis\sconfigured.\sTicket\s[c48d99d690].
-D 2011-09-30T12:01:01.579
+C Update\sMSVC\smakefile\sto\sallow\stargets\sto\sbe\sbuilt\swith\ssupport\sfor\sICU.
+D 2011-10-02T05:23:16.470
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in a162fe39e249b8ed4a65ee947c30152786cfe897
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc 6676bcfe711f621a0b1916ecfa5d0927f8084517
+F Makefile.msc dcad80fa69f17d46fe6778ba873fc108ca16298d
 F Makefile.vxworks 1deb39c8bb047296c30161ffa10c1b5423e632f9
 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
 F VERSION bb37c274b503bbe73f00ea4f374eb817cba4b171
@@ -965,7 +965,7 @@ F tool/symbols.sh caaf6ccc7300fd43353318b44524853e222557d5
 F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings.sh b7fdb2cc525f5ef4fa43c80e771636dd3690f9d2
-P f4dd32d30ed54f847319664cf749fd0b92b4af3f
-R 712f892aa9e5f34289b214c1af3c2cef
-U dan
-Z 65613378c768fb62c70f2ad14b487bbd
+P 9ddfe1e41300413bc9af7e5ce0ec9d1daf9136b1
+R 03863d4dd01ba5995289085115b33375
+U mistachkin
+Z 7dfdbd4e337132033acb3bc17ce78d60
index 604108eedb89844be0c137b1f7611fa45626ba83..c4bc7f0c61dd2afa9832e3fd615c3a2b41861cfe 100644 (file)
@@ -1 +1 @@
-9ddfe1e41300413bc9af7e5ce0ec9d1daf9136b1
\ No newline at end of file
+eb5da5e1dbe9c198095036827318fb381441cbd0
\ No newline at end of file