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 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
80 # Set this non-0 to use the library paths and other options necessary for
87 # Set this non-0 to split the SQLite amalgamation file into chunks to
88 # be used for debugging with Visual Studio.
90 !IFNDEF SPLIT_AMALGAMATION
91 SPLIT_AMALGAMATION = 0
95 # Set this non-0 to have this makefile assume the Tcl shell executable
96 # (tclsh*.exe) is available in the PATH. By default, this is disabled
97 # for compatibility with older build environments. This setting only
98 # applies if TCLSH_CMD is not set manually.
100 !IFNDEF USE_TCLSH_IN_PATH
101 USE_TCLSH_IN_PATH = 0
104 # Set this non-0 to use zlib, possibly compiling it from source code.
110 # Set this non-0 to build zlib from source code. This is enabled by
111 # default and in that case it will be assumed that the ZLIBDIR macro
112 # points to the top-level source code directory for zlib.
118 # Set this non-0 to use the International Components for Unicode (ICU).
125 # Set this non-0 to dynamically link to the MSVC runtime library.
131 # Set this non-0 to link to the RPCRT4 library.
133 !IFNDEF USE_RPCRT4_LIB
137 # Set this non-0 to generate assembly code listings for the source code
144 # Set this non-0 to attempt setting the native compiler automatically
145 # for cross-compiling the command line tools needed during the compilation
152 # Set this non-0 to use the native libraries paths for cross-compiling
153 # the command line tools needed during the compilation process.
155 !IFNDEF USE_NATIVE_LIBPATHS
156 USE_NATIVE_LIBPATHS = 0
159 # Set this 0 to skip the compiling and embedding of version resources.
165 # Set this non-0 to compile binaries suitable for the WinRT environment.
166 # This setting does not apply to any binaries that require Tcl to operate
167 # properly (i.e. the text fixture, etc).
173 # Set this non-0 to compile binaries suitable for the UWP environment.
174 # This setting does not apply to any binaries that require Tcl to operate
175 # properly (i.e. the text fixture, etc).
181 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
188 # Set this non-0 to skip attempting to look for and/or link with the Tcl
196 # Set this to non-0 to create and use PDBs.
202 # Set this to non-0 to use the SQLite debugging heap subsystem.
208 # Set this to non-0 to use the Win32 native heap subsystem.
214 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
221 # Set this to one of the following values to enable various debugging
222 # features. Each level includes the debugging options from the previous
223 # levels. Currently, the recognized values for DEBUG are:
225 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
226 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
227 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
228 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
229 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
230 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
231 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
238 # Disable use of the --linemacros argument to the mksqlite3c.tcl tool, which
239 # is used to build the amalgamation.
241 !IFNDEF NO_LINEMACROS
246 # Enable use of available compiler optimizations? Normally, this should be
247 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
248 # can be useful for testing.
250 !IFNDEF OPTIMIZATIONS
254 # Set this to non-0 to enable support for the session extension.
260 # Set this to non-0 to enable support for the rbu extension.
266 # Set the source code file to be used by executables and libraries when
267 # they need the amalgamation.
270 !IF $(SPLIT_AMALGAMATION)!=0
271 SQLITE3C = sqlite3-all.c
277 # Set the include code file to be used by executables and libraries when
284 # This is the name to use for the SQLite dynamic link library (DLL).
288 SQLITE3DLL = winsqlite3.dll
290 SQLITE3DLL = sqlite3.dll
294 # This is the name to use for the SQLite import library (LIB).
298 SQLITE3LIB = winsqlite3.lib
300 SQLITE3LIB = sqlite3.lib
304 # This is the name to use for the SQLite shell executable (EXE).
308 SQLITE3EXE = winsqlite3shell.exe
310 SQLITE3EXE = sqlite3.exe
314 # This is the argument used to set the program database (PDB) file for the
315 # SQLite shell executable (EXE).
317 !IFNDEF SQLITE3EXEPDB
321 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
326 # These are the names of the customized Tcl header files used by various parts
327 # of this makefile when the stdcall calling convention is in use. It is not
328 # used for any other purpose.
331 SQLITETCLH = sqlite_tcl.h
334 !IFNDEF SQLITETCLDECLSH
335 SQLITETCLDECLSH = sqlite_tclDecls.h
338 # This is the name to use for the dynamic link library (DLL) containing the
339 # Tcl bindings for SQLite.
341 !IFNDEF SQLITE3TCLDLL
342 SQLITE3TCLDLL = tclsqlite3.dll
345 # These are the additional targets that the targets that integrate with the
346 # Tcl library should depend on when compiling, etc.
348 !IFNDEF SQLITE_TCL_DEP
349 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
350 SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
357 # These are the "standard" SQLite compilation options used when compiling for
358 # the Windows platform.
360 !IFNDEF OPT_FEATURE_FLAGS
361 !IF $(MINIMAL_AMALGAMATION)==0
362 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
363 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
364 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_GEOPOLY=1
365 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
366 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
367 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
368 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
369 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
370 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
372 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
375 # Should the session extension be enabled? If so, add compilation options
379 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
380 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
383 # Should the rbu extension be enabled? If so, add compilation options
387 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
390 # These are the "extended" SQLite compilation options used when compiling for
391 # the Windows 10 platform.
393 !IFNDEF EXT_FEATURE_FLAGS
395 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
396 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
397 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
403 ###############################################################################
404 ############################### END OF OPTIONS ################################
405 ###############################################################################
407 # When compiling for the Windows 10 platform, the PLATFORM macro must be set
408 # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
412 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
416 # This assumes that MSVC is always installed in 32-bit Program Files directory
417 # and sets the variable for use in locating other 32-bit installs accordingly.
419 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
420 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
422 # Check for the predefined command macro CC. This should point to the compiler
423 # binary for the target platform. If it is not defined, simply define it to
424 # the legacy default value 'cl.exe'.
430 # Check for the predefined command macro CSC. This should point to a working
431 # C Sharp compiler binary. If it is not defined, simply define it to the
432 # legacy default value 'csc.exe'.
438 # Check for the command macro LD. This should point to the linker binary for
439 # the target platform. If it is not defined, simply define it to the legacy
440 # default value 'link.exe'.
446 # Check for the predefined command macro RC. This should point to the resource
447 # compiler binary for the target platform. If it is not defined, simply define
448 # it to the legacy default value 'rc.exe'.
454 # Check for the MSVC runtime library path macro. Otherwise, this value will
455 # default to the 'lib' directory underneath the MSVC installation directory.
458 CRTLIBPATH = $(VCINSTALLDIR)\lib
461 CRTLIBPATH = $(CRTLIBPATH:\\=\)
463 # Check for the command macro NCC. This should point to the compiler binary
464 # for the platform the compilation process is taking place on. If it is not
465 # defined, simply define it to have the same value as the CC macro. When
466 # cross-compiling, it is suggested that this macro be modified via the command
467 # line (since nmake itself does not provide a built-in method to guess it).
468 # For example, to use the x86 compiler when cross-compiling for x64, a command
469 # line similar to the following could be used (all on one line):
471 # nmake /f Makefile.msc sqlite3.dll
472 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
474 # Alternatively, the full path and file name to the compiler binary for the
475 # platform the compilation process is taking place may be specified (all on
478 # nmake /f Makefile.msc sqlite3.dll
479 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
480 # USE_NATIVE_LIBPATHS=1
484 !ELSEIF $(XCOMPILE)!=0
485 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
491 # Check for the MSVC native runtime library path macro. Otherwise,
492 # this value will default to the 'lib' directory underneath the MSVC
493 # installation directory.
496 NCRTLIBPATH = $(VCINSTALLDIR)\lib
499 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
501 # Check for the Platform SDK library path macro. Otherwise, this
502 # value will default to the 'lib' directory underneath the Windows
503 # SDK installation directory (the environment variable used appears
504 # to be available when using Visual C++ 2008 or later via the
508 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
511 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
513 # Check for the UCRT library path macro. Otherwise, this value will
514 # default to the version-specific, platform-specific 'lib' directory
515 # underneath the Windows SDK installation directory.
518 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
521 UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
523 # C compiler and options for use in building executables that
524 # will run on the platform that is doing the build.
526 !IF $(USE_FULLWARN)!=0
527 BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
529 BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
532 # Check if assembly code listings should be generated for the source
533 # code files to be compiled.
535 !IF $(USE_LISTINGS)!=0
539 # Check if the native library paths should be used when compiling
540 # the command line tools used during the compilation process. If
541 # so, set the necessary macro now.
543 !IF $(USE_NATIVE_LIBPATHS)!=0
544 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
547 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
548 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
552 # C compiler and options for use in building executables that
553 # will run on the target platform. (BCC and TCC are usually the
554 # same unless your are cross-compiling.)
556 !IF $(USE_FULLWARN)!=0
557 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
559 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
562 # Check if warnings should be treated as errors when compiling.
564 !IF $(USE_FATAL_WARN)!=0
568 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
569 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
571 # Check if we want to use the "stdcall" calling convention when compiling.
572 # This is not supported by the compilers for non-x86 platforms. It should
573 # also be noted here that building any target with these "stdcall" options
574 # will most likely fail if the Tcl library is also required. This is due
575 # to how the Tcl library functions are declared and exported (i.e. without
576 # an explicit calling convention, which results in "cdecl").
578 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
579 !IF "$(PLATFORM)"=="x86"
580 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
581 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
583 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
587 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
588 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
590 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
608 # These are additional compiler options used for the core library.
610 !IFNDEF CORE_COMPILE_OPTS
611 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
612 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
614 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
618 # These are the additional targets that the core library should depend on
621 !IFNDEF CORE_LINK_DEP
622 !IF $(DYNAMIC_SHELL)!=0
624 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
625 CORE_LINK_DEP = sqlite3.def
631 # These are additional linker options used for the core library.
633 !IFNDEF CORE_LINK_OPTS
634 !IF $(DYNAMIC_SHELL)!=0
636 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
637 CORE_LINK_OPTS = /DEF:sqlite3.def
643 # These are additional compiler options used for the shell executable.
645 !IFNDEF SHELL_COMPILE_OPTS
646 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
647 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
649 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
653 # This is the source code that the shell executable should be compiled
656 !IFNDEF SHELL_CORE_SRC
657 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
660 !ELSEIF $(USE_AMALGAMATION)==0
664 SHELL_CORE_SRC = $(SQLITE3C)
668 # This is the core library that the shell executable should depend on.
670 !IFNDEF SHELL_CORE_DEP
671 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
672 SHELL_CORE_DEP = $(SQLITE3DLL)
674 !ELSEIF $(USE_AMALGAMATION)==0
675 SHELL_CORE_DEP = libsqlite3.lib
683 # If zlib support is enabled, add the dependencies for it.
685 !IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
686 SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
687 TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
691 # This is the core library that the shell executable should link with.
693 !IFNDEF SHELL_CORE_LIB
694 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
695 SHELL_CORE_LIB = $(SQLITE3LIB)
697 !ELSEIF $(USE_AMALGAMATION)==0
698 SHELL_CORE_LIB = libsqlite3.lib
705 # These are additional linker options used for the shell executable.
707 !IFNDEF SHELL_LINK_OPTS
708 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
711 # Check if assembly code listings should be generated for the source
712 # code files to be compiled.
714 !IF $(USE_LISTINGS)!=0
718 # When compiling the library for use in the WinRT environment,
719 # the following compile-time options must be used as well to
720 # disable use of Win32 APIs that are not available and to enable
721 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
724 TCC = $(TCC) -DSQLITE_OS_WINRT=1
725 RCC = $(RCC) -DSQLITE_OS_WINRT=1
726 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
727 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
730 # C compiler options for the Windows 10 platform (needs MSVC 2015).
733 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
734 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
737 # Also, we need to dynamically link to the correct MSVC runtime
738 # when compiling for WinRT (e.g. debug or release) OR if the
739 # USE_CRT_DLL option is set to force dynamically linking to the
740 # MSVC runtime library.
742 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
761 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
762 # any extension header files by default. For non-amalgamation
763 # builds, we need to make sure the compiler can find these.
765 !IF $(USE_AMALGAMATION)==0
766 TCC = $(TCC) -I$(TOP)\ext\fts3
767 RCC = $(RCC) -I$(TOP)\ext\fts3
768 TCC = $(TCC) -I$(TOP)\ext\rtree
769 RCC = $(RCC) -I$(TOP)\ext\rtree
770 TCC = $(TCC) -I$(TOP)\ext\session
771 RCC = $(RCC) -I$(TOP)\ext\session
774 # The mksqlite3c.tcl script accepts some options on the command
775 # line. When compiling with debugging enabled, some of these
776 # options are necessary in order to allow debugging symbols to
777 # work correctly with Visual Studio when using the amalgamation.
779 !IFNDEF MKSQLITE3C_TOOL
780 !IF $(MINIMAL_AMALGAMATION)!=0
781 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
783 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
787 !IFNDEF MKSQLITE3C_ARGS
788 !IF $(DEBUG)>1 && $(NO_LINEMACROS)==0
789 MKSQLITE3C_ARGS = --linemacros
793 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
794 MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
798 # The mksqlite3h.tcl script accepts some options on the command line.
799 # When compiling with stdcall support, some of these options are
802 !IFNDEF MKSQLITE3H_ARGS
803 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
804 MKSQLITE3H_ARGS = --useapicall
811 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
812 # Omitting the define will cause extra debugging code to be inserted and
813 # includes extra comments when "EXPLAIN stmt" is used.
816 TCC = $(TCC) -DNDEBUG
817 BCC = $(BCC) -DNDEBUG
818 RCC = $(RCC) -DNDEBUG
821 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
822 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
823 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
827 TCC = $(TCC) -DSQLITE_DEBUG=1
828 RCC = $(RCC) -DSQLITE_DEBUG=1
829 !IF $(DYNAMIC_SHELL)==0
830 TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
831 RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
835 !IF $(DEBUG)>4 || $(OSTRACE)!=0
836 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
837 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
841 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
842 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
845 # Prevent warnings about "insecure" MSVC runtime library functions
848 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
849 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
850 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
852 # Prevent warnings about "deprecated" POSIX functions being used.
854 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
855 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
856 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
858 # Use the SQLite debugging heap subsystem?
861 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
862 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
864 # Use native Win32 heap subsystem instead of malloc/free?
866 !ELSEIF $(WIN32HEAP)!=0
867 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
868 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
870 # Validate the heap on every call into the native Win32 heap subsystem?
873 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
874 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
879 # The locations of the Tcl header and library files. Also, the library that
880 # non-stubs enabled programs using Tcl must link against. These variables
881 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
882 # prior to running nmake in order to match the actual installed location and
883 # version on this machine.
894 TCLDIR = $(TOP)\compat\tcl
898 TCLINCDIR = $(TCLDIR)\include
902 TCLLIBDIR = $(TCLDIR)\lib
906 LIBTCL = tcl$(TCLVERSION)$(TCLSUFFIX).lib
910 LIBTCLSTUB = tclstub$(TCLVERSION)$(TCLSUFFIX).lib
914 LIBTCLPATH = $(TCLDIR)\bin
917 # The locations of the zlib header and library files. These variables
918 # (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
919 # prior to running nmake in order to match the actual installed (or source
920 # code) location on this machine.
923 ZLIBDIR = $(TOP)\compat\zlib
927 ZLIBINCDIR = $(ZLIBDIR)
931 ZLIBLIBDIR = $(ZLIBDIR)
935 !IF $(DYNAMIC_SHELL)!=0
942 # The locations of the ICU header and library files. These variables
943 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
944 # prior to running nmake in order to match the actual installed location on
948 ICUDIR = $(TOP)\compat\icu
952 ICUINCDIR = $(ICUDIR)\include
956 ICULIBDIR = $(ICUDIR)\lib
960 LIBICU = icuuc.lib icuin.lib
963 # This is the command to use for tclsh - normally just "tclsh", but we may
964 # know the specific version we want to use. This variable (TCLSH_CMD) may be
965 # overridden via the environment prior to running nmake in order to select a
966 # specific Tcl shell to use.
969 !IF $(USE_TCLSH_IN_PATH)!=0 || !EXIST("$(TCLDIR)\bin\tclsh.exe")
972 TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
977 # Compiler options needed for programs that use the readline() library.
979 !IFNDEF READLINE_FLAGS
980 READLINE_FLAGS = -DHAVE_READLINE=0
983 # The library that programs using readline() must link against.
989 # Should the database engine be compiled threadsafe
991 TCC = $(TCC) -DSQLITE_THREADSAFE=1
992 RCC = $(RCC) -DSQLITE_THREADSAFE=1
994 # Do threads override each others locks by default (1), or do we test (-1)
996 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
997 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
999 # Any target libraries which libsqlite must be linked against
1005 # Flags controlling use of the in memory btree implementation
1007 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
1008 # default to file, 2 to default to memory, and 3 to force temporary
1009 # tables to always be in memory.
1011 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
1012 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
1014 # Enable/disable loadable extensions, and other optional features
1015 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
1016 # The same set of OMIT and ENABLE flags should be passed to the
1017 # LEMON parser generator and the mkkeywordhash tool as well.
1019 # These are the required SQLite compilation options used when compiling for
1020 # the Windows platform.
1022 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
1024 # If we are linking to the RPCRT4 library, enable features that need it.
1026 !IF $(USE_RPCRT4_LIB)!=0
1027 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
1030 # Add the required and optional SQLite compilation options into the command
1031 # lines used to invoke the MSVC code and resource compilers.
1033 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
1034 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
1036 # Add in any optional parameters specified on the commane line, e.g.
1037 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
1039 TCC = $(TCC) $(OPTS)
1040 RCC = $(RCC) $(OPTS)
1042 # If compiling for debugging, add some defines.
1045 TCC = $(TCC) -D_DEBUG
1046 BCC = $(BCC) -D_DEBUG
1047 RCC = $(RCC) -D_DEBUG
1050 # If optimizations are enabled or disabled (either implicitly or
1051 # explicitly), add the necessary flags.
1053 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
1056 !IF $(USE_RUNTIME_CHECKS)!=0
1060 !ELSEIF $(OPTIMIZATIONS)>=3
1063 !ELSEIF $(OPTIMIZATIONS)==2
1066 !ELSEIF $(OPTIMIZATIONS)==1
1071 # If symbols are enabled (or compiling for debugging), enable PDBs.
1073 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1079 # If zlib support is enabled, add the compiler options for it.
1082 TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
1083 RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
1084 TCC = $(TCC) -I$(ZLIBINCDIR)
1085 RCC = $(RCC) -I$(ZLIBINCDIR)
1088 # If ICU support is enabled, add the compiler options for it.
1091 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
1092 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
1093 TCC = $(TCC) -I$(TOP)\ext\icu
1094 RCC = $(RCC) -I$(TOP)\ext\icu
1095 TCC = $(TCC) -I$(ICUINCDIR)
1096 RCC = $(RCC) -I$(ICUINCDIR)
1100 # Command line prefixes for compiling code, compiling resources,
1103 LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
1104 LTRCOMPILE = $(RCC) -r
1106 LTLINK = $(TCC) -Fe$@
1108 # If requested, link to the RPCRT4 library.
1110 !IF $(USE_RPCRT4_LIB)!=0
1111 LTLIBS = $(LTLIBS) rpcrt4.lib
1114 # If a platform was set, force the linker to target that.
1115 # Note that the vcvars*.bat family of batch files typically
1116 # set this for you. Otherwise, the linker will attempt
1117 # to deduce the binary type based on the object files.
1119 LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1120 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1121 !ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
1122 "$(VISUALSTUDIOVERSION)"=="14.0" || \
1123 "$(VISUALSTUDIOVERSION)"=="15.0"
1124 LTLINKOPTS = /NOLOGO /MACHINE:x86
1125 LTLIBOPTS = /NOLOGO /MACHINE:x86
1127 LTLINKOPTS = /NOLOGO
1131 # When compiling for use in the WinRT environment, the following
1132 # linker option must be used to mark the executable as runnable
1133 # only in the context of an application container.
1136 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
1137 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
1138 !IFNDEF STORELIBPATH
1139 !IF "$(PLATFORM)"=="x86"
1140 STORELIBPATH = $(CRTLIBPATH)\store
1141 !ELSEIF "$(PLATFORM)"=="x64"
1142 STORELIBPATH = $(CRTLIBPATH)\store\amd64
1143 !ELSEIF "$(PLATFORM)"=="ARM"
1144 STORELIBPATH = $(CRTLIBPATH)\store\arm
1146 STORELIBPATH = $(CRTLIBPATH)\store
1149 STORELIBPATH = $(STORELIBPATH:\\=\)
1150 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
1154 # When compiling for Windows Phone 8.1, an extra library path is
1157 !IF $(USE_WP81_OPTS)!=0
1159 !IF "$(PLATFORM)"=="x86"
1160 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1161 !ELSEIF "$(PLATFORM)"=="ARM"
1162 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1164 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1169 # When compiling for Windows Phone 8.1, some extra linker options
1170 # are also required.
1172 !IF $(USE_WP81_OPTS)!=0
1174 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1176 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1177 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1178 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1181 # When compiling for UWP or the Windows 10 platform, some extra linker
1182 # options are also required.
1184 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
1185 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1186 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1188 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1193 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
1195 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1197 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1201 # If either debugging or symbols are enabled, enable PDBs.
1203 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1204 LDFLAGS = /DEBUG $(LDOPTS)
1210 # Start with the Tcl related linker options.
1213 TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
1214 TCLLIBS = $(TCLLIBS) $(LIBTCL)
1217 # If zlib support is enabled, add the linker options for it.
1220 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
1221 LTLIBS = $(LTLIBS) $(ZLIBLIB)
1224 # If ICU support is enabled, add the linker options for it.
1227 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1228 LTLIBS = $(LTLIBS) $(LIBICU)
1232 # You should not have to change anything below this line
1233 ###############################################################################
1236 # Object files for the SQLite library (non-amalgamation).
1238 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
1239 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
1240 callback.lo complete.lo ctime.lo \
1241 date.lo dbpage.lo dbstat.lo delete.lo \
1242 expr.lo fault.lo fkey.lo \
1243 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1244 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
1245 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
1247 func.lo global.lo hash.lo \
1248 icu.lo insert.lo json1.lo legacy.lo loadext.lo \
1249 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1250 memdb.lo memjournal.lo \
1251 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1252 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
1253 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
1254 random.lo resolve.lo rowset.lo rtree.lo \
1255 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
1256 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
1257 update.lo upsert.lo util.lo vacuum.lo \
1258 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
1259 vdbetrace.lo vdbevtab.lo wal.lo walker.lo where.lo wherecode.lo \
1261 window.lo utf.lo vtab.lo
1264 # Object files for the amalgamation.
1266 LIBOBJS1 = sqlite3.lo
1268 # Determine the real value of LIBOBJ based on the 'configure' script
1271 !IF $(USE_AMALGAMATION)==0
1272 LIBOBJ = $(LIBOBJS0)
1275 LIBOBJ = $(LIBOBJS1)
1280 # Determine if embedded resource compilation and usage are enabled.
1283 LIBRESOBJS = sqlite3res.lo
1289 # Core source code files, part 1.
1292 $(TOP)\src\alter.c \
1293 $(TOP)\src\analyze.c \
1294 $(TOP)\src\attach.c \
1296 $(TOP)\src\backup.c \
1297 $(TOP)\src\bitvec.c \
1298 $(TOP)\src\btmutex.c \
1299 $(TOP)\src\btree.c \
1300 $(TOP)\src\build.c \
1301 $(TOP)\src\callback.c \
1302 $(TOP)\src\complete.c \
1303 $(TOP)\src\ctime.c \
1305 $(TOP)\src\dbpage.c \
1306 $(TOP)\src\dbstat.c \
1307 $(TOP)\src\delete.c \
1309 $(TOP)\src\fault.c \
1312 $(TOP)\src\global.c \
1314 $(TOP)\src\insert.c \
1315 $(TOP)\src\legacy.c \
1316 $(TOP)\src\loadext.c \
1318 $(TOP)\src\malloc.c \
1324 $(TOP)\src\memdb.c \
1325 $(TOP)\src\memjournal.c \
1326 $(TOP)\src\mutex.c \
1327 $(TOP)\src\mutex_noop.c \
1328 $(TOP)\src\mutex_unix.c \
1329 $(TOP)\src\mutex_w32.c \
1330 $(TOP)\src\notify.c \
1332 $(TOP)\src\os_unix.c \
1335 # Core source code files, part 2.
1338 $(TOP)\src\pager.c \
1339 $(TOP)\src\pcache.c \
1340 $(TOP)\src\pcache1.c \
1341 $(TOP)\src\pragma.c \
1342 $(TOP)\src\prepare.c \
1343 $(TOP)\src\printf.c \
1344 $(TOP)\src\random.c \
1345 $(TOP)\src\resolve.c \
1346 $(TOP)\src\rowset.c \
1347 $(TOP)\src\select.c \
1348 $(TOP)\src\status.c \
1349 $(TOP)\src\table.c \
1350 $(TOP)\src\threads.c \
1351 $(TOP)\src\tclsqlite.c \
1352 $(TOP)\src\tokenize.c \
1353 $(TOP)\src\treeview.c \
1354 $(TOP)\src\trigger.c \
1356 $(TOP)\src\update.c \
1357 $(TOP)\src\upsert.c \
1359 $(TOP)\src\vacuum.c \
1361 $(TOP)\src\vdbeapi.c \
1362 $(TOP)\src\vdbeaux.c \
1363 $(TOP)\src\vdbeblob.c \
1364 $(TOP)\src\vdbemem.c \
1365 $(TOP)\src\vdbesort.c \
1366 $(TOP)\src\vdbetrace.c \
1367 $(TOP)\src\vdbevtab.c \
1370 $(TOP)\src\walker.c \
1371 $(TOP)\src\where.c \
1372 $(TOP)\src\wherecode.c \
1373 $(TOP)\src\whereexpr.c \
1376 # Core miscellaneous files.
1381 # Core header files, part 1.
1384 $(TOP)\src\btree.h \
1385 $(TOP)\src\btreeInt.h \
1387 $(TOP)\src\hwtime.h \
1389 $(TOP)\src\mutex.h \
1391 $(TOP)\src\os_common.h \
1392 $(TOP)\src\os_setup.h \
1395 # Core header files, part 2.
1398 $(TOP)\src\pager.h \
1399 $(TOP)\src\pcache.h \
1400 $(TOP)\src\pragma.h \
1401 $(TOP)\src\sqlite.h.in \
1402 $(TOP)\src\sqlite3ext.h \
1403 $(TOP)\src\sqliteInt.h \
1404 $(TOP)\src\sqliteLimit.h \
1406 $(TOP)\src\vdbeInt.h \
1407 $(TOP)\src\vxworks.h \
1409 $(TOP)\src\whereInt.h
1411 # Extension source code files, part 1.
1414 $(TOP)\ext\fts1\fts1.c \
1415 $(TOP)\ext\fts1\fts1_hash.c \
1416 $(TOP)\ext\fts1\fts1_porter.c \
1417 $(TOP)\ext\fts1\fts1_tokenizer1.c \
1418 $(TOP)\ext\fts2\fts2.c \
1419 $(TOP)\ext\fts2\fts2_hash.c \
1420 $(TOP)\ext\fts2\fts2_icu.c \
1421 $(TOP)\ext\fts2\fts2_porter.c \
1422 $(TOP)\ext\fts2\fts2_tokenizer.c \
1423 $(TOP)\ext\fts2\fts2_tokenizer1.c
1425 # Extension source code files, part 2.
1428 $(TOP)\ext\fts3\fts3.c \
1429 $(TOP)\ext\fts3\fts3_aux.c \
1430 $(TOP)\ext\fts3\fts3_expr.c \
1431 $(TOP)\ext\fts3\fts3_hash.c \
1432 $(TOP)\ext\fts3\fts3_icu.c \
1433 $(TOP)\ext\fts3\fts3_porter.c \
1434 $(TOP)\ext\fts3\fts3_snippet.c \
1435 $(TOP)\ext\fts3\fts3_tokenizer.c \
1436 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1437 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1438 $(TOP)\ext\fts3\fts3_unicode.c \
1439 $(TOP)\ext\fts3\fts3_unicode2.c \
1440 $(TOP)\ext\fts3\fts3_write.c \
1441 $(TOP)\ext\icu\icu.c \
1442 $(TOP)\ext\rtree\rtree.c \
1443 $(TOP)\ext\session\sqlite3session.c \
1444 $(TOP)\ext\rbu\sqlite3rbu.c \
1445 $(TOP)\ext\misc\json1.c \
1446 $(TOP)\ext\misc\stmt.c
1448 # Extension header files, part 1.
1451 $(TOP)\ext\fts1\fts1.h \
1452 $(TOP)\ext\fts1\fts1_hash.h \
1453 $(TOP)\ext\fts1\fts1_tokenizer.h \
1454 $(TOP)\ext\fts2\fts2.h \
1455 $(TOP)\ext\fts2\fts2_hash.h \
1456 $(TOP)\ext\fts2\fts2_tokenizer.h
1458 # Extension header files, part 2.
1461 $(TOP)\ext\fts3\fts3.h \
1462 $(TOP)\ext\fts3\fts3Int.h \
1463 $(TOP)\ext\fts3\fts3_hash.h \
1464 $(TOP)\ext\fts3\fts3_tokenizer.h \
1465 $(TOP)\ext\icu\sqliteicu.h \
1466 $(TOP)\ext\rtree\rtree.h \
1467 $(TOP)\ext\rtree\geopoly.c \
1468 $(TOP)\ext\rbu\sqlite3rbu.h \
1469 $(TOP)\ext\session\sqlite3session.h
1471 # Generated source code files
1477 # Generated header files
1486 # Generated Tcl header files
1488 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1496 # All source code files.
1498 SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11) $(SRC12)
1500 # Source code to the test files.
1503 $(TOP)\src\test1.c \
1504 $(TOP)\src\test2.c \
1505 $(TOP)\src\test3.c \
1506 $(TOP)\src\test4.c \
1507 $(TOP)\src\test5.c \
1508 $(TOP)\src\test6.c \
1509 $(TOP)\src\test7.c \
1510 $(TOP)\src\test8.c \
1511 $(TOP)\src\test9.c \
1512 $(TOP)\src\test_autoext.c \
1513 $(TOP)\src\test_async.c \
1514 $(TOP)\src\test_backup.c \
1515 $(TOP)\src\test_bestindex.c \
1516 $(TOP)\src\test_blob.c \
1517 $(TOP)\src\test_btree.c \
1518 $(TOP)\src\test_config.c \
1519 $(TOP)\src\test_delete.c \
1520 $(TOP)\src\test_demovfs.c \
1521 $(TOP)\src\test_devsym.c \
1522 $(TOP)\src\test_fs.c \
1523 $(TOP)\src\test_func.c \
1524 $(TOP)\src\test_hexio.c \
1525 $(TOP)\src\test_init.c \
1526 $(TOP)\src\test_intarray.c \
1527 $(TOP)\src\test_journal.c \
1528 $(TOP)\src\test_malloc.c \
1529 $(TOP)\src\test_md5.c \
1530 $(TOP)\src\test_multiplex.c \
1531 $(TOP)\src\test_mutex.c \
1532 $(TOP)\src\test_onefile.c \
1533 $(TOP)\src\test_osinst.c \
1534 $(TOP)\src\test_pcache.c \
1535 $(TOP)\src\test_quota.c \
1536 $(TOP)\src\test_rtree.c \
1537 $(TOP)\src\test_schema.c \
1538 $(TOP)\src\test_server.c \
1539 $(TOP)\src\test_superlock.c \
1540 $(TOP)\src\test_syscall.c \
1541 $(TOP)\src\test_tclsh.c \
1542 $(TOP)\src\test_tclvar.c \
1543 $(TOP)\src\test_thread.c \
1544 $(TOP)\src\test_vdbecov.c \
1545 $(TOP)\src\test_vfs.c \
1546 $(TOP)\src\test_windirent.c \
1547 $(TOP)\src\test_window.c \
1548 $(TOP)\src\test_wsd.c \
1549 $(TOP)\ext\fts3\fts3_term.c \
1550 $(TOP)\ext\fts3\fts3_test.c \
1551 $(TOP)\ext\rbu\test_rbu.c \
1552 $(TOP)\ext\session\test_session.c
1554 # Statically linked extensions.
1557 $(TOP)\ext\expert\sqlite3expert.c \
1558 $(TOP)\ext\expert\test_expert.c \
1559 $(TOP)\ext\misc\amatch.c \
1560 $(TOP)\ext\misc\carray.c \
1561 $(TOP)\ext\misc\cksumvfs.c \
1562 $(TOP)\ext\misc\closure.c \
1563 $(TOP)\ext\misc\csv.c \
1564 $(TOP)\ext\misc\decimal.c \
1565 $(TOP)\ext\misc\eval.c \
1566 $(TOP)\ext\misc\explain.c \
1567 $(TOP)\ext\misc\fileio.c \
1568 $(TOP)\ext\misc\fuzzer.c \
1569 $(TOP)\ext\fts5\fts5_tcl.c \
1570 $(TOP)\ext\fts5\fts5_test_mi.c \
1571 $(TOP)\ext\fts5\fts5_test_tok.c \
1572 $(TOP)\ext\misc\ieee754.c \
1573 $(TOP)\ext\misc\mmapwarm.c \
1574 $(TOP)\ext\misc\nextchar.c \
1575 $(TOP)\ext\misc\normalize.c \
1576 $(TOP)\ext\misc\percentile.c \
1577 $(TOP)\ext\misc\prefixes.c \
1578 $(TOP)\ext\misc\regexp.c \
1579 $(TOP)\ext\misc\remember.c \
1580 $(TOP)\ext\misc\series.c \
1581 $(TOP)\ext\misc\spellfix.c \
1582 $(TOP)\ext\misc\totype.c \
1583 $(TOP)\ext\misc\unionvtab.c \
1584 $(TOP)\ext\misc\wholenumber.c
1586 # If use of zlib is enabled, add the "zipfile.c" source file.
1589 TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
1592 # Source code to the library files needed by the test fixture
1593 # (non-amalgamation)
1601 $(TOP)\ext\async\sqlite3async.c
1603 # Header files used by all library source files.
1606 $(TOP)\src\btree.h \
1607 $(TOP)\src\btreeInt.h \
1609 $(TOP)\src\hwtime.h \
1612 $(TOP)\src\mutex.h \
1615 $(TOP)\src\os_common.h \
1616 $(TOP)\src\os_setup.h \
1617 $(TOP)\src\os_win.h \
1618 $(TOP)\src\pager.h \
1619 $(TOP)\src\pcache.h \
1621 $(TOP)\src\pragma.h \
1624 $(TOP)\src\sqliteInt.h \
1625 $(TOP)\src\sqliteLimit.h \
1627 $(TOP)\src\vdbeInt.h \
1628 $(TOP)\src\vxworks.h \
1629 $(TOP)\src\whereInt.h
1631 # Header files used by extensions
1633 EXTHDR = $(EXTHDR) \
1634 $(TOP)\ext\fts1\fts1.h \
1635 $(TOP)\ext\fts1\fts1_hash.h \
1636 $(TOP)\ext\fts1\fts1_tokenizer.h
1637 EXTHDR = $(EXTHDR) \
1638 $(TOP)\ext\fts2\fts2.h \
1639 $(TOP)\ext\fts2\fts2_hash.h \
1640 $(TOP)\ext\fts2\fts2_tokenizer.h
1641 EXTHDR = $(EXTHDR) \
1642 $(TOP)\ext\fts3\fts3.h \
1643 $(TOP)\ext\fts3\fts3Int.h \
1644 $(TOP)\ext\fts3\fts3_hash.h \
1645 $(TOP)\ext\fts3\fts3_tokenizer.h
1646 EXTHDR = $(EXTHDR) \
1647 $(TOP)\ext\rtree\rtree.h \
1648 $(TOP)\ext\rtree\geopoly.c
1649 EXTHDR = $(EXTHDR) \
1650 $(TOP)\ext\icu\sqliteicu.h
1651 EXTHDR = $(EXTHDR) \
1652 $(TOP)\ext\rtree\sqlite3rtree.h
1653 EXTHDR = $(EXTHDR) \
1654 $(TOP)\ext\session\sqlite3session.h
1656 # executables needed for testing
1661 sqlite3_analyzer.exe \
1662 sqlite3_checker.exe \
1667 # Databases containing fuzzer test cases
1670 $(TOP)\test\fuzzdata1.db \
1671 $(TOP)\test\fuzzdata2.db \
1672 $(TOP)\test\fuzzdata3.db \
1673 $(TOP)\test\fuzzdata4.db \
1674 $(TOP)\test\fuzzdata5.db \
1675 $(TOP)\test\fuzzdata6.db \
1676 $(TOP)\test\fuzzdata7.db \
1677 $(TOP)\test\fuzzdata8.db
1680 # Additional compiler options for the shell. These are only effective
1681 # when the shell is not being dynamically linked.
1683 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1684 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
1685 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
1686 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
1687 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DESERIALIZE=1
1691 # Extra compiler options for various test tools.
1693 MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
1694 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1695 FUZZCHECK_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ -DSQLITE_MAX_MEMORY=50000000 -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1696 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DESERIALIZE
1697 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
1698 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
1699 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
1700 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
1701 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
1703 FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1704 OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
1705 DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
1706 KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
1707 ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
1709 # Standard options to testfixture.
1711 TESTOPTS = --verbose=file --output=test-out.txt
1713 # Extra targets for the "all" target that require Tcl.
1716 ALL_TCL_TARGETS = $(SQLITE3TCLDLL)
1722 # This is the default Makefile target. The objects listed here
1723 # are what get build when you type just "make" with no arguments.
1725 core: dll libsqlite3.lib shell
1727 # Targets that require the Tcl library.
1729 tcl: $(ALL_TCL_TARGETS)
1731 # This Makefile target builds all of the standard binaries.
1735 # Dynamic link library section.
1741 shell: $(SQLITE3EXE)
1744 libsqlite3.lib: $(LIBOBJ)
1745 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1747 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1748 $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1750 tclsqlite3.def: tclsqlite.lo
1751 echo EXPORTS > tclsqlite3.def
1752 dumpbin /all tclsqlite.lo \
1753 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+/EXPORT:_?((?:Sqlite3|Tclsqlite3)_[^@]*)(?:@\d+)?$$" \1 \
1754 | sort >> tclsqlite3.def
1756 pkgIndex.tcl: $(TOP)\VERSION
1757 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1758 echo package ifneeded sqlite3 @version@ [list load [file join $$dir $(SQLITE3TCLDLL)] sqlite3] \
1759 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact @version@ %%V > pkgIndex.tcl \
1762 $(SQLITE3TCLDLL): libtclsqlite3.lib $(LIBRESOBJS) tclsqlite3.def pkgIndex.tcl
1763 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:tclsqlite3.def /OUT:$@ libtclsqlite3.lib $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1766 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1767 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1770 sqlite3.def: libsqlite3.lib
1771 echo EXPORTS > sqlite3.def
1772 dumpbin /all libsqlite3.lib \
1773 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \
1774 | sort >> sqlite3.def
1777 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1778 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
1779 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1782 sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1783 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1785 dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1786 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1788 scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1789 $(LTLINK) $(NO_WARN) -DSCRUB_STANDALONE=1 $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1791 srcck1.exe: $(TOP)\tool\srcck1.c
1792 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1794 sourcetest: srcck1.exe $(SQLITE3C)
1795 srcck1.exe $(SQLITE3C)
1797 fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1798 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1800 dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
1801 $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1803 fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1804 $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1806 ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1807 $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1809 sessionfuzz.exe: zlib $(TOP)\test\sessionfuzz.c $(SQLITE3C) $(SQLITE3H)
1810 $(LTLINK) $(NO_WARN) -I$(ZLIBINCDIR) $(TOP)\test\sessionfuzz.c /link $(LDFLAGS) $(LTLINKOPTS) /LIBPATH:$(ZLIBLIBDIR) $(ZLIBLIB)
1812 mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1813 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1815 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1816 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1818 mptest: mptester.exe
1819 del /Q mptest.db 2>NUL
1820 $(MPTEST1) --journalmode DELETE
1821 $(MPTEST2) --journalmode WAL
1822 $(MPTEST1) --journalmode WAL
1823 $(MPTEST2) --journalmode PERSIST
1824 $(MPTEST1) --journalmode PERSIST
1825 $(MPTEST2) --journalmode TRUNCATE
1826 $(MPTEST1) --journalmode TRUNCATE
1827 $(MPTEST2) --journalmode DELETE
1829 # This target creates a directory named "tsrc" and fills it with
1830 # copies of all of the C source code and header files needed to
1831 # build on the target system. Some of the C source code and header
1832 # files are automatically generated. This target takes care of
1833 # all that automatic generation.
1835 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
1836 -rmdir /Q/S tsrc 2>NUL
1838 for %i in ($(SRC00)) do copy /Y %i tsrc
1839 for %i in ($(SRC01)) do copy /Y %i tsrc
1840 for %i in ($(SRC03)) do copy /Y %i tsrc
1841 for %i in ($(SRC04)) do copy /Y %i tsrc
1842 for %i in ($(SRC05)) do copy /Y %i tsrc
1843 for %i in ($(SRC06)) do copy /Y %i tsrc
1844 for %i in ($(SRC07)) do copy /Y %i tsrc
1845 for %i in ($(SRC08)) do copy /Y %i tsrc
1846 for %i in ($(SRC09)) do copy /Y %i tsrc
1847 for %i in ($(SRC10)) do copy /Y %i tsrc
1848 for %i in ($(SRC11)) do copy /Y %i tsrc
1849 for %i in ($(SRC12)) do copy /Y %i tsrc
1851 copy /B tsrc\fts5.c +,,
1853 copy /B tsrc\fts5.h +,,
1854 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1855 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1856 move vdbe.new tsrc\vdbe.c
1857 echo > .target_source
1859 sqlite3.c: .target_source sqlite3ext.h sqlite3session.h $(MKSQLITE3C_TOOL)
1860 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
1862 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1863 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1866 # Rule to build the amalgamation
1868 sqlite3.lo: $(SQLITE3C)
1869 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1872 # Rules to build the LEMON compiler generator
1874 lempar.c: $(TOP)\tool\lempar.c
1875 copy /Y $(TOP)\tool\lempar.c .
1876 copy /B lempar.c +,,
1878 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1879 $(BCC) $(NO_WARN) -Daccess=_access \
1880 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1883 # Rules to build the source-id generator tool
1885 mksourceid.exe: $(TOP)\tool\mksourceid.c
1886 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1888 # Rules to build individual *.lo files from generated *.c files. This
1894 parse.lo: parse.c $(HDR)
1895 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1897 opcodes.lo: opcodes.c
1898 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1901 # Rule to build the Win32 resources object file.
1905 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H) $(TOP)\VERSION
1906 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1907 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1908 echo #define SQLITE_RESOURCE_VERSION %%V \
1909 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1911 echo #endif >> sqlite3rc.h
1912 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1917 # Rules to build individual *.lo files from files in the src directory.
1919 alter.lo: $(TOP)\src\alter.c $(HDR)
1920 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1922 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1923 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1925 attach.lo: $(TOP)\src\attach.c $(HDR)
1926 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1928 auth.lo: $(TOP)\src\auth.c $(HDR)
1929 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1931 backup.lo: $(TOP)\src\backup.c $(HDR)
1932 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1934 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1935 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1937 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1938 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1940 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1941 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1943 build.lo: $(TOP)\src\build.c $(HDR)
1944 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1946 callback.lo: $(TOP)\src\callback.c $(HDR)
1947 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1949 complete.lo: $(TOP)\src\complete.c $(HDR)
1950 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1952 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1953 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1955 date.lo: $(TOP)\src\date.c $(HDR)
1956 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1958 dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
1959 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
1961 dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
1962 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1964 delete.lo: $(TOP)\src\delete.c $(HDR)
1965 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1967 expr.lo: $(TOP)\src\expr.c $(HDR)
1968 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1970 fault.lo: $(TOP)\src\fault.c $(HDR)
1971 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1973 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1974 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1976 func.lo: $(TOP)\src\func.c $(HDR)
1977 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1979 global.lo: $(TOP)\src\global.c $(HDR)
1980 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1982 hash.lo: $(TOP)\src\hash.c $(HDR)
1983 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1985 insert.lo: $(TOP)\src\insert.c $(HDR)
1986 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1988 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1989 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1991 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1992 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1994 main.lo: $(TOP)\src\main.c $(HDR)
1995 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1997 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1998 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
2000 mem0.lo: $(TOP)\src\mem0.c $(HDR)
2001 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
2003 mem1.lo: $(TOP)\src\mem1.c $(HDR)
2004 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
2006 mem2.lo: $(TOP)\src\mem2.c $(HDR)
2007 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
2009 mem3.lo: $(TOP)\src\mem3.c $(HDR)
2010 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
2012 mem5.lo: $(TOP)\src\mem5.c $(HDR)
2013 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
2015 memdb.lo: $(TOP)\src\memdb.c $(HDR)
2016 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memdb.c
2018 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
2019 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
2021 mutex.lo: $(TOP)\src\mutex.c $(HDR)
2022 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
2024 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
2025 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
2027 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
2028 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
2030 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
2031 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
2033 notify.lo: $(TOP)\src\notify.c $(HDR)
2034 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
2036 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
2037 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
2039 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
2040 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
2042 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
2043 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
2045 os.lo: $(TOP)\src\os.c $(HDR)
2046 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
2048 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
2049 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
2051 os_win.lo: $(TOP)\src\os_win.c $(HDR)
2052 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
2054 pragma.lo: $(TOP)\src\pragma.c $(HDR)
2055 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
2057 prepare.lo: $(TOP)\src\prepare.c $(HDR)
2058 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
2060 printf.lo: $(TOP)\src\printf.c $(HDR)
2061 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
2063 random.lo: $(TOP)\src\random.c $(HDR)
2064 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
2066 resolve.lo: $(TOP)\src\resolve.c $(HDR)
2067 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
2069 rowset.lo: $(TOP)\src\rowset.c $(HDR)
2070 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
2072 select.lo: $(TOP)\src\select.c $(HDR)
2073 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
2075 status.lo: $(TOP)\src\status.c $(HDR)
2076 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
2078 table.lo: $(TOP)\src\table.c $(HDR)
2079 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
2081 threads.lo: $(TOP)\src\threads.c $(HDR)
2082 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
2084 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
2085 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
2087 treeview.lo: $(TOP)\src\treeview.c $(HDR)
2088 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
2090 trigger.lo: $(TOP)\src\trigger.c $(HDR)
2091 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
2093 update.lo: $(TOP)\src\update.c $(HDR)
2094 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
2096 upsert.lo: $(TOP)\src\upsert.c $(HDR)
2097 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\upsert.c
2099 utf.lo: $(TOP)\src\utf.c $(HDR)
2100 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
2102 util.lo: $(TOP)\src\util.c $(HDR)
2103 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
2105 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
2106 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
2108 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
2109 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
2111 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
2112 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
2114 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
2115 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
2117 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
2118 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
2120 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
2121 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
2123 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
2124 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
2126 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
2127 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
2129 vdbevtab.lo: $(TOP)\src\vdbevtab.c $(HDR)
2130 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbevtab.c
2132 vtab.lo: $(TOP)\src\vtab.c $(HDR)
2133 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
2135 wal.lo: $(TOP)\src\wal.c $(HDR)
2136 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
2138 walker.lo: $(TOP)\src\walker.c $(HDR)
2139 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
2141 where.lo: $(TOP)\src\where.c $(HDR)
2142 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
2144 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
2145 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
2147 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
2148 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
2150 window.lo: $(TOP)\src\window.c $(HDR)
2151 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\window.c
2153 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2154 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2156 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2157 $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2159 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2160 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2162 # Rules to build opcodes.c and opcodes.h
2164 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
2165 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
2167 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
2168 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
2170 # Rules to build parse.c and parse.h - the outputs of lemon.
2174 parse.c: $(TOP)\src\parse.y lemon.exe
2175 del /Q parse.y parse.h parse.h.temp 2>NUL
2176 copy /Y $(TOP)\src\parse.y .
2178 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S parse.y
2180 $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
2181 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
2183 sqlite3ext.h: .target_source
2184 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2185 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
2186 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
2187 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
2189 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
2190 copy /B sqlite3ext.h +,,
2193 sqlite3session.h: $(TOP)\ext\session\sqlite3session.h
2194 copy /Y $(TOP)\ext\session\sqlite3session.h .
2195 copy /B sqlite3session.h +,,
2197 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
2198 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
2199 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
2201 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
2202 .\mkkeywordhash.exe > keywordhash.h
2204 # Source files that go into making shell.c
2206 $(TOP)\src\shell.c.in \
2207 $(TOP)\ext\misc\appendvfs.c \
2208 $(TOP)\ext\misc\completion.c \
2209 $(TOP)\ext\misc\decimal.c \
2210 $(TOP)\ext\misc\fileio.c \
2211 $(TOP)\ext\misc\ieee754.c \
2212 $(TOP)\ext\misc\series.c \
2213 $(TOP)\ext\misc\shathree.c \
2214 $(TOP)\ext\misc\uint.c \
2215 $(TOP)\ext\expert\sqlite3expert.c \
2216 $(TOP)\ext\expert\sqlite3expert.h \
2217 $(TOP)\ext\misc\memtrace.c \
2218 $(TOP)\src\test_windirent.c
2220 # If use of zlib is enabled, add the "zipfile.c" source file.
2223 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\sqlar.c
2224 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\zipfile.c
2227 shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
2228 $(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
2231 pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
2233 # Rules to build the extension objects.
2235 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
2236 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
2238 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
2239 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
2241 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
2242 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
2244 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
2245 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
2247 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
2248 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
2250 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
2251 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
2253 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
2254 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
2256 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
2257 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
2259 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
2260 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
2262 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
2263 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
2265 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
2266 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
2268 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
2269 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
2271 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
2272 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
2274 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
2275 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
2277 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
2278 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
2280 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
2281 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
2283 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
2284 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
2286 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
2287 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
2289 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
2290 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
2292 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
2293 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
2295 json1.lo: $(TOP)\ext\misc\json1.c $(HDR) $(EXTHDR)
2296 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\json1.c
2298 stmt.lo: $(TOP)\ext\misc\stmt.c $(HDR) $(EXTHDR)
2299 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\stmt.c
2301 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
2302 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
2304 sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
2305 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
2310 $(TOP)\ext\fts5\fts5.h \
2311 $(TOP)\ext\fts5\fts5Int.h \
2312 $(TOP)\ext\fts5\fts5_aux.c \
2313 $(TOP)\ext\fts5\fts5_buffer.c \
2314 $(TOP)\ext\fts5\fts5_main.c \
2315 $(TOP)\ext\fts5\fts5_config.c \
2316 $(TOP)\ext\fts5\fts5_expr.c \
2317 $(TOP)\ext\fts5\fts5_hash.c \
2318 $(TOP)\ext\fts5\fts5_index.c \
2319 fts5parse.c fts5parse.h \
2320 $(TOP)\ext\fts5\fts5_storage.c \
2321 $(TOP)\ext\fts5\fts5_tokenize.c \
2322 $(TOP)\ext\fts5\fts5_unicode2.c \
2323 $(TOP)\ext\fts5\fts5_varint.c \
2324 $(TOP)\ext\fts5\fts5_vocab.c
2327 $(TOP)\ext\lsm1\lsm.h \
2328 $(TOP)\ext\lsm1\lsmInt.h \
2329 $(TOP)\ext\lsm1\lsm_ckpt.c \
2330 $(TOP)\ext\lsm1\lsm_file.c \
2331 $(TOP)\ext\lsm1\lsm_log.c \
2332 $(TOP)\ext\lsm1\lsm_main.c \
2333 $(TOP)\ext\lsm1\lsm_mem.c \
2334 $(TOP)\ext\lsm1\lsm_mutex.c \
2335 $(TOP)\ext\lsm1\lsm_shared.c \
2336 $(TOP)\ext\lsm1\lsm_sorted.c \
2337 $(TOP)\ext\lsm1\lsm_str.c \
2338 $(TOP)\ext\lsm1\lsm_tree.c \
2339 $(TOP)\ext\lsm1\lsm_unix.c \
2340 $(TOP)\ext\lsm1\lsm_varint.c \
2341 $(TOP)\ext\lsm1\lsm_vtab.c \
2342 $(TOP)\ext\lsm1\lsm_win32.c
2344 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2345 copy /Y $(TOP)\ext\fts5\fts5parse.y .
2346 copy /B fts5parse.y +,,
2347 del /Q fts5parse.h 2>NUL
2348 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S fts5parse.y
2350 fts5parse.h: fts5parse.c
2353 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2354 copy /Y $(TOP)\ext\fts5\fts5.h .
2358 $(TCLSH_CMD) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
2359 copy /Y $(TOP)\ext\lsm1\lsm.h .
2362 fts5.lo: fts5.c $(HDR) $(EXTHDR)
2363 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2365 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
2366 $(LTCOMPILE) $(NO_WARN) -c fts5.c
2368 fts5.dll: fts5_ext.lo
2369 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
2371 sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2372 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
2374 # Rules to build the 'testfixture' application.
2376 # If using the amalgamation, use sqlite3.c directly to build the test
2377 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
2378 # necessary because the test fixture requires non-API symbols which are
2379 # hidden when the library is built via the amalgamation).
2381 TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
2382 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2383 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
2384 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
2385 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
2386 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
2387 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
2388 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
2389 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
2390 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
2391 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CKSUMVFS_STATIC=1
2392 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
2394 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
2395 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
2396 !IF $(USE_AMALGAMATION)==0
2397 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2399 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2402 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2404 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2405 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2406 echo #endif >> $(SQLITETCLDECLSH)
2407 type "$(TCLINCDIR)\tclDecls.h" \
2408 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
2409 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2410 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
2411 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
2412 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
2415 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2416 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2417 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2418 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
2419 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2422 testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
2423 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
2424 -DBUILD_sqlite -I$(TCLINCDIR) \
2425 $(TESTFIXTURE_SRC) \
2426 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2428 extensiontest: testfixture.exe testloadext.dll
2429 @set PATH=$(LIBTCLPATH);$(PATH)
2430 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
2432 coretestprogs: $(TESTPROGS)
2434 testprogs: coretestprogs srcck1.exe fuzzcheck.exe sessionfuzz.exe
2436 fulltest: $(TESTPROGS) fuzztest
2437 @set PATH=$(LIBTCLPATH);$(PATH)
2438 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
2440 soaktest: $(TESTPROGS)
2441 @set PATH=$(LIBTCLPATH);$(PATH)
2442 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
2444 fulltestonly: $(TESTPROGS) fuzztest
2445 @set PATH=$(LIBTCLPATH);$(PATH)
2446 .\testfixture.exe $(TOP)\test\full.test
2448 queryplantest: testfixture.exe shell
2449 @set PATH=$(LIBTCLPATH);$(PATH)
2450 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
2452 fuzztest: fuzzcheck.exe
2453 .\fuzzcheck.exe $(FUZZDATA)
2455 # Minimal testing that runs in less than 3 minutes (on a fast machine)
2457 quicktest: testfixture.exe sourcetest
2458 @set PATH=$(LIBTCLPATH);$(PATH)
2459 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2461 # This is the common case. Run many tests that do not take too long,
2462 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2464 test: $(TESTPROGS) sourcetest fuzztest
2465 @set PATH=$(LIBTCLPATH);$(PATH)
2466 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
2468 smoketest: $(TESTPROGS)
2469 @set PATH=$(LIBTCLPATH);$(PATH)
2470 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
2472 shelltest: $(TESTPROGS)
2473 .\testfixture.exe $(TOP)\test\permutations.test shell
2475 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)
2476 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
2478 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
2479 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
2480 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2482 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
2483 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
2485 sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
2486 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
2487 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2489 sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
2490 $(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
2493 $(TOP)/tool/mkccode.tcl \
2495 $(TOP)/src/tclsqlite.c \
2496 $(TOP)/ext/repair/sqlite3_checker.tcl \
2497 $(TOP)/ext/repair/checkindex.c \
2498 $(TOP)/ext/repair/checkfreelist.c \
2499 $(TOP)/ext/misc/btreeinfo.c \
2500 $(TOP)/ext/repair/sqlite3_checker.c.in
2502 sqlite3_checker.c: $(CHECKER_DEPS)
2503 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\ext\repair\sqlite3_checker.c.in > $@
2505 sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
2506 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
2507 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2509 dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2510 $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
2511 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
2513 testloadext.lo: $(TOP)\src\test_loadext.c $(SQLITE3H)
2514 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
2516 testloadext.dll: testloadext.lo
2517 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2519 dbtotxt.exe: $(TOP)\tool\dbtotxt.c
2520 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbtotxt.c /link $(LDFLAGS) $(LTLINKOPTS)
2522 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
2523 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2524 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2526 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
2527 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2528 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2530 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
2531 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2532 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2534 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
2535 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2536 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2538 showshm.exe: $(TOP)\tool\showshm.c
2539 $(LTLINK) $(NO_WARN) $(TOP)\tool\showshm.c /link $(LDFLAGS) $(LTLINKOPTS)
2541 index_usage.exe: $(TOP)\tool\index_usage.c $(SQLITE3C) $(SQLITE3H)
2542 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2543 $(TOP)\tool\index_usage.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2545 changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
2546 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2547 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2548 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2550 changesetfuzz.exe: $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) $(SQLITE3H)
2551 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2552 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2553 $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2555 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
2556 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2557 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2559 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
2560 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2561 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2563 atrc.exe: $(TOP)\test\atrc.c $(SQLITE3C) $(SQLITE3H)
2564 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2565 $(TOP)\test\atrc.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2567 LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
2568 $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
2570 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
2571 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2572 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2574 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
2575 $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
2576 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2578 kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
2579 $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
2580 $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2582 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
2583 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
2584 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2586 LSMDIR=$(TOP)\ext\lsm1
2587 !INCLUDE $(LSMDIR)\Makefile.msc
2590 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
2594 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
2595 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
2596 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
2598 del /Q $(SQLITE3TCLDLL) pkgIndex.tcl 2>NUL
2599 del /Q opcodes.c opcodes.h 2>NUL
2600 del /Q lemon.* lempar.c parse.* 2>NUL
2601 del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
2602 del /Q notasharedlib.* 2>NUL
2603 -rmdir /Q/S .deps 2>NUL
2604 -rmdir /Q/S .libs 2>NUL
2605 -rmdir /Q/S tsrc 2>NUL
2606 del /Q .target_source 2>NUL
2607 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
2608 del /Q lsm.dll lsmtest.exe 2>NUL
2609 del /Q atrc.exe changesetfuzz.exe dbtotxt.exe index_usage.exe 2>NUL
2610 del /Q testloadext.dll 2>NUL
2611 del /Q testfixture.exe test.db 2>NUL
2612 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
2613 del /Q changeset.exe 2>NUL
2614 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2615 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
2616 del /Q sqlite3.c sqlite3-*.c sqlite3.h 2>NUL
2617 del /Q sqlite3rc.h 2>NUL
2618 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
2619 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2620 del /Q sqlite-*-output.vsix 2>NUL
2621 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
2622 del /Q sqltclsh.* 2>NUL
2623 del /Q dbfuzz.exe sessionfuzz.exe 2>NUL
2624 del /Q kvtest.exe ossshell.exe scrub.exe 2>NUL
2625 del /Q showshm.exe sqlite3_checker.* sqlite3_expert.exe 2>NUL
2626 del /Q fts5.* fts5parse.* 2>NUL
2627 del /Q lsm.h lsm1.c 2>NUL