]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
When cross-compiling with the MSVC makefile, make sure the correct library path is...
authormistachkin <mistachkin@noemail.net>
Fri, 9 May 2014 20:51:17 +0000 (20:51 +0000)
committermistachkin <mistachkin@noemail.net>
Fri, 9 May 2014 20:51:17 +0000 (20:51 +0000)
FossilOrigin-Name: c3dce2e7390eec3a337be1b99f80ad5f721cc647

Makefile.msc
manifest
manifest.uuid

index 2b970e3097bbbcbd8c27fe3a414c5d94913a16dc..a2d623e653df0f90149d73d95340d1b42ce7cb3c 100644 (file)
@@ -1,6 +1,9 @@
 #
 # nmake Makefile for SQLite
 #
+###############################################################################
+############################## START OF OPTIONS ###############################
+###############################################################################
 
 # The toplevel directory of the source tree.  This is the directory
 # that contains this "Makefile.msc".
@@ -116,6 +119,19 @@ DEBUG = 0
 OPTIMIZATIONS = 2
 !ENDIF
 
+# These are the "standard" SQLite compilation options used when compiling for
+# the Windows platform.
+#
+!IFNDEF OPT_FEATURE_FLAGS
+OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
+OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
+OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
+!ENDIF
+
+###############################################################################
+############################### END OF OPTIONS ################################
+###############################################################################
+
 # Check for the predefined command macro CC.  This should point to the compiler
 # binary for the target platform.  If it is not defined, simply define it to
 # the legacy default value 'cl.exe'.
@@ -140,6 +156,15 @@ LD = link.exe
 RC = rc.exe
 !ENDIF
 
+# Check for the MSVC runtime library path macro.  Othertise, this value will
+# default to the 'lib' directory underneath the MSVC installation directory.
+#
+!IFNDEF CRTLIBPATH
+CRTLIBPATH = $(VCINSTALLDIR)\lib
+!ENDIF
+
+CRTLIBPATH = $(CRTLIBPATH:\\=\)
+
 # Check for the command macro NCC.  This should point to the compiler binary
 # for the platform the compilation process is taking place on.  If it is not
 # defined, simply define it to have the same value as the CC macro.  When
@@ -168,8 +193,8 @@ NCC = $(NCC:\\=\)
 NCC = $(CC)
 !ENDIF
 
-# Check for the MSVC runtime library path macro.  Othertise, this
-# value will default to the 'lib' directory underneath the MSVC
+# Check for the MSVC native runtime library path macro.  Othertise,
+# this value will default to the 'lib' directory underneath the MSVC
 # installation directory.
 #
 !IFNDEF NCRTLIBPATH
@@ -306,7 +331,6 @@ TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE
 !ENDIF
 
-#
 # Prevent warnings about "insecure" MSVC runtime library functions
 # being used.
 #
@@ -314,28 +338,24 @@ TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
 
-#
 # Prevent warnings about "deprecated" POSIX functions being used.
 #
 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
 
-#
 # Use the SQLite debugging heap subsystem?
 #
 !IF $(MEMDEBUG)!=0
 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
 
-#
 # Use native Win32 heap subsystem instead of malloc/free?
 #
 !ELSEIF $(WIN32HEAP)!=0
 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
 
-#
 # Validate the heap on every call into the native Win32 heap subsystem?
 #
 !IF $(DEBUG)>2
@@ -430,25 +450,25 @@ RCC = $(RCC) -DSQLITE_TEMP_STORE=1
 # The same set of OMIT and ENABLE flags should be passed to the
 # LEMON parser generator and the mkkeywordhash tool as well.
 
-# BEGIN standard options
-OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
-OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
-OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
-# END standard options
-
-# BEGIN required Windows option
-OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
-# END required Windows option
+# These are the required SQLite compilation options used when compiling for
+# the Windows platform.
+#
+REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
 
-TCC = $(TCC) $(OPT_FEATURE_FLAGS)
-RCC = $(RCC) $(OPT_FEATURE_FLAGS)
+# Add the required and optional SQLite compilation options into the command
+# lines used to invoke the MSVC code and resource compilers.
+#
+TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
+RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
 
-# Add in any optional parameters specified on the make commane line
-# ie.  make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
+# Add in any optional parameters specified on the commane line, e.g.
+# nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
+#
 TCC = $(TCC) $(OPTS)
 RCC = $(RCC) $(OPTS)
 
 # If compiling for debugging, add some defines.
+#
 !IF $(DEBUG)>0
 TCC = $(TCC) -D_DEBUG
 BCC = $(BCC) -D_DEBUG
@@ -457,6 +477,7 @@ RCC = $(RCC) -D_DEBUG
 
 # If optimizations are enabled or disabled (either implicitly or
 # explicitly), add the necessary flags.
+#
 !IF $(DEBUG)>0 || $(OPTIMIZATIONS)==0
 TCC = $(TCC) -Od
 BCC = $(BCC) -Od
