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 use the International Components for Unicode (ICU).
102 # Set this non-0 to dynamically link to the MSVC runtime library.
108 # Set this non-0 to link to the RPCRT4 library.
110 !IFNDEF USE_RPCRT4_LIB
114 # Set this non-0 to generate assembly code listings for the source code
121 # Set this non-0 to attempt setting the native compiler automatically
122 # for cross-compiling the command line tools needed during the compilation
129 # Set this non-0 to use the native libraries paths for cross-compiling
130 # the command line tools needed during the compilation process.
132 !IFNDEF USE_NATIVE_LIBPATHS
133 USE_NATIVE_LIBPATHS = 0
136 # Set this 0 to skip the compiling and embedding of version resources.
142 # Set this non-0 to compile binaries suitable for the WinRT environment.
143 # This setting does not apply to any binaries that require Tcl to operate
144 # properly (i.e. the text fixture, etc).
150 # Set this non-0 to compile binaries suitable for the UWP environment.
151 # This setting does not apply to any binaries that require Tcl to operate
152 # properly (i.e. the text fixture, etc).
158 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
165 # Set this non-0 to skip attempting to look for and/or link with the Tcl
173 # Set this to non-0 to create and use PDBs.
179 # Set this to non-0 to use the SQLite debugging heap subsystem.
185 # Set this to non-0 to use the Win32 native heap subsystem.
191 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
198 # Set this to one of the following values to enable various debugging
199 # features. Each level includes the debugging options from the previous
200 # levels. Currently, the recognized values for DEBUG are:
202 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
203 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
204 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
205 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
206 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
207 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
208 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
214 # Enable use of available compiler optimizations? Normally, this should be
215 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
216 # can be useful for testing.
218 !IFNDEF OPTIMIZATIONS
222 # Set this to non-0 to enable support for the session extension.
228 # Set the source code file to be used by executables and libraries when
229 # they need the amalgamation.
232 !IF $(SPLIT_AMALGAMATION)!=0
233 SQLITE3C = sqlite3-all.c
239 # Set the include code file to be used by executables and libraries when
246 # This is the name to use for the SQLite dynamic link library (DLL).
250 SQLITE3DLL = winsqlite3.dll
252 SQLITE3DLL = sqlite3.dll
256 # This is the name to use for the SQLite import library (LIB).
260 SQLITE3LIB = winsqlite3.lib
262 SQLITE3LIB = sqlite3.lib
266 # This is the name to use for the SQLite shell executable (EXE).
270 SQLITE3EXE = winsqlite3shell.exe
272 SQLITE3EXE = sqlite3.exe
276 # This is the argument used to set the program database (PDB) file for the
277 # SQLite shell executable (EXE).
279 !IFNDEF SQLITE3EXEPDB
283 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
288 # These are the names of the customized Tcl header files used by various parts
289 # of this makefile when the stdcall calling convention is in use. It is not
290 # used for any other purpose.
293 SQLITETCLH = sqlite_tcl.h
296 !IFNDEF SQLITETCLDECLSH
297 SQLITETCLDECLSH = sqlite_tclDecls.h
300 # These are the additional targets that the targets that integrate with the
301 # Tcl library should depend on when compiling, etc.
303 !IFNDEF SQLITE_TCL_DEP
304 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
305 SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
312 # These are the "standard" SQLite compilation options used when compiling for
313 # the Windows platform.
315 !IFNDEF OPT_FEATURE_FLAGS
316 !IF $(MINIMAL_AMALGAMATION)==0
317 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
318 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
320 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
323 # Should the session extension be enabled? If so, add compilation options
327 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
328 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
331 # These are the "extended" SQLite compilation options used when compiling for
332 # the Windows 10 platform.
334 !IFNDEF EXT_FEATURE_FLAGS
336 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
337 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
338 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
344 ###############################################################################
345 ############################### END OF OPTIONS ################################
346 ###############################################################################
348 # When compiling for the Windows 10 platform, the PLATFORM macro must be set
349 # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
353 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
357 # This assumes that MSVC is always installed in 32-bit Program Files directory
358 # and sets the variable for use in locating other 32-bit installs accordingly.
360 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
361 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
363 # Check for the predefined command macro CC. This should point to the compiler
364 # binary for the target platform. If it is not defined, simply define it to
365 # the legacy default value 'cl.exe'.
371 # Check for the predefined command macro CSC. This should point to a working
372 # C Sharp compiler binary. If it is not defined, simply define it to the
373 # legacy default value 'csc.exe'.
379 # Check for the command macro LD. This should point to the linker binary for
380 # the target platform. If it is not defined, simply define it to the legacy
381 # default value 'link.exe'.
387 # Check for the predefined command macro RC. This should point to the resource
388 # compiler binary for the target platform. If it is not defined, simply define
389 # it to the legacy default value 'rc.exe'.
395 # Check for the MSVC runtime library path macro. Otherwise, this value will
396 # default to the 'lib' directory underneath the MSVC installation directory.
399 CRTLIBPATH = $(VCINSTALLDIR)\lib
402 CRTLIBPATH = $(CRTLIBPATH:\\=\)
404 # Check for the command macro NCC. This should point to the compiler binary
405 # for the platform the compilation process is taking place on. If it is not
406 # defined, simply define it to have the same value as the CC macro. When
407 # cross-compiling, it is suggested that this macro be modified via the command
408 # line (since nmake itself does not provide a built-in method to guess it).
409 # For example, to use the x86 compiler when cross-compiling for x64, a command
410 # line similar to the following could be used (all on one line):
412 # nmake /f Makefile.msc sqlite3.dll
413 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
415 # Alternatively, the full path and file name to the compiler binary for the
416 # platform the compilation process is taking place may be specified (all on
419 # nmake /f Makefile.msc sqlite3.dll
420 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
421 # USE_NATIVE_LIBPATHS=1
425 !ELSEIF $(XCOMPILE)!=0
426 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
432 # Check for the MSVC native runtime library path macro. Otherwise,
433 # this value will default to the 'lib' directory underneath the MSVC
434 # installation directory.
437 NCRTLIBPATH = $(VCINSTALLDIR)\lib
440 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
442 # Check for the Platform SDK library path macro. Otherwise, this
443 # value will default to the 'lib' directory underneath the Windows
444 # SDK installation directory (the environment variable used appears
445 # to be available when using Visual C++ 2008 or later via the
449 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
452 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
454 # Check for the UCRT library path macro. Otherwise, this value will
455 # default to the version-specific, platform-specific 'lib' directory
456 # underneath the Windows SDK installation directory.
459 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
462 UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
464 # C compiler and options for use in building executables that
465 # will run on the platform that is doing the build.
467 !IF $(USE_FULLWARN)!=0
468 BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
470 BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
473 # Check if assembly code listings should be generated for the source
474 # code files to be compiled.
476 !IF $(USE_LISTINGS)!=0
480 # Check if the native library paths should be used when compiling
481 # the command line tools used during the compilation process. If
482 # so, set the necessary macro now.
484 !IF $(USE_NATIVE_LIBPATHS)!=0
485 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
488 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
489 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
493 # C compiler and options for use in building executables that
494 # will run on the target platform. (BCC and TCC are usually the
495 # same unless your are cross-compiling.)
497 !IF $(USE_FULLWARN)!=0
498 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
500 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
503 # Check if warnings should be treated as errors when compiling.
505 !IF $(USE_FATAL_WARN)!=0
509 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
510 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
512 # Check if we want to use the "stdcall" calling convention when compiling.
513 # This is not supported by the compilers for non-x86 platforms. It should
514 # also be noted here that building any target with these "stdcall" options
515 # will most likely fail if the Tcl library is also required. This is due
516 # to how the Tcl library functions are declared and exported (i.e. without
517 # an explicit calling convention, which results in "cdecl").
519 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
520 !IF "$(PLATFORM)"=="x86"
521 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
522 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
524 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
528 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
529 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
531 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
549 # These are additional compiler options used for the core library.
551 !IFNDEF CORE_COMPILE_OPTS
552 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
553 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
555 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
559 # These are the additional targets that the core library should depend on
562 !IFNDEF CORE_LINK_DEP
563 !IF $(DYNAMIC_SHELL)!=0
565 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
566 CORE_LINK_DEP = sqlite3.def
572 # These are additional linker options used for the core library.
574 !IFNDEF CORE_LINK_OPTS
575 !IF $(DYNAMIC_SHELL)!=0
577 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
578 CORE_LINK_OPTS = /DEF:sqlite3.def
584 # These are additional compiler options used for the shell executable.
586 !IFNDEF SHELL_COMPILE_OPTS
587 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
588 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
590 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
594 # This is the source code that the shell executable should be compiled
597 !IFNDEF SHELL_CORE_SRC
598 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
601 SHELL_CORE_SRC = $(SQLITE3C)
605 # This is the core library that the shell executable should depend on.
607 !IFNDEF SHELL_CORE_DEP
608 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
609 SHELL_CORE_DEP = $(SQLITE3DLL)
615 # This is the core library that the shell executable should link with.
617 !IFNDEF SHELL_CORE_LIB
618 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
619 SHELL_CORE_LIB = $(SQLITE3LIB)
625 # These are additional linker options used for the shell executable.
627 !IFNDEF SHELL_LINK_OPTS
628 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
631 # Check if assembly code listings should be generated for the source
632 # code files to be compiled.
634 !IF $(USE_LISTINGS)!=0
638 # When compiling the library for use in the WinRT environment,
639 # the following compile-time options must be used as well to
640 # disable use of Win32 APIs that are not available and to enable
641 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
644 TCC = $(TCC) -DSQLITE_OS_WINRT=1
645 RCC = $(RCC) -DSQLITE_OS_WINRT=1
646 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
647 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
650 # C compiler options for the Windows 10 platform (needs MSVC 2015).
653 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
654 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
657 # Also, we need to dynamically link to the correct MSVC runtime
658 # when compiling for WinRT (e.g. debug or release) OR if the
659 # USE_CRT_DLL option is set to force dynamically linking to the
660 # MSVC runtime library.
662 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
681 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
682 # any extension header files by default. For non-amalgamation
683 # builds, we need to make sure the compiler can find these.
685 !IF $(USE_AMALGAMATION)==0
686 TCC = $(TCC) -I$(TOP)\ext\fts3
687 RCC = $(RCC) -I$(TOP)\ext\fts3
688 TCC = $(TCC) -I$(TOP)\ext\rtree
689 RCC = $(RCC) -I$(TOP)\ext\rtree
690 TCC = $(TCC) -I$(TOP)\ext\session
691 RCC = $(RCC) -I$(TOP)\ext\session
694 # The mksqlite3c.tcl script accepts some options on the command
695 # line. When compiling with debugging enabled, some of these
696 # options are necessary in order to allow debugging symbols to
697 # work correctly with Visual Studio when using the amalgamation.
699 !IFNDEF MKSQLITE3C_TOOL
700 !IF $(MINIMAL_AMALGAMATION)!=0
701 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
703 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
707 !IFNDEF MKSQLITE3C_ARGS
709 MKSQLITE3C_ARGS = --linemacros
713 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
714 MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
718 # The mksqlite3h.tcl script accepts some options on the command line.
719 # When compiling with stdcall support, some of these options are
722 !IFNDEF MKSQLITE3H_ARGS
723 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
724 MKSQLITE3H_ARGS = --useapicall
731 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
732 # Omitting the define will cause extra debugging code to be inserted and
733 # includes extra comments when "EXPLAIN stmt" is used.
736 TCC = $(TCC) -DNDEBUG
737 BCC = $(BCC) -DNDEBUG
738 RCC = $(RCC) -DNDEBUG
741 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
742 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
743 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
747 TCC = $(TCC) -DSQLITE_DEBUG=1
748 RCC = $(RCC) -DSQLITE_DEBUG=1
749 !IF $(DYNAMIC_SHELL)==0
750 TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
751 RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
755 !IF $(DEBUG)>4 || $(OSTRACE)!=0
756 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
757 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
761 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
762 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
765 # Prevent warnings about "insecure" MSVC runtime library functions
768 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
769 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
770 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
772 # Prevent warnings about "deprecated" POSIX functions being used.
774 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
775 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
776 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
778 # Use the SQLite debugging heap subsystem?
781 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
782 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
784 # Use native Win32 heap subsystem instead of malloc/free?
786 !ELSEIF $(WIN32HEAP)!=0
787 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
788 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
790 # Validate the heap on every call into the native Win32 heap subsystem?
793 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
794 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
799 # The locations of the Tcl header and library files. Also, the library that
800 # non-stubs enabled programs using Tcl must link against. These variables
801 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
802 # prior to running nmake in order to match the actual installed location and
803 # version on this machine.
806 TCLINCDIR = c:\tcl\include
810 TCLLIBDIR = c:\tcl\lib
818 LIBTCLSTUB = tclstub86.lib
822 LIBTCLPATH = c:\tcl\bin
825 # The locations of the ICU header and library files. These variables
826 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
827 # prior to running nmake in order to match the actual installed location on
831 ICUINCDIR = c:\icu\include
835 ICULIBDIR = c:\icu\lib
839 LIBICU = icuuc.lib icuin.lib
842 # This is the command to use for tclsh - normally just "tclsh", but we may
843 # know the specific version we want to use. This variable (TCLSH_CMD) may be
844 # overridden via the environment prior to running nmake in order to select a
845 # specific Tcl shell to use.
852 # Compiler options needed for programs that use the readline() library.
854 !IFNDEF READLINE_FLAGS
855 READLINE_FLAGS = -DHAVE_READLINE=0
858 # The library that programs using readline() must link against.
864 # Should the database engine be compiled threadsafe
866 TCC = $(TCC) -DSQLITE_THREADSAFE=1
867 RCC = $(RCC) -DSQLITE_THREADSAFE=1
869 # Do threads override each others locks by default (1), or do we test (-1)
871 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
872 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
874 # Any target libraries which libsqlite must be linked against
880 # Flags controlling use of the in memory btree implementation
882 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
883 # default to file, 2 to default to memory, and 3 to force temporary
884 # tables to always be in memory.
886 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
887 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
889 # Enable/disable loadable extensions, and other optional features
890 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
891 # The same set of OMIT and ENABLE flags should be passed to the
892 # LEMON parser generator and the mkkeywordhash tool as well.
894 # These are the required SQLite compilation options used when compiling for
895 # the Windows platform.
897 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
899 # If we are linking to the RPCRT4 library, enable features that need it.
901 !IF $(USE_RPCRT4_LIB)!=0
902 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
905 # Add the required and optional SQLite compilation options into the command
906 # lines used to invoke the MSVC code and resource compilers.
908 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
909 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
911 # Add in any optional parameters specified on the commane line, e.g.
912 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
917 # If compiling for debugging, add some defines.
920 TCC = $(TCC) -D_DEBUG
921 BCC = $(BCC) -D_DEBUG
922 RCC = $(RCC) -D_DEBUG
925 # If optimizations are enabled or disabled (either implicitly or
926 # explicitly), add the necessary flags.
928 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
931 !IF $(USE_RUNTIME_CHECKS)!=0
935 !ELSEIF $(OPTIMIZATIONS)>=3
938 !ELSEIF $(OPTIMIZATIONS)==2
941 !ELSEIF $(OPTIMIZATIONS)==1
946 # If symbols are enabled (or compiling for debugging), enable PDBs.
948 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
954 # If ICU support is enabled, add the compiler options for it.
957 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
958 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
959 TCC = $(TCC) -I$(TOP)\ext\icu
960 RCC = $(RCC) -I$(TOP)\ext\icu
961 TCC = $(TCC) -I$(ICUINCDIR)
962 RCC = $(RCC) -I$(ICUINCDIR)
966 # Command line prefixes for compiling code, compiling resources,
969 LTCOMPILE = $(TCC) -Fo$@
970 LTRCOMPILE = $(RCC) -r
972 LTLINK = $(TCC) -Fe$@
974 # If requested, link to the RPCRT4 library.
976 !IF $(USE_RPCRT4_LIB)!=0
977 LTLINK = $(LTLINK) rpcrt4.lib
980 # If a platform was set, force the linker to target that.
981 # Note that the vcvars*.bat family of batch files typically
982 # set this for you. Otherwise, the linker will attempt
983 # to deduce the binary type based on the object files.
985 LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
986 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
992 # When compiling for use in the WinRT environment, the following
993 # linker option must be used to mark the executable as runnable
994 # only in the context of an application container.
997 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
998 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
1000 !IF "$(PLATFORM)"=="x86"
1001 STORELIBPATH = $(CRTLIBPATH)\store
1002 !ELSEIF "$(PLATFORM)"=="x64"
1003 STORELIBPATH = $(CRTLIBPATH)\store\amd64
1004 !ELSEIF "$(PLATFORM)"=="ARM"
1005 STORELIBPATH = $(CRTLIBPATH)\store\arm
1007 STORELIBPATH = $(CRTLIBPATH)\store
1010 STORELIBPATH = $(STORELIBPATH:\\=\)
1011 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
1015 # When compiling for Windows Phone 8.1, an extra library path is
1018 !IF $(USE_WP81_OPTS)!=0
1020 !IF "$(PLATFORM)"=="x86"
1021 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1022 !ELSEIF "$(PLATFORM)"=="ARM"
1023 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1025 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1030 # When compiling for Windows Phone 8.1, some extra linker options
1031 # are also required.
1033 !IF $(USE_WP81_OPTS)!=0
1035 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1037 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1038 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1039 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1042 # When compiling for UWP or the Windows 10 platform, some extra linker
1043 # options are also required.
1045 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
1046 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1047 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1049 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1054 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
1056 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1058 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1062 # If either debugging or symbols are enabled, enable PDBs.
1064 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1065 LDFLAGS = /DEBUG $(LDOPTS)
1071 # Start with the Tcl related linker options.
1074 LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
1078 # If ICU support is enabled, add the linker options for it.
1081 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1082 LTLIBS = $(LTLIBS) $(LIBICU)
1086 # You should not have to change anything below this line
1087 ###############################################################################
1090 # Object files for the SQLite library (non-amalgamation).
1092 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
1093 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
1094 callback.lo complete.lo ctime.lo \
1095 date.lo dbpage.lo dbstat.lo delete.lo \
1096 expr.lo fault.lo fkey.lo \
1097 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1098 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
1099 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
1101 func.lo global.lo hash.lo \
1102 icu.lo insert.lo legacy.lo loadext.lo \
1103 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1105 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1106 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
1107 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
1108 random.lo resolve.lo rowset.lo rtree.lo \
1109 sqlite3session.lo select.lo sqlite3rbu.lo status.lo \
1110 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
1111 update.lo util.lo vacuum.lo \
1112 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
1113 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
1117 # Object files for the amalgamation.
1119 LIBOBJS1 = sqlite3.lo
1121 # Determine the real value of LIBOBJ based on the 'configure' script
1124 !IF $(USE_AMALGAMATION)==0
1125 LIBOBJ = $(LIBOBJS0)
1128 LIBOBJ = $(LIBOBJS1)
1133 # Determine if embedded resource compilation and usage are enabled.
1136 LIBRESOBJS = sqlite3res.lo
1142 # Core source code files, part 1.
1145 $(TOP)\src\alter.c \
1146 $(TOP)\src\analyze.c \
1147 $(TOP)\src\attach.c \
1149 $(TOP)\src\backup.c \
1150 $(TOP)\src\bitvec.c \
1151 $(TOP)\src\btmutex.c \
1152 $(TOP)\src\btree.c \
1153 $(TOP)\src\build.c \
1154 $(TOP)\src\callback.c \
1155 $(TOP)\src\complete.c \
1156 $(TOP)\src\ctime.c \
1158 $(TOP)\src\dbpage.c \
1159 $(TOP)\src\dbstat.c \
1160 $(TOP)\src\delete.c \
1162 $(TOP)\src\fault.c \
1165 $(TOP)\src\global.c \
1167 $(TOP)\src\insert.c \
1168 $(TOP)\src\legacy.c \
1169 $(TOP)\src\loadext.c \
1171 $(TOP)\src\malloc.c \
1177 $(TOP)\src\memjournal.c \
1178 $(TOP)\src\mutex.c \
1179 $(TOP)\src\mutex_noop.c \
1180 $(TOP)\src\mutex_unix.c \
1181 $(TOP)\src\mutex_w32.c \
1182 $(TOP)\src\notify.c \
1184 $(TOP)\src\os_unix.c \
1187 # Core source code files, part 2.
1190 $(TOP)\src\pager.c \
1191 $(TOP)\src\pcache.c \
1192 $(TOP)\src\pcache1.c \
1193 $(TOP)\src\pragma.c \
1194 $(TOP)\src\prepare.c \
1195 $(TOP)\src\printf.c \
1196 $(TOP)\src\random.c \
1197 $(TOP)\src\resolve.c \
1198 $(TOP)\src\rowset.c \
1199 $(TOP)\src\select.c \
1200 $(TOP)\src\status.c \
1201 $(TOP)\src\table.c \
1202 $(TOP)\src\threads.c \
1203 $(TOP)\src\tclsqlite.c \
1204 $(TOP)\src\tokenize.c \
1205 $(TOP)\src\treeview.c \
1206 $(TOP)\src\trigger.c \
1208 $(TOP)\src\update.c \
1210 $(TOP)\src\vacuum.c \
1212 $(TOP)\src\vdbeapi.c \
1213 $(TOP)\src\vdbeaux.c \
1214 $(TOP)\src\vdbeblob.c \
1215 $(TOP)\src\vdbemem.c \
1216 $(TOP)\src\vdbesort.c \
1217 $(TOP)\src\vdbetrace.c \
1220 $(TOP)\src\walker.c \
1221 $(TOP)\src\where.c \
1222 $(TOP)\src\wherecode.c \
1223 $(TOP)\src\whereexpr.c
1225 # Core miscellaneous files.
1230 # Core header files, part 1.
1233 $(TOP)\src\btree.h \
1234 $(TOP)\src\btreeInt.h \
1236 $(TOP)\src\hwtime.h \
1238 $(TOP)\src\mutex.h \
1240 $(TOP)\src\os_common.h \
1241 $(TOP)\src\os_setup.h \
1244 # Core header files, part 2.
1247 $(TOP)\src\pager.h \
1248 $(TOP)\src\pcache.h \
1249 $(TOP)\src\pragma.h \
1250 $(TOP)\src\sqlite.h.in \
1251 $(TOP)\src\sqlite3ext.h \
1252 $(TOP)\src\sqliteInt.h \
1253 $(TOP)\src\sqliteLimit.h \
1255 $(TOP)\src\vdbeInt.h \
1256 $(TOP)\src\vxworks.h \
1258 $(TOP)\src\whereInt.h
1260 # Extension source code files, part 1.
1263 $(TOP)\ext\fts1\fts1.c \
1264 $(TOP)\ext\fts1\fts1_hash.c \
1265 $(TOP)\ext\fts1\fts1_porter.c \
1266 $(TOP)\ext\fts1\fts1_tokenizer1.c \
1267 $(TOP)\ext\fts2\fts2.c \
1268 $(TOP)\ext\fts2\fts2_hash.c \
1269 $(TOP)\ext\fts2\fts2_icu.c \
1270 $(TOP)\ext\fts2\fts2_porter.c \
1271 $(TOP)\ext\fts2\fts2_tokenizer.c \
1272 $(TOP)\ext\fts2\fts2_tokenizer1.c
1274 # Extension source code files, part 2.
1277 $(TOP)\ext\fts3\fts3.c \
1278 $(TOP)\ext\fts3\fts3_aux.c \
1279 $(TOP)\ext\fts3\fts3_expr.c \
1280 $(TOP)\ext\fts3\fts3_hash.c \
1281 $(TOP)\ext\fts3\fts3_icu.c \
1282 $(TOP)\ext\fts3\fts3_porter.c \
1283 $(TOP)\ext\fts3\fts3_snippet.c \
1284 $(TOP)\ext\fts3\fts3_tokenizer.c \
1285 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1286 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1287 $(TOP)\ext\fts3\fts3_unicode.c \
1288 $(TOP)\ext\fts3\fts3_unicode2.c \
1289 $(TOP)\ext\fts3\fts3_write.c \
1290 $(TOP)\ext\icu\icu.c \
1291 $(TOP)\ext\rtree\rtree.c \
1292 $(TOP)\ext\session\sqlite3session.c \
1293 $(TOP)\ext\rbu\sqlite3rbu.c \
1294 $(TOP)\ext\misc\json1.c \
1295 $(TOP)\ext\misc\stmt.c
1297 # Extension header files, part 1.
1300 $(TOP)\ext\fts1\fts1.h \
1301 $(TOP)\ext\fts1\fts1_hash.h \
1302 $(TOP)\ext\fts1\fts1_tokenizer.h \
1303 $(TOP)\ext\fts2\fts2.h \
1304 $(TOP)\ext\fts2\fts2_hash.h \
1305 $(TOP)\ext\fts2\fts2_tokenizer.h
1307 # Extension header files, part 2.
1310 $(TOP)\ext\fts3\fts3.h \
1311 $(TOP)\ext\fts3\fts3Int.h \
1312 $(TOP)\ext\fts3\fts3_hash.h \
1313 $(TOP)\ext\fts3\fts3_tokenizer.h \
1314 $(TOP)\ext\icu\sqliteicu.h \
1315 $(TOP)\ext\rtree\rtree.h \
1316 $(TOP)\ext\rbu\sqlite3rbu.h \
1317 $(TOP)\ext\session\sqlite3session.h
1319 # Generated source code files
1325 # Generated header files
1334 # Generated Tcl header files
1336 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1344 # All source code files.
1346 SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
1348 # Source code to the test files.
1351 $(TOP)\src\test1.c \
1352 $(TOP)\src\test2.c \
1353 $(TOP)\src\test3.c \
1354 $(TOP)\src\test4.c \
1355 $(TOP)\src\test5.c \
1356 $(TOP)\src\test6.c \
1357 $(TOP)\src\test7.c \
1358 $(TOP)\src\test8.c \
1359 $(TOP)\src\test9.c \
1360 $(TOP)\src\test_autoext.c \
1361 $(TOP)\src\test_async.c \
1362 $(TOP)\src\test_backup.c \
1363 $(TOP)\src\test_bestindex.c \
1364 $(TOP)\src\test_blob.c \
1365 $(TOP)\src\test_btree.c \
1366 $(TOP)\src\test_config.c \
1367 $(TOP)\src\test_delete.c \
1368 $(TOP)\src\test_demovfs.c \
1369 $(TOP)\src\test_devsym.c \
1370 $(TOP)\src\test_fs.c \
1371 $(TOP)\src\test_func.c \
1372 $(TOP)\src\test_hexio.c \
1373 $(TOP)\src\test_init.c \
1374 $(TOP)\src\test_intarray.c \
1375 $(TOP)\src\test_journal.c \
1376 $(TOP)\src\test_malloc.c \
1377 $(TOP)\src\test_md5.c \
1378 $(TOP)\src\test_multiplex.c \
1379 $(TOP)\src\test_mutex.c \
1380 $(TOP)\src\test_onefile.c \
1381 $(TOP)\src\test_osinst.c \
1382 $(TOP)\src\test_pcache.c \
1383 $(TOP)\src\test_quota.c \
1384 $(TOP)\src\test_rtree.c \
1385 $(TOP)\src\test_schema.c \
1386 $(TOP)\src\test_server.c \
1387 $(TOP)\src\test_superlock.c \
1388 $(TOP)\src\test_syscall.c \
1389 $(TOP)\src\test_tclsh.c \
1390 $(TOP)\src\test_tclvar.c \
1391 $(TOP)\src\test_thread.c \
1392 $(TOP)\src\test_vfs.c \
1393 $(TOP)\src\test_windirent.c \
1394 $(TOP)\src\test_wsd.c \
1395 $(TOP)\ext\fts3\fts3_term.c \
1396 $(TOP)\ext\fts3\fts3_test.c \
1397 $(TOP)\ext\rbu\test_rbu.c \
1398 $(TOP)\ext\session\test_session.c
1400 # Statically linked extensions.
1403 $(TOP)\ext\misc\amatch.c \
1404 $(TOP)\ext\misc\carray.c \
1405 $(TOP)\ext\misc\closure.c \
1406 $(TOP)\ext\misc\csv.c \
1407 $(TOP)\ext\misc\eval.c \
1408 $(TOP)\ext\misc\fileio.c \
1409 $(TOP)\ext\misc\fuzzer.c \
1410 $(TOP)\ext\fts5\fts5_tcl.c \
1411 $(TOP)\ext\fts5\fts5_test_mi.c \
1412 $(TOP)\ext\fts5\fts5_test_tok.c \
1413 $(TOP)\ext\misc\ieee754.c \
1414 $(TOP)\ext\misc\mmapwarm.c \
1415 $(TOP)\ext\misc\nextchar.c \
1416 $(TOP)\ext\misc\percentile.c \
1417 $(TOP)\ext\misc\regexp.c \
1418 $(TOP)\ext\misc\remember.c \
1419 $(TOP)\ext\misc\series.c \
1420 $(TOP)\ext\misc\spellfix.c \
1421 $(TOP)\ext\misc\totype.c \
1422 $(TOP)\ext\misc\unionvtab.c \
1423 $(TOP)\ext\misc\wholenumber.c
1425 # Source code to the library files needed by the test fixture
1426 # (non-amalgamation)
1434 $(TOP)\ext\async\sqlite3async.c
1436 # Header files used by all library source files.
1439 $(TOP)\src\btree.h \
1440 $(TOP)\src\btreeInt.h \
1442 $(TOP)\src\hwtime.h \
1445 $(TOP)\src\mutex.h \
1448 $(TOP)\src\os_common.h \
1449 $(TOP)\src\os_setup.h \
1450 $(TOP)\src\os_win.h \
1451 $(TOP)\src\pager.h \
1452 $(TOP)\src\pcache.h \
1454 $(TOP)\src\pragma.h \
1457 $(TOP)\src\sqliteInt.h \
1458 $(TOP)\src\sqliteLimit.h \
1460 $(TOP)\src\vdbeInt.h \
1461 $(TOP)\src\vxworks.h \
1462 $(TOP)\src\whereInt.h
1464 # Header files used by extensions
1466 EXTHDR = $(EXTHDR) \
1467 $(TOP)\ext\fts1\fts1.h \
1468 $(TOP)\ext\fts1\fts1_hash.h \
1469 $(TOP)\ext\fts1\fts1_tokenizer.h
1470 EXTHDR = $(EXTHDR) \
1471 $(TOP)\ext\fts2\fts2.h \
1472 $(TOP)\ext\fts2\fts2_hash.h \
1473 $(TOP)\ext\fts2\fts2_tokenizer.h
1474 EXTHDR = $(EXTHDR) \
1475 $(TOP)\ext\fts3\fts3.h \
1476 $(TOP)\ext\fts3\fts3Int.h \
1477 $(TOP)\ext\fts3\fts3_hash.h \
1478 $(TOP)\ext\fts3\fts3_tokenizer.h
1479 EXTHDR = $(EXTHDR) \
1480 $(TOP)\ext\rtree\rtree.h
1481 EXTHDR = $(EXTHDR) \
1482 $(TOP)\ext\icu\sqliteicu.h
1483 EXTHDR = $(EXTHDR) \
1484 $(TOP)\ext\rtree\sqlite3rtree.h
1485 EXTHDR = $(EXTHDR) \
1486 $(TOP)\ext\session\sqlite3session.h
1488 # executables needed for testing
1493 sqlite3_analyzer.exe \
1497 # Databases containing fuzzer test cases
1500 $(TOP)\test\fuzzdata1.db \
1501 $(TOP)\test\fuzzdata2.db \
1502 $(TOP)\test\fuzzdata3.db \
1503 $(TOP)\test\fuzzdata4.db \
1504 $(TOP)\test\fuzzdata5.db
1507 # Additional compiler options for the shell. These are only effective
1508 # when the shell is not being dynamically linked.
1510 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1511 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
1512 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
1516 # Extra compiler options for various test tools.
1518 MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
1519 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1520 FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ -DSQLITE_MAX_MEMORY=50000000
1521 FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1522 OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
1523 DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
1524 KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
1525 DBSELFTEST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
1526 ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
1528 # Standard options to testfixture.
1530 TESTOPTS = --verbose=file --output=test-out.txt
1532 # Extra targets for the "all" target that require Tcl.
1535 ALL_TCL_TARGETS = libtclsqlite3.lib
1541 # This is the default Makefile target. The objects listed here
1542 # are what get build when you type just "make" with no arguments.
1544 all: dll libsqlite3.lib shell $(ALL_TCL_TARGETS)
1546 # Dynamic link library section.
1552 shell: $(SQLITE3EXE)
1555 libsqlite3.lib: $(LIBOBJ)
1556 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1558 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1559 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1562 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1563 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1566 sqlite3.def: libsqlite3.lib
1567 echo EXPORTS > sqlite3.def
1568 dumpbin /all libsqlite3.lib \
1569 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup)?_[^@]*)(?:@\d+)?$$" \1 \
1570 | sort >> sqlite3.def
1573 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1574 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
1575 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1578 sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1579 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1581 dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1582 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1584 scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1585 $(LTLINK) $(NO_WARN) $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1587 srcck1.exe: $(TOP)\tool\srcck1.c
1588 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1590 sourcetest: srcck1.exe sqlite3.c
1591 srcck1.exe sqlite3.c
1593 fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1594 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1596 dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
1597 $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1599 fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1600 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1602 ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1603 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1605 mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1606 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1608 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1609 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1611 mptest: mptester.exe
1612 del /Q mptest.db 2>NUL
1613 $(MPTEST1) --journalmode DELETE
1614 $(MPTEST2) --journalmode WAL
1615 $(MPTEST1) --journalmode WAL
1616 $(MPTEST2) --journalmode PERSIST
1617 $(MPTEST1) --journalmode PERSIST
1618 $(MPTEST2) --journalmode TRUNCATE
1619 $(MPTEST1) --journalmode TRUNCATE
1620 $(MPTEST2) --journalmode DELETE
1622 # This target creates a directory named "tsrc" and fills it with
1623 # copies of all of the C source code and header files needed to
1624 # build on the target system. Some of the C source code and header
1625 # files are automatically generated. This target takes care of
1626 # all that automatic generation.
1628 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
1629 -rmdir /Q/S tsrc 2>NUL
1631 for %i in ($(SRC00)) do copy /Y %i tsrc
1632 for %i in ($(SRC01)) do copy /Y %i tsrc
1633 for %i in ($(SRC03)) do copy /Y %i tsrc
1634 for %i in ($(SRC04)) do copy /Y %i tsrc
1635 for %i in ($(SRC05)) do copy /Y %i tsrc
1636 for %i in ($(SRC06)) do copy /Y %i tsrc
1637 for %i in ($(SRC07)) do copy /Y %i tsrc
1638 for %i in ($(SRC08)) do copy /Y %i tsrc
1639 for %i in ($(SRC09)) do copy /Y %i tsrc
1640 for %i in ($(SRC10)) do copy /Y %i tsrc
1641 for %i in ($(SRC11)) do copy /Y %i tsrc
1642 for %i in ($(SRC12)) do copy /Y %i tsrc
1645 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1646 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1647 move vdbe.new tsrc\vdbe.c
1648 echo > .target_source
1650 sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
1651 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
1653 copy $(TOP)\ext\session\sqlite3session.h .
1655 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1656 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1659 # Rule to build the amalgamation
1661 sqlite3.lo: $(SQLITE3C)
1662 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1665 # Rules to build the LEMON compiler generator
1667 lempar.c: $(TOP)\tool\lempar.c
1668 copy $(TOP)\tool\lempar.c .
1670 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1671 $(BCC) $(NO_WARN) -Daccess=_access \
1672 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1675 # Rules to build the source-id generator tool
1677 mksourceid.exe: $(TOP)\tool\mksourceid.c
1678 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1680 # Rules to build individual *.lo files from generated *.c files. This
1686 parse.lo: parse.c $(HDR)
1687 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1689 opcodes.lo: opcodes.c
1690 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1693 # Rule to build the Win32 resources object file.
1697 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H)
1698 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1699 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1700 echo #define SQLITE_RESOURCE_VERSION %%V \
1701 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1703 echo #endif >> sqlite3rc.h
1704 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1709 # Rules to build individual *.lo files from files in the src directory.
1711 alter.lo: $(TOP)\src\alter.c $(HDR)
1712 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1714 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1715 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1717 attach.lo: $(TOP)\src\attach.c $(HDR)
1718 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1720 auth.lo: $(TOP)\src\auth.c $(HDR)
1721 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1723 backup.lo: $(TOP)\src\backup.c $(HDR)
1724 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1726 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1727 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1729 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1730 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1732 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1733 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1735 build.lo: $(TOP)\src\build.c $(HDR)
1736 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1738 callback.lo: $(TOP)\src\callback.c $(HDR)
1739 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1741 complete.lo: $(TOP)\src\complete.c $(HDR)
1742 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1744 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1745 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1747 date.lo: $(TOP)\src\date.c $(HDR)
1748 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1750 dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
1751 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
1753 dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
1754 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1756 delete.lo: $(TOP)\src\delete.c $(HDR)
1757 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1759 expr.lo: $(TOP)\src\expr.c $(HDR)
1760 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1762 fault.lo: $(TOP)\src\fault.c $(HDR)
1763 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1765 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1766 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1768 func.lo: $(TOP)\src\func.c $(HDR)
1769 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1771 global.lo: $(TOP)\src\global.c $(HDR)
1772 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1774 hash.lo: $(TOP)\src\hash.c $(HDR)
1775 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1777 insert.lo: $(TOP)\src\insert.c $(HDR)
1778 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1780 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1781 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1783 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1784 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1786 main.lo: $(TOP)\src\main.c $(HDR)
1787 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1789 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1790 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
1792 mem0.lo: $(TOP)\src\mem0.c $(HDR)
1793 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
1795 mem1.lo: $(TOP)\src\mem1.c $(HDR)
1796 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
1798 mem2.lo: $(TOP)\src\mem2.c $(HDR)
1799 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
1801 mem3.lo: $(TOP)\src\mem3.c $(HDR)
1802 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
1804 mem5.lo: $(TOP)\src\mem5.c $(HDR)
1805 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
1807 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
1808 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
1810 mutex.lo: $(TOP)\src\mutex.c $(HDR)
1811 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
1813 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
1814 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
1816 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
1817 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
1819 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
1820 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
1822 notify.lo: $(TOP)\src\notify.c $(HDR)
1823 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
1825 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1826 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
1828 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1829 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
1831 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1832 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
1834 os.lo: $(TOP)\src\os.c $(HDR)
1835 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
1837 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
1838 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
1840 os_win.lo: $(TOP)\src\os_win.c $(HDR)
1841 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
1843 pragma.lo: $(TOP)\src\pragma.c $(HDR)
1844 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
1846 prepare.lo: $(TOP)\src\prepare.c $(HDR)
1847 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
1849 printf.lo: $(TOP)\src\printf.c $(HDR)
1850 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
1852 random.lo: $(TOP)\src\random.c $(HDR)
1853 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
1855 resolve.lo: $(TOP)\src\resolve.c $(HDR)
1856 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
1858 rowset.lo: $(TOP)\src\rowset.c $(HDR)
1859 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
1861 select.lo: $(TOP)\src\select.c $(HDR)
1862 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
1864 status.lo: $(TOP)\src\status.c $(HDR)
1865 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
1867 table.lo: $(TOP)\src\table.c $(HDR)
1868 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
1870 threads.lo: $(TOP)\src\threads.c $(HDR)
1871 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
1873 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
1874 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
1876 treeview.lo: $(TOP)\src\treeview.c $(HDR)
1877 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
1879 trigger.lo: $(TOP)\src\trigger.c $(HDR)
1880 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
1882 update.lo: $(TOP)\src\update.c $(HDR)
1883 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
1885 utf.lo: $(TOP)\src\utf.c $(HDR)
1886 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
1888 util.lo: $(TOP)\src\util.c $(HDR)
1889 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
1891 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
1892 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
1894 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
1895 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
1897 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
1898 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
1900 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
1901 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
1903 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
1904 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
1906 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
1907 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
1909 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
1910 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
1912 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
1913 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
1915 vtab.lo: $(TOP)\src\vtab.c $(HDR)
1916 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
1918 wal.lo: $(TOP)\src\wal.c $(HDR)
1919 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
1921 walker.lo: $(TOP)\src\walker.c $(HDR)
1922 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
1924 where.lo: $(TOP)\src\where.c $(HDR)
1925 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
1927 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
1928 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
1930 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
1931 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
1933 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
1934 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1936 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
1937 $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1939 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
1940 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1942 # Rules to build opcodes.c and opcodes.h
1944 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
1945 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
1947 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
1948 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
1950 # Rules to build parse.c and parse.h - the outputs of lemon.
1954 parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
1955 del /Q parse.y parse.h parse.h.temp 2>NUL
1956 copy $(TOP)\src\parse.y .
1957 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
1958 move parse.h parse.h.temp
1959 $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
1961 $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
1962 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
1964 sqlite3ext.h: .target_source
1965 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1966 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
1967 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
1968 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
1970 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
1973 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
1974 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
1975 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1977 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
1978 .\mkkeywordhash.exe > keywordhash.h
1980 # Source files that go into making shell.c
1982 $(TOP)\src\shell.c.in \
1983 $(TOP)\ext\misc\shathree.c \
1984 $(TOP)\ext\misc\fileio.c \
1985 $(TOP)\ext\misc\completion.c
1987 shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
1988 $(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
1991 # Rules to build the extension objects.
1993 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1994 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1996 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1997 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1999 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
2000 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
2002 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
2003 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
2005 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
2006 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
2008 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
2009 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
2011 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
2012 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
2014 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
2015 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
2017 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
2018 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
2020 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
2021 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
2023 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
2024 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
2026 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
2027 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
2029 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
2030 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
2032 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
2033 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
2035 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
2036 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
2038 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
2039 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
2041 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
2042 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
2044 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
2045 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
2047 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
2048 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
2050 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
2051 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
2053 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
2054 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
2056 sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
2057 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
2062 $(TOP)\ext\fts5\fts5.h \
2063 $(TOP)\ext\fts5\fts5Int.h \
2064 $(TOP)\ext\fts5\fts5_aux.c \
2065 $(TOP)\ext\fts5\fts5_buffer.c \
2066 $(TOP)\ext\fts5\fts5_main.c \
2067 $(TOP)\ext\fts5\fts5_config.c \
2068 $(TOP)\ext\fts5\fts5_expr.c \
2069 $(TOP)\ext\fts5\fts5_hash.c \
2070 $(TOP)\ext\fts5\fts5_index.c \
2071 fts5parse.c fts5parse.h \
2072 $(TOP)\ext\fts5\fts5_storage.c \
2073 $(TOP)\ext\fts5\fts5_tokenize.c \
2074 $(TOP)\ext\fts5\fts5_unicode2.c \
2075 $(TOP)\ext\fts5\fts5_varint.c \
2076 $(TOP)\ext\fts5\fts5_vocab.c
2078 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2079 copy $(TOP)\ext\fts5\fts5parse.y .
2080 del /Q fts5parse.h 2>NUL
2081 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
2083 fts5parse.h: fts5parse.c
2086 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2087 copy $(TOP)\ext\fts5\fts5.h .
2089 fts5.lo: fts5.c $(HDR) $(EXTHDR)
2090 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2092 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
2093 $(LTCOMPILE) $(NO_WARN) -c fts5.c
2095 fts5.dll: fts5_ext.lo
2096 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
2098 sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2099 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
2101 # Rules to build the 'testfixture' application.
2103 # If using the amalgamation, use sqlite3.c directly to build the test
2104 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
2105 # necessary because the test fixture requires non-API symbols which are
2106 # hidden when the library is built via the amalgamation).
2108 TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
2109 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2110 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
2111 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
2112 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
2113 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB
2114 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB
2115 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
2117 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
2118 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
2119 !IF $(USE_AMALGAMATION)==0
2120 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2122 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2125 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2127 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2128 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2129 echo #endif >> $(SQLITETCLDECLSH)
2130 type "$(TCLINCDIR)\tclDecls.h" \
2131 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
2132 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2133 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
2134 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
2135 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
2138 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2139 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2140 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2141 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
2142 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2145 testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
2146 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
2147 -DBUILD_sqlite -I$(TCLINCDIR) \
2148 $(TESTFIXTURE_SRC) \
2149 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
2151 extensiontest: testfixture.exe testloadext.dll
2152 @set PATH=$(LIBTCLPATH);$(PATH)
2153 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
2155 fulltest: $(TESTPROGS) fuzztest
2156 @set PATH=$(LIBTCLPATH);$(PATH)
2157 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
2159 soaktest: $(TESTPROGS)
2160 @set PATH=$(LIBTCLPATH);$(PATH)
2161 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
2163 fulltestonly: $(TESTPROGS) fuzztest
2164 @set PATH=$(LIBTCLPATH);$(PATH)
2165 .\testfixture.exe $(TOP)\test\full.test
2167 queryplantest: testfixture.exe shell
2168 @set PATH=$(LIBTCLPATH);$(PATH)
2169 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
2171 fuzztest: fuzzcheck.exe
2172 .\fuzzcheck.exe $(FUZZDATA)
2174 fastfuzztest: fuzzcheck.exe
2175 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
2177 # Minimal testing that runs in less than 3 minutes (on a fast machine)
2179 quicktest: testfixture.exe sourcetest
2180 @set PATH=$(LIBTCLPATH);$(PATH)
2181 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2183 # This is the common case. Run many tests that do not take too long,
2184 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2186 test: $(TESTPROGS) sourcetest fastfuzztest
2187 @set PATH=$(LIBTCLPATH);$(PATH)
2188 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
2190 smoketest: $(TESTPROGS)
2191 @set PATH=$(LIBTCLPATH);$(PATH)
2192 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
2194 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)
2195 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
2197 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
2198 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
2199 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
2201 dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H)
2202 $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
2203 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
2205 testloadext.lo: $(TOP)\src\test_loadext.c
2206 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
2208 testloadext.dll: testloadext.lo
2209 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2211 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
2212 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2213 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2215 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
2216 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2217 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2219 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
2220 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2221 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2223 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
2224 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2225 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2227 changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
2228 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2229 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2230 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2232 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
2233 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2234 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2236 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
2237 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2238 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2240 LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
2241 $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
2243 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
2244 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2245 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2247 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
2248 $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
2249 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2251 kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
2252 $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
2253 $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2255 dbselftest.exe: $(TOP)\test\dbselftest.c $(SQLITE3C) $(SQLITE3H)
2256 $(LTLINK) $(NO_WARN) $(DBSELFTEST_COMPILE_OPTS) $(TOP)\test\dbselftest.c $(SQLITE3C)
2258 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
2259 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
2260 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2262 LSMDIR=$(TOP)\ext\lsm1
2263 !INCLUDE $(LSMDIR)\Makefile.msc
2266 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
2270 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
2271 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
2272 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
2274 del /Q sqlite3.c sqlite3.h 2>NUL
2275 del /Q opcodes.c opcodes.h 2>NUL
2276 del /Q lemon.* lempar.c parse.* 2>NUL
2277 del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
2278 del /Q notasharedlib.* 2>NUL
2279 -rmdir /Q/S .deps 2>NUL
2280 -rmdir /Q/S .libs 2>NUL
2281 -rmdir /Q/S tsrc 2>NUL
2282 del /Q .target_source 2>NUL
2283 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
2284 del /Q lsm.dll lsmtest.exe 2>NUL
2285 del /Q testloadext.dll 2>NUL
2286 del /Q testfixture.exe test.db 2>NUL
2287 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
2288 del /Q changeset.exe 2>NUL
2289 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2290 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
2291 del /Q sqlite3.c sqlite3-*.c 2>NUL
2292 del /Q sqlite3rc.h 2>NUL
2293 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
2294 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2295 del /Q sqlite-*-output.vsix 2>NUL
2296 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
2297 del /Q fts5.* fts5parse.* 2>NUL