#
USE_CRT_DLL = 0
+# Set this non-0 to use the native libraries paths for cross-compiling
+# the command line tools needed during the compilation process.
+#
+USE_NATIVE_LIBPATHS = 0
+
# Set this non-0 to compile binaries suitable for the WinRT environment.
# This setting does not apply to any binaries that require Tcl to operate
# properly (i.e. the text fixture, etc).
DEBUG = 0
# Check for the predefined command macro CC. This should point to the compiler
-# binary for the target platform. If it does not exist, simply define it to
+# binary for the target platform. If it is not defined, simply define it to
# the legacy default value 'cl.exe'.
#
!IFNDEF CC
!ENDIF
# Check for the command macro LD. This should point to the linker binary for
-# the target platform. If it does not exist, simply define it to the legacy
+# the target platform. If it is not defined, simply define it to the legacy
# default value 'link.exe'.
#
!IFNDEF LD
!ENDIF
# 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 does not
-# exist, simply define it to have the same value as the CC macro. When
+# 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
# cross-compiling, it is suggested that this macro be modified via the command
# line (since nmake itself does not provide a built-in method to guess it).
# For example, to use the x86 compiler when cross-compiling for x64, a command
-# line similar to the following could be used:
+# line similar to the following could be used (all on one line):
#
-# nmake /f Makefile.msc "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
+# nmake /f Makefile.msc
+# "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
+# USE_NATIVE_LIBPATHS=1
#
!IFNDEF NCC
NCC = $(CC)
!ENDIF
-# C Compiler and options for use in building executables that
+# Check for the MSVC runtime library path macro. Othertise, this
+# value will default to the 'lib' directory underneath the MSVC
+# installation directory.
+#
+!IFNDEF NCRTLIBPATH
+NCRTLIBPATH = $(VCINSTALLDIR)\lib
+!ENDIF
+
+# Check for the Platform SDK library path macro. Othertise, this
+# value will default to the 'lib' directory underneath the Windows
+# SDK installation directory (the environment variable used appears
+# to be available when using Visual C++ 2008 or later via the
+# command line).
+#
+!IFNDEF NSDKLIBPATH
+NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
+!ENDIF
+
+# C compiler and options for use in building executables that
# will run on the platform that is doing the build.
#
BCC = $(NCC) -W3
-# C Compile and options for use in building executables that
+# Check if the native library paths should be used when compiling
+# the command line tools used during the compilation process. If
+# so, set the necessary macro now.
+#
+!IF $(USE_NATIVE_LIBPATHS)!=0
+NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
+!ENDIF
+
+# C compiler and options for use in building executables that
# will run on the target platform. (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
!ENDIF
#
-# Prevent warnings about "insecure" runtime library functions being used.
+# Prevent warnings about "insecure" MSVC runtime library functions
+# being used.
#
TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
BCC = $(BCC) -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
+
#
# Use native Win32 heap instead of malloc/free?
#
copy $(TOP)\src\lempar.c .
lemon.exe: $(TOP)\tool\lemon.c lempar.c
- $(BCC) -Fe$@ $(TOP)\tool\lemon.c
+ $(BCC) -Daccess=_access -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLIBPATHS)
# Rules to build individual *.lo files from generated *.c files. This
# applies to:
$(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
+ $(BCC) -Fe$@ $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLIBPATHS)
keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
.\mkkeywordhash.exe > keywordhash.h
-C Simplify\susage\sof\ssome\slinker\soptions\sin\sthe\sMSVC\smakefile.
-D 2012-06-30T19:24:09.458
+C Setup\sthe\snecessary\slibrary\spaths\sfor\scross-compilation\swith\sMSVC.
+D 2012-06-30T22:22:34.095
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 8f6d858bf3df9978ba43df19985146a1173025e4
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc 04ebadf5e94d566d4ef9f636416f68e17205120f
+F Makefile.msc 56ff0fcc3fc3b275aec7f6acb34b3c0526c684bc
F Makefile.vxworks 879f034a64062a364b21000266bbd5bc6e0c19b9
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
F VERSION a71848df48082f1d6585d4b0819d530fc455485d
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P 6c88229aa39775a7438befebe1640a30affc72c8
-R 0706037ca6af4d59d9bcb1545687aa13
+P 03016020664a7459cb01c8ac9016b20af8a416bb
+R 3838aec4be451692e3019372e4566300
U mistachkin
-Z 4412848c1478fd90700fa3f54861d772
+Z 6999152625f8f616344bc02a959eabf4