@@ -472,12 +493,14 @@ BCC = $(BCC) -O1
 !ENDIF
 
 # If symbols are enabled (or compiling for debugging), enable PDBs.
+#
 !IF $(DEBUG)>0 || $(SYMBOLS)!=0
 TCC = $(TCC) -Zi
 BCC = $(BCC) -Zi
 !ENDIF
 
 # If ICU support is enabled, add the compiler options for it.
+#
 !IF $(USE_ICU)!=0
 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
@@ -489,6 +512,7 @@ RCC = $(RCC) -I$(ICUINCDIR)
 
 # Command line prefixes for compiling code, compiling resources,
 # linking, etc.
+#
 LTCOMPILE = $(TCC) -Fo$@
 LTRCOMPILE = $(RCC) -r
 LTLIB = lib.exe
@@ -512,13 +536,13 @@ LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
 !IF "$(VISUALSTUDIOVERSION)"=="12.0"
 !IFNDEF STORELIBPATH
 !IF "$(PLATFORM)"=="x86"
-STORELIBPATH = $(NCRTLIBPATH)\store
+STORELIBPATH = $(CRTLIBPATH)\store
 !ELSEIF "$(PLATFORM)"=="x64"
-STORELIBPATH = $(NCRTLIBPATH)\store\amd64
+STORELIBPATH = $(CRTLIBPATH)\store\amd64
 !ELSEIF "$(PLATFORM)"=="ARM"
-STORELIBPATH = $(NCRTLIBPATH)\store\arm
+STORELIBPATH = $(CRTLIBPATH)\store\arm
 !ELSE
-STORELIBPATH = $(NCRTLIBPATH)\store
+STORELIBPATH = $(CRTLIBPATH)\store
 !ENDIF
 !ENDIF
 STORELIBPATH = $(STORELIBPATH:\\=\)
@@ -527,23 +551,27 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
 !ENDIF
 
 # If either debugging or symbols are enabled, enable PDBs.
+#
 !IF $(DEBUG)>0 || $(SYMBOLS)!=0
 LDFLAGS = /DEBUG
 !ENDIF
 
 # Start with the Tcl related linker options.
+#
 !IF $(NO_TCL)==0
 LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
 LTLIBS = $(LIBTCL)
 !ENDIF
 
 # 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.
+#
 !IFNDEF NAWK
 NAWK = gawk.exe
 !ENDIF
@@ -1222,7 +1250,7 @@ parse.h:  parse.c
 parse.c:       $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
        del /Q parse.y parse.h parse.h.temp
        copy $(TOP)\src\parse.y .
-       .\lemon.exe $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
+       .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
        move parse.h parse.h.temp
        $(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
 
@@ -1230,7 +1258,7 @@ sqlite3.h:        $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
        $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h
 
 mkkeywordhash.exe:     $(TOP)\tool\mkkeywordhash.c
-       $(BCC) -Fe$@ $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
+       $(BCC) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
 
 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
        .\mkkeywordhash.exe > keywordhash.h
index bec4a2d4fe13372f44a1f9f1f0108c791bdbc0e6..491f33f044adee9c1ef4e4c1c5c22bd3a56cfade 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Include\ssqlite3rtree.h\sin\sthe\stsrc/\spile\sof\ssource\sfiles\sduring\ntarget_source\sin\sthe\smain.mk\smakefile.
-D 2014-05-07T21:16:56.524
+C When\scross-compiling\swith\sthe\sMSVC\smakefile,\smake\ssure\sthe\scorrect\slibrary\spath\sis\sused.\s\sAlso,\skeep\strack\sof\sthe\srequired\scompilation\soptions\sseparately.
+D 2014-05-09T20:51:17.136
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc 7e6c495d9a145054a09f518781916c7503f7a8e9
+F Makefile.msc f4b4d99d61cfe4ec508600dccd1a0ab2dc8a8b9b
 F Makefile.vxworks 034289efa9d591b04b1a73598623119c306cbba0
 F README.md 64f270c43c38c46de749e419c22f0ae2f4499fe8
 F VERSION 9f823c026c6a32fc5f84d212a8aae0a221dba45c
@@ -1170,7 +1170,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix a94fb9b1b1ef06efc2898975cdfcfa9643731f5e
-P 68766f837491cb89c2103f2627eb9e23ab326a68
-R 1b75d6e5e9a19ccc14f8e59e21c749f6
-U drh
-Z 3528e73d8f87faaf66e6658213b6d573
+P 116bed5af664899a73b46dca528ac0c021fc50c3
+R 88c72e40fa185e1eb8f17237cccbb934
+U mistachkin
+Z b5868dcc5cdf0f5ef12e0a431c431ca8
index 150ca3781017ca77e9c4542a0189d2f516daf99d..a49c4f2f0201da2b688a3a71e7688839fb1c509c 100644 (file)
@@ -1 +1 @@
-116bed5af664899a73b46dca528ac0c021fc50c3
\ No newline at end of file
+c3dce2e7390eec3a337be1b99f80ad5f721cc647
\ No newline at end of file