From: shaneh Date: Mon, 20 Jun 2011 20:52:32 +0000 (+0000) Subject: Add ability to pass linker specific options to nmake makefile. X-Git-Tag: version-3.7.7~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a0b9ef0649076690d22aa441382a57e330d648f;p=thirdparty%2Fsqlite.git Add ability to pass linker specific options to nmake makefile. FossilOrigin-Name: b4f09c9393ce703062170220af20a23fdcf53494 --- diff --git a/Makefile.msc b/Makefile.msc index 68a66bcb45..1de682b854 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -26,7 +26,7 @@ BCC = cl.exe -O2 # will run on the target platform. (BCC and TCC are usually the # same unless your are cross-compiling.) # -TCC = cl.exe -W3 -O2 -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src +TCC = cl.exe -W3 -O2 -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src -fp:precise # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in # any extension header files by default. For non-amalgamation @@ -105,8 +105,16 @@ TCC = $(TCC) $(OPTS) # libtool compile/link LTCOMPILE = $(TCC) -Fo$@ -LTLINK = $(TCC) -Fe$@ LTLIB = lib.exe +LTLINK = $(TCC) -Fe$@ + +# If a platform was set, force the linker to target that. +# Note that the vcvars*.bat family of batch files typically +# set this for you. Otherwise, the linker will attempt +# to deduce the binary type based on the object files. +!IF "$(PLATFORM)"!="" +LTLINKOPTS = /MACHINE:$(PLATFORM) +!ENDIF # nawk compatible awk. NAWK = .\gawk.exe @@ -440,8 +448,8 @@ libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib sqlite3.h $(LTLINK) $(READLINE_FLAGS) \ - $(TOP)\src\shell.c libsqlite3.lib \ - $(LIBREADLINE) $(TLIBS) + $(TOP)\src\shell.c \ + /link $(LTLINKOPTS) libsqlite3.lib $(LIBREADLINE) $(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 @@ -706,7 +714,7 @@ tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LTLINK) tclsqlite-shell.lo \ - /link /LIBPATH:$(TCLLIBDIR) libsqlite3.lib $(LIBTCL) + /link $(LTLINKOPTS) /LIBPATH:$(TCLLIBDIR) libsqlite3.lib $(LIBTCL) # Rules to build opcodes.c and opcodes.h # @@ -816,7 +824,8 @@ TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1) testfixture.exe: $(TESTFIXTURE_SRC) $(HDR) $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \ -DBUILD_sqlite -I$(TCLINCDIR) \ - $(TESTFIXTURE_SRC) /link /LIBPATH:$(TCLLIBDIR) $(LIBTCL) $(TLIBS) + $(TESTFIXTURE_SRC) \ + /link $(LTLINKOPTS) /LIBPATH:$(TCLLIBDIR) $(LIBTCL) $(TLIBS) fulltest: testfixture.exe sqlite3.exe .\testfixture.exe $(TOP)\test\all.test @@ -835,7 +844,8 @@ sqlite3_analyzer.exe: $(TESTFIXTURE_SRC) spaceanal_tcl.h $(LTLINK) -DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \ -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE \ -DBUILD_sqlite -I$(TCLINCDIR) \ - $(TESTFIXTURE_SRC) /link /LIBPATH:$(TCLLIBDIR) $(LIBTCL) $(TLIBS) + $(TESTFIXTURE_SRC) \ + /link $(LTLINKOPTS) /LIBPATH:$(TCLLIBDIR) $(LIBTCL) $(TLIBS) clean: del /Q *.lo *.lib *.obj sqlite3.exe libsqlite3.lib diff --git a/manifest b/manifest index 263e473734..3e1e8e33fc 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Fix\sa\scouple\sof\scompiler\sissues\son\sWindows\sdue\sto\swarning\sclean\sup. -D 2011-06-20T20:50:49.490 +C Add\sability\sto\spass\slinker\sspecific\soptions\sto\snmake\smakefile. +D 2011-06-20T20:52:32.797 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc ce73810c83d4bd202deb59d547a5df4a5cfef7c9 +F Makefile.msc c942f2ceb9385d6c75b01ee3d38d8a189fb76e8c F Makefile.vxworks c85ec1d8597fe2f7bc225af12ac1666e21379151 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6 F VERSION 3fcdd7fbe3eb282df3978fe77288544543767961 @@ -946,7 +946,7 @@ F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings.sh 347d974d143cf132f953b565fbc03026f19fcb4d -P 3ee5d1a51d6347858734b7b595771ae9cd2cc89d -R 38b91ba83a0690d05159e3865af95b9c +P 81e6f151d384fa1f1474175b39ad6dfa64f8da0d +R 388ef8da117dd58630bcba36b4ab36b5 U shaneh -Z 2b8dce98f298f90cca367918eb5b7523 +Z 93f23f7fb76ab7ba5824bd093c1cad99 diff --git a/manifest.uuid b/manifest.uuid index 09c8cdcb30..5414dd039f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -81e6f151d384fa1f1474175b39ad6dfa64f8da0d \ No newline at end of file +b4f09c9393ce703062170220af20a23fdcf53494 \ No newline at end of file