2 # nmake Makefile for SQLite
4 ###############################################################################
5 ############################## START OF OPTIONS ###############################
6 ###############################################################################
8 # The toplevel directory of the source tree. This is the directory
9 # that contains this "Makefile.msc".
14 # Set this non-0 to create and use the SQLite amalgamation file.
16 !IFNDEF USE_AMALGAMATION
21 # Set this non-0 to enable full warnings (-W4, etc) when compiling.
27 # Set this non-0 to enable treating warnings as errors (-WX, etc) when
30 !IFNDEF USE_FATAL_WARN
34 # Set this non-0 to enable full runtime error checks (-RTC1, etc). This
35 # has no effect if (any) optimizations are enabled.
37 !IFNDEF USE_RUNTIME_CHECKS
38 USE_RUNTIME_CHECKS = 0
41 # Set this non-0 to create a SQLite amalgamation file that excludes the
42 # various built-in extensions.
44 !IFNDEF MINIMAL_AMALGAMATION
45 MINIMAL_AMALGAMATION = 0
48 # Set this non-0 to use "stdcall" calling convention for the core library
49 # and shell executable.
55 # Set this non-0 to have the shell executable link against the core dynamic
62 # Set this non-0 to enable extra code that attempts to detect misuse of the
69 # If necessary, create a list of harmless compiler warnings to disable when
70 # compiling the various tools. For the SQLite source code itself, warnings,
71 # if any, will be disabled from within it.
74 !IF $(USE_FULLWARN)!=0
75 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
76 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
80 # Set this non-0 to use the library paths and other options necessary for
87 # Set this non-0 to split the SQLite amalgamation file into chunks to
88 # be used for debugging with Visual Studio.
90 !IFNDEF SPLIT_AMALGAMATION
91 SPLIT_AMALGAMATION = 0
95 # Set this non-0 to have this makefile assume the Tcl shell executable
96 # (tclsh*.exe) is available in the PATH. By default, this is disabled
97 # for compatibility with older build environments. This setting only
98 # applies if TCLSH_CMD is not set manually.
100 !IFNDEF USE_TCLSH_IN_PATH
101 USE_TCLSH_IN_PATH = 0
104 # Set this non-0 to use zlib, possibly compiling it from source code.
110 # Set this non-0 to build zlib from source code. This is enabled by
111 # default and in that case it will be assumed that the ZLIBDIR macro
112 # points to the top-level source code directory for zlib.
118 # Set this non-0 to use the International Components for Unicode (ICU).
125 # Set this non-0 to dynamically link to the MSVC runtime library.
131 # Set this non-0 to link to the RPCRT4 library.
133 !IFNDEF USE_RPCRT4_LIB
137 # Set this non-0 to generate assembly code listings for the source code
144 # Set this non-0 to attempt setting the native compiler automatically
145 # for cross-compiling the command line tools needed during the compilation
152 # Set this non-0 to use the native libraries paths for cross-compiling
153 # the command line tools needed during the compilation process.
155 !IFNDEF USE_NATIVE_LIBPATHS
156 USE_NATIVE_LIBPATHS = 0
159 # Set this 0 to skip the compiling and embedding of version resources.
165 # Set this non-0 to compile binaries suitable for the WinRT environment.
166 # This setting does not apply to any binaries that require Tcl to operate
167 # properly (i.e. the text fixture, etc).
173 # Set this non-0 to compile binaries suitable for the UWP environment.
174 # This setting does not apply to any binaries that require Tcl to operate
175 # properly (i.e. the text fixture, etc).
181 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
188 # Set this non-0 to skip attempting to look for and/or link with the Tcl
196 # Set this to non-0 to create and use PDBs.
202 # Set this to non-0 to use the SQLite debugging heap subsystem.
208 # Set this to non-0 to use the Win32 native heap subsystem.
214 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
221 # Set this to one of the following values to enable various debugging
222 # features. Each level includes the debugging options from the previous
223 # levels. Currently, the recognized values for DEBUG are:
225 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
226 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
227 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
228 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
229 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
230 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
231 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
237 # Enable use of available compiler optimizations? Normally, this should be
238 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
239 # can be useful for testing.
241 !IFNDEF OPTIMIZATIONS
245 # Set this to non-0 to enable support for the session extension.
251 # Set the source code file to be used by executables and libraries when
252 # they need the amalgamation.
255 !IF $(SPLIT_AMALGAMATION)!=0
256 SQLITE3C = sqlite3-all.c
262 # Set the include code file to be used by executables and libraries when
269 # This is the name to use for the SQLite dynamic link library (DLL).
273 SQLITE3DLL = winsqlite3.dll
275 SQLITE3DLL = sqlite3.dll
279 # This is the name to use for the SQLite import library (LIB).
283 SQLITE3LIB = winsqlite3.lib
285 SQLITE3LIB = sqlite3.lib
289 # This is the name to use for the SQLite shell executable (EXE).
293 SQLITE3EXE = winsqlite3shell.exe
295 SQLITE3EXE = sqlite3.exe
299 # This is the argument used to set the program database (PDB) file for the
300 # SQLite shell executable (EXE).
302 !IFNDEF SQLITE3EXEPDB
306 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
311 # These are the names of the customized Tcl header files used by various parts
312 # of this makefile when the stdcall calling convention is in use. It is not
313 # used for any other purpose.
316 SQLITETCLH = sqlite_tcl.h
319 !IFNDEF SQLITETCLDECLSH
320 SQLITETCLDECLSH = sqlite_tclDecls.h
323 # This is the name to use for the dynamic link library (DLL) containing the
324 # Tcl bindings for SQLite.
326 !IFNDEF SQLITE3TCLDLL
327 SQLITE3TCLDLL = tclsqlite3.dll
330 # These are the additional targets that the targets that integrate with the
331 # Tcl library should depend on when compiling, etc.
333 !IFNDEF SQLITE_TCL_DEP
334 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
335 SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
342 # These are the "standard" SQLite compilation options used when compiling for
343 # the Windows platform.
345 !IFNDEF OPT_FEATURE_FLAGS
346 !IF $(MINIMAL_AMALGAMATION)==0
347 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
348 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
349 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_GEOPOLY=1
350 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
351 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
352 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
353 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
354 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1
355 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
357 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
360 # Should the session extension be enabled? If so, add compilation options
364 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
365 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
368 # These are the "extended" SQLite compilation options used when compiling for
369 # the Windows 10 platform.
371 !IFNDEF EXT_FEATURE_FLAGS
373 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
374 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
375 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
381 ###############################################################################
382 ############################### END OF OPTIONS ################################
383 ###############################################################################
385 # When compiling for the Windows 10 platform, the PLATFORM macro must be set
386 # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
390 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
394 # This assumes that MSVC is always installed in 32-bit Program Files directory
395 # and sets the variable for use in locating other 32-bit installs accordingly.
397 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
398 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
400 # Check for the predefined command macro CC. This should point to the compiler
401 # binary for the target platform. If it is not defined, simply define it to
402 # the legacy default value 'cl.exe'.
408 # Check for the predefined command macro CSC. This should point to a working
409 # C Sharp compiler binary. If it is not defined, simply define it to the
410 # legacy default value 'csc.exe'.
416 # Check for the command macro LD. This should point to the linker binary for
417 # the target platform. If it is not defined, simply define it to the legacy
418 # default value 'link.exe'.
424 # Check for the predefined command macro RC. This should point to the resource
425 # compiler binary for the target platform. If it is not defined, simply define
426 # it to the legacy default value 'rc.exe'.
432 # Check for the MSVC runtime library path macro. Otherwise, this value will
433 # default to the 'lib' directory underneath the MSVC installation directory.
436 CRTLIBPATH = $(VCINSTALLDIR)\lib
439 CRTLIBPATH = $(CRTLIBPATH:\\=\)
441 # Check for the command macro NCC. This should point to the compiler binary
442 # for the platform the compilation process is taking place on. If it is not
443 # defined, simply define it to have the same value as the CC macro. When
444 # cross-compiling, it is suggested that this macro be modified via the command
445 # line (since nmake itself does not provide a built-in method to guess it).
446 # For example, to use the x86 compiler when cross-compiling for x64, a command
447 # line similar to the following could be used (all on one line):
449 # nmake /f Makefile.msc sqlite3.dll
450 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
452 # Alternatively, the full path and file name to the compiler binary for the
453 # platform the compilation process is taking place may be specified (all on
456 # nmake /f Makefile.msc sqlite3.dll
457 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
458 # USE_NATIVE_LIBPATHS=1
462 !ELSEIF $(XCOMPILE)!=0
463 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
469 # Check for the MSVC native runtime library path macro. Otherwise,
470 # this value will default to the 'lib' directory underneath the MSVC
471 # installation directory.
474 NCRTLIBPATH = $(VCINSTALLDIR)\lib
477 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
479 # Check for the Platform SDK library path macro. Otherwise, this
480 # value will default to the 'lib' directory underneath the Windows
481 # SDK installation directory (the environment variable used appears
482 # to be available when using Visual C++ 2008 or later via the
486 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
489 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
491 # Check for the UCRT library path macro. Otherwise, this value will
492 # default to the version-specific, platform-specific 'lib' directory
493 # underneath the Windows SDK installation directory.
496 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
499 UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
501 # C compiler and options for use in building executables that
502 # will run on the platform that is doing the build.
504 !IF $(USE_FULLWARN)!=0
505 BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
507 BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
510 # Check if assembly code listings should be generated for the source
511 # code files to be compiled.
513 !IF $(USE_LISTINGS)!=0
517 # Check if the native library paths should be used when compiling
518 # the command line tools used during the compilation process. If
519 # so, set the necessary macro now.
521 !IF $(USE_NATIVE_LIBPATHS)!=0
522 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
525 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
526 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
530 # C compiler and options for use in building executables that
531 # will run on the target platform. (BCC and TCC are usually the
532 # same unless your are cross-compiling.)
534 !IF $(USE_FULLWARN)!=0
535 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
537 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
540 # Check if warnings should be treated as errors when compiling.
542 !IF $(USE_FATAL_WARN)!=0
546 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
547 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
549 # Check if we want to use the "stdcall" calling convention when compiling.
550 # This is not supported by the compilers for non-x86 platforms. It should
551 # also be noted here that building any target with these "stdcall" options
552 # will most likely fail if the Tcl library is also required. This is due
553 # to how the Tcl library functions are declared and exported (i.e. without
554 # an explicit calling convention, which results in "cdecl").
556 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
557 !IF "$(PLATFORM)"=="x86"
558 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
559 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
561 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
565 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
566 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
568 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
586 # These are additional compiler options used for the core library.
588 !IFNDEF CORE_COMPILE_OPTS
589 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
590 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
592 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
596 # These are the additional targets that the core library should depend on
599 !IFNDEF CORE_LINK_DEP
600 !IF $(DYNAMIC_SHELL)!=0
602 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
603 CORE_LINK_DEP = sqlite3.def
609 # These are additional linker options used for the core library.
611 !IFNDEF CORE_LINK_OPTS
612 !IF $(DYNAMIC_SHELL)!=0
614 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
615 CORE_LINK_OPTS = /DEF:sqlite3.def
621 # These are additional compiler options used for the shell executable.
623 !IFNDEF SHELL_COMPILE_OPTS
624 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
625 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
627 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
631 # This is the source code that the shell executable should be compiled
634 !IFNDEF SHELL_CORE_SRC
635 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
638 !ELSEIF $(USE_AMALGAMATION)==0
642 SHELL_CORE_SRC = $(SQLITE3C)
646 # This is the core library that the shell executable should depend on.
648 !IFNDEF SHELL_CORE_DEP
649 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
650 SHELL_CORE_DEP = $(SQLITE3DLL)
652 !ELSEIF $(USE_AMALGAMATION)==0
653 SHELL_CORE_DEP = libsqlite3.lib
661 # If zlib support is enabled, add the dependencies for it.
663 !IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
664 SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
665 TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
669 # This is the core library that the shell executable should link with.
671 !IFNDEF SHELL_CORE_LIB
672 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
673 SHELL_CORE_LIB = $(SQLITE3LIB)
675 !ELSEIF $(USE_AMALGAMATION)==0
676 SHELL_CORE_LIB = libsqlite3.lib
683 # These are additional linker options used for the shell executable.
685 !IFNDEF SHELL_LINK_OPTS
686 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
689 # Check if assembly code listings should be generated for the source
690 # code files to be compiled.
692 !IF $(USE_LISTINGS)!=0
696 # When compiling the library for use in the WinRT environment,
697 # the following compile-time options must be used as well to
698 # disable use of Win32 APIs that are not available and to enable
699 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
702 TCC = $(TCC) -DSQLITE_OS_WINRT=1
703 RCC = $(RCC) -DSQLITE_OS_WINRT=1
704 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
705 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
708 # C compiler options for the Windows 10 platform (needs MSVC 2015).
711 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
712 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
715 # Also, we need to dynamically link to the correct MSVC runtime
716 # when compiling for WinRT (e.g. debug or release) OR if the
717 # USE_CRT_DLL option is set to force dynamically linking to the
718 # MSVC runtime library.
720 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
739 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
740 # any extension header files by default. For non-amalgamation
741 # builds, we need to make sure the compiler can find these.
743 !IF $(USE_AMALGAMATION)==0
744 TCC = $(TCC) -I$(TOP)\ext\fts3
745 RCC = $(RCC) -I$(TOP)\ext\fts3
746 TCC = $(TCC) -I$(TOP)\ext\rtree
747 RCC = $(RCC) -I$(TOP)\ext\rtree
748 TCC = $(TCC) -I$(TOP)\ext\session
749 RCC = $(RCC) -I$(TOP)\ext\session
752 # The mksqlite3c.tcl script accepts some options on the command
753 # line. When compiling with debugging enabled, some of these
754 # options are necessary in order to allow debugging symbols to
755 # work correctly with Visual Studio when using the amalgamation.
757 !IFNDEF MKSQLITE3C_TOOL
758 !IF $(MINIMAL_AMALGAMATION)!=0
759 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
761 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
765 !IFNDEF MKSQLITE3C_ARGS
767 MKSQLITE3C_ARGS = --linemacros
771 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
772 MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
776 # The mksqlite3h.tcl script accepts some options on the command line.
777 # When compiling with stdcall support, some of these options are
780 !IFNDEF MKSQLITE3H_ARGS
781 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
782 MKSQLITE3H_ARGS = --useapicall
789 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
790 # Omitting the define will cause extra debugging code to be inserted and
791 # includes extra comments when "EXPLAIN stmt" is used.
794 TCC = $(TCC) -DNDEBUG
795 BCC = $(BCC) -DNDEBUG
796 RCC = $(RCC) -DNDEBUG
799 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
800 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
801 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
805 TCC = $(TCC) -DSQLITE_DEBUG=1
806 RCC = $(RCC) -DSQLITE_DEBUG=1
807 !IF $(DYNAMIC_SHELL)==0
808 TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
809 RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
813 !IF $(DEBUG)>4 || $(OSTRACE)!=0
814 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
815 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
819 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
820 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
823 # Prevent warnings about "insecure" MSVC runtime library functions
826 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
827 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
828 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
830 # Prevent warnings about "deprecated" POSIX functions being used.
832 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
833 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
834 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
836 # Use the SQLite debugging heap subsystem?
839 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
840 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
842 # Use native Win32 heap subsystem instead of malloc/free?
844 !ELSEIF $(WIN32HEAP)!=0
845 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
846 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
848 # Validate the heap on every call into the native Win32 heap subsystem?
851 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
852 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
857 # The locations of the Tcl header and library files. Also, the library that
858 # non-stubs enabled programs using Tcl must link against. These variables
859 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
860 # prior to running nmake in order to match the actual installed location and
861 # version on this machine.
872 TCLDIR = $(TOP)\compat\tcl
876 TCLINCDIR = $(TCLDIR)\include
880 TCLLIBDIR = $(TCLDIR)\lib
884 LIBTCL = tcl$(TCLVERSION)$(TCLSUFFIX).lib
888 LIBTCLSTUB = tclstub$(TCLVERSION)$(TCLSUFFIX).lib
892 LIBTCLPATH = $(TCLDIR)\bin
895 # The locations of the zlib header and library files. These variables
896 # (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
897 # prior to running nmake in order to match the actual installed (or source
898 # code) location on this machine.
901 ZLIBDIR = $(TOP)\compat\zlib
905 ZLIBINCDIR = $(ZLIBDIR)
909 ZLIBLIBDIR = $(ZLIBDIR)
913 !IF $(DYNAMIC_SHELL)!=0
920 # The locations of the ICU header and library files. These variables
921 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
922 # prior to running nmake in order to match the actual installed location on
926 ICUDIR = $(TOP)\compat\icu
930 ICUINCDIR = $(ICUDIR)\include
934 ICULIBDIR = $(ICUDIR)\lib
938 LIBICU = icuuc.lib icuin.lib
941 # This is the command to use for tclsh - normally just "tclsh", but we may
942 # know the specific version we want to use. This variable (TCLSH_CMD) may be
943 # overridden via the environment prior to running nmake in order to select a
944 # specific Tcl shell to use.
947 !IF $(USE_TCLSH_IN_PATH)!=0 || !EXIST("$(TCLDIR)\bin\tclsh.exe")
950 TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
955 # Compiler options needed for programs that use the readline() library.
957 !IFNDEF READLINE_FLAGS
958 READLINE_FLAGS = -DHAVE_READLINE=0
961 # The library that programs using readline() must link against.
967 # Should the database engine be compiled threadsafe
969 TCC = $(TCC) -DSQLITE_THREADSAFE=1
970 RCC = $(RCC) -DSQLITE_THREADSAFE=1
972 # Do threads override each others locks by default (1), or do we test (-1)
974 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
975 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
977 # Any target libraries which libsqlite must be linked against
983 # Flags controlling use of the in memory btree implementation
985 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
986 # default to file, 2 to default to memory, and 3 to force temporary
987 # tables to always be in memory.
989 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
990 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
992 # Enable/disable loadable extensions, and other optional features
993 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
994 # The same set of OMIT and ENABLE flags should be passed to the
995 # LEMON parser generator and the mkkeywordhash tool as well.
997 # These are the required SQLite compilation options used when compiling for
998 # the Windows platform.
1000 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
1002 # If we are linking to the RPCRT4 library, enable features that need it.
1004 !IF $(USE_RPCRT4_LIB)!=0
1005 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
1008 # Add the required and optional SQLite compilation options into the command
1009 # lines used to invoke the MSVC code and resource compilers.
1011 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
1012 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
1014 # Add in any optional parameters specified on the commane line, e.g.
1015 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
1017 TCC = $(TCC) $(OPTS)
1018 RCC = $(RCC) $(OPTS)
1020 # If compiling for debugging, add some defines.
1023 TCC = $(TCC) -D_DEBUG
1024 BCC = $(BCC) -D_DEBUG
1025 RCC = $(RCC) -D_DEBUG
1028 # If optimizations are enabled or disabled (either implicitly or
1029 # explicitly), add the necessary flags.
1031 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
1034 !IF $(USE_RUNTIME_CHECKS)!=0
1038 !ELSEIF $(OPTIMIZATIONS)>=3
1041 !ELSEIF $(OPTIMIZATIONS)==2
1044 !ELSEIF $(OPTIMIZATIONS)==1
1049 # If symbols are enabled (or compiling for debugging), enable PDBs.
1051 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1057 # If zlib support is enabled, add the compiler options for it.
1060 TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
1061 RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
1062 TCC = $(TCC) -I$(ZLIBINCDIR)
1063 RCC = $(RCC) -I$(ZLIBINCDIR)
1066 # If ICU support is enabled, add the compiler options for it.
1069 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
1070 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
1071 TCC = $(TCC) -I$(TOP)\ext\icu
1072 RCC = $(RCC) -I$(TOP)\ext\icu
1073 TCC = $(TCC) -I$(ICUINCDIR)
1074 RCC = $(RCC) -I$(ICUINCDIR)
1078 # Command line prefixes for compiling code, compiling resources,
1081 LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
1082 LTRCOMPILE = $(RCC) -r
1084 LTLINK = $(TCC) -Fe$@
1086 # If requested, link to the RPCRT4 library.
1088 !IF $(USE_RPCRT4_LIB)!=0
1089 LTLIBS = $(LTLIBS) rpcrt4.lib
1092 # If a platform was set, force the linker to target that.
1093 # Note that the vcvars*.bat family of batch files typically
1094 # set this for you. Otherwise, the linker will attempt
1095 # to deduce the binary type based on the object files.
1097 LTLINKOPTS = $(LTLINKOPTS) /NOLOGO /MACHINE:$(PLATFORM)
1098 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1099 !ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
1100 "$(VISUALSTUDIOVERSION)"=="14.0" || \
1101 "$(VISUALSTUDIOVERSION)"=="15.0"
1102 LTLINKOPTS = /NOLOGO /MACHINE:x86
1103 LTLIBOPTS = /NOLOGO /MACHINE:x86
1105 LTLINKOPTS = $(LTLINKOPTS) /NOLOGO
1109 # When compiling for use in the WinRT environment, the following
1110 # linker option must be used to mark the executable as runnable
1111 # only in the context of an application container.
1114 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
1115 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
1116 !IFNDEF STORELIBPATH
1117 !IF "$(PLATFORM)"=="x86"
1118 STORELIBPATH = $(CRTLIBPATH)\store
1119 !ELSEIF "$(PLATFORM)"=="x64"
1120 STORELIBPATH = $(CRTLIBPATH)\store\amd64
1121 !ELSEIF "$(PLATFORM)"=="ARM"
1122 STORELIBPATH = $(CRTLIBPATH)\store\arm
1124 STORELIBPATH = $(CRTLIBPATH)\store
1127 STORELIBPATH = $(STORELIBPATH:\\=\)
1128 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
1132 # When compiling for Windows Phone 8.1, an extra library path is
1135 !IF $(USE_WP81_OPTS)!=0
1137 !IF "$(PLATFORM)"=="x86"
1138 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1139 !ELSEIF "$(PLATFORM)"=="ARM"
1140 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1142 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1147 # When compiling for Windows Phone 8.1, some extra linker options
1148 # are also required.
1150 !IF $(USE_WP81_OPTS)!=0
1152 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1154 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1155 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1156 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1159 # When compiling for UWP or the Windows 10 platform, some extra linker
1160 # options are also required.
1162 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
1163 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1164 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1166 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1171 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
1173 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1175 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1179 # If either debugging or symbols are enabled, enable PDBs.
1181 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1182 LDFLAGS = /DEBUG $(LDOPTS)
1188 # Start with the Tcl related linker options.
1191 TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
1192 TCLLIBS = $(TCLLIBS) $(LIBTCL)
1195 # If zlib support is enabled, add the linker options for it.
1198 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
1199 LTLIBS = $(LTLIBS) $(ZLIBLIB)
1202 # If ICU support is enabled, add the linker options for it.
1205 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1206 LTLIBS = $(LTLIBS) $(LIBICU)
1210 # You should not have to change anything below this line
1211 ###############################################################################
1214 # Object files for the SQLite library (non-amalgamation).
1216 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
1217 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
1218 callback.lo complete.lo ctime.lo \
1219 date.lo dbpage.lo dbstat.lo delete.lo \
1220 expr.lo fault.lo fkey.lo \
1221 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1222 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
1223 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
1225 func.lo global.lo hash.lo \
1226 icu.lo insert.lo json1.lo legacy.lo loadext.lo \
1227 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1228 memdb.lo memjournal.lo \
1229 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1230 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
1231 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
1232 random.lo resolve.lo rowset.lo rtree.lo \
1233 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
1234 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
1235 update.lo upsert.lo util.lo vacuum.lo \
1236 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
1237 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
1238 window.lo utf.lo vtab.lo
1241 # Object files for the amalgamation.
1243 LIBOBJS1 = sqlite3.lo
1245 # Determine the real value of LIBOBJ based on the 'configure' script
1248 !IF $(USE_AMALGAMATION)==0
1249 LIBOBJ = $(LIBOBJS0)
1252 LIBOBJ = $(LIBOBJS1)
1257 # Determine if embedded resource compilation and usage are enabled.
1260 LIBRESOBJS = sqlite3res.lo
1266 # Core source code files, part 1.
1269 $(TOP)\src\crypto.c \
1270 $(TOP)\src\crypto_cc.c \
1271 $(TOP)\src\crypto_impl.c \
1272 $(TOP)\src\crypto_libtomcrypt.c \
1273 $(TOP)\src\crypto_openssl.c \
1274 $(TOP)\src\crypto.h \
1275 $(TOP)\src\sqlcipher.h \
1276 $(TOP)\src\alter.c \
1277 $(TOP)\src\analyze.c \
1278 $(TOP)\src\attach.c \
1280 $(TOP)\src\backup.c \
1281 $(TOP)\src\bitvec.c \
1282 $(TOP)\src\btmutex.c \
1283 $(TOP)\src\btree.c \
1284 $(TOP)\src\build.c \
1285 $(TOP)\src\callback.c \
1286 $(TOP)\src\complete.c \
1287 $(TOP)\src\ctime.c \
1289 $(TOP)\src\dbpage.c \
1290 $(TOP)\src\dbstat.c \
1291 $(TOP)\src\delete.c \
1293 $(TOP)\src\fault.c \
1296 $(TOP)\src\global.c \
1298 $(TOP)\src\insert.c \
1299 $(TOP)\src\legacy.c \
1300 $(TOP)\src\loadext.c \
1302 $(TOP)\src\malloc.c \
1308 $(TOP)\src\memdb.c \
1309 $(TOP)\src\memjournal.c \
1310 $(TOP)\src\mutex.c \
1311 $(TOP)\src\mutex_noop.c \
1312 $(TOP)\src\mutex_unix.c \
1313 $(TOP)\src\mutex_w32.c \
1314 $(TOP)\src\notify.c \
1316 $(TOP)\src\os_unix.c \
1319 # Core source code files, part 2.
1322 $(TOP)\src\pager.c \
1323 $(TOP)\src\pcache.c \
1324 $(TOP)\src\pcache1.c \
1325 $(TOP)\src\pragma.c \
1326 $(TOP)\src\prepare.c \
1327 $(TOP)\src\printf.c \
1328 $(TOP)\src\random.c \
1329 $(TOP)\src\resolve.c \
1330 $(TOP)\src\rowset.c \
1331 $(TOP)\src\select.c \
1332 $(TOP)\src\status.c \
1333 $(TOP)\src\table.c \
1334 $(TOP)\src\threads.c \
1335 $(TOP)\src\tclsqlite.c \
1336 $(TOP)\src\tokenize.c \
1337 $(TOP)\src\treeview.c \
1338 $(TOP)\src\trigger.c \
1340 $(TOP)\src\update.c \
1341 $(TOP)\src\upsert.c \
1343 $(TOP)\src\vacuum.c \
1345 $(TOP)\src\vdbeapi.c \
1346 $(TOP)\src\vdbeaux.c \
1347 $(TOP)\src\vdbeblob.c \
1348 $(TOP)\src\vdbemem.c \
1349 $(TOP)\src\vdbesort.c \
1350 $(TOP)\src\vdbetrace.c \
1353 $(TOP)\src\walker.c \
1354 $(TOP)\src\where.c \
1355 $(TOP)\src\wherecode.c \
1356 $(TOP)\src\whereexpr.c \
1359 # Core miscellaneous files.
1364 # Core header files, part 1.
1367 $(TOP)\src\btree.h \
1368 $(TOP)\src\btreeInt.h \
1370 $(TOP)\src\hwtime.h \
1372 $(TOP)\src\mutex.h \
1374 $(TOP)\src\os_common.h \
1375 $(TOP)\src\os_setup.h \
1378 # Core header files, part 2.
1381 $(TOP)\src\pager.h \
1382 $(TOP)\src\pcache.h \
1383 $(TOP)\src\pragma.h \
1384 $(TOP)\src\sqlite.h.in \
1385 $(TOP)\src\sqlite3ext.h \
1386 $(TOP)\src\sqliteInt.h \
1387 $(TOP)\src\sqliteLimit.h \
1389 $(TOP)\src\vdbeInt.h \
1390 $(TOP)\src\vxworks.h \
1392 $(TOP)\src\whereInt.h
1394 # Extension source code files, part 1.
1397 $(TOP)\ext\fts1\fts1.c \
1398 $(TOP)\ext\fts1\fts1_hash.c \
1399 $(TOP)\ext\fts1\fts1_porter.c \
1400 $(TOP)\ext\fts1\fts1_tokenizer1.c \
1401 $(TOP)\ext\fts2\fts2.c \
1402 $(TOP)\ext\fts2\fts2_hash.c \
1403 $(TOP)\ext\fts2\fts2_icu.c \
1404 $(TOP)\ext\fts2\fts2_porter.c \
1405 $(TOP)\ext\fts2\fts2_tokenizer.c \
1406 $(TOP)\ext\fts2\fts2_tokenizer1.c
1408 # Extension source code files, part 2.
1411 $(TOP)\ext\fts3\fts3.c \
1412 $(TOP)\ext\fts3\fts3_aux.c \
1413 $(TOP)\ext\fts3\fts3_expr.c \
1414 $(TOP)\ext\fts3\fts3_hash.c \
1415 $(TOP)\ext\fts3\fts3_icu.c \
1416 $(TOP)\ext\fts3\fts3_porter.c \
1417 $(TOP)\ext\fts3\fts3_snippet.c \
1418 $(TOP)\ext\fts3\fts3_tokenizer.c \
1419 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1420 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1421 $(TOP)\ext\fts3\fts3_unicode.c \
1422 $(TOP)\ext\fts3\fts3_unicode2.c \
1423 $(TOP)\ext\fts3\fts3_write.c \
1424 $(TOP)\ext\icu\icu.c \
1425 $(TOP)\ext\rtree\rtree.c \
1426 $(TOP)\ext\session\sqlite3session.c \
1427 $(TOP)\ext\rbu\sqlite3rbu.c \
1428 $(TOP)\ext\misc\json1.c \
1429 $(TOP)\ext\misc\stmt.c
1431 # Extension header files, part 1.
1434 $(TOP)\ext\fts1\fts1.h \
1435 $(TOP)\ext\fts1\fts1_hash.h \
1436 $(TOP)\ext\fts1\fts1_tokenizer.h \
1437 $(TOP)\ext\fts2\fts2.h \
1438 $(TOP)\ext\fts2\fts2_hash.h \
1439 $(TOP)\ext\fts2\fts2_tokenizer.h
1441 # Extension header files, part 2.
1444 $(TOP)\ext\fts3\fts3.h \
1445 $(TOP)\ext\fts3\fts3Int.h \
1446 $(TOP)\ext\fts3\fts3_hash.h \
1447 $(TOP)\ext\fts3\fts3_tokenizer.h \
1448 $(TOP)\ext\icu\sqliteicu.h \
1449 $(TOP)\ext\rtree\rtree.h \
1450 $(TOP)\ext\rtree\geopoly.c \
1451 $(TOP)\ext\rbu\sqlite3rbu.h \
1452 $(TOP)\ext\session\sqlite3session.h
1454 # Generated source code files
1460 # Generated header files
1469 # Generated Tcl header files
1471 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1479 # All source code files.
1481 SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
1483 # Source code to the test files.
1486 $(TOP)\src\test1.c \
1487 $(TOP)\src\test2.c \
1488 $(TOP)\src\test3.c \
1489 $(TOP)\src\test4.c \
1490 $(TOP)\src\test5.c \
1491 $(TOP)\src\test6.c \
1492 $(TOP)\src\test7.c \
1493 $(TOP)\src\test8.c \
1494 $(TOP)\src\test9.c \
1495 $(TOP)\src\test_autoext.c \
1496 $(TOP)\src\test_async.c \
1497 $(TOP)\src\test_backup.c \
1498 $(TOP)\src\test_bestindex.c \
1499 $(TOP)\src\test_blob.c \
1500 $(TOP)\src\test_btree.c \
1501 $(TOP)\src\test_config.c \
1502 $(TOP)\src\test_delete.c \
1503 $(TOP)\src\test_demovfs.c \
1504 $(TOP)\src\test_devsym.c \
1505 $(TOP)\src\test_fs.c \
1506 $(TOP)\src\test_func.c \
1507 $(TOP)\src\test_hexio.c \
1508 $(TOP)\src\test_init.c \
1509 $(TOP)\src\test_intarray.c \
1510 $(TOP)\src\test_journal.c \
1511 $(TOP)\src\test_malloc.c \
1512 $(TOP)\src\test_md5.c \
1513 $(TOP)\src\test_multiplex.c \
1514 $(TOP)\src\test_mutex.c \
1515 $(TOP)\src\test_onefile.c \
1516 $(TOP)\src\test_osinst.c \
1517 $(TOP)\src\test_pcache.c \
1518 $(TOP)\src\test_quota.c \
1519 $(TOP)\src\test_rtree.c \
1520 $(TOP)\src\test_schema.c \
1521 $(TOP)\src\test_server.c \
1522 $(TOP)\src\test_superlock.c \
1523 $(TOP)\src\test_syscall.c \
1524 $(TOP)\src\test_tclsh.c \
1525 $(TOP)\src\test_tclvar.c \
1526 $(TOP)\src\test_thread.c \
1527 $(TOP)\src\test_vdbecov.c \
1528 $(TOP)\src\test_vfs.c \
1529 $(TOP)\src\test_windirent.c \
1530 $(TOP)\src\test_window.c \
1531 $(TOP)\src\test_wsd.c \
1532 $(TOP)\ext\fts3\fts3_term.c \
1533 $(TOP)\ext\fts3\fts3_test.c \
1534 $(TOP)\ext\rbu\test_rbu.c \
1535 $(TOP)\ext\session\test_session.c
1537 # Statically linked extensions.
1540 $(TOP)\ext\expert\sqlite3expert.c \
1541 $(TOP)\ext\expert\test_expert.c \
1542 $(TOP)\ext\misc\amatch.c \
1543 $(TOP)\ext\misc\carray.c \
1544 $(TOP)\ext\misc\closure.c \
1545 $(TOP)\ext\misc\csv.c \
1546 $(TOP)\ext\misc\eval.c \
1547 $(TOP)\ext\misc\explain.c \
1548 $(TOP)\ext\misc\fileio.c \
1549 $(TOP)\ext\misc\fuzzer.c \
1550 $(TOP)\ext\fts5\fts5_tcl.c \
1551 $(TOP)\ext\fts5\fts5_test_mi.c \
1552 $(TOP)\ext\fts5\fts5_test_tok.c \
1553 $(TOP)\ext\misc\ieee754.c \
1554 $(TOP)\ext\misc\mmapwarm.c \
1555 $(TOP)\ext\misc\nextchar.c \
1556 $(TOP)\ext\misc\normalize.c \
1557 $(TOP)\ext\misc\percentile.c \
1558 $(TOP)\ext\misc\prefixes.c \
1559 $(TOP)\ext\misc\regexp.c \
1560 $(TOP)\ext\misc\remember.c \
1561 $(TOP)\ext\misc\series.c \
1562 $(TOP)\ext\misc\spellfix.c \
1563 $(TOP)\ext\misc\totype.c \
1564 $(TOP)\ext\misc\unionvtab.c \
1565 $(TOP)\ext\misc\wholenumber.c
1567 # If use of zlib is enabled, add the "zipfile.c" source file.
1570 TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
1573 # Source code to the library files needed by the test fixture
1574 # (non-amalgamation)
1582 $(TOP)\ext\async\sqlite3async.c
1584 # Header files used by all library source files.
1587 $(TOP)\src\btree.h \
1588 $(TOP)\src\btreeInt.h \
1590 $(TOP)\src\hwtime.h \
1593 $(TOP)\src\mutex.h \
1596 $(TOP)\src\os_common.h \
1597 $(TOP)\src\os_setup.h \
1598 $(TOP)\src\os_win.h \
1599 $(TOP)\src\pager.h \
1600 $(TOP)\src\pcache.h \
1602 $(TOP)\src\pragma.h \
1605 $(TOP)\src\sqliteInt.h \
1606 $(TOP)\src\sqliteLimit.h \
1608 $(TOP)\src\vdbeInt.h \
1609 $(TOP)\src\vxworks.h \
1610 $(TOP)\src\whereInt.h
1612 # Header files used by extensions
1614 EXTHDR = $(EXTHDR) \
1615 $(TOP)\ext\fts1\fts1.h \
1616 $(TOP)\ext\fts1\fts1_hash.h \
1617 $(TOP)\ext\fts1\fts1_tokenizer.h
1618 EXTHDR = $(EXTHDR) \
1619 $(TOP)\ext\fts2\fts2.h \
1620 $(TOP)\ext\fts2\fts2_hash.h \
1621 $(TOP)\ext\fts2\fts2_tokenizer.h
1622 EXTHDR = $(EXTHDR) \
1623 $(TOP)\ext\fts3\fts3.h \
1624 $(TOP)\ext\fts3\fts3Int.h \
1625 $(TOP)\ext\fts3\fts3_hash.h \
1626 $(TOP)\ext\fts3\fts3_tokenizer.h
1627 EXTHDR = $(EXTHDR) \
1628 $(TOP)\ext\rtree\rtree.h \
1629 $(TOP)\ext\rtree\geopoly.c
1630 EXTHDR = $(EXTHDR) \
1631 $(TOP)\ext\icu\sqliteicu.h
1632 EXTHDR = $(EXTHDR) \
1633 $(TOP)\ext\rtree\sqlite3rtree.h
1634 EXTHDR = $(EXTHDR) \
1635 $(TOP)\ext\session\sqlite3session.h
1637 # executables needed for testing
1642 sqlite3_analyzer.exe \
1643 sqlite3_checker.exe \
1648 # Databases containing fuzzer test cases
1651 $(TOP)\test\fuzzdata1.db \
1652 $(TOP)\test\fuzzdata2.db \
1653 $(TOP)\test\fuzzdata3.db \
1654 $(TOP)\test\fuzzdata4.db \
1655 $(TOP)\test\fuzzdata5.db \
1656 $(TOP)\test\fuzzdata6.db \
1657 $(TOP)\test\fuzzdata7.db \
1658 $(TOP)\test\fuzzdata8.db
1661 # Additional compiler options for the shell. These are only effective
1662 # when the shell is not being dynamically linked.
1664 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1665 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
1666 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
1667 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
1668 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DESERIALIZE=1
1672 # Extra compiler options for various test tools.
1674 MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
1675 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1676 FUZZCHECK_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ -DSQLITE_MAX_MEMORY=50000000 -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1677 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DESERIALIZE
1678 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
1679 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
1680 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
1681 FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
1683 FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1684 OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
1685 DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
1686 KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
1687 ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
1689 # Standard options to testfixture.
1691 TESTOPTS = --verbose=file --output=test-out.txt
1693 # Extra targets for the "all" target that require Tcl.
1696 ALL_TCL_TARGETS = $(SQLITE3TCLDLL)
1702 # This is the default Makefile target. The objects listed here
1703 # are what get build when you type just "make" with no arguments.
1705 core: dll libsqlite3.lib shell
1707 # Targets that require the Tcl library.
1709 tcl: $(ALL_TCL_TARGETS)
1711 # This Makefile target builds all of the standard binaries.
1715 # Dynamic link library section.
1721 shell: $(SQLITE3EXE)
1724 libsqlite3.lib: $(LIBOBJ)
1725 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1727 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1728 $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1730 tclsqlite3.def: tclsqlite.lo
1731 echo EXPORTS > tclsqlite3.def
1732 dumpbin /all tclsqlite.lo \
1733 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+/EXPORT:_?((?:Sqlite3|Tclsqlite3)_[^@]*)(?:@\d+)?$$" \1 \
1734 | sort >> tclsqlite3.def
1736 pkgIndex.tcl: $(TOP)\VERSION
1737 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1738 echo package ifneeded sqlite3 @version@ [list load [file join $$dir $(SQLITE3TCLDLL)] sqlite3] \
1739 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact @version@ %%V > pkgIndex.tcl \
1742 $(SQLITE3TCLDLL): libtclsqlite3.lib $(LIBRESOBJS) tclsqlite3.def pkgIndex.tcl
1743 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:tclsqlite3.def /OUT:$@ libtclsqlite3.lib $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1746 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1747 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1750 sqlite3.def: libsqlite3.lib
1751 echo EXPORTS > sqlite3.def
1752 dumpbin /all libsqlite3.lib \
1753 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@]*)(?:@\d+)?$$" \1 \
1754 | sort >> sqlite3.def
1757 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1758 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
1759 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1762 sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1763 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1765 dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1766 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1768 scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1769 $(LTLINK) $(NO_WARN) -DSCRUB_STANDALONE=1 $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1771 srcck1.exe: $(TOP)\tool\srcck1.c
1772 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1774 sourcetest: srcck1.exe $(SQLITE3C)
1775 srcck1.exe $(SQLITE3C)
1777 fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1778 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1780 dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
1781 $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1783 fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1784 $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1786 ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1787 $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1789 sessionfuzz.exe: zlib $(TOP)\test\sessionfuzz.c $(SQLITE3C) $(SQLITE3H)
1790 $(LTLINK) $(NO_WARN) -I$(ZLIBINCDIR) $(TOP)\test\sessionfuzz.c /link $(LDFLAGS) $(LTLINKOPTS) /LIBPATH:$(ZLIBLIBDIR) $(ZLIBLIB)
1792 mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1793 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1795 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1796 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1798 mptest: mptester.exe
1799 del /Q mptest.db 2>NUL
1800 $(MPTEST1) --journalmode DELETE
1801 $(MPTEST2) --journalmode WAL
1802 $(MPTEST1) --journalmode WAL
1803 $(MPTEST2) --journalmode PERSIST
1804 $(MPTEST1) --journalmode PERSIST
1805 $(MPTEST2) --journalmode TRUNCATE
1806 $(MPTEST1) --journalmode TRUNCATE
1807 $(MPTEST2) --journalmode DELETE
1809 # This target creates a directory named "tsrc" and fills it with
1810 # copies of all of the C source code and header files needed to
1811 # build on the target system. Some of the C source code and header
1812 # files are automatically generated. This target takes care of
1813 # all that automatic generation.
1815 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
1816 -rmdir /Q/S tsrc 2>NUL
1818 for %i in ($(SRC00)) do copy /Y %i tsrc
1819 for %i in ($(SRC01)) do copy /Y %i tsrc
1820 for %i in ($(SRC03)) do copy /Y %i tsrc
1821 for %i in ($(SRC04)) do copy /Y %i tsrc
1822 for %i in ($(SRC05)) do copy /Y %i tsrc
1823 for %i in ($(SRC06)) do copy /Y %i tsrc
1824 for %i in ($(SRC07)) do copy /Y %i tsrc
1825 for %i in ($(SRC08)) do copy /Y %i tsrc
1826 for %i in ($(SRC09)) do copy /Y %i tsrc
1827 for %i in ($(SRC10)) do copy /Y %i tsrc
1828 for %i in ($(SRC11)) do copy /Y %i tsrc
1829 for %i in ($(SRC12)) do copy /Y %i tsrc
1832 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1833 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1834 move vdbe.new tsrc\vdbe.c
1835 echo > .target_source
1837 sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
1838 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
1839 copy $(TOP)\ext\session\sqlite3session.h .
1841 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1842 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1845 # Rule to build the amalgamation
1847 sqlite3.lo: $(SQLITE3C)
1848 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1851 # Rules to build the LEMON compiler generator
1853 lempar.c: $(TOP)\tool\lempar.c
1854 copy $(TOP)\tool\lempar.c .
1856 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1857 $(BCC) $(NO_WARN) -Daccess=_access \
1858 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1861 # Rules to build the source-id generator tool
1863 mksourceid.exe: $(TOP)\tool\mksourceid.c
1864 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1866 # Rules to build individual *.lo files from generated *.c files. This
1872 parse.lo: parse.c $(HDR)
1873 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1875 opcodes.lo: opcodes.c
1876 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1879 # Rule to build the Win32 resources object file.
1883 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H) $(TOP)\VERSION
1884 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1885 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1886 echo #define SQLITE_RESOURCE_VERSION %%V \
1887 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1889 echo #endif >> sqlite3rc.h
1890 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1895 # Rules to build individual *.lo files from files in the src directory.
1897 alter.lo: $(TOP)\src\alter.c $(HDR)
1898 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1900 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1901 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1903 attach.lo: $(TOP)\src\attach.c $(HDR)
1904 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1906 auth.lo: $(TOP)\src\auth.c $(HDR)
1907 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1909 backup.lo: $(TOP)\src\backup.c $(HDR)
1910 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1912 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1913 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1915 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1916 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1918 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1919 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1921 build.lo: $(TOP)\src\build.c $(HDR)
1922 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1924 callback.lo: $(TOP)\src\callback.c $(HDR)
1925 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1927 complete.lo: $(TOP)\src\complete.c $(HDR)
1928 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1930 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1931 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1933 date.lo: $(TOP)\src\date.c $(HDR)
1934 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1936 dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
1937 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
1939 dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
1940 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1942 delete.lo: $(TOP)\src\delete.c $(HDR)
1943 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1945 expr.lo: $(TOP)\src\expr.c $(HDR)
1946 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1948 fault.lo: $(TOP)\src\fault.c $(HDR)
1949 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1951 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1952 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1954 func.lo: $(TOP)\src\func.c $(HDR)
1955 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1957 global.lo: $(TOP)\src\global.c $(HDR)
1958 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1960 hash.lo: $(TOP)\src\hash.c $(HDR)
1961 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1963 insert.lo: $(TOP)\src\insert.c $(HDR)
1964 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1966 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1967 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1969 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1970 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1972 main.lo: $(TOP)\src\main.c $(HDR)
1973 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1975 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1976 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
1978 mem0.lo: $(TOP)\src\mem0.c $(HDR)
1979 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
1981 mem1.lo: $(TOP)\src\mem1.c $(HDR)
1982 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
1984 mem2.lo: $(TOP)\src\mem2.c $(HDR)
1985 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
1987 mem3.lo: $(TOP)\src\mem3.c $(HDR)
1988 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
1990 mem5.lo: $(TOP)\src\mem5.c $(HDR)
1991 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
1993 memdb.lo: $(TOP)\src\memdb.c $(HDR)
1994 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memdb.c
1996 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
1997 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
1999 mutex.lo: $(TOP)\src\mutex.c $(HDR)
2000 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
2002 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
2003 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
2005 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
2006 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
2008 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
2009 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
2011 notify.lo: $(TOP)\src\notify.c $(HDR)
2012 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
2014 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
2015 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
2017 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
2018 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
2020 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
2021 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
2023 os.lo: $(TOP)\src\os.c $(HDR)
2024 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
2026 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
2027 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
2029 os_win.lo: $(TOP)\src\os_win.c $(HDR)
2030 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
2032 pragma.lo: $(TOP)\src\pragma.c $(HDR)
2033 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
2035 prepare.lo: $(TOP)\src\prepare.c $(HDR)
2036 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
2038 printf.lo: $(TOP)\src\printf.c $(HDR)
2039 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
2041 random.lo: $(TOP)\src\random.c $(HDR)
2042 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
2044 resolve.lo: $(TOP)\src\resolve.c $(HDR)
2045 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
2047 rowset.lo: $(TOP)\src\rowset.c $(HDR)
2048 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
2050 select.lo: $(TOP)\src\select.c $(HDR)
2051 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
2053 status.lo: $(TOP)\src\status.c $(HDR)
2054 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
2056 table.lo: $(TOP)\src\table.c $(HDR)
2057 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
2059 threads.lo: $(TOP)\src\threads.c $(HDR)
2060 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
2062 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
2063 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
2065 treeview.lo: $(TOP)\src\treeview.c $(HDR)
2066 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
2068 trigger.lo: $(TOP)\src\trigger.c $(HDR)
2069 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
2071 update.lo: $(TOP)\src\update.c $(HDR)
2072 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
2074 upsert.lo: $(TOP)\src\upsert.c $(HDR)
2075 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\upsert.c
2077 utf.lo: $(TOP)\src\utf.c $(HDR)
2078 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
2080 util.lo: $(TOP)\src\util.c $(HDR)
2081 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
2083 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
2084 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
2086 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
2087 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
2089 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
2090 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
2092 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
2093 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
2095 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
2096 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
2098 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
2099 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
2101 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
2102 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
2104 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
2105 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
2107 vtab.lo: $(TOP)\src\vtab.c $(HDR)
2108 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
2110 wal.lo: $(TOP)\src\wal.c $(HDR)
2111 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
2113 walker.lo: $(TOP)\src\walker.c $(HDR)
2114 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
2116 where.lo: $(TOP)\src\where.c $(HDR)
2117 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
2119 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
2120 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
2122 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
2123 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
2125 window.lo: $(TOP)\src\window.c $(HDR)
2126 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\window.c
2128 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2129 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2131 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2132 $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2134 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2135 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2137 # Rules to build opcodes.c and opcodes.h
2139 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
2140 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
2142 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
2143 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
2145 # Rules to build parse.c and parse.h - the outputs of lemon.
2149 parse.c: $(TOP)\src\parse.y lemon.exe
2150 del /Q parse.y parse.h parse.h.temp 2>NUL
2151 copy $(TOP)\src\parse.y .
2152 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
2154 $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
2155 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
2157 sqlite3ext.h: .target_source
2158 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2159 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
2160 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
2161 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
2163 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
2166 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
2167 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
2168 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
2170 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
2171 .\mkkeywordhash.exe > keywordhash.h
2173 # Source files that go into making shell.c
2175 $(TOP)\src\shell.c.in \
2176 $(TOP)\ext\misc\appendvfs.c \
2177 $(TOP)\ext\misc\shathree.c \
2178 $(TOP)\ext\misc\fileio.c \
2179 $(TOP)\ext\misc\completion.c \
2180 $(TOP)\ext\expert\sqlite3expert.c \
2181 $(TOP)\ext\expert\sqlite3expert.h \
2182 $(TOP)\ext\misc\memtrace.c \
2183 $(TOP)\src\test_windirent.c
2185 # If use of zlib is enabled, add the "zipfile.c" source file.
2188 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\sqlar.c
2189 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\zipfile.c
2192 shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
2193 $(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
2196 pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
2198 # Rules to build the extension objects.
2200 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
2201 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
2203 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
2204 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
2206 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
2207 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
2209 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
2210 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
2212 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
2213 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
2215 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
2216 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
2218 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
2219 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
2221 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
2222 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
2224 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
2225 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
2227 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
2228 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
2230 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
2231 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
2233 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
2234 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
2236 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
2237 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
2239 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
2240 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
2242 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
2243 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
2245 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
2246 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
2248 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
2249 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
2251 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
2252 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
2254 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
2255 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
2257 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
2258 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
2260 json1.lo: $(TOP)\ext\misc\json1.c $(HDR) $(EXTHDR)
2261 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\json1.c
2263 stmt.lo: $(TOP)\ext\misc\stmt.c $(HDR) $(EXTHDR)
2264 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\stmt.c
2266 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
2267 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
2269 sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
2270 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
2275 $(TOP)\ext\fts5\fts5.h \
2276 $(TOP)\ext\fts5\fts5Int.h \
2277 $(TOP)\ext\fts5\fts5_aux.c \
2278 $(TOP)\ext\fts5\fts5_buffer.c \
2279 $(TOP)\ext\fts5\fts5_main.c \
2280 $(TOP)\ext\fts5\fts5_config.c \
2281 $(TOP)\ext\fts5\fts5_expr.c \
2282 $(TOP)\ext\fts5\fts5_hash.c \
2283 $(TOP)\ext\fts5\fts5_index.c \
2284 fts5parse.c fts5parse.h \
2285 $(TOP)\ext\fts5\fts5_storage.c \
2286 $(TOP)\ext\fts5\fts5_tokenize.c \
2287 $(TOP)\ext\fts5\fts5_unicode2.c \
2288 $(TOP)\ext\fts5\fts5_varint.c \
2289 $(TOP)\ext\fts5\fts5_vocab.c
2292 $(TOP)\ext\lsm1\lsm.h \
2293 $(TOP)\ext\lsm1\lsmInt.h \
2294 $(TOP)\ext\lsm1\lsm_ckpt.c \
2295 $(TOP)\ext\lsm1\lsm_file.c \
2296 $(TOP)\ext\lsm1\lsm_log.c \
2297 $(TOP)\ext\lsm1\lsm_main.c \
2298 $(TOP)\ext\lsm1\lsm_mem.c \
2299 $(TOP)\ext\lsm1\lsm_mutex.c \
2300 $(TOP)\ext\lsm1\lsm_shared.c \
2301 $(TOP)\ext\lsm1\lsm_sorted.c \
2302 $(TOP)\ext\lsm1\lsm_str.c \
2303 $(TOP)\ext\lsm1\lsm_tree.c \
2304 $(TOP)\ext\lsm1\lsm_unix.c \
2305 $(TOP)\ext\lsm1\lsm_varint.c \
2306 $(TOP)\ext\lsm1\lsm_vtab.c \
2307 $(TOP)\ext\lsm1\lsm_win32.c
2309 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2310 copy $(TOP)\ext\fts5\fts5parse.y .
2311 del /Q fts5parse.h 2>NUL
2312 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
2314 fts5parse.h: fts5parse.c
2317 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2318 copy $(TOP)\ext\fts5\fts5.h .
2321 $(TCLSH_CMD) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
2322 copy $(TOP)\ext\lsm1\lsm.h .
2324 fts5.lo: fts5.c $(HDR) $(EXTHDR)
2325 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2327 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
2328 $(LTCOMPILE) $(NO_WARN) -c fts5.c
2330 fts5.dll: fts5_ext.lo
2331 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
2333 sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2334 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
2336 # Rules to build the 'testfixture' application.
2338 # If using the amalgamation, use sqlite3.c directly to build the test
2339 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
2340 # necessary because the test fixture requires non-API symbols which are
2341 # hidden when the library is built via the amalgamation).
2343 TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
2344 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2345 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
2346 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
2347 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
2348 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
2349 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
2350 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
2351 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
2352 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
2354 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
2355 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
2356 !IF $(USE_AMALGAMATION)==0
2357 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2359 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2362 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2364 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2365 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2366 echo #endif >> $(SQLITETCLDECLSH)
2367 type "$(TCLINCDIR)\tclDecls.h" \
2368 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
2369 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2370 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
2371 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
2372 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
2375 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2376 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2377 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2378 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
2379 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2382 testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
2383 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
2384 -DBUILD_sqlite -I$(TCLINCDIR) \
2385 $(TESTFIXTURE_SRC) \
2386 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2388 extensiontest: testfixture.exe testloadext.dll
2389 @set PATH=$(LIBTCLPATH);$(PATH)
2390 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
2392 coretestprogs: $(TESTPROGS)
2394 testprogs: coretestprogs srcck1.exe fuzzcheck.exe sessionfuzz.exe
2396 fulltest: $(TESTPROGS) fuzztest
2397 @set PATH=$(LIBTCLPATH);$(PATH)
2398 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
2400 soaktest: $(TESTPROGS)
2401 @set PATH=$(LIBTCLPATH);$(PATH)
2402 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
2404 fulltestonly: $(TESTPROGS) fuzztest
2405 @set PATH=$(LIBTCLPATH);$(PATH)
2406 .\testfixture.exe $(TOP)\test\full.test
2408 queryplantest: testfixture.exe shell
2409 @set PATH=$(LIBTCLPATH);$(PATH)
2410 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
2412 fuzztest: fuzzcheck.exe
2413 .\fuzzcheck.exe $(FUZZDATA)
2415 fastfuzztest: fuzzcheck.exe
2416 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
2418 # Minimal testing that runs in less than 3 minutes (on a fast machine)
2420 quicktest: testfixture.exe sourcetest
2421 @set PATH=$(LIBTCLPATH);$(PATH)
2422 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2424 # This is the common case. Run many tests that do not take too long,
2425 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2427 test: $(TESTPROGS) sourcetest fastfuzztest
2428 @set PATH=$(LIBTCLPATH);$(PATH)
2429 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
2431 smoketest: $(TESTPROGS)
2432 @set PATH=$(LIBTCLPATH);$(PATH)
2433 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
2435 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)
2436 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
2438 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
2439 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
2440 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2442 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
2443 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
2445 sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
2446 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
2447 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2449 sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
2450 $(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
2453 $(TOP)/tool/mkccode.tcl \
2455 $(TOP)/src/tclsqlite.c \
2456 $(TOP)/ext/repair/sqlite3_checker.tcl \
2457 $(TOP)/ext/repair/checkindex.c \
2458 $(TOP)/ext/repair/checkfreelist.c \
2459 $(TOP)/ext/misc/btreeinfo.c \
2460 $(TOP)/ext/repair/sqlite3_checker.c.in
2462 sqlite3_checker.c: $(CHECKER_DEPS)
2463 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\ext\repair\sqlite3_checker.c.in > $@
2465 sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
2466 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
2467 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2469 dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2470 $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
2471 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
2473 testloadext.lo: $(TOP)\src\test_loadext.c $(SQLITE3H)
2474 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
2476 testloadext.dll: testloadext.lo
2477 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2479 dbtotxt.exe: $(TOP)\tool\dbtotxt.c
2480 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbtotxt.c /link $(LDFLAGS) $(LTLINKOPTS)
2482 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
2483 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2484 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2486 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
2487 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2488 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2490 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
2491 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2492 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2494 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
2495 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2496 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2498 showshm.exe: $(TOP)\tool\showshm.c
2499 $(LTLINK) $(NO_WARN) $(TOP)\tool\showshm.c /link $(LDFLAGS) $(LTLINKOPTS)
2501 index_usage.exe: $(TOP)\tool\index_usage.c $(SQLITE3C) $(SQLITE3H)
2502 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2503 $(TOP)\tool\index_usage.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2505 changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
2506 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2507 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2508 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2510 changesetfuzz.exe: $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) $(SQLITE3H)
2511 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2512 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2513 $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2515 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
2516 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2517 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2519 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
2520 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2521 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2523 atrc.exe: $(TOP)\test\atrc.c $(SQLITE3C) $(SQLITE3H)
2524 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2525 $(TOP)\test\atrc.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2527 LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
2528 $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
2530 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
2531 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2532 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2534 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
2535 $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
2536 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2538 kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
2539 $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
2540 $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2542 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
2543 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
2544 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2546 LSMDIR=$(TOP)\ext\lsm1
2547 !INCLUDE $(LSMDIR)\Makefile.msc
2550 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
2554 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
2555 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
2556 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
2558 del /Q $(SQLITE3TCLDLL) pkgIndex.tcl 2>NUL
2559 del /Q opcodes.c opcodes.h 2>NUL
2560 del /Q lemon.* lempar.c parse.* 2>NUL
2561 del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
2562 del /Q notasharedlib.* 2>NUL
2563 -rmdir /Q/S .deps 2>NUL
2564 -rmdir /Q/S .libs 2>NUL
2565 -rmdir /Q/S tsrc 2>NUL
2566 del /Q .target_source 2>NUL
2567 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
2568 del /Q lsm.dll lsmtest.exe 2>NUL
2569 del /Q atrc.exe changesetfuzz.exe dbtotxt.exe index_usage.exe 2>NUL
2570 del /Q testloadext.dll 2>NUL
2571 del /Q testfixture.exe test.db 2>NUL
2572 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
2573 del /Q changeset.exe 2>NUL
2574 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2575 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
2576 del /Q sqlite3.c sqlite3-*.c sqlite3.h 2>NUL
2577 del /Q sqlite3rc.h 2>NUL
2578 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
2579 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2580 del /Q sqlite-*-output.vsix 2>NUL
2581 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
2582 del /Q sqltclsh.* 2>NUL
2583 del /Q dbfuzz.exe sessionfuzz.exe 2>NUL
2584 del /Q kvtest.exe ossshell.exe scrub.exe 2>NUL
2585 del /Q showshm.exe sqlite3_checker.* sqlite3_expert.exe 2>NUL
2586 del /Q fts5.* fts5parse.* 2>NUL
2587 del /Q lsm.h lsm1.c 2>NUL