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 # Optionally set EXTRA_SRC to a list of C files to append to
22 # the generated sqlite3.c.
28 # Set this non-0 to enable full warnings (-W4, etc) when compiling.
34 # Set this non-0 to enable treating warnings as errors (-WX, etc) when
37 !IFNDEF USE_FATAL_WARN
41 # Set this non-0 to enable full runtime error checks (-RTC1, etc). This
42 # has no effect if (any) optimizations are enabled.
44 !IFNDEF USE_RUNTIME_CHECKS
45 USE_RUNTIME_CHECKS = 0
48 # Set this non-0 to create a SQLite amalgamation file that excludes the
49 # various built-in extensions.
51 !IFNDEF MINIMAL_AMALGAMATION
52 MINIMAL_AMALGAMATION = 0
55 # Set this non-0 to use "stdcall" calling convention for the core library
56 # and shell executable.
62 # Use the USE_SEH=0 option on the nmake command line to omit structured
63 # exception handling (SEH) support. SEH is on by default.
69 # Set this non-0 to have the shell executable link against the core dynamic
76 # Set this non-0 to enable extra code that attempts to detect misuse of the
83 # If necessary, create a list of harmless compiler warnings to disable when
84 # compiling the various tools. For the SQLite source code itself, warnings,
85 # if any, will be disabled from within it.
88 !IF $(USE_FULLWARN)!=0
89 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
90 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
94 # Set this non-0 to use the library paths and other options necessary for
101 # Set this non-0 to split the SQLite amalgamation file into chunks to
102 # be used for debugging with Visual Studio.
104 !IFNDEF SPLIT_AMALGAMATION
105 SPLIT_AMALGAMATION = 0
109 # Set this non-0 to have this makefile assume the Tcl shell executable
110 # (tclsh*.exe) is available in the PATH. By default, this is disabled
111 # for compatibility with older build environments. This setting only
112 # applies if TCLSH_CMD is not set manually.
114 !IFNDEF USE_TCLSH_IN_PATH
115 USE_TCLSH_IN_PATH = 0
118 # Set this non-0 to use zlib, possibly compiling it from source code.
124 # Set this non-0 to build zlib from source code. This is enabled by
125 # default and in that case it will be assumed that the ZLIBDIR macro
126 # points to the top-level source code directory for zlib.
132 # Set this non-0 to use the International Components for Unicode (ICU).
139 # Set this non-0 to dynamically link to the MSVC runtime library.
145 # Set this non-0 to link to the RPCRT4 library.
147 !IFNDEF USE_RPCRT4_LIB
151 # Set this non-0 to generate assembly code listings for the source code
158 # Set this non-0 to attempt setting the native compiler automatically
159 # for cross-compiling the command line tools needed during the compilation
166 # Set this non-0 to use the native libraries paths for cross-compiling
167 # the command line tools needed during the compilation process.
169 !IFNDEF USE_NATIVE_LIBPATHS
170 USE_NATIVE_LIBPATHS = 0
173 # Set this 0 to skip the compiling and embedding of version resources.
179 # Set this non-0 to compile binaries suitable for the WinRT environment.
180 # This setting does not apply to any binaries that require Tcl to operate
181 # properly (i.e. the text fixture, etc).
187 # Set this non-0 to compile binaries suitable for the UWP environment.
188 # This setting does not apply to any binaries that require Tcl to operate
189 # properly (i.e. the text fixture, etc).
195 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
202 # Set this non-0 to skip attempting to look for and/or link with the Tcl
210 # Set this to non-0 to create and use PDBs.
216 # Set this to non-0 to use the SQLite debugging heap subsystem.
222 # Set this to non-0 to use the Win32 native heap subsystem.
228 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
235 # enable address sanitizer using ASAN=1 on the command-line.
241 # Set this to one of the following values to enable various debugging
242 # features. Each level includes the debugging options from the previous
243 # levels. Currently, the recognized values for DEBUG are:
245 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
246 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
247 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
248 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
249 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
250 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
251 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
258 # By default, use --linemacros=1 argument to the mksqlite3c.tcl tool, which
259 # is used to build the amalgamation. This can be turned off to ease debug
260 # of the amalgamation away from the source tree.
262 !IFNDEF NO_LINEMACROS
267 # Enable use of available compiler optimizations? Normally, this should be
268 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
269 # can be useful for testing.
271 !IFNDEF OPTIMIZATIONS
275 # Set this to non-0 to enable support for the session extension.
281 # Set this to non-0 to enable support for the rbu extension.
287 # Set the source code file to be used by executables and libraries when
288 # they need the amalgamation.
291 !IF $(SPLIT_AMALGAMATION)!=0
292 SQLITE3C = sqlite3-all.c
298 # Set the include code file to be used by executables and libraries when
305 # This is the name to use for the SQLite dynamic link library (DLL).
309 SQLITE3DLL = winsqlite3.dll
311 SQLITE3DLL = sqlite3.dll
315 # This is the name to use for the SQLite import library (LIB).
319 SQLITE3LIB = winsqlite3.lib
321 SQLITE3LIB = sqlite3.lib
325 # This is the name to use for the SQLite shell executable (EXE).
329 SQLITE3EXE = winsqlite3shell.exe
331 SQLITE3EXE = sqlite3.exe
335 # This is the argument used to set the program database (PDB) file for the
336 # SQLite shell executable (EXE).
338 !IFNDEF SQLITE3EXEPDB
342 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
347 # These are the names of the customized Tcl header files used by various parts
348 # of this makefile when the stdcall calling convention is in use. It is not
349 # used for any other purpose.
352 SQLITETCLH = sqlite_tcl.h
355 !IFNDEF SQLITETCLDECLSH
356 SQLITETCLDECLSH = sqlite_tclDecls.h
359 # This is the name to use for the dynamic link library (DLL) containing the
360 # Tcl bindings for SQLite.
362 !IFNDEF SQLITE3TCLDLL
363 SQLITE3TCLDLL = tclsqlite3.dll
366 # These are the additional targets that the targets that integrate with the
367 # Tcl library should depend on when compiling, etc.
369 !IFNDEF SQLITE_TCL_DEP
370 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
371 SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
378 # These are the "standard" SQLite compilation options used when compiling for
379 # the Windows platform.
381 !IFNDEF OPT_FEATURE_FLAGS
382 !IF $(MINIMAL_AMALGAMATION)==0
383 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
384 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS5=1
385 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
386 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_GEOPOLY=1
387 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
388 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
389 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
390 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
392 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
395 # Should the session extension be enabled? If so, add compilation options
399 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
400 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
403 # Always enable math functions on Windows
404 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS
406 # Should the rbu extension be enabled? If so, add compilation options
410 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
413 # Should structured exception handling (SEH) be enabled for WAL mode in
414 # the core library? It is on by default. Only omit it if the
415 # USE_SEH=0 option is provided on the nmake command-line.
418 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_OMIT_SEH=1
421 # These are the "extended" SQLite compilation options used when compiling for
422 # the Windows 10 platform.
424 !IFNDEF EXT_FEATURE_FLAGS
426 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
427 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
428 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
434 ###############################################################################
435 ############################### END OF OPTIONS ################################
436 ###############################################################################
438 # When compiling for the Windows 10 platform, the PLATFORM macro must be set
439 # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
443 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
447 # This assumes that MSVC is always installed in 32-bit Program Files directory
448 # and sets the variable for use in locating other 32-bit installs accordingly.
450 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
451 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
453 # Check for the predefined command macro CC. This should point to the compiler
454 # binary for the target platform. If it is not defined, simply define it to
455 # the legacy default value 'cl.exe'.
461 # Check for the predefined command macro CSC. This should point to a working
462 # C Sharp compiler binary. If it is not defined, simply define it to the
463 # legacy default value 'csc.exe'.
469 # Check for the command macro LD. This should point to the linker binary for
470 # the target platform. If it is not defined, simply define it to the legacy
471 # default value 'link.exe'.
477 # Check for the predefined command macro RC. This should point to the resource
478 # compiler binary for the target platform. If it is not defined, simply define
479 # it to the legacy default value 'rc.exe'.
485 # Check for the MSVC runtime library path macro. Otherwise, this value will
486 # default to the 'lib' directory underneath the MSVC installation directory.
489 CRTLIBPATH = $(VCINSTALLDIR)\lib
492 CRTLIBPATH = $(CRTLIBPATH:\\=\)
494 # Check for the command macro NCC. This should point to the compiler binary
495 # for the platform the compilation process is taking place on. If it is not
496 # defined, simply define it to have the same value as the CC macro. When
497 # cross-compiling, it is suggested that this macro be modified via the command
498 # line (since nmake itself does not provide a built-in method to guess it).
499 # For example, to use the x86 compiler when cross-compiling for x64, a command
500 # line similar to the following could be used (all on one line):
502 # nmake /f Makefile.msc sqlite3.dll
503 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
505 # Alternatively, the full path and file name to the compiler binary for the
506 # platform the compilation process is taking place may be specified (all on
509 # nmake /f Makefile.msc sqlite3.dll
510 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
511 # USE_NATIVE_LIBPATHS=1
515 !ELSEIF $(XCOMPILE)!=0
516 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
522 # Check for the MSVC native runtime library path macro. Otherwise,
523 # this value will default to the 'lib' directory underneath the MSVC
524 # installation directory.
527 NCRTLIBPATH = $(VCINSTALLDIR)\lib
530 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
532 # Check for the Platform SDK library path macro. Otherwise, this
533 # value will default to the 'lib' directory underneath the Windows
534 # SDK installation directory (the environment variable used appears
535 # to be available when using Visual C++ 2008 or later via the
539 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
542 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
544 # Check for the UCRT library path macro. Otherwise, this value will
545 # default to the version-specific, platform-specific 'lib' directory
546 # underneath the Windows SDK installation directory.
549 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
552 UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
554 # C compiler and options for use in building executables that
555 # will run on the platform that is doing the build.
557 !IF $(USE_FULLWARN)!=0
558 BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
560 BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
563 # Check if assembly code listings should be generated for the source
564 # code files to be compiled.
566 !IF $(USE_LISTINGS)!=0
570 # Check if the native library paths should be used when compiling
571 # the command line tools used during the compilation process. If
572 # so, set the necessary macro now.
574 !IF $(USE_NATIVE_LIBPATHS)!=0
575 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
578 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
579 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
583 # C compiler and options for use in building executables that
584 # will run on the target platform. (BCC and TCC are usually the
585 # same unless your are cross-compiling.)
587 !IF $(USE_FULLWARN)!=0
588 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
590 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
593 # Check if warnings should be treated as errors when compiling.
595 !IF $(USE_FATAL_WARN)!=0
599 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
600 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
602 # Check if we want to use the "stdcall" calling convention when compiling.
603 # This is not supported by the compilers for non-x86 platforms. It should
604 # also be noted here that building any target with these "stdcall" options
605 # will most likely fail if the Tcl library is also required. This is due
606 # to how the Tcl library functions are declared and exported (i.e. without
607 # an explicit calling convention, which results in "cdecl").
609 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
610 !IF "$(PLATFORM)"=="x86"
611 CORE_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
612 SHELL_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
614 TEST_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
618 CORE_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
619 SHELL_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
621 TEST_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
639 # These are additional compiler options used for the core library.
641 !IFNDEF CORE_COMPILE_OPTS
642 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
643 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
645 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
649 # These are the additional targets that the core library should depend on
652 !IFNDEF CORE_LINK_DEP
653 !IF $(DYNAMIC_SHELL)!=0
655 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
656 CORE_LINK_DEP = sqlite3.def
662 # These are additional linker options used for the core library.
664 !IFNDEF CORE_LINK_OPTS
665 !IF $(DYNAMIC_SHELL)!=0
667 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
668 CORE_LINK_OPTS = /DEF:sqlite3.def
674 # These are additional compiler options used for the shell executable.
676 !IFNDEF SHELL_COMPILE_OPTS
677 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
678 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
680 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
684 # This is the source code that the shell executable should be compiled
687 !IFNDEF SHELL_CORE_SRC
688 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
691 !ELSEIF $(USE_AMALGAMATION)==0
695 SHELL_CORE_SRC = $(SQLITE3C)
699 # This is the core library that the shell executable should depend on.
701 !IFNDEF SHELL_CORE_DEP
702 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
703 SHELL_CORE_DEP = $(SQLITE3DLL)
705 !ELSEIF $(USE_AMALGAMATION)==0
706 SHELL_CORE_DEP = libsqlite3.lib
714 # If zlib support is enabled, add the dependencies for it.
716 !IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
717 SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
718 TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
722 # This is the core library that the shell executable should link with.
724 !IFNDEF SHELL_CORE_LIB
725 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
726 SHELL_CORE_LIB = $(SQLITE3LIB)
728 !ELSEIF $(USE_AMALGAMATION)==0
729 SHELL_CORE_LIB = libsqlite3.lib
736 # These are additional linker options used for the shell executable.
738 !IFNDEF SHELL_LINK_OPTS
739 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
742 # Check if assembly code listings should be generated for the source
743 # code files to be compiled.
745 !IF $(USE_LISTINGS)!=0
749 # When compiling the library for use in the WinRT environment,
750 # the following compile-time options must be used as well to
751 # disable use of Win32 APIs that are not available and to enable
752 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
755 TCC = $(TCC) -DSQLITE_OS_WINRT=1
756 RCC = $(RCC) -DSQLITE_OS_WINRT=1
757 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
758 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
761 # C compiler options for the Windows 10 platform (needs MSVC 2015).
764 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
765 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
768 # Also, we need to dynamically link to the correct MSVC runtime
769 # when compiling for WinRT (e.g. debug or release) OR if the
770 # USE_CRT_DLL option is set to force dynamically linking to the
771 # MSVC runtime library.
773 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
792 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
793 # any extension header files by default. For non-amalgamation
794 # builds, we need to make sure the compiler can find these.
796 !IF $(USE_AMALGAMATION)==0
797 TCC = $(TCC) -I$(TOP)\ext\fts3
798 RCC = $(RCC) -I$(TOP)\ext\fts3
799 TCC = $(TCC) -I$(TOP)\ext\rtree
800 RCC = $(RCC) -I$(TOP)\ext\rtree
801 TCC = $(TCC) -I$(TOP)\ext\session
802 RCC = $(RCC) -I$(TOP)\ext\session
805 # The mksqlite3c.tcl script accepts some options on the command
806 # line. When compiling with debugging enabled, some of these
807 # options are necessary in order to allow debugging symbols to
808 # work correctly with Visual Studio when using the amalgamation.
810 !IFNDEF MKSQLITE3C_TOOL
811 !IF $(MINIMAL_AMALGAMATION)!=0
812 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
814 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
818 !IFNDEF MKSQLITE3C_ARGS
819 !IF $(DEBUG)>1 && $(NO_LINEMACROS)==0
820 MKSQLITE3C_ARGS = --linemacros=1
822 MKSQLITE3C_ARGS = --linemacros=0
824 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
825 MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
829 # The mksqlite3h.tcl script accepts some options on the command line.
830 # When compiling with stdcall support, some of these options are
833 !IFNDEF MKSQLITE3H_ARGS
834 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
835 MKSQLITE3H_ARGS = --useapicall
842 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
843 # Omitting the define will cause extra debugging code to be inserted and
844 # includes extra comments when "EXPLAIN stmt" is used.
847 TCC = $(TCC) -DNDEBUG
848 BCC = $(BCC) -DNDEBUG
849 RCC = $(RCC) -DNDEBUG
852 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
853 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
854 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
858 TCC = $(TCC) -DSQLITE_DEBUG=1
859 RCC = $(RCC) -DSQLITE_DEBUG=1
860 !IF $(DYNAMIC_SHELL)==0
861 TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
862 RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
866 !IF $(DEBUG)>4 || $(OSTRACE)!=0
867 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
868 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
872 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
873 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
876 # Prevent warnings about "insecure" MSVC runtime library functions
879 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
880 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
881 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
883 # Prevent warnings about "deprecated" POSIX functions being used.
885 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
886 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
887 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
889 # Use the SQLite debugging heap subsystem?
892 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
893 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
895 # Use native Win32 heap subsystem instead of malloc/free?
897 !ELSEIF $(WIN32HEAP)!=0
898 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
899 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
901 # Validate the heap on every call into the native Win32 heap subsystem?
904 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
905 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
910 # Address sanitizer if ASAN=1
913 TCC = $(TCC) /fsanitize=address
917 # The locations of the Tcl header and library files. Also, the library that
918 # non-stubs enabled programs using Tcl must link against. These variables
919 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
920 # prior to running nmake in order to match the actual installed location and
921 # version on this machine.
932 TCLDIR = $(TOP)\compat\tcl
936 TCLINCDIR = $(TCLDIR)\include
940 TCLLIBDIR = $(TCLDIR)\lib
944 LIBTCL = tcl$(TCLVERSION)$(TCLSUFFIX).lib
948 LIBTCLSTUB = tclstub$(TCLVERSION)$(TCLSUFFIX).lib
952 LIBTCLPATH = $(TCLDIR)\bin
955 # The locations of the zlib header and library files. These variables
956 # (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
957 # prior to running nmake in order to match the actual installed (or source
958 # code) location on this machine.
961 ZLIBDIR = $(TOP)\compat\zlib
965 ZLIBINCDIR = $(ZLIBDIR)
969 ZLIBLIBDIR = $(ZLIBDIR)
973 !IF $(DYNAMIC_SHELL)!=0
980 # The locations of the ICU header and library files. These variables
981 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
982 # prior to running nmake in order to match the actual installed location on
986 ICUDIR = $(TOP)\compat\icu
990 ICUINCDIR = $(ICUDIR)\include
994 ICULIBDIR = $(ICUDIR)\lib
998 LIBICU = icuuc.lib icuin.lib
1001 # This is the command to use for tclsh - normally just "tclsh", but we may
1002 # know the specific version we want to use. This variable (TCLSH_CMD) may be
1003 # overridden via the environment prior to running nmake in order to select a
1004 # specific Tcl shell to use.
1007 !IF $(USE_TCLSH_IN_PATH)!=0 || !EXIST("$(TCLDIR)\bin\tclsh.exe")
1010 TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
1015 # Compiler options needed for programs that use the readline() library.
1017 !IFNDEF READLINE_FLAGS
1018 READLINE_FLAGS = -DHAVE_READLINE=0
1021 # The library that programs using readline() must link against.
1027 # Should the database engine be compiled threadsafe
1029 TCC = $(TCC) -DSQLITE_THREADSAFE=1
1030 RCC = $(RCC) -DSQLITE_THREADSAFE=1
1032 # Do threads override each others locks by default (1), or do we test (-1)
1034 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
1035 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
1037 # Any target libraries which libsqlite must be linked against
1043 # Flags controlling use of the in memory btree implementation
1045 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
1046 # default to file, 2 to default to memory, and 3 to force temporary
1047 # tables to always be in memory.
1049 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
1050 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
1052 # Enable/disable loadable extensions, and other optional features
1053 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
1054 # The same set of OMIT and ENABLE flags should be passed to the
1055 # LEMON parser generator and the mkkeywordhash tool as well.
1057 # These are the required SQLite compilation options used when compiling for
1058 # the Windows platform.
1060 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
1062 # If we are linking to the RPCRT4 library, enable features that need it.
1064 !IF $(USE_RPCRT4_LIB)!=0
1065 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
1068 # Add the required and optional SQLite compilation options into the command
1069 # lines used to invoke the MSVC code and resource compilers.
1071 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
1072 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
1074 # Add in any optional parameters specified on the commane line, e.g.
1075 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
1077 TCC = $(TCC) $(OPTS)
1078 RCC = $(RCC) $(OPTS)
1080 # If compiling for debugging, add some defines.
1083 TCC = $(TCC) -D_DEBUG
1084 BCC = $(BCC) -D_DEBUG
1085 RCC = $(RCC) -D_DEBUG
1088 # If optimizations are enabled or disabled (either implicitly or
1089 # explicitly), add the necessary flags.
1091 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
1094 !IF $(USE_RUNTIME_CHECKS)!=0
1098 !ELSEIF $(OPTIMIZATIONS)>=3
1101 !ELSEIF $(OPTIMIZATIONS)==2
1104 !ELSEIF $(OPTIMIZATIONS)==1
1109 # If symbols are enabled (or compiling for debugging), enable PDBs.
1111 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1117 # If zlib support is enabled, add the compiler options for it.
1120 TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
1121 RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
1122 TCC = $(TCC) -I$(ZLIBINCDIR)
1123 RCC = $(RCC) -I$(ZLIBINCDIR)
1126 # If ICU support is enabled, add the compiler options for it.
1129 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
1130 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
1131 TCC = $(TCC) -I$(TOP)\ext\icu
1132 RCC = $(RCC) -I$(TOP)\ext\icu
1133 TCC = $(TCC) -I$(ICUINCDIR)
1134 RCC = $(RCC) -I$(ICUINCDIR)
1138 # Command line prefixes for compiling code, compiling resources,
1141 LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
1142 LTRCOMPILE = $(RCC) -r
1144 LTLINK = $(TCC) -Fe$@
1146 # If requested, link to the RPCRT4 library.
1148 !IF $(USE_RPCRT4_LIB)!=0
1149 LTLIBS = $(LTLIBS) rpcrt4.lib
1152 # If a platform was set, force the linker to target that.
1153 # Note that the vcvars*.bat family of batch files typically
1154 # set this for you. Otherwise, the linker will attempt
1155 # to deduce the binary type based on the object files.
1157 LTLINKOPTS = $(LTLINKOPTS) /NOLOGO /MACHINE:$(PLATFORM)
1158 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1159 !ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
1160 "$(VISUALSTUDIOVERSION)"=="14.0" || \
1161 "$(VISUALSTUDIOVERSION)"=="15.0"
1162 LTLINKOPTS = /NOLOGO /MACHINE:x86
1163 LTLIBOPTS = /NOLOGO /MACHINE:x86
1165 LTLINKOPTS = $(LTLINKOPTS) /NOLOGO
1169 # When compiling for use in the WinRT environment, the following
1170 # linker option must be used to mark the executable as runnable
1171 # only in the context of an application container.
1174 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
1175 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
1176 !IFNDEF STORELIBPATH
1177 !IF "$(PLATFORM)"=="x86"
1178 STORELIBPATH = $(CRTLIBPATH)\store
1179 !ELSEIF "$(PLATFORM)"=="x64"
1180 STORELIBPATH = $(CRTLIBPATH)\store\amd64
1181 !ELSEIF "$(PLATFORM)"=="ARM"
1182 STORELIBPATH = $(CRTLIBPATH)\store\arm
1184 STORELIBPATH = $(CRTLIBPATH)\store
1187 STORELIBPATH = $(STORELIBPATH:\\=\)
1188 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
1192 # When compiling for Windows Phone 8.1, an extra library path is
1195 !IF $(USE_WP81_OPTS)!=0
1197 !IF "$(PLATFORM)"=="x86"
1198 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1199 !ELSEIF "$(PLATFORM)"=="ARM"
1200 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1202 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1207 # When compiling for Windows Phone 8.1, some extra linker options
1208 # are also required.
1210 !IF $(USE_WP81_OPTS)!=0
1212 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1214 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1215 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1216 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1219 # When compiling for UWP or the Windows 10 platform, some extra linker
1220 # options are also required.
1222 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
1223 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1224 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1226 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1231 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
1233 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1235 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1239 # If either debugging or symbols are enabled, enable PDBs.
1241 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1242 LDFLAGS = /DEBUG $(LDOPTS)
1248 # Start with the Tcl related linker options.
1251 TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
1252 TCLLIBS = $(TCLLIBS) $(LIBTCL)
1255 # If zlib support is enabled, add the linker options for it.
1258 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
1259 LTLIBS = $(LTLIBS) $(ZLIBLIB)
1262 # If ICU support is enabled, add the linker options for it.
1265 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1266 LTLIBS = $(LTLIBS) $(LIBICU)
1270 # You should not have to change anything below this line
1271 ###############################################################################
1274 # Object files for the SQLite library (non-amalgamation).
1276 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
1277 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
1278 callback.lo complete.lo ctime.lo \
1279 date.lo dbpage.lo dbstat.lo delete.lo \
1280 expr.lo fault.lo fkey.lo \
1281 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1282 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
1283 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
1285 func.lo global.lo hash.lo \
1286 icu.lo insert.lo json.lo legacy.lo loadext.lo \
1287 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1288 memdb.lo memjournal.lo \
1289 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1290 notify.lo opcodes.lo os.lo os_kv.lo os_unix.lo os_win.lo \
1291 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
1292 random.lo resolve.lo rowset.lo rtree.lo \
1293 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
1294 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
1295 update.lo upsert.lo util.lo vacuum.lo \
1296 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
1297 vdbetrace.lo vdbevtab.lo wal.lo walker.lo where.lo wherecode.lo \
1299 window.lo utf.lo vtab.lo
1302 # Object files for the amalgamation.
1304 LIBOBJS1 = sqlite3.lo
1306 # Determine the real value of LIBOBJ based on the 'configure' script
1309 !IF $(USE_AMALGAMATION)==0
1310 LIBOBJ = $(LIBOBJS0)
1313 LIBOBJ = $(LIBOBJS1)
1318 # Determine if embedded resource compilation and usage are enabled.
1321 LIBRESOBJS = sqlite3res.lo
1327 # Core source code files, part 1.
1330 $(TOP)\src\sqlcipher.c \
1331 $(TOP)\src\crypto_cc.c \
1332 $(TOP)\src\crypto_libtomcrypt.c \
1333 $(TOP)\src\crypto_nss.c \
1334 $(TOP)\src\crypto_openssl.c \
1335 $(TOP)\src\sqlcipher.h \
1336 $(TOP)\src\alter.c \
1337 $(TOP)\src\analyze.c \
1338 $(TOP)\src\attach.c \
1340 $(TOP)\src\backup.c \
1341 $(TOP)\src\bitvec.c \
1342 $(TOP)\src\btmutex.c \
1343 $(TOP)\src\btree.c \
1344 $(TOP)\src\build.c \
1345 $(TOP)\src\callback.c \
1346 $(TOP)\src\complete.c \
1347 $(TOP)\src\ctime.c \
1349 $(TOP)\src\dbpage.c \
1350 $(TOP)\src\dbstat.c \
1351 $(TOP)\src\delete.c \
1353 $(TOP)\src\fault.c \
1356 $(TOP)\src\global.c \
1358 $(TOP)\src\insert.c \
1360 $(TOP)\src\legacy.c \
1361 $(TOP)\src\loadext.c \
1363 $(TOP)\src\malloc.c \
1369 $(TOP)\src\memdb.c \
1370 $(TOP)\src\memjournal.c \
1371 $(TOP)\src\mutex.c \
1372 $(TOP)\src\mutex_noop.c \
1373 $(TOP)\src\mutex_unix.c \
1374 $(TOP)\src\mutex_w32.c \
1375 $(TOP)\src\notify.c \
1377 $(TOP)\src\os_kv.c \
1378 $(TOP)\src\os_unix.c \
1381 # Core source code files, part 2.
1384 $(TOP)\src\pager.c \
1385 $(TOP)\src\pcache.c \
1386 $(TOP)\src\pcache1.c \
1387 $(TOP)\src\pragma.c \
1388 $(TOP)\src\prepare.c \
1389 $(TOP)\src\printf.c \
1390 $(TOP)\src\random.c \
1391 $(TOP)\src\resolve.c \
1392 $(TOP)\src\rowset.c \
1393 $(TOP)\src\select.c \
1394 $(TOP)\src\status.c \
1395 $(TOP)\src\table.c \
1396 $(TOP)\src\threads.c \
1397 $(TOP)\src\tclsqlite.c \
1398 $(TOP)\src\tokenize.c \
1399 $(TOP)\src\treeview.c \
1400 $(TOP)\src\trigger.c \
1402 $(TOP)\src\update.c \
1403 $(TOP)\src\upsert.c \
1405 $(TOP)\src\vacuum.c \
1407 $(TOP)\src\vdbeapi.c \
1408 $(TOP)\src\vdbeaux.c \
1409 $(TOP)\src\vdbeblob.c \
1410 $(TOP)\src\vdbemem.c \
1411 $(TOP)\src\vdbesort.c \
1412 $(TOP)\src\vdbetrace.c \
1413 $(TOP)\src\vdbevtab.c \
1416 $(TOP)\src\walker.c \
1417 $(TOP)\src\where.c \
1418 $(TOP)\src\wherecode.c \
1419 $(TOP)\src\whereexpr.c \
1422 # Core miscellaneous files.
1427 # Core header files, part 1.
1430 $(TOP)\src\btree.h \
1431 $(TOP)\src\btreeInt.h \
1433 $(TOP)\src\hwtime.h \
1435 $(TOP)\src\mutex.h \
1437 $(TOP)\src\os_common.h \
1438 $(TOP)\src\os_setup.h \
1441 # Core header files, part 2.
1444 $(TOP)\src\pager.h \
1445 $(TOP)\src\pcache.h \
1446 $(TOP)\src\pragma.h \
1447 $(TOP)\src\sqlite.h.in \
1448 $(TOP)\src\sqlite3ext.h \
1449 $(TOP)\src\sqliteInt.h \
1450 $(TOP)\src\sqliteLimit.h \
1452 $(TOP)\src\vdbeInt.h \
1453 $(TOP)\src\vxworks.h \
1455 $(TOP)\src\whereInt.h
1457 # Extension source code files, part 2.
1460 $(TOP)\ext\fts3\fts3.c \
1461 $(TOP)\ext\fts3\fts3_aux.c \
1462 $(TOP)\ext\fts3\fts3_expr.c \
1463 $(TOP)\ext\fts3\fts3_hash.c \
1464 $(TOP)\ext\fts3\fts3_icu.c \
1465 $(TOP)\ext\fts3\fts3_porter.c \
1466 $(TOP)\ext\fts3\fts3_snippet.c \
1467 $(TOP)\ext\fts3\fts3_tokenizer.c \
1468 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1469 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1470 $(TOP)\ext\fts3\fts3_unicode.c \
1471 $(TOP)\ext\fts3\fts3_unicode2.c \
1472 $(TOP)\ext\fts3\fts3_write.c \
1473 $(TOP)\ext\icu\icu.c \
1474 $(TOP)\ext\rtree\rtree.c \
1475 $(TOP)\ext\session\sqlite3session.c \
1476 $(TOP)\ext\rbu\sqlite3rbu.c \
1477 $(TOP)\ext\misc\stmt.c
1479 # Extension header files, part 2.
1482 $(TOP)\ext\fts3\fts3.h \
1483 $(TOP)\ext\fts3\fts3Int.h \
1484 $(TOP)\ext\fts3\fts3_hash.h \
1485 $(TOP)\ext\fts3\fts3_tokenizer.h \
1486 $(TOP)\ext\icu\sqliteicu.h \
1487 $(TOP)\ext\rtree\rtree.h \
1488 $(TOP)\ext\rtree\geopoly.c \
1489 $(TOP)\ext\rbu\sqlite3rbu.h \
1490 $(TOP)\ext\session\sqlite3session.h
1492 # Generated source code files
1498 # Generated header files
1507 # Generated Tcl header files
1509 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1517 # All source code files.
1519 SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC07) $(SRC09) $(SRC10) $(SRC11) $(SRC12)
1521 # Source code to the test files.
1524 $(TOP)\src\test1.c \
1525 $(TOP)\src\test2.c \
1526 $(TOP)\src\test3.c \
1527 $(TOP)\src\test4.c \
1528 $(TOP)\src\test5.c \
1529 $(TOP)\src\test6.c \
1530 $(TOP)\src\test8.c \
1531 $(TOP)\src\test9.c \
1532 $(TOP)\src\test_autoext.c \
1533 $(TOP)\src\test_async.c \
1534 $(TOP)\src\test_backup.c \
1535 $(TOP)\src\test_bestindex.c \
1536 $(TOP)\src\test_blob.c \
1537 $(TOP)\src\test_btree.c \
1538 $(TOP)\src\test_config.c \
1539 $(TOP)\src\test_delete.c \
1540 $(TOP)\src\test_demovfs.c \
1541 $(TOP)\src\test_devsym.c \
1542 $(TOP)\src\test_fs.c \
1543 $(TOP)\src\test_func.c \
1544 $(TOP)\src\test_hexio.c \
1545 $(TOP)\src\test_init.c \
1546 $(TOP)\src\test_intarray.c \
1547 $(TOP)\src\test_journal.c \
1548 $(TOP)\src\test_malloc.c \
1549 $(TOP)\src\test_md5.c \
1550 $(TOP)\src\test_multiplex.c \
1551 $(TOP)\src\test_mutex.c \
1552 $(TOP)\src\test_onefile.c \
1553 $(TOP)\src\test_osinst.c \
1554 $(TOP)\src\test_pcache.c \
1555 $(TOP)\src\test_quota.c \
1556 $(TOP)\src\test_rtree.c \
1557 $(TOP)\src\test_schema.c \
1558 $(TOP)\src\test_superlock.c \
1559 $(TOP)\src\test_syscall.c \
1560 $(TOP)\src\test_tclsh.c \
1561 $(TOP)\src\test_tclvar.c \
1562 $(TOP)\src\test_thread.c \
1563 $(TOP)\src\test_vdbecov.c \
1564 $(TOP)\src\test_vfs.c \
1565 $(TOP)\src\test_windirent.c \
1566 $(TOP)\src\test_window.c \
1567 $(TOP)\src\test_wsd.c \
1568 $(TOP)\ext\fts3\fts3_term.c \
1569 $(TOP)\ext\fts3\fts3_test.c \
1570 $(TOP)\ext\rbu\test_rbu.c \
1571 $(TOP)\ext\session\test_session.c
1573 # Statically linked extensions.
1576 $(TOP)\ext\expert\sqlite3expert.c \
1577 $(TOP)\ext\expert\test_expert.c \
1578 $(TOP)\ext\misc\amatch.c \
1579 $(TOP)\ext\misc\appendvfs.c \
1580 $(TOP)\ext\misc\basexx.c \
1581 $(TOP)\ext\misc\carray.c \
1582 $(TOP)\ext\misc\cksumvfs.c \
1583 $(TOP)\ext\misc\closure.c \
1584 $(TOP)\ext\misc\csv.c \
1585 $(TOP)\ext\misc\decimal.c \
1586 $(TOP)\ext\misc\eval.c \
1587 $(TOP)\ext\misc\explain.c \
1588 $(TOP)\ext\misc\fileio.c \
1589 $(TOP)\ext\misc\fuzzer.c \
1590 $(TOP)\ext\fts5\fts5_tcl.c \
1591 $(TOP)\ext\fts5\fts5_test_mi.c \
1592 $(TOP)\ext\fts5\fts5_test_tok.c \
1593 $(TOP)\ext\misc\ieee754.c \
1594 $(TOP)\ext\misc\mmapwarm.c \
1595 $(TOP)\ext\misc\nextchar.c \
1596 $(TOP)\ext\misc\normalize.c \
1597 $(TOP)\ext\misc\percentile.c \
1598 $(TOP)\ext\misc\prefixes.c \
1599 $(TOP)\ext\misc\qpvtab.c \
1600 $(TOP)\ext\misc\randomjson.c \
1601 $(TOP)\ext\misc\regexp.c \
1602 $(TOP)\ext\misc\remember.c \
1603 $(TOP)\ext\misc\series.c \
1604 $(TOP)\ext\misc\spellfix.c \
1605 $(TOP)\ext\misc\totype.c \
1606 $(TOP)\ext\misc\unionvtab.c \
1607 $(TOP)\ext\misc\wholenumber.c \
1608 $(TOP)\ext\rtree\test_rtreedoc.c \
1609 $(TOP)\ext\recover\sqlite3recover.c \
1610 $(TOP)\ext\recover\test_recover.c \
1611 $(TOP)\ext\intck\test_intck.c \
1612 $(TOP)\ext\intck\sqlite3intck.c \
1613 $(TOP)\ext\recover\dbdata.c
1615 # If use of zlib is enabled, add the "zipfile.c" source file.
1618 TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
1621 # Source code to the library files needed by the test fixture
1622 # (non-amalgamation)
1629 $(TOP)\ext\async\sqlite3async.c \
1632 # Header files used by all library source files.
1635 $(TOP)\src\btree.h \
1636 $(TOP)\src\btreeInt.h \
1638 $(TOP)\src\hwtime.h \
1641 $(TOP)\src\mutex.h \
1644 $(TOP)\src\os_common.h \
1645 $(TOP)\src\os_setup.h \
1646 $(TOP)\src\os_win.h \
1647 $(TOP)\src\pager.h \
1648 $(TOP)\src\pcache.h \
1650 $(TOP)\src\pragma.h \
1653 $(TOP)\src\sqliteInt.h \
1654 $(TOP)\src\sqliteLimit.h \
1656 $(TOP)\src\vdbeInt.h \
1657 $(TOP)\src\vxworks.h \
1658 $(TOP)\src\whereInt.h
1660 # Header files used by extensions
1662 EXTHDR = $(EXTHDR) \
1663 $(TOP)\ext\fts3\fts3.h \
1664 $(TOP)\ext\fts3\fts3Int.h \
1665 $(TOP)\ext\fts3\fts3_hash.h \
1666 $(TOP)\ext\fts3\fts3_tokenizer.h
1667 EXTHDR = $(EXTHDR) \
1668 $(TOP)\ext\rtree\rtree.h \
1669 $(TOP)\ext\rtree\geopoly.c
1670 EXTHDR = $(EXTHDR) \
1671 $(TOP)\ext\icu\sqliteicu.h
1672 EXTHDR = $(EXTHDR) \
1673 $(TOP)\ext\rtree\sqlite3rtree.h
1674 EXTHDR = $(EXTHDR) \
1675 $(TOP)\ext\session\sqlite3session.h
1677 # executables needed for testing
1682 sqlite3_analyzer.exe \
1683 sqlite3_checker.exe \
1688 # Databases containing fuzzer test cases
1691 $(TOP)\test\fuzzdata1.db \
1692 $(TOP)\test\fuzzdata2.db \
1693 $(TOP)\test\fuzzdata3.db \
1694 $(TOP)\test\fuzzdata4.db \
1695 $(TOP)\test\fuzzdata5.db \
1696 $(TOP)\test\fuzzdata6.db \
1697 $(TOP)\test\fuzzdata7.db \
1698 $(TOP)\test\fuzzdata8.db
1701 # Additional compiler options for the shell. These are only effective
1702 # when the shell is not being dynamically linked.
1704 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1705 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_DQS=0
1706 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
1707 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
1708 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
1709 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1
1710 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_STMT_SCANSTATUS=1
1711 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_STRICT_SUBTYPE=1
1715 # Extra compiler options for various test tools.
1717 MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_FTS5
1718 FUZZERSHELL_COMPILE_OPTS =
1719 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -I$(TOP)\test -I$(TOP)\ext\recover
1720 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MEMSYS5
1721 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OSS_FUZZ
1722 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
1723 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB
1724 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
1725 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
1726 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DESERIALIZE
1727 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
1728 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS3_PARENTHESIS
1729 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
1730 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS5
1731 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
1732 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MATH_FUNCTIONS
1733 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MEMSYS5
1734 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_NORMALIZE
1735 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC
1736 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_PREUPDATE_HOOK
1737 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
1738 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_SESSION
1739 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STMTVTAB
1740 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
1741 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STAT4
1742 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STMT_SCANSTATUS
1743 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MEMORY=50000000
1744 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MMAP_SIZE=0
1745 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION
1746 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1747 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRIVATE=""
1748 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_STRICT_SUBTYPE=1
1749 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_STATIC_RANDOMJSON
1751 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MEMORY=50000000
1752 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1753 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION
1754 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
1755 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS5
1756 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
1757 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
1758 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
1759 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
1760 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\fuzzcheck.c
1761 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\ossfuzz.c
1762 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\fuzzinvariants.c
1763 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\vt02.c
1764 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\recover\dbdata.c
1765 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\recover\sqlite3recover.c
1766 FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\misc\randomjson.c
1768 OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
1769 DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
1770 KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
1771 ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
1773 # Standard options to testfixture.
1775 TESTOPTS = --verbose=file --output=test-out.txt
1777 # Extra targets for the "all" target that require Tcl.
1780 ALL_TCL_TARGETS = $(SQLITE3TCLDLL)
1786 # This is the default Makefile target. The objects listed here
1787 # are what get build when you type just "make" with no arguments.
1789 core: dll libsqlite3.lib shell
1791 # Targets that require the Tcl library.
1793 tcl: $(ALL_TCL_TARGETS)
1795 # This Makefile target builds all of the standard binaries.
1799 # Dynamic link library section.
1805 shell: $(SQLITE3EXE)
1808 libsqlite3.lib: $(LIBOBJ)
1809 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1811 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1812 $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1814 tclsqlite3.def: tclsqlite.lo
1815 echo EXPORTS > tclsqlite3.def
1816 dumpbin /all tclsqlite.lo \
1817 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+/EXPORT:_?((?:Sqlite3|Tclsqlite3)_[^@]*)(?:@\d+)?$$" \1 \
1818 | sort >> tclsqlite3.def
1820 pkgIndex.tcl: $(TOP)\VERSION
1821 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1822 echo package ifneeded sqlite3 @version@ [list load [file join $$dir $(SQLITE3TCLDLL)] sqlite3] \
1823 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact @version@ %%V > pkgIndex.tcl \
1826 $(SQLITE3TCLDLL): libtclsqlite3.lib $(LIBRESOBJS) tclsqlite3.def pkgIndex.tcl
1827 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:tclsqlite3.def /OUT:$@ libtclsqlite3.lib $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1830 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1831 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1834 sqlite3.def: libsqlite3.lib
1835 echo EXPORTS > sqlite3.def
1836 dumpbin /all libsqlite3.lib \
1837 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \
1838 | sort >> sqlite3.def
1841 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1842 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
1843 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1846 sqldiff.exe: $(TOP)\tool\sqldiff.c $(TOP)\ext\consio\console_io.h $(TOP)\ext\consio\console_io.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
1847 $(LTLINK) $(NO_WARN) -I$(TOP)\ext\consio $(TOP)\tool\sqldiff.c $(TOP)\ext\consio\console_io.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LIBRESOBJS)
1849 dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1850 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1852 scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1853 $(LTLINK) $(NO_WARN) -DSCRUB_STANDALONE=1 $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1855 srcck1.exe: $(TOP)\tool\srcck1.c
1856 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1858 sourcetest: srcck1.exe $(SQLITE3C)
1859 srcck1.exe $(SQLITE3C)
1861 src-verify.exe: $(TOP)\tool\src-verify.c
1862 $(LTLINK) $(NO_WARN) $(TOP)\tool\src-verify.c
1864 verify-source: src-verify.exe
1865 src-verify.exe $(TOP)
1867 fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1868 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1870 dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
1871 $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1873 fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1874 $(LTLINK) /F 8388608 $(NO_WARN) $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1876 fuzzcheck-asan.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1877 $(LTLINK) $(NO_WARN) /fsanitize=address $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1879 ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1880 $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1882 sessionfuzz.exe: zlib $(TOP)\test\sessionfuzz.c $(SQLITE3C) $(SQLITE3H)
1883 $(LTLINK) $(NO_WARN) -I$(ZLIBINCDIR) $(TOP)\test\sessionfuzz.c /link $(LDFLAGS) $(LTLINKOPTS) /LIBPATH:$(ZLIBLIBDIR) $(ZLIBLIB)
1885 mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1886 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1888 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1889 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1891 mptest: mptester.exe
1892 del /Q mptest.db 2>NUL
1893 $(MPTEST1) --journalmode DELETE
1894 $(MPTEST2) --journalmode WAL
1895 $(MPTEST1) --journalmode WAL
1896 $(MPTEST2) --journalmode PERSIST
1897 $(MPTEST1) --journalmode PERSIST
1898 $(MPTEST2) --journalmode TRUNCATE
1899 $(MPTEST1) --journalmode TRUNCATE
1900 $(MPTEST2) --journalmode DELETE
1902 # This target creates a directory named "tsrc" and fills it with
1903 # copies of all of the C source code and header files needed to
1904 # build on the target system. Some of the C source code and header
1905 # files are automatically generated. This target takes care of
1906 # all that automatic generation.
1908 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
1909 -rmdir /Q/S tsrc 2>NUL
1911 for %i in ($(SRC00)) do copy /Y %i tsrc
1912 for %i in ($(SRC01)) do copy /Y %i tsrc
1913 for %i in ($(SRC03)) do copy /Y %i tsrc
1914 for %i in ($(SRC04)) do copy /Y %i tsrc
1915 for %i in ($(SRC05)) do copy /Y %i tsrc
1916 for %i in ($(SRC07)) do copy /Y %i tsrc
1917 for %i in ($(SRC09)) do copy /Y %i tsrc
1918 for %i in ($(SRC10)) do copy /Y %i tsrc
1919 for %i in ($(SRC11)) do copy /Y %i tsrc
1920 for %i in ($(SRC12)) do copy /Y %i tsrc
1922 copy /B tsrc\fts5.c +,,
1924 copy /B tsrc\fts5.h +,,
1925 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1926 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1927 move vdbe.new tsrc\vdbe.c
1928 echo > .target_source
1930 sqlite3.c: .target_source sqlite3ext.h sqlite3session.h $(MKSQLITE3C_TOOL) src-verify.exe
1931 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS) $(EXTRA_SRC)
1933 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1934 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1937 # Rule to build the amalgamation
1939 sqlite3.lo: $(SQLITE3C)
1940 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1943 # Rules to build the LEMON compiler generator
1945 lempar.c: $(TOP)\tool\lempar.c
1946 copy /Y $(TOP)\tool\lempar.c .
1947 copy /B lempar.c +,,
1949 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1950 $(BCC) $(NO_WARN) -Daccess=_access \
1951 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1954 # Rules to build the source-id generator tool
1956 mksourceid.exe: $(TOP)\tool\mksourceid.c
1957 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1959 # Rules to build individual *.lo files from generated *.c files. This
1965 parse.lo: parse.c $(HDR)
1966 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1968 opcodes.lo: opcodes.c
1969 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1972 # Rule to build the Win32 resources object file.
1976 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H) $(TOP)\VERSION
1977 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1978 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1979 echo #define SQLITE_RESOURCE_VERSION %%V \
1980 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1982 echo #endif >> sqlite3rc.h
1983 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1988 # Rules to build individual *.lo files from files in the src directory.
1990 alter.lo: $(TOP)\src\alter.c $(HDR)
1991 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1993 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1994 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1996 attach.lo: $(TOP)\src\attach.c $(HDR)
1997 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1999 auth.lo: $(TOP)\src\auth.c $(HDR)
2000 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
2002 backup.lo: $(TOP)\src\backup.c $(HDR)
2003 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
2005 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
2006 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
2008 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
2009 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
2011 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
2012 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
2014 build.lo: $(TOP)\src\build.c $(HDR)
2015 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
2017 callback.lo: $(TOP)\src\callback.c $(HDR)
2018 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
2020 complete.lo: $(TOP)\src\complete.c $(HDR)
2021 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
2023 ctime.lo: $(TOP)\src\ctime.c $(HDR)
2024 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
2026 date.lo: $(TOP)\src\date.c $(HDR)
2027 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
2029 dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
2030 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
2032 dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
2033 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
2035 delete.lo: $(TOP)\src\delete.c $(HDR)
2036 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
2038 expr.lo: $(TOP)\src\expr.c $(HDR)
2039 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
2041 fault.lo: $(TOP)\src\fault.c $(HDR)
2042 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
2044 fkey.lo: $(TOP)\src\fkey.c $(HDR)
2045 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
2047 func.lo: $(TOP)\src\func.c $(HDR)
2048 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
2050 global.lo: $(TOP)\src\global.c $(HDR)
2051 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
2053 hash.lo: $(TOP)\src\hash.c $(HDR)
2054 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
2056 insert.lo: $(TOP)\src\insert.c $(HDR)
2057 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
2059 json.lo: $(TOP)\src\json.c $(HDR)
2060 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\json.c
2062 legacy.lo: $(TOP)\src\legacy.c $(HDR)
2063 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
2065 loadext.lo: $(TOP)\src\loadext.c $(HDR)
2066 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
2068 main.lo: $(TOP)\src\main.c $(HDR)
2069 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
2071 malloc.lo: $(TOP)\src\malloc.c $(HDR)
2072 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
2074 mem0.lo: $(TOP)\src\mem0.c $(HDR)
2075 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
2077 mem1.lo: $(TOP)\src\mem1.c $(HDR)
2078 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
2080 mem2.lo: $(TOP)\src\mem2.c $(HDR)
2081 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
2083 mem3.lo: $(TOP)\src\mem3.c $(HDR)
2084 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
2086 mem5.lo: $(TOP)\src\mem5.c $(HDR)
2087 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
2089 memdb.lo: $(TOP)\src\memdb.c $(HDR)
2090 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memdb.c
2092 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
2093 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
2095 mutex.lo: $(TOP)\src\mutex.c $(HDR)
2096 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
2098 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
2099 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
2101 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
2102 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
2104 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
2105 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
2107 notify.lo: $(TOP)\src\notify.c $(HDR)
2108 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
2110 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
2111 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
2113 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
2114 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
2116 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
2117 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
2119 os.lo: $(TOP)\src\os.c $(HDR)
2120 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
2122 os_kv.lo: $(TOP)\src\os_kv.c $(HDR)
2123 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_kv.c
2125 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
2126 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
2128 os_win.lo: $(TOP)\src\os_win.c $(HDR)
2129 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
2131 pragma.lo: $(TOP)\src\pragma.c $(HDR)
2132 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
2134 prepare.lo: $(TOP)\src\prepare.c $(HDR)
2135 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
2137 printf.lo: $(TOP)\src\printf.c $(HDR)
2138 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
2140 random.lo: $(TOP)\src\random.c $(HDR)
2141 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
2143 resolve.lo: $(TOP)\src\resolve.c $(HDR)
2144 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
2146 rowset.lo: $(TOP)\src\rowset.c $(HDR)
2147 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
2149 select.lo: $(TOP)\src\select.c $(HDR)
2150 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
2152 status.lo: $(TOP)\src\status.c $(HDR)
2153 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
2155 table.lo: $(TOP)\src\table.c $(HDR)
2156 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
2158 threads.lo: $(TOP)\src\threads.c $(HDR)
2159 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
2161 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
2162 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
2164 treeview.lo: $(TOP)\src\treeview.c $(HDR)
2165 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
2167 trigger.lo: $(TOP)\src\trigger.c $(HDR)
2168 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
2170 update.lo: $(TOP)\src\update.c $(HDR)
2171 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
2173 upsert.lo: $(TOP)\src\upsert.c $(HDR)
2174 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\upsert.c
2176 utf.lo: $(TOP)\src\utf.c $(HDR)
2177 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
2179 util.lo: $(TOP)\src\util.c $(HDR)
2180 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
2182 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
2183 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
2185 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
2186 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
2188 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
2189 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
2191 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
2192 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
2194 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
2195 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
2197 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
2198 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
2200 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
2201 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
2203 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
2204 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
2206 vdbevtab.lo: $(TOP)\src\vdbevtab.c $(HDR)
2207 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbevtab.c
2209 vtab.lo: $(TOP)\src\vtab.c $(HDR)
2210 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
2212 wal.lo: $(TOP)\src\wal.c $(HDR)
2213 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
2215 walker.lo: $(TOP)\src\walker.c $(HDR)
2216 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
2218 where.lo: $(TOP)\src\where.c $(HDR)
2219 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
2221 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
2222 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
2224 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
2225 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
2227 window.lo: $(TOP)\src\window.c $(HDR)
2228 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\window.c
2230 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2231 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2233 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2234 $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2236 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2237 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2239 # Rules to build opcodes.c and opcodes.h
2241 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
2242 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
2244 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
2245 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
2247 # Rules to build parse.c and parse.h - the outputs of lemon.
2251 parse.c: $(TOP)\src\parse.y lemon.exe
2252 del /Q parse.y parse.h parse.h.temp 2>NUL
2253 copy /Y $(TOP)\src\parse.y .
2255 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S parse.y
2257 $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
2258 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
2260 sqlite3ext.h: .target_source
2261 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2262 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
2263 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
2264 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
2266 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
2267 copy /B sqlite3ext.h +,,
2270 sqlite3session.h: $(TOP)\ext\session\sqlite3session.h
2271 copy /Y $(TOP)\ext\session\sqlite3session.h .
2272 copy /B sqlite3session.h +,,
2274 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
2275 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
2276 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
2278 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
2279 .\mkkeywordhash.exe > keywordhash.h
2281 # Source and header files that shell.c depends on
2283 $(TOP)\src\shell.c.in \
2284 $(TOP)\ext\consio\console_io.c \
2285 $(TOP)\ext\consio\console_io.h \
2286 $(TOP)\ext\expert\sqlite3expert.c \
2287 $(TOP)\ext\expert\sqlite3expert.h \
2288 $(TOP)\ext\intck\sqlite3intck.c \
2289 $(TOP)\ext\intck\sqlite3intck.h \
2290 $(TOP)\ext\misc\appendvfs.c \
2291 $(TOP)\ext\misc\base64.c \
2292 $(TOP)\ext\misc\base85.c \
2293 $(TOP)\ext\misc\completion.c \
2294 $(TOP)\ext\misc\decimal.c \
2295 $(TOP)\ext\misc\fileio.c \
2296 $(TOP)\ext\misc\ieee754.c \
2297 $(TOP)\ext\misc\memtrace.c \
2298 $(TOP)\ext\misc\pcachetrace.c \
2299 $(TOP)\ext\misc\regexp.c \
2300 $(TOP)\ext\misc\series.c \
2301 $(TOP)\ext\misc\shathree.c \
2302 $(TOP)\ext\misc\sqlar.c \
2303 $(TOP)\ext\misc\uint.c \
2304 $(TOP)\ext\misc\zipfile.c \
2305 $(TOP)\ext\recover\dbdata.c \
2306 $(TOP)\ext\recover\sqlite3recover.c \
2307 $(TOP)\ext\recover\sqlite3recover.h \
2308 $(TOP)\src\test_windirent.c \
2309 $(TOP)\src\test_windirent.h
2311 # If use of zlib is enabled, add the "zipfile.c" source file.
2314 SHELL_DEP = $(SHELL_DEP) $(TOP)\ext\misc\sqlar.c
2315 SHELL_DEP = $(SHELL_DEP) $(TOP)\ext\misc\zipfile.c
2318 shell.c: $(SHELL_DEP) $(TOP)\tool\mkshellc.tcl
2319 $(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
2322 pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
2324 # Rules to build the extension objects.
2326 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
2327 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
2329 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
2330 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
2332 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
2333 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
2335 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
2336 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
2338 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
2339 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
2341 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
2342 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
2344 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
2345 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
2347 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
2348 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
2350 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
2351 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
2353 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
2354 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
2356 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
2357 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
2359 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
2360 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
2362 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
2363 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
2365 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
2366 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
2368 stmt.lo: $(TOP)\ext\misc\stmt.c $(HDR) $(EXTHDR)
2369 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\stmt.c
2371 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
2372 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
2374 sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
2375 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
2380 $(TOP)\ext\fts5\fts5.h \
2381 $(TOP)\ext\fts5\fts5Int.h \
2382 $(TOP)\ext\fts5\fts5_aux.c \
2383 $(TOP)\ext\fts5\fts5_buffer.c \
2384 $(TOP)\ext\fts5\fts5_main.c \
2385 $(TOP)\ext\fts5\fts5_config.c \
2386 $(TOP)\ext\fts5\fts5_expr.c \
2387 $(TOP)\ext\fts5\fts5_hash.c \
2388 $(TOP)\ext\fts5\fts5_index.c \
2389 fts5parse.c fts5parse.h \
2390 $(TOP)\ext\fts5\fts5_storage.c \
2391 $(TOP)\ext\fts5\fts5_tokenize.c \
2392 $(TOP)\ext\fts5\fts5_unicode2.c \
2393 $(TOP)\ext\fts5\fts5_varint.c \
2394 $(TOP)\ext\fts5\fts5_vocab.c
2397 $(TOP)\ext\lsm1\lsm.h \
2398 $(TOP)\ext\lsm1\lsmInt.h \
2399 $(TOP)\ext\lsm1\lsm_ckpt.c \
2400 $(TOP)\ext\lsm1\lsm_file.c \
2401 $(TOP)\ext\lsm1\lsm_log.c \
2402 $(TOP)\ext\lsm1\lsm_main.c \
2403 $(TOP)\ext\lsm1\lsm_mem.c \
2404 $(TOP)\ext\lsm1\lsm_mutex.c \
2405 $(TOP)\ext\lsm1\lsm_shared.c \
2406 $(TOP)\ext\lsm1\lsm_sorted.c \
2407 $(TOP)\ext\lsm1\lsm_str.c \
2408 $(TOP)\ext\lsm1\lsm_tree.c \
2409 $(TOP)\ext\lsm1\lsm_unix.c \
2410 $(TOP)\ext\lsm1\lsm_varint.c \
2411 $(TOP)\ext\lsm1\lsm_vtab.c \
2412 $(TOP)\ext\lsm1\lsm_win32.c
2414 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2415 copy /Y $(TOP)\ext\fts5\fts5parse.y .
2416 copy /B fts5parse.y +,,
2417 del /Q fts5parse.h 2>NUL
2418 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S fts5parse.y
2420 fts5parse.h: fts5parse.c
2423 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2424 copy /Y $(TOP)\ext\fts5\fts5.h .
2428 $(TCLSH_CMD) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
2429 copy /Y $(TOP)\ext\lsm1\lsm.h .
2432 fts5.lo: fts5.c $(HDR) $(EXTHDR)
2433 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2435 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
2436 $(LTCOMPILE) $(NO_WARN) -c fts5.c
2438 fts5.dll: fts5_ext.lo
2439 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
2441 sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2442 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
2444 # Rules to build the 'testfixture' application.
2446 # If using the amalgamation, use sqlite3.c directly to build the test
2447 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
2448 # necessary because the test fixture requires non-API symbols which are
2449 # hidden when the library is built via the amalgamation).
2451 TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
2452 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2453 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
2454 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
2455 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
2456 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
2457 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
2458 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
2459 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CKSUMVFS_STATIC=1
2460 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
2461 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_STATIC_RANDOMJSON
2462 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_STRICT_SUBTYPE=1
2464 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
2465 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
2466 !IF $(USE_AMALGAMATION)==0
2467 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2469 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2472 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2474 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2475 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2476 echo #endif >> $(SQLITETCLDECLSH)
2477 type "$(TCLINCDIR)\tclDecls.h" \
2478 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
2479 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2480 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
2481 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
2482 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
2485 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2486 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2487 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2488 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
2489 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2492 testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
2493 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
2494 -DBUILD_sqlite -I$(TCLINCDIR) \
2495 $(TESTFIXTURE_SRC) \
2496 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2498 extensiontest: testfixture.exe testloadext.dll
2499 @set PATH=$(LIBTCLPATH);$(PATH)
2500 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
2502 tool-zip: testfixture.exe sqlite3.exe sqldiff.exe sqlite3_analyzer.exe $(TOP)\tool\mktoolzip.tcl
2503 .\testfixture.exe $(TOP)\tool\mktoolzip.tcl
2505 coretestprogs: testfixture.exe sqlite3.exe
2507 testprogs: $(TESTPROGS) srcck1.exe fuzzcheck.exe sessionfuzz.exe
2509 fulltest: alltest fuzztest
2511 alltest: $(TESTPROGS)
2512 @set PATH=$(LIBTCLPATH);$(PATH)
2513 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
2515 soaktest: $(TESTPROGS)
2516 @set PATH=$(LIBTCLPATH);$(PATH)
2517 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
2519 fulltestonly: $(TESTPROGS) fuzztest
2520 @set PATH=$(LIBTCLPATH);$(PATH)
2521 .\testfixture.exe $(TOP)\test\full.test
2523 queryplantest: testfixture.exe shell
2524 @set PATH=$(LIBTCLPATH);$(PATH)
2525 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
2527 fuzztest: fuzzcheck.exe
2528 .\fuzzcheck.exe $(FUZZDATA)
2530 # Minimal testing that runs in less than 3 minutes (on a fast machine)
2532 quicktest: testfixture.exe sourcetest
2533 @set PATH=$(LIBTCLPATH);$(PATH)
2534 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2536 # This is the common case. Run many tests that do not take too long,
2537 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2539 test: $(TESTPROGS) sourcetest fuzztest tcltest
2541 # The veryquick.test TCL tests.
2543 tcltest: testfixture.exe
2544 @set PATH=$(LIBTCLPATH);$(PATH)
2545 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
2547 # Runs all the same tests cases as the "tcltest" target but uses
2548 # the testrunner.tcl script to run them in multiple cores
2550 testrunner: testfixture.exe
2551 .\testfixture.exe $(TOP)\test\testrunner.tcl
2553 # Runs both fuzztest and testrunner, consecutively.
2555 devtest: testfixture.exe fuzztest testrunner
2558 $(TCLSH_CMD) $(TOP)\test\testrunner.tcl mdevtest
2560 # Testing for a release
2562 releasetest: testfixture.exe
2563 testfixture.exe $(TOP)\test\testrunner.tcl release
2566 smoketest: $(TESTPROGS)
2567 @set PATH=$(LIBTCLPATH);$(PATH)
2568 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
2570 shelltest: $(TESTPROGS)
2571 .\testfixture.exe $(TOP)\test\permutations.test shell
2573 sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(TOP)\ext\consio\console_io.h $(TOP)\ext\consio\console_io.c $(SQLITE_TCL_DEP)
2574 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
2576 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
2577 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
2578 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2580 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
2581 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
2583 sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
2584 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
2585 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2587 sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
2588 $(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
2591 $(TOP)\tool\mkccode.tcl \
2593 $(TOP)\src\tclsqlite.c \
2594 $(TOP)\ext\repair\sqlite3_checker.tcl \
2595 $(TOP)\ext\repair\checkindex.c \
2596 $(TOP)\ext\repair\checkfreelist.c \
2597 $(TOP)\ext\misc\btreeinfo.c \
2598 $(TOP)\ext\repair\sqlite3_checker.c.in
2600 sqlite3_checker.c: $(CHECKER_DEPS)
2601 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\ext\repair\sqlite3_checker.c.in > $@
2603 sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
2604 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
2605 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2607 dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2608 $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
2609 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
2611 testloadext.lo: $(TOP)\src\test_loadext.c $(SQLITE3H)
2612 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
2614 testloadext.dll: testloadext.lo
2615 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2617 dbtotxt.exe: $(TOP)\tool\dbtotxt.c
2618 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbtotxt.c /link $(LDFLAGS) $(LTLINKOPTS)
2620 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
2621 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2622 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2624 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
2625 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2626 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2628 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
2629 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2630 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2632 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
2633 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2634 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2636 showshm.exe: $(TOP)\tool\showshm.c
2637 $(LTLINK) $(NO_WARN) $(TOP)\tool\showshm.c /link $(LDFLAGS) $(LTLINKOPTS)
2639 index_usage.exe: $(TOP)\tool\index_usage.c $(SQLITE3C) $(SQLITE3H)
2640 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2641 $(TOP)\tool\index_usage.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2643 changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
2644 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2645 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2646 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2648 changesetfuzz.exe: $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) $(SQLITE3H)
2649 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2650 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2651 $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2653 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
2654 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2655 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2657 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
2658 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2659 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2661 atrc.exe: $(TOP)\test\atrc.c $(SQLITE3C) $(SQLITE3H)
2662 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2663 $(TOP)\test\atrc.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2665 LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
2666 $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
2668 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
2669 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2670 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2672 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
2673 $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
2674 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2676 kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
2677 $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
2678 $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2680 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
2681 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
2682 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2685 $(TOP)\test\threadtest3.c \
2686 $(TOP)\test\tt3_checkpoint.c \
2687 $(TOP)\test\tt3_index.c \
2688 $(TOP)\test\tt3_vacuum.c \
2689 $(TOP)\test\tt3_stress.c \
2690 $(TOP)\test\tt3_lookaside1.c
2692 threadtest3.exe: $(THREADTEST3_SRC) $(TOP)\src\test_multiplex.c $(SQLITE3C) $(SQLITE3H)
2693 $(LTLINK) $(NO_WARN) $(TOP)\test\threadtest3.c $(TOP)\src\test_multiplex.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2695 LSMDIR=$(TOP)\ext\lsm1
2696 !INCLUDE $(LSMDIR)\Makefile.msc
2699 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
2703 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
2704 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
2705 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
2707 del /Q $(SQLITE3TCLDLL) pkgIndex.tcl 2>NUL
2708 del /Q opcodes.c opcodes.h 2>NUL
2709 del /Q lemon.* lempar.c parse.* 2>NUL
2710 del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
2711 del /Q notasharedlib.* 2>NUL
2712 -rmdir /Q/S .deps 2>NUL
2713 -rmdir /Q/S .libs 2>NUL
2714 -rmdir /Q/S tsrc 2>NUL
2715 del /Q .target_source 2>NUL
2716 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
2717 del /Q lsm.dll lsmtest.exe 2>NUL
2718 del /Q atrc.exe changesetfuzz.exe dbtotxt.exe index_usage.exe 2>NUL
2719 del /Q testloadext.dll 2>NUL
2720 del /Q testfixture.exe test.db 2>NUL
2721 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
2722 del /Q changeset.exe 2>NUL
2723 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2724 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
2725 del /Q sqlite3.c sqlite3-*.c sqlite3.h 2>NUL
2726 del /Q sqlite3rc.h 2>NUL
2727 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
2728 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2729 del /Q sqlite-*-output.vsix 2>NUL
2730 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
2731 del /Q sqltclsh.* 2>NUL
2732 del /Q dbfuzz.exe sessionfuzz.exe threadtest3.exe 2>NUL
2733 del /Q kvtest.exe ossshell.exe scrub.exe 2>NUL
2734 del /Q showshm.exe sqlite3_checker.* sqlite3_expert.exe 2>NUL
2735 del /Q fts5.* fts5parse.* 2>NUL
2736 del /Q lsm.h lsm1.c 2>NUL
2737 del /q src-verify.exe 2>NUL