2 # nmake Makefile for SQLite
4 ###############################################################################
5 ############################## START OF OPTIONS ###############################
6 ###############################################################################
8 # The toplevel directory of the source tree. This is the directory
9 # that contains this "Makefile.msc".
14 # Set this non-0 to create and use the SQLite amalgamation file.
16 !IFNDEF USE_AMALGAMATION
21 # Set this non-0 to enable full warnings (-W4, etc) when compiling.
27 # Set this non-0 to enable treating warnings as errors (-WX, etc) when
30 !IFNDEF USE_FATAL_WARN
34 # Set this non-0 to enable full runtime error checks (-RTC1, etc). This
35 # has no effect if (any) optimizations are enabled.
37 !IFNDEF USE_RUNTIME_CHECKS
38 USE_RUNTIME_CHECKS = 0
41 # Set this non-0 to create a SQLite amalgamation file that excludes the
42 # various built-in extensions.
44 !IFNDEF MINIMAL_AMALGAMATION
45 MINIMAL_AMALGAMATION = 0
48 # Set this non-0 to use "stdcall" calling convention for the core library
49 # and shell executable.
55 # Set this non-0 to have the shell executable link against the core dynamic
62 # Set this non-0 to enable extra code that attempts to detect misuse of the
69 # If necessary, create a list of harmless compiler warnings to disable when
70 # compiling the various tools. For the SQLite source code itself, warnings,
71 # if any, will be disabled from within it.
74 !IF $(USE_FULLWARN)!=0
75 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
76 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
80 # Set this non-0 to use the library paths and other options necessary for
87 # Set this non-0 to split the SQLite amalgamation file into chunks to
88 # be used for debugging with Visual Studio.
90 !IFNDEF SPLIT_AMALGAMATION
91 SPLIT_AMALGAMATION = 0
95 # Set this non-0 to have this makefile assume the Tcl shell executable
96 # (tclsh*.exe) is available in the PATH. By default, this is disabled
97 # for compatibility with older build environments. This setting only
98 # applies if TCLSH_CMD is not set manually.
100 !IFNDEF USE_TCLSH_IN_PATH
101 USE_TCLSH_IN_PATH = 0
104 # Set this non-0 to use zlib, possibly compiling it from source code.
110 # Set this non-0 to build zlib from source code. This is enabled by
111 # default and in that case it will be assumed that the ZLIBDIR macro
112 # points to the top-level source code directory for zlib.
118 # Set this non-0 to use the International Components for Unicode (ICU).
125 # Set this non-0 to dynamically link to the MSVC runtime library.
131 # Set this non-0 to link to the RPCRT4 library.
133 !IFNDEF USE_RPCRT4_LIB
137 # Set this non-0 to generate assembly code listings for the source code
144 # Set this non-0 to attempt setting the native compiler automatically
145 # for cross-compiling the command line tools needed during the compilation
152 # Set this non-0 to use the native libraries paths for cross-compiling
153 # the command line tools needed during the compilation process.
155 !IFNDEF USE_NATIVE_LIBPATHS
156 USE_NATIVE_LIBPATHS = 0
159 # Set this 0 to skip the compiling and embedding of version resources.
165 # Set this non-0 to compile binaries suitable for the WinRT environment.
166 # This setting does not apply to any binaries that require Tcl to operate
167 # properly (i.e. the text fixture, etc).
173 # Set this non-0 to compile binaries suitable for the UWP environment.
174 # This setting does not apply to any binaries that require Tcl to operate
175 # properly (i.e. the text fixture, etc).
181 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
188 # Set this non-0 to skip attempting to look for and/or link with the Tcl
196 # Set this to non-0 to create and use PDBs.
202 # Set this to non-0 to use the SQLite debugging heap subsystem.
208 # Set this to non-0 to use the Win32 native heap subsystem.
214 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
221 # Set this to one of the following values to enable various debugging
222 # features. Each level includes the debugging options from the previous
223 # levels. Currently, the recognized values for DEBUG are:
225 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
226 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
227 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
228 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
229 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
230 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
231 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
237 # Enable use of available compiler optimizations? Normally, this should be
238 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
239 # can be useful for testing.
241 !IFNDEF OPTIMIZATIONS
245 # Set this to non-0 to enable support for the session extension.
251 # Set the source code file to be used by executables and libraries when
252 # they need the amalgamation.
255 !IF $(SPLIT_AMALGAMATION)!=0
256 SQLITE3C = sqlite3-all.c
262 # Set the include code file to be used by executables and libraries when
269 # This is the name to use for the SQLite dynamic link library (DLL).
273 SQLITE3DLL = winsqlite3.dll
275 SQLITE3DLL = sqlite3.dll
279 # This is the name to use for the SQLite import library (LIB).
283 SQLITE3LIB = winsqlite3.lib
285 SQLITE3LIB = sqlite3.lib
289 # This is the name to use for the SQLite shell executable (EXE).
293 SQLITE3EXE = winsqlite3shell.exe
295 SQLITE3EXE = sqlite3.exe
299 # This is the argument used to set the program database (PDB) file for the
300 # SQLite shell executable (EXE).
302 !IFNDEF SQLITE3EXEPDB
306 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
311 # These are the names of the customized Tcl header files used by various parts
312 # of this makefile when the stdcall calling convention is in use. It is not
313 # used for any other purpose.
316 SQLITETCLH = sqlite_tcl.h
319 !IFNDEF SQLITETCLDECLSH
320 SQLITETCLDECLSH = sqlite_tclDecls.h
323 # These are the additional targets that the targets that integrate with the
324 # Tcl library should depend on when compiling, etc.
326 !IFNDEF SQLITE_TCL_DEP
327 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
328 SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
335 # These are the "standard" SQLite compilation options used when compiling for
336 # the Windows platform.
338 !IFNDEF OPT_FEATURE_FLAGS
339 !IF $(MINIMAL_AMALGAMATION)==0
340 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
341 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
343 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
346 # Should the session extension be enabled? If so, add compilation options
350 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
351 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
354 # These are the "extended" SQLite compilation options used when compiling for
355 # the Windows 10 platform.
357 !IFNDEF EXT_FEATURE_FLAGS
359 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
360 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
361 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
367 ###############################################################################
368 ############################### END OF OPTIONS ################################
369 ###############################################################################
371 # When compiling for the Windows 10 platform, the PLATFORM macro must be set
372 # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
376 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
380 # This assumes that MSVC is always installed in 32-bit Program Files directory
381 # and sets the variable for use in locating other 32-bit installs accordingly.
383 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
384 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
386 # Check for the predefined command macro CC. This should point to the compiler
387 # binary for the target platform. If it is not defined, simply define it to
388 # the legacy default value 'cl.exe'.
394 # Check for the predefined command macro CSC. This should point to a working
395 # C Sharp compiler binary. If it is not defined, simply define it to the
396 # legacy default value 'csc.exe'.
402 # Check for the command macro LD. This should point to the linker binary for
403 # the target platform. If it is not defined, simply define it to the legacy
404 # default value 'link.exe'.
410 # Check for the predefined command macro RC. This should point to the resource
411 # compiler binary for the target platform. If it is not defined, simply define
412 # it to the legacy default value 'rc.exe'.
418 # Check for the MSVC runtime library path macro. Otherwise, this value will
419 # default to the 'lib' directory underneath the MSVC installation directory.
422 CRTLIBPATH = $(VCINSTALLDIR)\lib
425 CRTLIBPATH = $(CRTLIBPATH:\\=\)
427 # Check for the command macro NCC. This should point to the compiler binary
428 # for the platform the compilation process is taking place on. If it is not
429 # defined, simply define it to have the same value as the CC macro. When
430 # cross-compiling, it is suggested that this macro be modified via the command
431 # line (since nmake itself does not provide a built-in method to guess it).
432 # For example, to use the x86 compiler when cross-compiling for x64, a command
433 # line similar to the following could be used (all on one line):
435 # nmake /f Makefile.msc sqlite3.dll
436 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
438 # Alternatively, the full path and file name to the compiler binary for the
439 # platform the compilation process is taking place may be specified (all on
442 # nmake /f Makefile.msc sqlite3.dll
443 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
444 # USE_NATIVE_LIBPATHS=1
448 !ELSEIF $(XCOMPILE)!=0
449 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
455 # Check for the MSVC native runtime library path macro. Otherwise,
456 # this value will default to the 'lib' directory underneath the MSVC
457 # installation directory.
460 NCRTLIBPATH = $(VCINSTALLDIR)\lib
463 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
465 # Check for the Platform SDK library path macro. Otherwise, this
466 # value will default to the 'lib' directory underneath the Windows
467 # SDK installation directory (the environment variable used appears
468 # to be available when using Visual C++ 2008 or later via the
472 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
475 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
477 # Check for the UCRT library path macro. Otherwise, this value will
478 # default to the version-specific, platform-specific 'lib' directory
479 # underneath the Windows SDK installation directory.
482 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
485 UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
487 # C compiler and options for use in building executables that
488 # will run on the platform that is doing the build.
490 !IF $(USE_FULLWARN)!=0
491 BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
493 BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
496 # Check if assembly code listings should be generated for the source
497 # code files to be compiled.
499 !IF $(USE_LISTINGS)!=0
503 # Check if the native library paths should be used when compiling
504 # the command line tools used during the compilation process. If
505 # so, set the necessary macro now.
507 !IF $(USE_NATIVE_LIBPATHS)!=0
508 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
511 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
512 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
516 # C compiler and options for use in building executables that
517 # will run on the target platform. (BCC and TCC are usually the
518 # same unless your are cross-compiling.)
520 !IF $(USE_FULLWARN)!=0
521 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
523 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
526 # Check if warnings should be treated as errors when compiling.
528 !IF $(USE_FATAL_WARN)!=0
532 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
533 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
535 # Check if we want to use the "stdcall" calling convention when compiling.
536 # This is not supported by the compilers for non-x86 platforms. It should
537 # also be noted here that building any target with these "stdcall" options
538 # will most likely fail if the Tcl library is also required. This is due
539 # to how the Tcl library functions are declared and exported (i.e. without
540 # an explicit calling convention, which results in "cdecl").
542 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
543 !IF "$(PLATFORM)"=="x86"
544 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
545 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
547 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
551 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
552 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
554 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
572 # These are additional compiler options used for the core library.
574 !IFNDEF CORE_COMPILE_OPTS
575 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
576 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
578 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
582 # These are the additional targets that the core library should depend on
585 !IFNDEF CORE_LINK_DEP
586 !IF $(DYNAMIC_SHELL)!=0
588 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
589 CORE_LINK_DEP = sqlite3.def
595 # These are additional linker options used for the core library.
597 !IFNDEF CORE_LINK_OPTS
598 !IF $(DYNAMIC_SHELL)!=0
600 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
601 CORE_LINK_OPTS = /DEF:sqlite3.def
607 # These are additional compiler options used for the shell executable.
609 !IFNDEF SHELL_COMPILE_OPTS
610 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
611 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
613 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
617 # This is the source code that the shell executable should be compiled
620 !IFNDEF SHELL_CORE_SRC
621 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
624 SHELL_CORE_SRC = $(SQLITE3C)
628 # This is the core library that the shell executable should depend on.
630 !IFNDEF SHELL_CORE_DEP
631 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
632 SHELL_CORE_DEP = $(SQLITE3DLL)
639 # If zlib support is enabled, add the dependencies for it.
641 !IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
642 SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
643 TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
647 # This is the core library that the shell executable should link with.
649 !IFNDEF SHELL_CORE_LIB
650 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
651 SHELL_CORE_LIB = $(SQLITE3LIB)
657 # These are additional linker options used for the shell executable.
659 !IFNDEF SHELL_LINK_OPTS
660 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
663 # Check if assembly code listings should be generated for the source
664 # code files to be compiled.
666 !IF $(USE_LISTINGS)!=0
670 # When compiling the library for use in the WinRT environment,
671 # the following compile-time options must be used as well to
672 # disable use of Win32 APIs that are not available and to enable
673 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
676 TCC = $(TCC) -DSQLITE_OS_WINRT=1
677 RCC = $(RCC) -DSQLITE_OS_WINRT=1
678 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
679 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
682 # C compiler options for the Windows 10 platform (needs MSVC 2015).
685 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
686 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
689 # Also, we need to dynamically link to the correct MSVC runtime
690 # when compiling for WinRT (e.g. debug or release) OR if the
691 # USE_CRT_DLL option is set to force dynamically linking to the
692 # MSVC runtime library.
694 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
713 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
714 # any extension header files by default. For non-amalgamation
715 # builds, we need to make sure the compiler can find these.
717 !IF $(USE_AMALGAMATION)==0
718 TCC = $(TCC) -I$(TOP)\ext\fts3
719 RCC = $(RCC) -I$(TOP)\ext\fts3
720 TCC = $(TCC) -I$(TOP)\ext\rtree
721 RCC = $(RCC) -I$(TOP)\ext\rtree
722 TCC = $(TCC) -I$(TOP)\ext\session
723 RCC = $(RCC) -I$(TOP)\ext\session
726 # The mksqlite3c.tcl script accepts some options on the command
727 # line. When compiling with debugging enabled, some of these
728 # options are necessary in order to allow debugging symbols to
729 # work correctly with Visual Studio when using the amalgamation.
731 !IFNDEF MKSQLITE3C_TOOL
732 !IF $(MINIMAL_AMALGAMATION)!=0
733 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
735 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
739 !IFNDEF MKSQLITE3C_ARGS
741 MKSQLITE3C_ARGS = --linemacros
745 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
746 MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
750 # The mksqlite3h.tcl script accepts some options on the command line.
751 # When compiling with stdcall support, some of these options are
754 !IFNDEF MKSQLITE3H_ARGS
755 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
756 MKSQLITE3H_ARGS = --useapicall
763 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
764 # Omitting the define will cause extra debugging code to be inserted and
765 # includes extra comments when "EXPLAIN stmt" is used.
768 TCC = $(TCC) -DNDEBUG
769 BCC = $(BCC) -DNDEBUG
770 RCC = $(RCC) -DNDEBUG
773 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
774 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
775 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
779 TCC = $(TCC) -DSQLITE_DEBUG=1
780 RCC = $(RCC) -DSQLITE_DEBUG=1
781 !IF $(DYNAMIC_SHELL)==0
782 TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
783 RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
787 !IF $(DEBUG)>4 || $(OSTRACE)!=0
788 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
789 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
793 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
794 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
797 # Prevent warnings about "insecure" MSVC runtime library functions
800 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
801 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
802 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
804 # Prevent warnings about "deprecated" POSIX functions being used.
806 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
807 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
808 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
810 # Use the SQLite debugging heap subsystem?
813 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
814 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
816 # Use native Win32 heap subsystem instead of malloc/free?
818 !ELSEIF $(WIN32HEAP)!=0
819 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
820 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
822 # Validate the heap on every call into the native Win32 heap subsystem?
825 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
826 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
831 # The locations of the Tcl header and library files. Also, the library that
832 # non-stubs enabled programs using Tcl must link against. These variables
833 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
834 # prior to running nmake in order to match the actual installed location and
835 # version on this machine.
838 TCLDIR = $(TOP)\compat\tcl
842 TCLINCDIR = $(TCLDIR)\include
846 TCLLIBDIR = $(TCLDIR)\lib
854 LIBTCLSTUB = tclstub86.lib
858 LIBTCLPATH = $(TCLDIR)\bin
861 # The locations of the zlib header and library files. These variables
862 # (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
863 # prior to running nmake in order to match the actual installed (or source
864 # code) location on this machine.
867 ZLIBDIR = $(TOP)\compat\zlib
871 ZLIBINCDIR = $(ZLIBDIR)
875 ZLIBLIBDIR = $(ZLIBDIR)
879 !IF $(DYNAMIC_SHELL)!=0
886 # The locations of the ICU header and library files. These variables
887 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
888 # prior to running nmake in order to match the actual installed location on
892 ICUDIR = $(TOP)\compat\icu
896 ICUINCDIR = $(ICUDIR)\include
900 ICULIBDIR = $(ICUDIR)\lib
904 LIBICU = icuuc.lib icuin.lib
907 # This is the command to use for tclsh - normally just "tclsh", but we may
908 # know the specific version we want to use. This variable (TCLSH_CMD) may be
909 # overridden via the environment prior to running nmake in order to select a
910 # specific Tcl shell to use.
913 !IF $(USE_TCLSH_IN_PATH)!=0 || !EXIST("$(TCLDIR)\bin\tclsh.exe")
916 TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
921 # Compiler options needed for programs that use the readline() library.
923 !IFNDEF READLINE_FLAGS
924 READLINE_FLAGS = -DHAVE_READLINE=0
927 # The library that programs using readline() must link against.
933 # Should the database engine be compiled threadsafe
935 TCC = $(TCC) -DSQLITE_THREADSAFE=1
936 RCC = $(RCC) -DSQLITE_THREADSAFE=1
938 # Do threads override each others locks by default (1), or do we test (-1)
940 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
941 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
943 # Any target libraries which libsqlite must be linked against
949 # Flags controlling use of the in memory btree implementation
951 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
952 # default to file, 2 to default to memory, and 3 to force temporary
953 # tables to always be in memory.
955 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
956 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
958 # Enable/disable loadable extensions, and other optional features
959 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
960 # The same set of OMIT and ENABLE flags should be passed to the
961 # LEMON parser generator and the mkkeywordhash tool as well.
963 # These are the required SQLite compilation options used when compiling for
964 # the Windows platform.
966 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
968 # If we are linking to the RPCRT4 library, enable features that need it.
970 !IF $(USE_RPCRT4_LIB)!=0
971 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
974 # Add the required and optional SQLite compilation options into the command
975 # lines used to invoke the MSVC code and resource compilers.
977 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
978 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
980 # Add in any optional parameters specified on the commane line, e.g.
981 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
986 # If compiling for debugging, add some defines.
989 TCC = $(TCC) -D_DEBUG
990 BCC = $(BCC) -D_DEBUG
991 RCC = $(RCC) -D_DEBUG
994 # If optimizations are enabled or disabled (either implicitly or
995 # explicitly), add the necessary flags.
997 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
1000 !IF $(USE_RUNTIME_CHECKS)!=0
1004 !ELSEIF $(OPTIMIZATIONS)>=3
1007 !ELSEIF $(OPTIMIZATIONS)==2
1010 !ELSEIF $(OPTIMIZATIONS)==1
1015 # If symbols are enabled (or compiling for debugging), enable PDBs.
1017 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1023 # If zlib support is enabled, add the compiler options for it.
1026 TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
1027 RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
1028 TCC = $(TCC) -I$(ZLIBINCDIR)
1029 RCC = $(RCC) -I$(ZLIBINCDIR)
1032 # If ICU support is enabled, add the compiler options for it.
1035 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
1036 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
1037 TCC = $(TCC) -I$(TOP)\ext\icu
1038 RCC = $(RCC) -I$(TOP)\ext\icu
1039 TCC = $(TCC) -I$(ICUINCDIR)
1040 RCC = $(RCC) -I$(ICUINCDIR)
1044 # Command line prefixes for compiling code, compiling resources,
1047 LTCOMPILE = $(TCC) -Fo$@
1048 LTRCOMPILE = $(RCC) -r
1050 LTLINK = $(TCC) -Fe$@
1052 # If requested, link to the RPCRT4 library.
1054 !IF $(USE_RPCRT4_LIB)!=0
1055 LTLIBS = $(LTLIBS) rpcrt4.lib
1058 # If a platform was set, force the linker to target that.
1059 # Note that the vcvars*.bat family of batch files typically
1060 # set this for you. Otherwise, the linker will attempt
1061 # to deduce the binary type based on the object files.
1063 LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1064 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1066 LTLINKOPTS = /NOLOGO
1070 # When compiling for use in the WinRT environment, the following
1071 # linker option must be used to mark the executable as runnable
1072 # only in the context of an application container.
1075 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
1076 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
1077 !IFNDEF STORELIBPATH
1078 !IF "$(PLATFORM)"=="x86"
1079 STORELIBPATH = $(CRTLIBPATH)\store
1080 !ELSEIF "$(PLATFORM)"=="x64"
1081 STORELIBPATH = $(CRTLIBPATH)\store\amd64
1082 !ELSEIF "$(PLATFORM)"=="ARM"
1083 STORELIBPATH = $(CRTLIBPATH)\store\arm
1085 STORELIBPATH = $(CRTLIBPATH)\store
1088 STORELIBPATH = $(STORELIBPATH:\\=\)
1089 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
1093 # When compiling for Windows Phone 8.1, an extra library path is
1096 !IF $(USE_WP81_OPTS)!=0
1098 !IF "$(PLATFORM)"=="x86"
1099 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1100 !ELSEIF "$(PLATFORM)"=="ARM"
1101 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1103 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1108 # When compiling for Windows Phone 8.1, some extra linker options
1109 # are also required.
1111 !IF $(USE_WP81_OPTS)!=0
1113 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1115 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1116 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1117 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1120 # When compiling for UWP or the Windows 10 platform, some extra linker
1121 # options are also required.
1123 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
1124 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1125 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1127 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1132 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
1134 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1136 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1140 # If either debugging or symbols are enabled, enable PDBs.
1142 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1143 LDFLAGS = /DEBUG $(LDOPTS)
1149 # Start with the Tcl related linker options.
1152 TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
1153 TCLLIBS = $(TCLLIBS) $(LIBTCL)
1156 # If zlib support is enabled, add the linker options for it.
1159 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
1160 LTLIBS = $(LTLIBS) $(ZLIBLIB)
1163 # If ICU support is enabled, add the linker options for it.
1166 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1167 LTLIBS = $(LTLIBS) $(LIBICU)
1171 # You should not have to change anything below this line
1172 ###############################################################################
1175 # Object files for the SQLite library (non-amalgamation).
1177 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
1178 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
1179 callback.lo complete.lo ctime.lo \
1180 date.lo dbpage.lo dbstat.lo delete.lo \
1181 expr.lo fault.lo fkey.lo \
1182 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1183 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
1184 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
1186 func.lo global.lo hash.lo \
1187 icu.lo insert.lo legacy.lo loadext.lo \
1188 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1189 memdb.lo memjournal.lo \
1190 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1191 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
1192 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
1193 random.lo resolve.lo rowset.lo rtree.lo \
1194 sqlite3session.lo select.lo sqlite3rbu.lo status.lo \
1195 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
1196 update.lo upsert.lo util.lo vacuum.lo \
1197 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
1198 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
1202 # Object files for the amalgamation.
1204 LIBOBJS1 = sqlite3.lo
1206 # Determine the real value of LIBOBJ based on the 'configure' script
1209 !IF $(USE_AMALGAMATION)==0
1210 LIBOBJ = $(LIBOBJS0)
1213 LIBOBJ = $(LIBOBJS1)
1218 # Determine if embedded resource compilation and usage are enabled.
1221 LIBRESOBJS = sqlite3res.lo
1227 # Core source code files, part 1.
1230 $(TOP)\src\alter.c \
1231 $(TOP)\src\analyze.c \
1232 $(TOP)\src\attach.c \
1234 $(TOP)\src\backup.c \
1235 $(TOP)\src\bitvec.c \
1236 $(TOP)\src\btmutex.c \
1237 $(TOP)\src\btree.c \
1238 $(TOP)\src\build.c \
1239 $(TOP)\src\callback.c \
1240 $(TOP)\src\complete.c \
1241 $(TOP)\src\ctime.c \
1243 $(TOP)\src\dbpage.c \
1244 $(TOP)\src\dbstat.c \
1245 $(TOP)\src\delete.c \
1247 $(TOP)\src\fault.c \
1250 $(TOP)\src\global.c \
1252 $(TOP)\src\insert.c \
1253 $(TOP)\src\legacy.c \
1254 $(TOP)\src\loadext.c \
1256 $(TOP)\src\malloc.c \
1262 $(TOP)\src\memdb.c \
1263 $(TOP)\src\memjournal.c \
1264 $(TOP)\src\mutex.c \
1265 $(TOP)\src\mutex_noop.c \
1266 $(TOP)\src\mutex_unix.c \
1267 $(TOP)\src\mutex_w32.c \
1268 $(TOP)\src\notify.c \
1270 $(TOP)\src\os_unix.c \
1273 # Core source code files, part 2.
1276 $(TOP)\src\pager.c \
1277 $(TOP)\src\pcache.c \
1278 $(TOP)\src\pcache1.c \
1279 $(TOP)\src\pragma.c \
1280 $(TOP)\src\prepare.c \
1281 $(TOP)\src\printf.c \
1282 $(TOP)\src\random.c \
1283 $(TOP)\src\resolve.c \
1284 $(TOP)\src\rowset.c \
1285 $(TOP)\src\select.c \
1286 $(TOP)\src\status.c \
1287 $(TOP)\src\table.c \
1288 $(TOP)\src\threads.c \
1289 $(TOP)\src\tclsqlite.c \
1290 $(TOP)\src\tokenize.c \
1291 $(TOP)\src\treeview.c \
1292 $(TOP)\src\trigger.c \
1294 $(TOP)\src\update.c \
1295 $(TOP)\src\upsert.c \
1297 $(TOP)\src\vacuum.c \
1299 $(TOP)\src\vdbeapi.c \
1300 $(TOP)\src\vdbeaux.c \
1301 $(TOP)\src\vdbeblob.c \
1302 $(TOP)\src\vdbemem.c \
1303 $(TOP)\src\vdbesort.c \
1304 $(TOP)\src\vdbetrace.c \
1307 $(TOP)\src\walker.c \
1308 $(TOP)\src\where.c \
1309 $(TOP)\src\wherecode.c \
1310 $(TOP)\src\whereexpr.c
1312 # Core miscellaneous files.
1317 # Core header files, part 1.
1320 $(TOP)\src\btree.h \
1321 $(TOP)\src\btreeInt.h \
1323 $(TOP)\src\hwtime.h \
1325 $(TOP)\src\mutex.h \
1327 $(TOP)\src\os_common.h \
1328 $(TOP)\src\os_setup.h \
1331 # Core header files, part 2.
1334 $(TOP)\src\pager.h \
1335 $(TOP)\src\pcache.h \
1336 $(TOP)\src\pragma.h \
1337 $(TOP)\src\sqlite.h.in \
1338 $(TOP)\src\sqlite3ext.h \
1339 $(TOP)\src\sqliteInt.h \
1340 $(TOP)\src\sqliteLimit.h \
1342 $(TOP)\src\vdbeInt.h \
1343 $(TOP)\src\vxworks.h \
1345 $(TOP)\src\whereInt.h
1347 # Extension source code files, part 1.
1350 $(TOP)\ext\fts1\fts1.c \
1351 $(TOP)\ext\fts1\fts1_hash.c \
1352 $(TOP)\ext\fts1\fts1_porter.c \
1353 $(TOP)\ext\fts1\fts1_tokenizer1.c \
1354 $(TOP)\ext\fts2\fts2.c \
1355 $(TOP)\ext\fts2\fts2_hash.c \
1356 $(TOP)\ext\fts2\fts2_icu.c \
1357 $(TOP)\ext\fts2\fts2_porter.c \
1358 $(TOP)\ext\fts2\fts2_tokenizer.c \
1359 $(TOP)\ext\fts2\fts2_tokenizer1.c
1361 # Extension source code files, part 2.
1364 $(TOP)\ext\fts3\fts3.c \
1365 $(TOP)\ext\fts3\fts3_aux.c \
1366 $(TOP)\ext\fts3\fts3_expr.c \
1367 $(TOP)\ext\fts3\fts3_hash.c \
1368 $(TOP)\ext\fts3\fts3_icu.c \
1369 $(TOP)\ext\fts3\fts3_porter.c \
1370 $(TOP)\ext\fts3\fts3_snippet.c \
1371 $(TOP)\ext\fts3\fts3_tokenizer.c \
1372 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1373 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1374 $(TOP)\ext\fts3\fts3_unicode.c \
1375 $(TOP)\ext\fts3\fts3_unicode2.c \
1376 $(TOP)\ext\fts3\fts3_write.c \
1377 $(TOP)\ext\icu\icu.c \
1378 $(TOP)\ext\rtree\rtree.c \
1379 $(TOP)\ext\session\sqlite3session.c \
1380 $(TOP)\ext\rbu\sqlite3rbu.c \
1381 $(TOP)\ext\misc\json1.c \
1382 $(TOP)\ext\misc\stmt.c
1384 # Extension header files, part 1.
1387 $(TOP)\ext\fts1\fts1.h \
1388 $(TOP)\ext\fts1\fts1_hash.h \
1389 $(TOP)\ext\fts1\fts1_tokenizer.h \
1390 $(TOP)\ext\fts2\fts2.h \
1391 $(TOP)\ext\fts2\fts2_hash.h \
1392 $(TOP)\ext\fts2\fts2_tokenizer.h
1394 # Extension header files, part 2.
1397 $(TOP)\ext\fts3\fts3.h \
1398 $(TOP)\ext\fts3\fts3Int.h \
1399 $(TOP)\ext\fts3\fts3_hash.h \
1400 $(TOP)\ext\fts3\fts3_tokenizer.h \
1401 $(TOP)\ext\icu\sqliteicu.h \
1402 $(TOP)\ext\rtree\rtree.h \
1403 $(TOP)\ext\rbu\sqlite3rbu.h \
1404 $(TOP)\ext\session\sqlite3session.h
1406 # Generated source code files
1412 # Generated header files
1421 # Generated Tcl header files
1423 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1431 # All source code files.
1433 SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
1435 # Source code to the test files.
1438 $(TOP)\src\test1.c \
1439 $(TOP)\src\test2.c \
1440 $(TOP)\src\test3.c \
1441 $(TOP)\src\test4.c \
1442 $(TOP)\src\test5.c \
1443 $(TOP)\src\test6.c \
1444 $(TOP)\src\test7.c \
1445 $(TOP)\src\test8.c \
1446 $(TOP)\src\test9.c \
1447 $(TOP)\src\test_autoext.c \
1448 $(TOP)\src\test_async.c \
1449 $(TOP)\src\test_backup.c \
1450 $(TOP)\src\test_bestindex.c \
1451 $(TOP)\src\test_blob.c \
1452 $(TOP)\src\test_btree.c \
1453 $(TOP)\src\test_config.c \
1454 $(TOP)\src\test_delete.c \
1455 $(TOP)\src\test_demovfs.c \
1456 $(TOP)\src\test_devsym.c \
1457 $(TOP)\src\test_fs.c \
1458 $(TOP)\src\test_func.c \
1459 $(TOP)\src\test_hexio.c \
1460 $(TOP)\src\test_init.c \
1461 $(TOP)\src\test_intarray.c \
1462 $(TOP)\src\test_journal.c \
1463 $(TOP)\src\test_malloc.c \
1464 $(TOP)\src\test_md5.c \
1465 $(TOP)\src\test_multiplex.c \
1466 $(TOP)\src\test_mutex.c \
1467 $(TOP)\src\test_onefile.c \
1468 $(TOP)\src\test_osinst.c \
1469 $(TOP)\src\test_pcache.c \
1470 $(TOP)\src\test_quota.c \
1471 $(TOP)\src\test_rtree.c \
1472 $(TOP)\src\test_schema.c \
1473 $(TOP)\src\test_server.c \
1474 $(TOP)\src\test_superlock.c \
1475 $(TOP)\src\test_syscall.c \
1476 $(TOP)\src\test_tclsh.c \
1477 $(TOP)\src\test_tclvar.c \
1478 $(TOP)\src\test_thread.c \
1479 $(TOP)\src\test_vfs.c \
1480 $(TOP)\src\test_windirent.c \
1481 $(TOP)\src\test_wsd.c \
1482 $(TOP)\ext\fts3\fts3_term.c \
1483 $(TOP)\ext\fts3\fts3_test.c \
1484 $(TOP)\ext\rbu\test_rbu.c \
1485 $(TOP)\ext\session\test_session.c
1487 # Statically linked extensions.
1490 $(TOP)\ext\expert\sqlite3expert.c \
1491 $(TOP)\ext\expert\test_expert.c \
1492 $(TOP)\ext\misc\amatch.c \
1493 $(TOP)\ext\misc\carray.c \
1494 $(TOP)\ext\misc\closure.c \
1495 $(TOP)\ext\misc\csv.c \
1496 $(TOP)\ext\misc\eval.c \
1497 $(TOP)\ext\misc\fileio.c \
1498 $(TOP)\ext\misc\fuzzer.c \
1499 $(TOP)\ext\fts5\fts5_tcl.c \
1500 $(TOP)\ext\fts5\fts5_test_mi.c \
1501 $(TOP)\ext\fts5\fts5_test_tok.c \
1502 $(TOP)\ext\misc\ieee754.c \
1503 $(TOP)\ext\misc\mmapwarm.c \
1504 $(TOP)\ext\misc\nextchar.c \
1505 $(TOP)\ext\misc\normalize.c \
1506 $(TOP)\ext\misc\percentile.c \
1507 $(TOP)\ext\misc\regexp.c \
1508 $(TOP)\ext\misc\remember.c \
1509 $(TOP)\ext\misc\series.c \
1510 $(TOP)\ext\misc\spellfix.c \
1511 $(TOP)\ext\misc\totype.c \
1512 $(TOP)\ext\misc\unionvtab.c \
1513 $(TOP)\ext\misc\wholenumber.c
1515 # If use of zlib is enabled, add the "zipfile.c" source file.
1518 TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
1521 # Source code to the library files needed by the test fixture
1522 # (non-amalgamation)
1530 $(TOP)\ext\async\sqlite3async.c
1532 # Header files used by all library source files.
1535 $(TOP)\src\btree.h \
1536 $(TOP)\src\btreeInt.h \
1538 $(TOP)\src\hwtime.h \
1541 $(TOP)\src\mutex.h \
1544 $(TOP)\src\os_common.h \
1545 $(TOP)\src\os_setup.h \
1546 $(TOP)\src\os_win.h \
1547 $(TOP)\src\pager.h \
1548 $(TOP)\src\pcache.h \
1550 $(TOP)\src\pragma.h \
1553 $(TOP)\src\sqliteInt.h \
1554 $(TOP)\src\sqliteLimit.h \
1556 $(TOP)\src\vdbeInt.h \
1557 $(TOP)\src\vxworks.h \
1558 $(TOP)\src\whereInt.h
1560 # Header files used by extensions
1562 EXTHDR = $(EXTHDR) \
1563 $(TOP)\ext\fts1\fts1.h \
1564 $(TOP)\ext\fts1\fts1_hash.h \
1565 $(TOP)\ext\fts1\fts1_tokenizer.h
1566 EXTHDR = $(EXTHDR) \
1567 $(TOP)\ext\fts2\fts2.h \
1568 $(TOP)\ext\fts2\fts2_hash.h \
1569 $(TOP)\ext\fts2\fts2_tokenizer.h
1570 EXTHDR = $(EXTHDR) \
1571 $(TOP)\ext\fts3\fts3.h \
1572 $(TOP)\ext\fts3\fts3Int.h \
1573 $(TOP)\ext\fts3\fts3_hash.h \
1574 $(TOP)\ext\fts3\fts3_tokenizer.h
1575 EXTHDR = $(EXTHDR) \
1576 $(TOP)\ext\rtree\rtree.h
1577 EXTHDR = $(EXTHDR) \
1578 $(TOP)\ext\icu\sqliteicu.h
1579 EXTHDR = $(EXTHDR) \
1580 $(TOP)\ext\rtree\sqlite3rtree.h
1581 EXTHDR = $(EXTHDR) \
1582 $(TOP)\ext\session\sqlite3session.h
1584 # executables needed for testing
1589 sqlite3_analyzer.exe \
1590 sqlite3_checker.exe \
1595 # Databases containing fuzzer test cases
1598 $(TOP)\test\fuzzdata1.db \
1599 $(TOP)\test\fuzzdata2.db \
1600 $(TOP)\test\fuzzdata3.db \
1601 $(TOP)\test\fuzzdata4.db \
1602 $(TOP)\test\fuzzdata5.db \
1603 $(TOP)\test\fuzzdata6.db
1606 # Additional compiler options for the shell. These are only effective
1607 # when the shell is not being dynamically linked.
1609 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1610 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
1611 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
1612 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_INTROSPECTION_PRAGMAS
1613 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_RTREE
1617 # Extra compiler options for various test tools.
1619 MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
1620 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1621 FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ -DSQLITE_MAX_MEMORY=50000000 -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1622 FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1623 OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
1624 DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
1625 KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
1626 ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
1628 # Standard options to testfixture.
1630 TESTOPTS = --verbose=file --output=test-out.txt
1632 # Extra targets for the "all" target that require Tcl.
1635 ALL_TCL_TARGETS = libtclsqlite3.lib
1641 # This is the default Makefile target. The objects listed here
1642 # are what get build when you type just "make" with no arguments.
1644 core: dll libsqlite3.lib shell
1646 # Targets that require the Tcl library.
1648 tcl: $(ALL_TCL_TARGETS)
1650 # This Makefile target builds all of the standard binaries.
1654 # Dynamic link library section.
1660 shell: $(SQLITE3EXE)
1663 libsqlite3.lib: $(LIBOBJ)
1664 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1666 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1667 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1670 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1671 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1674 sqlite3.def: libsqlite3.lib
1675 echo EXPORTS > sqlite3.def
1676 dumpbin /all libsqlite3.lib \
1677 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@]*)(?:@\d+)?$$" \1 \
1678 | sort >> sqlite3.def
1681 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1682 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
1683 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1686 sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1687 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1689 dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1690 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1692 scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1693 $(LTLINK) $(NO_WARN) -DSCRUB_STANDALONE=1 $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1695 srcck1.exe: $(TOP)\tool\srcck1.c
1696 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1698 sourcetest: srcck1.exe sqlite3.c
1699 srcck1.exe sqlite3.c
1701 fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1702 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1704 dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
1705 $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1707 fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1708 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1710 ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1711 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1713 sessionfuzz.exe: zlib $(TOP)\test\sessionfuzz.c $(SQLITE3C) $(SQLITE3H)
1714 $(LTLINK) $(NO_WARN) -I$(ZLIBINCDIR) $(TOP)\test\sessionfuzz.c /link $(LDFLAGS) $(LTLINKOPTS) /LIBPATH:$(ZLIBLIBDIR) $(ZLIBLIB)
1716 mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1717 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1719 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1720 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1722 mptest: mptester.exe
1723 del /Q mptest.db 2>NUL
1724 $(MPTEST1) --journalmode DELETE
1725 $(MPTEST2) --journalmode WAL
1726 $(MPTEST1) --journalmode WAL
1727 $(MPTEST2) --journalmode PERSIST
1728 $(MPTEST1) --journalmode PERSIST
1729 $(MPTEST2) --journalmode TRUNCATE
1730 $(MPTEST1) --journalmode TRUNCATE
1731 $(MPTEST2) --journalmode DELETE
1733 # This target creates a directory named "tsrc" and fills it with
1734 # copies of all of the C source code and header files needed to
1735 # build on the target system. Some of the C source code and header
1736 # files are automatically generated. This target takes care of
1737 # all that automatic generation.
1739 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
1740 -rmdir /Q/S tsrc 2>NUL
1742 for %i in ($(SRC00)) do copy /Y %i tsrc
1743 for %i in ($(SRC01)) do copy /Y %i tsrc
1744 for %i in ($(SRC03)) do copy /Y %i tsrc
1745 for %i in ($(SRC04)) do copy /Y %i tsrc
1746 for %i in ($(SRC05)) do copy /Y %i tsrc
1747 for %i in ($(SRC06)) do copy /Y %i tsrc
1748 for %i in ($(SRC07)) do copy /Y %i tsrc
1749 for %i in ($(SRC08)) do copy /Y %i tsrc
1750 for %i in ($(SRC09)) do copy /Y %i tsrc
1751 for %i in ($(SRC10)) do copy /Y %i tsrc
1752 for %i in ($(SRC11)) do copy /Y %i tsrc
1753 for %i in ($(SRC12)) do copy /Y %i tsrc
1756 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1757 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1758 move vdbe.new tsrc\vdbe.c
1759 echo > .target_source
1761 sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
1762 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
1763 copy $(TOP)\ext\session\sqlite3session.h .
1765 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1766 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1769 # Rule to build the amalgamation
1771 sqlite3.lo: $(SQLITE3C)
1772 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1775 # Rules to build the LEMON compiler generator
1777 lempar.c: $(TOP)\tool\lempar.c
1778 copy $(TOP)\tool\lempar.c .
1780 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1781 $(BCC) $(NO_WARN) -Daccess=_access \
1782 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1785 # Rules to build the source-id generator tool
1787 mksourceid.exe: $(TOP)\tool\mksourceid.c
1788 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1790 # Rules to build individual *.lo files from generated *.c files. This
1796 parse.lo: parse.c $(HDR)
1797 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1799 opcodes.lo: opcodes.c
1800 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1803 # Rule to build the Win32 resources object file.
1807 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H)
1808 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1809 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1810 echo #define SQLITE_RESOURCE_VERSION %%V \
1811 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1813 echo #endif >> sqlite3rc.h
1814 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1819 # Rules to build individual *.lo files from files in the src directory.
1821 alter.lo: $(TOP)\src\alter.c $(HDR)
1822 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1824 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1825 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1827 attach.lo: $(TOP)\src\attach.c $(HDR)
1828 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1830 auth.lo: $(TOP)\src\auth.c $(HDR)
1831 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1833 backup.lo: $(TOP)\src\backup.c $(HDR)
1834 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1836 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1837 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1839 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1840 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1842 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1843 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1845 build.lo: $(TOP)\src\build.c $(HDR)
1846 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1848 callback.lo: $(TOP)\src\callback.c $(HDR)
1849 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1851 complete.lo: $(TOP)\src\complete.c $(HDR)
1852 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1854 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1855 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1857 date.lo: $(TOP)\src\date.c $(HDR)
1858 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1860 dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
1861 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
1863 dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
1864 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1866 delete.lo: $(TOP)\src\delete.c $(HDR)
1867 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1869 expr.lo: $(TOP)\src\expr.c $(HDR)
1870 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1872 fault.lo: $(TOP)\src\fault.c $(HDR)
1873 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1875 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1876 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1878 func.lo: $(TOP)\src\func.c $(HDR)
1879 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1881 global.lo: $(TOP)\src\global.c $(HDR)
1882 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1884 hash.lo: $(TOP)\src\hash.c $(HDR)
1885 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1887 insert.lo: $(TOP)\src\insert.c $(HDR)
1888 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1890 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1891 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1893 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1894 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1896 main.lo: $(TOP)\src\main.c $(HDR)
1897 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1899 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1900 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
1902 mem0.lo: $(TOP)\src\mem0.c $(HDR)
1903 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
1905 mem1.lo: $(TOP)\src\mem1.c $(HDR)
1906 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
1908 mem2.lo: $(TOP)\src\mem2.c $(HDR)
1909 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
1911 mem3.lo: $(TOP)\src\mem3.c $(HDR)
1912 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
1914 mem5.lo: $(TOP)\src\mem5.c $(HDR)
1915 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
1917 memdb.lo: $(TOP)\src\memdb.c $(HDR)
1918 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memdb.c
1920 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
1921 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
1923 mutex.lo: $(TOP)\src\mutex.c $(HDR)
1924 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
1926 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
1927 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
1929 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
1930 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
1932 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
1933 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
1935 notify.lo: $(TOP)\src\notify.c $(HDR)
1936 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
1938 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1939 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
1941 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1942 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
1944 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1945 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
1947 os.lo: $(TOP)\src\os.c $(HDR)
1948 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
1950 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
1951 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
1953 os_win.lo: $(TOP)\src\os_win.c $(HDR)
1954 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
1956 pragma.lo: $(TOP)\src\pragma.c $(HDR)
1957 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
1959 prepare.lo: $(TOP)\src\prepare.c $(HDR)
1960 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
1962 printf.lo: $(TOP)\src\printf.c $(HDR)
1963 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
1965 random.lo: $(TOP)\src\random.c $(HDR)
1966 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
1968 resolve.lo: $(TOP)\src\resolve.c $(HDR)
1969 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
1971 rowset.lo: $(TOP)\src\rowset.c $(HDR)
1972 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
1974 select.lo: $(TOP)\src\select.c $(HDR)
1975 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
1977 status.lo: $(TOP)\src\status.c $(HDR)
1978 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
1980 table.lo: $(TOP)\src\table.c $(HDR)
1981 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
1983 threads.lo: $(TOP)\src\threads.c $(HDR)
1984 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
1986 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
1987 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
1989 treeview.lo: $(TOP)\src\treeview.c $(HDR)
1990 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
1992 trigger.lo: $(TOP)\src\trigger.c $(HDR)
1993 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
1995 update.lo: $(TOP)\src\update.c $(HDR)
1996 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
1998 upsert.lo: $(TOP)\src\upsert.c $(HDR)
1999 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\upsert.c
2001 utf.lo: $(TOP)\src\utf.c $(HDR)
2002 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
2004 util.lo: $(TOP)\src\util.c $(HDR)
2005 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
2007 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
2008 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
2010 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
2011 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
2013 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
2014 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
2016 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
2017 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
2019 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
2020 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
2022 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
2023 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
2025 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
2026 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
2028 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
2029 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
2031 vtab.lo: $(TOP)\src\vtab.c $(HDR)
2032 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
2034 wal.lo: $(TOP)\src\wal.c $(HDR)
2035 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
2037 walker.lo: $(TOP)\src\walker.c $(HDR)
2038 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
2040 where.lo: $(TOP)\src\where.c $(HDR)
2041 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
2043 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
2044 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
2046 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
2047 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
2049 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2050 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2052 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2053 $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2055 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2056 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2058 # Rules to build opcodes.c and opcodes.h
2060 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
2061 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
2063 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
2064 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
2066 # Rules to build parse.c and parse.h - the outputs of lemon.
2070 parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
2071 del /Q parse.y parse.h parse.h.temp 2>NUL
2072 copy $(TOP)\src\parse.y .
2073 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
2074 move parse.h parse.h.temp
2075 $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
2077 $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
2078 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
2080 sqlite3ext.h: .target_source
2081 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2082 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
2083 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
2084 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
2086 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
2089 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
2090 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
2091 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
2093 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
2094 .\mkkeywordhash.exe > keywordhash.h
2096 # Source files that go into making shell.c
2098 $(TOP)\src\shell.c.in \
2099 $(TOP)\ext\misc\appendvfs.c \
2100 $(TOP)\ext\misc\shathree.c \
2101 $(TOP)\ext\misc\fileio.c \
2102 $(TOP)\ext\misc\completion.c \
2103 $(TOP)\ext\expert\sqlite3expert.c \
2104 $(TOP)\ext\expert\sqlite3expert.h \
2105 $(TOP)\src\test_windirent.c
2107 # If use of zlib is enabled, add the "zipfile.c" source file.
2110 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\sqlar.c
2111 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\zipfile.c
2114 shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
2115 $(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
2118 pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
2120 # Rules to build the extension objects.
2122 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
2123 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
2125 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
2126 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
2128 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
2129 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
2131 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
2132 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
2134 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
2135 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
2137 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
2138 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
2140 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
2141 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
2143 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
2144 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
2146 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
2147 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
2149 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
2150 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
2152 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
2153 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
2155 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
2156 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
2158 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
2159 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
2161 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
2162 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
2164 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
2165 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
2167 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
2168 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
2170 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
2171 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
2173 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
2174 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
2176 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
2177 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
2179 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
2180 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
2182 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
2183 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
2185 sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
2186 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
2191 $(TOP)\ext\fts5\fts5.h \
2192 $(TOP)\ext\fts5\fts5Int.h \
2193 $(TOP)\ext\fts5\fts5_aux.c \
2194 $(TOP)\ext\fts5\fts5_buffer.c \
2195 $(TOP)\ext\fts5\fts5_main.c \
2196 $(TOP)\ext\fts5\fts5_config.c \
2197 $(TOP)\ext\fts5\fts5_expr.c \
2198 $(TOP)\ext\fts5\fts5_hash.c \
2199 $(TOP)\ext\fts5\fts5_index.c \
2200 fts5parse.c fts5parse.h \
2201 $(TOP)\ext\fts5\fts5_storage.c \
2202 $(TOP)\ext\fts5\fts5_tokenize.c \
2203 $(TOP)\ext\fts5\fts5_unicode2.c \
2204 $(TOP)\ext\fts5\fts5_varint.c \
2205 $(TOP)\ext\fts5\fts5_vocab.c
2208 $(TOP)\ext\lsm1\lsm.h \
2209 $(TOP)\ext\lsm1\lsmInt.h \
2210 $(TOP)\ext\lsm1\lsm_ckpt.c \
2211 $(TOP)\ext\lsm1\lsm_file.c \
2212 $(TOP)\ext\lsm1\lsm_log.c \
2213 $(TOP)\ext\lsm1\lsm_main.c \
2214 $(TOP)\ext\lsm1\lsm_mem.c \
2215 $(TOP)\ext\lsm1\lsm_mutex.c \
2216 $(TOP)\ext\lsm1\lsm_shared.c \
2217 $(TOP)\ext\lsm1\lsm_sorted.c \
2218 $(TOP)\ext\lsm1\lsm_str.c \
2219 $(TOP)\ext\lsm1\lsm_tree.c \
2220 $(TOP)\ext\lsm1\lsm_unix.c \
2221 $(TOP)\ext\lsm1\lsm_varint.c \
2222 $(TOP)\ext\lsm1\lsm_vtab.c \
2223 $(TOP)\ext\lsm1\lsm_win32.c
2225 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2226 copy $(TOP)\ext\fts5\fts5parse.y .
2227 del /Q fts5parse.h 2>NUL
2228 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
2230 fts5parse.h: fts5parse.c
2233 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2234 copy $(TOP)\ext\fts5\fts5.h .
2237 $(TCLSH_CMD) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
2238 copy $(TOP)\ext\lsm1\lsm.h .
2240 fts5.lo: fts5.c $(HDR) $(EXTHDR)
2241 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2243 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
2244 $(LTCOMPILE) $(NO_WARN) -c fts5.c
2246 fts5.dll: fts5_ext.lo
2247 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
2249 sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2250 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
2252 # Rules to build the 'testfixture' application.
2254 # If using the amalgamation, use sqlite3.c directly to build the test
2255 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
2256 # necessary because the test fixture requires non-API symbols which are
2257 # hidden when the library is built via the amalgamation).
2259 TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
2260 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2261 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
2262 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
2263 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
2264 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB
2265 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB
2266 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_JSON1
2267 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
2269 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
2270 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
2271 !IF $(USE_AMALGAMATION)==0
2272 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2274 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2277 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2279 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2280 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2281 echo #endif >> $(SQLITETCLDECLSH)
2282 type "$(TCLINCDIR)\tclDecls.h" \
2283 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
2284 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2285 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
2286 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
2287 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
2290 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2291 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2292 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2293 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
2294 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2297 testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
2298 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
2299 -DBUILD_sqlite -I$(TCLINCDIR) \
2300 $(TESTFIXTURE_SRC) \
2301 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2303 extensiontest: testfixture.exe testloadext.dll
2304 @set PATH=$(LIBTCLPATH);$(PATH)
2305 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
2307 fulltest: $(TESTPROGS) fuzztest
2308 @set PATH=$(LIBTCLPATH);$(PATH)
2309 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
2311 soaktest: $(TESTPROGS)
2312 @set PATH=$(LIBTCLPATH);$(PATH)
2313 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
2315 fulltestonly: $(TESTPROGS) fuzztest
2316 @set PATH=$(LIBTCLPATH);$(PATH)
2317 .\testfixture.exe $(TOP)\test\full.test
2319 queryplantest: testfixture.exe shell
2320 @set PATH=$(LIBTCLPATH);$(PATH)
2321 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
2323 fuzztest: fuzzcheck.exe
2324 .\fuzzcheck.exe $(FUZZDATA)
2326 fastfuzztest: fuzzcheck.exe
2327 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
2329 # Minimal testing that runs in less than 3 minutes (on a fast machine)
2331 quicktest: testfixture.exe sourcetest
2332 @set PATH=$(LIBTCLPATH);$(PATH)
2333 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2335 # This is the common case. Run many tests that do not take too long,
2336 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2338 test: $(TESTPROGS) sourcetest fastfuzztest
2339 @set PATH=$(LIBTCLPATH);$(PATH)
2340 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
2342 smoketest: $(TESTPROGS)
2343 @set PATH=$(LIBTCLPATH);$(PATH)
2344 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
2346 sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(SQLITE_TCL_DEP)
2347 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
2349 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
2350 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
2351 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2353 sqltclsh.c: sqlite3.c $(TOP)\src\tclsqlite.c $(TOP)\tool\sqltclsh.tcl $(TOP)\ext\misc\appendvfs.c $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in
2354 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
2356 sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
2357 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
2358 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2360 sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
2361 $(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
2364 $(TOP)/tool/mkccode.tcl \
2366 $(TOP)/src/tclsqlite.c \
2367 $(TOP)/ext/repair/sqlite3_checker.tcl \
2368 $(TOP)/ext/repair/checkindex.c \
2369 $(TOP)/ext/repair/checkfreelist.c \
2370 $(TOP)/ext/misc/btreeinfo.c \
2371 $(TOP)/ext/repair/sqlite3_checker.c.in
2373 sqlite3_checker.c: $(CHECKER_DEPS)
2374 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\ext\repair\sqlite3_checker.c.in > $@
2376 sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
2377 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
2378 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2380 dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2381 $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
2382 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
2384 testloadext.lo: $(TOP)\src\test_loadext.c $(SQLITE3H)
2385 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
2387 testloadext.dll: testloadext.lo
2388 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2390 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
2391 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2392 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2394 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
2395 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2396 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2398 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
2399 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2400 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2402 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
2403 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2404 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2406 showshm.exe: $(TOP)\tool\showshm.c
2407 $(LTLINK) $(NO_WARN) $(TOP)\tool\showshm.c /link $(LDFLAGS) $(LTLINKOPTS)
2409 changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
2410 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2411 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2412 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2414 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
2415 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2416 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2418 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
2419 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2420 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2422 LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
2423 $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
2425 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
2426 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2427 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2429 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
2430 $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
2431 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2433 kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
2434 $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
2435 $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2437 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
2438 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
2439 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2441 LSMDIR=$(TOP)\ext\lsm1
2442 !INCLUDE $(LSMDIR)\Makefile.msc
2445 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
2449 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
2450 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
2451 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
2453 del /Q sqlite3.c sqlite3.h 2>NUL
2454 del /Q opcodes.c opcodes.h 2>NUL
2455 del /Q lemon.* lempar.c parse.* 2>NUL
2456 del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
2457 del /Q notasharedlib.* 2>NUL
2458 -rmdir /Q/S .deps 2>NUL
2459 -rmdir /Q/S .libs 2>NUL
2460 -rmdir /Q/S tsrc 2>NUL
2461 del /Q .target_source 2>NUL
2462 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
2463 del /Q lsm.dll lsmtest.exe 2>NUL
2464 del /Q testloadext.dll 2>NUL
2465 del /Q testfixture.exe test.db 2>NUL
2466 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
2467 del /Q changeset.exe 2>NUL
2468 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2469 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
2470 del /Q sqlite3.c sqlite3-*.c 2>NUL
2471 del /Q sqlite3rc.h 2>NUL
2472 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
2473 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2474 del /Q sqlite-*-output.vsix 2>NUL
2475 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
2476 del /Q sqltclsh.* 2>NUL
2477 del /Q dbfuzz.exe sessionfuzz.exe 2>NUL
2478 del /Q kvtest.exe ossshell.exe scrub.exe 2>NUL
2479 del /Q showshm.exe sqlite3_checker.* sqlite3_expert.exe 2>NUL
2480 del /Q fts5.* fts5parse.* 2>NUL
2481 del /Q lsm.h lsm1.c 2>NUL