2 # nmake Makefile for SQLite
4 ###############################################################################
5 ############################## START OF OPTIONS ###############################
6 ###############################################################################
8 # The toplevel directory of the source tree. This is the directory
9 # that contains this "Makefile.msc".
14 # Set this non-0 to create and use the SQLite amalgamation file.
16 !IFNDEF USE_AMALGAMATION
21 # Set this non-0 to enable full warnings (-W4, etc) when compiling.
27 # Set this non-0 to enable treating warnings as errors (-WX, etc) when
30 !IFNDEF USE_FATAL_WARN
34 # Set this non-0 to enable full runtime error checks (-RTC1, etc). This
35 # has no effect if (any) optimizations are enabled.
37 !IFNDEF USE_RUNTIME_CHECKS
38 USE_RUNTIME_CHECKS = 0
41 # Set this non-0 to create a SQLite amalgamation file that excludes the
42 # various built-in extensions.
44 !IFNDEF MINIMAL_AMALGAMATION
45 MINIMAL_AMALGAMATION = 0
48 # Set this non-0 to use "stdcall" calling convention for the core library
49 # and shell executable.
55 # Set this non-0 to have the shell executable link against the core dynamic
62 # Set this non-0 to enable extra code that attempts to detect misuse of the
69 # If necessary, create a list of harmless compiler warnings to disable when
70 # compiling the various tools. For the SQLite source code itself, warnings,
71 # if any, will be disabled from within it.
74 !IF $(USE_FULLWARN)!=0
75 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
76 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
80 # Set this non-0 to use the library paths and other options necessary for
87 # Set this non-0 to split the SQLite amalgamation file into chunks to
88 # be used for debugging with Visual Studio.
90 !IFNDEF SPLIT_AMALGAMATION
91 SPLIT_AMALGAMATION = 0
95 # Set this non-0 to have this makefile assume the Tcl shell executable
96 # (tclsh*.exe) is available in the PATH. By default, this is disabled
97 # for compatibility with older build environments. This setting only
98 # applies if TCLSH_CMD is not set manually.
100 !IFNDEF USE_TCLSH_IN_PATH
101 USE_TCLSH_IN_PATH = 0
104 # Set this non-0 to use zlib, possibly compiling it from source code.
110 # Set this non-0 to build zlib from source code. This is enabled by
111 # default and in that case it will be assumed that the ZLIBDIR macro
112 # points to the top-level source code directory for zlib.
118 # Set this non-0 to use the International Components for Unicode (ICU).
125 # Set this non-0 to dynamically link to the MSVC runtime library.
131 # Set this non-0 to link to the RPCRT4 library.
133 !IFNDEF USE_RPCRT4_LIB
137 # Set this non-0 to generate assembly code listings for the source code
144 # Set this non-0 to attempt setting the native compiler automatically
145 # for cross-compiling the command line tools needed during the compilation
152 # Set this non-0 to use the native libraries paths for cross-compiling
153 # the command line tools needed during the compilation process.
155 !IFNDEF USE_NATIVE_LIBPATHS
156 USE_NATIVE_LIBPATHS = 0
159 # Set this 0 to skip the compiling and embedding of version resources.
165 # Set this non-0 to compile binaries suitable for the WinRT environment.
166 # This setting does not apply to any binaries that require Tcl to operate
167 # properly (i.e. the text fixture, etc).
173 # Set this non-0 to compile binaries suitable for the UWP environment.
174 # This setting does not apply to any binaries that require Tcl to operate
175 # properly (i.e. the text fixture, etc).
181 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
188 # Set this non-0 to skip attempting to look for and/or link with the Tcl
196 # Set this to non-0 to create and use PDBs.
202 # Set this to non-0 to use the SQLite debugging heap subsystem.
208 # Set this to non-0 to use the Win32 native heap subsystem.
214 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
221 # Set this to one of the following values to enable various debugging
222 # features. Each level includes the debugging options from the previous
223 # levels. Currently, the recognized values for DEBUG are:
225 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
226 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
227 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
228 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
229 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
230 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
231 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
237 # Enable use of available compiler optimizations? Normally, this should be
238 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
239 # can be useful for testing.
241 !IFNDEF OPTIMIZATIONS
245 # Set this to non-0 to enable support for the session extension.
251 # Set the source code file to be used by executables and libraries when
252 # they need the amalgamation.
255 !IF $(SPLIT_AMALGAMATION)!=0
256 SQLITE3C = sqlite3-all.c
262 # Set the include code file to be used by executables and libraries when
269 # This is the name to use for the SQLite dynamic link library (DLL).
273 SQLITE3DLL = winsqlite3.dll
275 SQLITE3DLL = sqlite3.dll
279 # This is the name to use for the SQLite import library (LIB).
283 SQLITE3LIB = winsqlite3.lib
285 SQLITE3LIB = sqlite3.lib
289 # This is the name to use for the SQLite shell executable (EXE).
293 SQLITE3EXE = winsqlite3shell.exe
295 SQLITE3EXE = sqlite3.exe
299 # This is the argument used to set the program database (PDB) file for the
300 # SQLite shell executable (EXE).
302 !IFNDEF SQLITE3EXEPDB
306 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
311 # These are the names of the customized Tcl header files used by various parts
312 # of this makefile when the stdcall calling convention is in use. It is not
313 # used for any other purpose.
316 SQLITETCLH = sqlite_tcl.h
319 !IFNDEF SQLITETCLDECLSH
320 SQLITETCLDECLSH = sqlite_tclDecls.h
323 # These are the additional targets that the targets that integrate with the
324 # Tcl library should depend on when compiling, etc.
326 !IFNDEF SQLITE_TCL_DEP
327 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
328 SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
335 # These are the "standard" SQLite compilation options used when compiling for
336 # the Windows platform.
338 !IFNDEF OPT_FEATURE_FLAGS
339 !IF $(MINIMAL_AMALGAMATION)==0
340 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
341 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
342 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_GEOPOLY=1
343 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
344 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
345 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
346 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
347 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1
348 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
350 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
353 # Should the session extension be enabled? If so, add compilation options
357 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
358 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
361 # These are the "extended" SQLite compilation options used when compiling for
362 # the Windows 10 platform.
364 !IFNDEF EXT_FEATURE_FLAGS
366 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
367 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
368 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
374 ###############################################################################
375 ############################### END OF OPTIONS ################################
376 ###############################################################################
378 # When compiling for the Windows 10 platform, the PLATFORM macro must be set
379 # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
383 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
387 # This assumes that MSVC is always installed in 32-bit Program Files directory
388 # and sets the variable for use in locating other 32-bit installs accordingly.
390 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
391 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
393 # Check for the predefined command macro CC. This should point to the compiler
394 # binary for the target platform. If it is not defined, simply define it to
395 # the legacy default value 'cl.exe'.
401 # Check for the predefined command macro CSC. This should point to a working
402 # C Sharp compiler binary. If it is not defined, simply define it to the
403 # legacy default value 'csc.exe'.
409 # Check for the command macro LD. This should point to the linker binary for
410 # the target platform. If it is not defined, simply define it to the legacy
411 # default value 'link.exe'.
417 # Check for the predefined command macro RC. This should point to the resource
418 # compiler binary for the target platform. If it is not defined, simply define
419 # it to the legacy default value 'rc.exe'.
425 # Check for the MSVC runtime library path macro. Otherwise, this value will
426 # default to the 'lib' directory underneath the MSVC installation directory.
429 CRTLIBPATH = $(VCINSTALLDIR)\lib
432 CRTLIBPATH = $(CRTLIBPATH:\\=\)
434 # Check for the command macro NCC. This should point to the compiler binary
435 # for the platform the compilation process is taking place on. If it is not
436 # defined, simply define it to have the same value as the CC macro. When
437 # cross-compiling, it is suggested that this macro be modified via the command
438 # line (since nmake itself does not provide a built-in method to guess it).
439 # For example, to use the x86 compiler when cross-compiling for x64, a command
440 # line similar to the following could be used (all on one line):
442 # nmake /f Makefile.msc sqlite3.dll
443 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
445 # Alternatively, the full path and file name to the compiler binary for the
446 # platform the compilation process is taking place may be specified (all on
449 # nmake /f Makefile.msc sqlite3.dll
450 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
451 # USE_NATIVE_LIBPATHS=1
455 !ELSEIF $(XCOMPILE)!=0
456 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
462 # Check for the MSVC native runtime library path macro. Otherwise,
463 # this value will default to the 'lib' directory underneath the MSVC
464 # installation directory.
467 NCRTLIBPATH = $(VCINSTALLDIR)\lib
470 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
472 # Check for the Platform SDK library path macro. Otherwise, this
473 # value will default to the 'lib' directory underneath the Windows
474 # SDK installation directory (the environment variable used appears
475 # to be available when using Visual C++ 2008 or later via the
479 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
482 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
484 # Check for the UCRT library path macro. Otherwise, this value will
485 # default to the version-specific, platform-specific 'lib' directory
486 # underneath the Windows SDK installation directory.
489 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
492 UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
494 # C compiler and options for use in building executables that
495 # will run on the platform that is doing the build.
497 !IF $(USE_FULLWARN)!=0
498 BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
500 BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
503 # Check if assembly code listings should be generated for the source
504 # code files to be compiled.
506 !IF $(USE_LISTINGS)!=0
510 # Check if the native library paths should be used when compiling
511 # the command line tools used during the compilation process. If
512 # so, set the necessary macro now.
514 !IF $(USE_NATIVE_LIBPATHS)!=0
515 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
518 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
519 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
523 # C compiler and options for use in building executables that
524 # will run on the target platform. (BCC and TCC are usually the
525 # same unless your are cross-compiling.)
527 !IF $(USE_FULLWARN)!=0
528 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
530 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
533 # Check if warnings should be treated as errors when compiling.
535 !IF $(USE_FATAL_WARN)!=0
539 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
540 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
542 # Check if we want to use the "stdcall" calling convention when compiling.
543 # This is not supported by the compilers for non-x86 platforms. It should
544 # also be noted here that building any target with these "stdcall" options
545 # will most likely fail if the Tcl library is also required. This is due
546 # to how the Tcl library functions are declared and exported (i.e. without
547 # an explicit calling convention, which results in "cdecl").
549 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
550 !IF "$(PLATFORM)"=="x86"
551 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
552 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
554 TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
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
579 # These are additional compiler options used for the core library.
581 !IFNDEF CORE_COMPILE_OPTS
582 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
583 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
585 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
589 # These are the additional targets that the core library should depend on
592 !IFNDEF CORE_LINK_DEP
593 !IF $(DYNAMIC_SHELL)!=0
595 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
596 CORE_LINK_DEP = sqlite3.def
602 # These are additional linker options used for the core library.
604 !IFNDEF CORE_LINK_OPTS
605 !IF $(DYNAMIC_SHELL)!=0
607 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
608 CORE_LINK_OPTS = /DEF:sqlite3.def
614 # These are additional compiler options used for the shell executable.
616 !IFNDEF SHELL_COMPILE_OPTS
617 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
618 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
620 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
624 # This is the source code that the shell executable should be compiled
627 !IFNDEF SHELL_CORE_SRC
628 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
631 !ELSEIF $(USE_AMALGAMATION)==0
635 SHELL_CORE_SRC = $(SQLITE3C)
639 # This is the core library that the shell executable should depend on.
641 !IFNDEF SHELL_CORE_DEP
642 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
643 SHELL_CORE_DEP = $(SQLITE3DLL)
645 !ELSEIF $(USE_AMALGAMATION)==0
646 SHELL_CORE_DEP = libsqlite3.lib
654 # If zlib support is enabled, add the dependencies for it.
656 !IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
657 SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
658 TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
662 # This is the core library that the shell executable should link with.
664 !IFNDEF SHELL_CORE_LIB
665 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
666 SHELL_CORE_LIB = $(SQLITE3LIB)
668 !ELSEIF $(USE_AMALGAMATION)==0
669 SHELL_CORE_LIB = libsqlite3.lib
676 # These are additional linker options used for the shell executable.
678 !IFNDEF SHELL_LINK_OPTS
679 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
682 # Check if assembly code listings should be generated for the source
683 # code files to be compiled.
685 !IF $(USE_LISTINGS)!=0
689 # When compiling the library for use in the WinRT environment,
690 # the following compile-time options must be used as well to
691 # disable use of Win32 APIs that are not available and to enable
692 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
695 TCC = $(TCC) -DSQLITE_OS_WINRT=1
696 RCC = $(RCC) -DSQLITE_OS_WINRT=1
697 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
698 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
701 # C compiler options for the Windows 10 platform (needs MSVC 2015).
704 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
705 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
708 # Also, we need to dynamically link to the correct MSVC runtime
709 # when compiling for WinRT (e.g. debug or release) OR if the
710 # USE_CRT_DLL option is set to force dynamically linking to the
711 # MSVC runtime library.
713 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
732 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
733 # any extension header files by default. For non-amalgamation
734 # builds, we need to make sure the compiler can find these.
736 !IF $(USE_AMALGAMATION)==0
737 TCC = $(TCC) -I$(TOP)\ext\fts3
738 RCC = $(RCC) -I$(TOP)\ext\fts3
739 TCC = $(TCC) -I$(TOP)\ext\rtree
740 RCC = $(RCC) -I$(TOP)\ext\rtree
741 TCC = $(TCC) -I$(TOP)\ext\session
742 RCC = $(RCC) -I$(TOP)\ext\session
745 # The mksqlite3c.tcl script accepts some options on the command
746 # line. When compiling with debugging enabled, some of these
747 # options are necessary in order to allow debugging symbols to
748 # work correctly with Visual Studio when using the amalgamation.
750 !IFNDEF MKSQLITE3C_TOOL
751 !IF $(MINIMAL_AMALGAMATION)!=0
752 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
754 MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
758 !IFNDEF MKSQLITE3C_ARGS
760 MKSQLITE3C_ARGS = --linemacros
764 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
765 MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
769 # The mksqlite3h.tcl script accepts some options on the command line.
770 # When compiling with stdcall support, some of these options are
773 !IFNDEF MKSQLITE3H_ARGS
774 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
775 MKSQLITE3H_ARGS = --useapicall
782 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
783 # Omitting the define will cause extra debugging code to be inserted and
784 # includes extra comments when "EXPLAIN stmt" is used.
787 TCC = $(TCC) -DNDEBUG
788 BCC = $(BCC) -DNDEBUG
789 RCC = $(RCC) -DNDEBUG
792 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
793 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
794 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
798 TCC = $(TCC) -DSQLITE_DEBUG=1
799 RCC = $(RCC) -DSQLITE_DEBUG=1
800 !IF $(DYNAMIC_SHELL)==0
801 TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
802 RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
806 !IF $(DEBUG)>4 || $(OSTRACE)!=0
807 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
808 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
812 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
813 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
816 # Prevent warnings about "insecure" MSVC runtime library functions
819 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
820 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
821 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
823 # Prevent warnings about "deprecated" POSIX functions being used.
825 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
826 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
827 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
829 # Use the SQLite debugging heap subsystem?
832 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
833 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
835 # Use native Win32 heap subsystem instead of malloc/free?
837 !ELSEIF $(WIN32HEAP)!=0
838 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
839 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
841 # Validate the heap on every call into the native Win32 heap subsystem?
844 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
845 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
850 # The locations of the Tcl header and library files. Also, the library that
851 # non-stubs enabled programs using Tcl must link against. These variables
852 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
853 # prior to running nmake in order to match the actual installed location and
854 # version on this machine.
857 TCLDIR = $(TOP)\compat\tcl
861 TCLINCDIR = $(TCLDIR)\include
865 TCLLIBDIR = $(TCLDIR)\lib
873 LIBTCLSTUB = tclstub86.lib
877 LIBTCLPATH = $(TCLDIR)\bin
880 # The locations of the zlib header and library files. These variables
881 # (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
882 # prior to running nmake in order to match the actual installed (or source
883 # code) location on this machine.
886 ZLIBDIR = $(TOP)\compat\zlib
890 ZLIBINCDIR = $(ZLIBDIR)
894 ZLIBLIBDIR = $(ZLIBDIR)
898 !IF $(DYNAMIC_SHELL)!=0
905 # The locations of the ICU header and library files. These variables
906 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
907 # prior to running nmake in order to match the actual installed location on
911 ICUDIR = $(TOP)\compat\icu
915 ICUINCDIR = $(ICUDIR)\include
919 ICULIBDIR = $(ICUDIR)\lib
923 LIBICU = icuuc.lib icuin.lib
926 # This is the command to use for tclsh - normally just "tclsh", but we may
927 # know the specific version we want to use. This variable (TCLSH_CMD) may be
928 # overridden via the environment prior to running nmake in order to select a
929 # specific Tcl shell to use.
932 !IF $(USE_TCLSH_IN_PATH)!=0 || !EXIST("$(TCLDIR)\bin\tclsh.exe")
935 TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
940 # Compiler options needed for programs that use the readline() library.
942 !IFNDEF READLINE_FLAGS
943 READLINE_FLAGS = -DHAVE_READLINE=0
946 # The library that programs using readline() must link against.
952 # Should the database engine be compiled threadsafe
954 TCC = $(TCC) -DSQLITE_THREADSAFE=1
955 RCC = $(RCC) -DSQLITE_THREADSAFE=1
957 # Do threads override each others locks by default (1), or do we test (-1)
959 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
960 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
962 # Any target libraries which libsqlite must be linked against
968 # Flags controlling use of the in memory btree implementation
970 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
971 # default to file, 2 to default to memory, and 3 to force temporary
972 # tables to always be in memory.
974 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
975 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
977 # Enable/disable loadable extensions, and other optional features
978 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
979 # The same set of OMIT and ENABLE flags should be passed to the
980 # LEMON parser generator and the mkkeywordhash tool as well.
982 # These are the required SQLite compilation options used when compiling for
983 # the Windows platform.
985 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
987 # If we are linking to the RPCRT4 library, enable features that need it.
989 !IF $(USE_RPCRT4_LIB)!=0
990 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
993 # Add the required and optional SQLite compilation options into the command
994 # lines used to invoke the MSVC code and resource compilers.
996 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
997 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
999 # Add in any optional parameters specified on the commane line, e.g.
1000 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
1002 TCC = $(TCC) $(OPTS)
1003 RCC = $(RCC) $(OPTS)
1005 # If compiling for debugging, add some defines.
1008 TCC = $(TCC) -D_DEBUG
1009 BCC = $(BCC) -D_DEBUG
1010 RCC = $(RCC) -D_DEBUG
1013 # If optimizations are enabled or disabled (either implicitly or
1014 # explicitly), add the necessary flags.
1016 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
1019 !IF $(USE_RUNTIME_CHECKS)!=0
1023 !ELSEIF $(OPTIMIZATIONS)>=3
1026 !ELSEIF $(OPTIMIZATIONS)==2
1029 !ELSEIF $(OPTIMIZATIONS)==1
1034 # If symbols are enabled (or compiling for debugging), enable PDBs.
1036 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1042 # If zlib support is enabled, add the compiler options for it.
1045 TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
1046 RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
1047 TCC = $(TCC) -I$(ZLIBINCDIR)
1048 RCC = $(RCC) -I$(ZLIBINCDIR)
1051 # If ICU support is enabled, add the compiler options for it.
1054 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
1055 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
1056 TCC = $(TCC) -I$(TOP)\ext\icu
1057 RCC = $(RCC) -I$(TOP)\ext\icu
1058 TCC = $(TCC) -I$(ICUINCDIR)
1059 RCC = $(RCC) -I$(ICUINCDIR)
1063 # Command line prefixes for compiling code, compiling resources,
1066 LTCOMPILE = $(TCC) -Fo$@
1067 LTRCOMPILE = $(RCC) -r
1069 LTLINK = $(TCC) -Fe$@
1071 # If requested, link to the RPCRT4 library.
1073 !IF $(USE_RPCRT4_LIB)!=0
1074 LTLIBS = $(LTLIBS) rpcrt4.lib
1077 # If a platform was set, force the linker to target that.
1078 # Note that the vcvars*.bat family of batch files typically
1079 # set this for you. Otherwise, the linker will attempt
1080 # to deduce the binary type based on the object files.
1082 LTLINKOPTS = $(LTLINKOPTS) /NOLOGO /MACHINE:$(PLATFORM)
1083 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
1085 LTLINKOPTS = $(LTLINKOPTS) /NOLOGO
1089 # When compiling for use in the WinRT environment, the following
1090 # linker option must be used to mark the executable as runnable
1091 # only in the context of an application container.
1094 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
1095 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
1096 !IFNDEF STORELIBPATH
1097 !IF "$(PLATFORM)"=="x86"
1098 STORELIBPATH = $(CRTLIBPATH)\store
1099 !ELSEIF "$(PLATFORM)"=="x64"
1100 STORELIBPATH = $(CRTLIBPATH)\store\amd64
1101 !ELSEIF "$(PLATFORM)"=="ARM"
1102 STORELIBPATH = $(CRTLIBPATH)\store\arm
1104 STORELIBPATH = $(CRTLIBPATH)\store
1107 STORELIBPATH = $(STORELIBPATH:\\=\)
1108 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
1112 # When compiling for Windows Phone 8.1, an extra library path is
1115 !IF $(USE_WP81_OPTS)!=0
1117 !IF "$(PLATFORM)"=="x86"
1118 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1119 !ELSEIF "$(PLATFORM)"=="ARM"
1120 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1122 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1127 # When compiling for Windows Phone 8.1, some extra linker options
1128 # are also required.
1130 !IF $(USE_WP81_OPTS)!=0
1132 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1134 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1135 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1136 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1139 # When compiling for UWP or the Windows 10 platform, some extra linker
1140 # options are also required.
1142 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
1143 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1144 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1146 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1151 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
1153 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1155 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1159 # If either debugging or symbols are enabled, enable PDBs.
1161 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
1162 LDFLAGS = /DEBUG $(LDOPTS)
1168 # Start with the Tcl related linker options.
1171 TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
1172 TCLLIBS = $(TCLLIBS) $(LIBTCL)
1175 # If zlib support is enabled, add the linker options for it.
1178 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
1179 LTLIBS = $(LTLIBS) $(ZLIBLIB)
1182 # If ICU support is enabled, add the linker options for it.
1185 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1186 LTLIBS = $(LTLIBS) $(LIBICU)
1190 # You should not have to change anything below this line
1191 ###############################################################################
1194 # Object files for the SQLite library (non-amalgamation).
1196 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
1197 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
1198 callback.lo complete.lo ctime.lo \
1199 date.lo dbpage.lo dbstat.lo delete.lo \
1200 expr.lo fault.lo fkey.lo \
1201 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1202 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
1203 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
1205 func.lo global.lo hash.lo \
1206 icu.lo insert.lo json1.lo legacy.lo loadext.lo \
1207 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1208 memdb.lo memjournal.lo \
1209 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1210 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
1211 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
1212 random.lo resolve.lo rowset.lo rtree.lo \
1213 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
1214 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
1215 update.lo upsert.lo util.lo vacuum.lo \
1216 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
1217 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
1218 window.lo utf.lo vtab.lo
1221 # Object files for the amalgamation.
1223 LIBOBJS1 = sqlite3.lo
1225 # Determine the real value of LIBOBJ based on the 'configure' script
1228 !IF $(USE_AMALGAMATION)==0
1229 LIBOBJ = $(LIBOBJS0)
1232 LIBOBJ = $(LIBOBJS1)
1237 # Determine if embedded resource compilation and usage are enabled.
1240 LIBRESOBJS = sqlite3res.lo
1246 # Core source code files, part 1.
1249 $(TOP)\src\crypto.c \
1250 $(TOP)\src\crypto_cc.c \
1251 $(TOP)\src\crypto_impl.c \
1252 $(TOP)\src\crypto_libtomcrypt.c \
1253 $(TOP)\src\crypto_openssl.c \
1254 $(TOP)\src\crypto.h \
1255 $(TOP)\src\sqlcipher.h \
1256 $(TOP)\src\alter.c \
1257 $(TOP)\src\analyze.c \
1258 $(TOP)\src\attach.c \
1260 $(TOP)\src\backup.c \
1261 $(TOP)\src\bitvec.c \
1262 $(TOP)\src\btmutex.c \
1263 $(TOP)\src\btree.c \
1264 $(TOP)\src\build.c \
1265 $(TOP)\src\callback.c \
1266 $(TOP)\src\complete.c \
1267 $(TOP)\src\ctime.c \
1269 $(TOP)\src\dbpage.c \
1270 $(TOP)\src\dbstat.c \
1271 $(TOP)\src\delete.c \
1273 $(TOP)\src\fault.c \
1276 $(TOP)\src\global.c \
1278 $(TOP)\src\insert.c \
1279 $(TOP)\src\legacy.c \
1280 $(TOP)\src\loadext.c \
1282 $(TOP)\src\malloc.c \
1288 $(TOP)\src\memdb.c \
1289 $(TOP)\src\memjournal.c \
1290 $(TOP)\src\mutex.c \
1291 $(TOP)\src\mutex_noop.c \
1292 $(TOP)\src\mutex_unix.c \
1293 $(TOP)\src\mutex_w32.c \
1294 $(TOP)\src\notify.c \
1296 $(TOP)\src\os_unix.c \
1299 # Core source code files, part 2.
1302 $(TOP)\src\pager.c \
1303 $(TOP)\src\pcache.c \
1304 $(TOP)\src\pcache1.c \
1305 $(TOP)\src\pragma.c \
1306 $(TOP)\src\prepare.c \
1307 $(TOP)\src\printf.c \
1308 $(TOP)\src\random.c \
1309 $(TOP)\src\resolve.c \
1310 $(TOP)\src\rowset.c \
1311 $(TOP)\src\select.c \
1312 $(TOP)\src\status.c \
1313 $(TOP)\src\table.c \
1314 $(TOP)\src\threads.c \
1315 $(TOP)\src\tclsqlite.c \
1316 $(TOP)\src\tokenize.c \
1317 $(TOP)\src\treeview.c \
1318 $(TOP)\src\trigger.c \
1320 $(TOP)\src\update.c \
1321 $(TOP)\src\upsert.c \
1323 $(TOP)\src\vacuum.c \
1325 $(TOP)\src\vdbeapi.c \
1326 $(TOP)\src\vdbeaux.c \
1327 $(TOP)\src\vdbeblob.c \
1328 $(TOP)\src\vdbemem.c \
1329 $(TOP)\src\vdbesort.c \
1330 $(TOP)\src\vdbetrace.c \
1333 $(TOP)\src\walker.c \
1334 $(TOP)\src\where.c \
1335 $(TOP)\src\wherecode.c \
1336 $(TOP)\src\whereexpr.c \
1339 # Core miscellaneous files.
1344 # Core header files, part 1.
1347 $(TOP)\src\btree.h \
1348 $(TOP)\src\btreeInt.h \
1350 $(TOP)\src\hwtime.h \
1352 $(TOP)\src\mutex.h \
1354 $(TOP)\src\os_common.h \
1355 $(TOP)\src\os_setup.h \
1358 # Core header files, part 2.
1361 $(TOP)\src\pager.h \
1362 $(TOP)\src\pcache.h \
1363 $(TOP)\src\pragma.h \
1364 $(TOP)\src\sqlite.h.in \
1365 $(TOP)\src\sqlite3ext.h \
1366 $(TOP)\src\sqliteInt.h \
1367 $(TOP)\src\sqliteLimit.h \
1369 $(TOP)\src\vdbeInt.h \
1370 $(TOP)\src\vxworks.h \
1372 $(TOP)\src\whereInt.h
1374 # Extension source code files, part 1.
1377 $(TOP)\ext\fts1\fts1.c \
1378 $(TOP)\ext\fts1\fts1_hash.c \
1379 $(TOP)\ext\fts1\fts1_porter.c \
1380 $(TOP)\ext\fts1\fts1_tokenizer1.c \
1381 $(TOP)\ext\fts2\fts2.c \
1382 $(TOP)\ext\fts2\fts2_hash.c \
1383 $(TOP)\ext\fts2\fts2_icu.c \
1384 $(TOP)\ext\fts2\fts2_porter.c \
1385 $(TOP)\ext\fts2\fts2_tokenizer.c \
1386 $(TOP)\ext\fts2\fts2_tokenizer1.c
1388 # Extension source code files, part 2.
1391 $(TOP)\ext\fts3\fts3.c \
1392 $(TOP)\ext\fts3\fts3_aux.c \
1393 $(TOP)\ext\fts3\fts3_expr.c \
1394 $(TOP)\ext\fts3\fts3_hash.c \
1395 $(TOP)\ext\fts3\fts3_icu.c \
1396 $(TOP)\ext\fts3\fts3_porter.c \
1397 $(TOP)\ext\fts3\fts3_snippet.c \
1398 $(TOP)\ext\fts3\fts3_tokenizer.c \
1399 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1400 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1401 $(TOP)\ext\fts3\fts3_unicode.c \
1402 $(TOP)\ext\fts3\fts3_unicode2.c \
1403 $(TOP)\ext\fts3\fts3_write.c \
1404 $(TOP)\ext\icu\icu.c \
1405 $(TOP)\ext\rtree\rtree.c \
1406 $(TOP)\ext\session\sqlite3session.c \
1407 $(TOP)\ext\rbu\sqlite3rbu.c \
1408 $(TOP)\ext\misc\json1.c \
1409 $(TOP)\ext\misc\stmt.c
1411 # Extension header files, part 1.
1414 $(TOP)\ext\fts1\fts1.h \
1415 $(TOP)\ext\fts1\fts1_hash.h \
1416 $(TOP)\ext\fts1\fts1_tokenizer.h \
1417 $(TOP)\ext\fts2\fts2.h \
1418 $(TOP)\ext\fts2\fts2_hash.h \
1419 $(TOP)\ext\fts2\fts2_tokenizer.h
1421 # Extension header files, part 2.
1424 $(TOP)\ext\fts3\fts3.h \
1425 $(TOP)\ext\fts3\fts3Int.h \
1426 $(TOP)\ext\fts3\fts3_hash.h \
1427 $(TOP)\ext\fts3\fts3_tokenizer.h \
1428 $(TOP)\ext\icu\sqliteicu.h \
1429 $(TOP)\ext\rtree\rtree.h \
1430 $(TOP)\ext\rtree\geopoly.c \
1431 $(TOP)\ext\rbu\sqlite3rbu.h \
1432 $(TOP)\ext\session\sqlite3session.h
1434 # Generated source code files
1440 # Generated header files
1449 # Generated Tcl header files
1451 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
1459 # All source code files.
1461 SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
1463 # Source code to the test files.
1466 $(TOP)\src\test1.c \
1467 $(TOP)\src\test2.c \
1468 $(TOP)\src\test3.c \
1469 $(TOP)\src\test4.c \
1470 $(TOP)\src\test5.c \
1471 $(TOP)\src\test6.c \
1472 $(TOP)\src\test7.c \
1473 $(TOP)\src\test8.c \
1474 $(TOP)\src\test9.c \
1475 $(TOP)\src\test_autoext.c \
1476 $(TOP)\src\test_async.c \
1477 $(TOP)\src\test_backup.c \
1478 $(TOP)\src\test_bestindex.c \
1479 $(TOP)\src\test_blob.c \
1480 $(TOP)\src\test_btree.c \
1481 $(TOP)\src\test_config.c \
1482 $(TOP)\src\test_delete.c \
1483 $(TOP)\src\test_demovfs.c \
1484 $(TOP)\src\test_devsym.c \
1485 $(TOP)\src\test_fs.c \
1486 $(TOP)\src\test_func.c \
1487 $(TOP)\src\test_hexio.c \
1488 $(TOP)\src\test_init.c \
1489 $(TOP)\src\test_intarray.c \
1490 $(TOP)\src\test_journal.c \
1491 $(TOP)\src\test_malloc.c \
1492 $(TOP)\src\test_md5.c \
1493 $(TOP)\src\test_multiplex.c \
1494 $(TOP)\src\test_mutex.c \
1495 $(TOP)\src\test_onefile.c \
1496 $(TOP)\src\test_osinst.c \
1497 $(TOP)\src\test_pcache.c \
1498 $(TOP)\src\test_quota.c \
1499 $(TOP)\src\test_rtree.c \
1500 $(TOP)\src\test_schema.c \
1501 $(TOP)\src\test_server.c \
1502 $(TOP)\src\test_superlock.c \
1503 $(TOP)\src\test_syscall.c \
1504 $(TOP)\src\test_tclsh.c \
1505 $(TOP)\src\test_tclvar.c \
1506 $(TOP)\src\test_thread.c \
1507 $(TOP)\src\test_vfs.c \
1508 $(TOP)\src\test_windirent.c \
1509 $(TOP)\src\test_window.c \
1510 $(TOP)\src\test_wsd.c \
1511 $(TOP)\ext\fts3\fts3_term.c \
1512 $(TOP)\ext\fts3\fts3_test.c \
1513 $(TOP)\ext\rbu\test_rbu.c \
1514 $(TOP)\ext\session\test_session.c
1516 # Statically linked extensions.
1519 $(TOP)\ext\expert\sqlite3expert.c \
1520 $(TOP)\ext\expert\test_expert.c \
1521 $(TOP)\ext\misc\amatch.c \
1522 $(TOP)\ext\misc\carray.c \
1523 $(TOP)\ext\misc\closure.c \
1524 $(TOP)\ext\misc\csv.c \
1525 $(TOP)\ext\misc\eval.c \
1526 $(TOP)\ext\misc\explain.c \
1527 $(TOP)\ext\misc\fileio.c \
1528 $(TOP)\ext\misc\fuzzer.c \
1529 $(TOP)\ext\fts5\fts5_tcl.c \
1530 $(TOP)\ext\fts5\fts5_test_mi.c \
1531 $(TOP)\ext\fts5\fts5_test_tok.c \
1532 $(TOP)\ext\misc\ieee754.c \
1533 $(TOP)\ext\misc\mmapwarm.c \
1534 $(TOP)\ext\misc\nextchar.c \
1535 $(TOP)\ext\misc\normalize.c \
1536 $(TOP)\ext\misc\percentile.c \
1537 $(TOP)\ext\misc\regexp.c \
1538 $(TOP)\ext\misc\remember.c \
1539 $(TOP)\ext\misc\series.c \
1540 $(TOP)\ext\misc\spellfix.c \
1541 $(TOP)\ext\misc\totype.c \
1542 $(TOP)\ext\misc\unionvtab.c \
1543 $(TOP)\ext\misc\wholenumber.c
1545 # If use of zlib is enabled, add the "zipfile.c" source file.
1548 TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
1551 # Source code to the library files needed by the test fixture
1552 # (non-amalgamation)
1560 $(TOP)\ext\async\sqlite3async.c
1562 # Header files used by all library source files.
1565 $(TOP)\src\btree.h \
1566 $(TOP)\src\btreeInt.h \
1568 $(TOP)\src\hwtime.h \
1571 $(TOP)\src\mutex.h \
1574 $(TOP)\src\os_common.h \
1575 $(TOP)\src\os_setup.h \
1576 $(TOP)\src\os_win.h \
1577 $(TOP)\src\pager.h \
1578 $(TOP)\src\pcache.h \
1580 $(TOP)\src\pragma.h \
1583 $(TOP)\src\sqliteInt.h \
1584 $(TOP)\src\sqliteLimit.h \
1586 $(TOP)\src\vdbeInt.h \
1587 $(TOP)\src\vxworks.h \
1588 $(TOP)\src\whereInt.h
1590 # Header files used by extensions
1592 EXTHDR = $(EXTHDR) \
1593 $(TOP)\ext\fts1\fts1.h \
1594 $(TOP)\ext\fts1\fts1_hash.h \
1595 $(TOP)\ext\fts1\fts1_tokenizer.h
1596 EXTHDR = $(EXTHDR) \
1597 $(TOP)\ext\fts2\fts2.h \
1598 $(TOP)\ext\fts2\fts2_hash.h \
1599 $(TOP)\ext\fts2\fts2_tokenizer.h
1600 EXTHDR = $(EXTHDR) \
1601 $(TOP)\ext\fts3\fts3.h \
1602 $(TOP)\ext\fts3\fts3Int.h \
1603 $(TOP)\ext\fts3\fts3_hash.h \
1604 $(TOP)\ext\fts3\fts3_tokenizer.h
1605 EXTHDR = $(EXTHDR) \
1606 $(TOP)\ext\rtree\rtree.h \
1607 $(TOP)\ext\rtree\geopoly.c
1608 EXTHDR = $(EXTHDR) \
1609 $(TOP)\ext\icu\sqliteicu.h
1610 EXTHDR = $(EXTHDR) \
1611 $(TOP)\ext\rtree\sqlite3rtree.h
1612 EXTHDR = $(EXTHDR) \
1613 $(TOP)\ext\session\sqlite3session.h
1615 # executables needed for testing
1620 sqlite3_analyzer.exe \
1621 sqlite3_checker.exe \
1626 # Databases containing fuzzer test cases
1629 $(TOP)\test\fuzzdata1.db \
1630 $(TOP)\test\fuzzdata2.db \
1631 $(TOP)\test\fuzzdata3.db \
1632 $(TOP)\test\fuzzdata4.db \
1633 $(TOP)\test\fuzzdata5.db \
1634 $(TOP)\test\fuzzdata6.db \
1635 $(TOP)\test\fuzzdata7.db
1638 # Additional compiler options for the shell. These are only effective
1639 # when the shell is not being dynamically linked.
1641 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1642 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
1643 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
1644 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
1645 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DESERIALIZE=1
1649 # Extra compiler options for various test tools.
1651 MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
1652 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1653 FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ -DSQLITE_MAX_MEMORY=50000000 -DSQLITE_PRINTF_PRECISION_LIMIT=1000
1654 FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1655 OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
1656 DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
1657 KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
1658 ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
1660 # Standard options to testfixture.
1662 TESTOPTS = --verbose=file --output=test-out.txt
1664 # Extra targets for the "all" target that require Tcl.
1667 ALL_TCL_TARGETS = libtclsqlite3.lib
1673 # This is the default Makefile target. The objects listed here
1674 # are what get build when you type just "make" with no arguments.
1676 core: dll libsqlite3.lib shell
1678 # Targets that require the Tcl library.
1680 tcl: $(ALL_TCL_TARGETS)
1682 # This Makefile target builds all of the standard binaries.
1686 # Dynamic link library section.
1692 shell: $(SQLITE3EXE)
1695 libsqlite3.lib: $(LIBOBJ)
1696 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1698 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1699 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1702 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1703 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1706 sqlite3.def: libsqlite3.lib
1707 echo EXPORTS > sqlite3.def
1708 dumpbin /all libsqlite3.lib \
1709 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@]*)(?:@\d+)?$$" \1 \
1710 | sort >> sqlite3.def
1713 $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1714 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
1715 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1718 sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1719 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1721 dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1722 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1724 scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1725 $(LTLINK) $(NO_WARN) -DSCRUB_STANDALONE=1 $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1727 srcck1.exe: $(TOP)\tool\srcck1.c
1728 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1730 sourcetest: srcck1.exe $(SQLITE3C)
1731 srcck1.exe $(SQLITE3C)
1733 fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1734 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1736 dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
1737 $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1739 fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1740 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1742 ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1743 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1745 sessionfuzz.exe: zlib $(TOP)\test\sessionfuzz.c $(SQLITE3C) $(SQLITE3H)
1746 $(LTLINK) $(NO_WARN) -I$(ZLIBINCDIR) $(TOP)\test\sessionfuzz.c /link $(LDFLAGS) $(LTLINKOPTS) /LIBPATH:$(ZLIBLIBDIR) $(ZLIBLIB)
1748 mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1749 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1751 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1752 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1754 mptest: mptester.exe
1755 del /Q mptest.db 2>NUL
1756 $(MPTEST1) --journalmode DELETE
1757 $(MPTEST2) --journalmode WAL
1758 $(MPTEST1) --journalmode WAL
1759 $(MPTEST2) --journalmode PERSIST
1760 $(MPTEST1) --journalmode PERSIST
1761 $(MPTEST2) --journalmode TRUNCATE
1762 $(MPTEST1) --journalmode TRUNCATE
1763 $(MPTEST2) --journalmode DELETE
1765 # This target creates a directory named "tsrc" and fills it with
1766 # copies of all of the C source code and header files needed to
1767 # build on the target system. Some of the C source code and header
1768 # files are automatically generated. This target takes care of
1769 # all that automatic generation.
1771 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
1772 -rmdir /Q/S tsrc 2>NUL
1774 for %i in ($(SRC00)) do copy /Y %i tsrc
1775 for %i in ($(SRC01)) do copy /Y %i tsrc
1776 for %i in ($(SRC03)) do copy /Y %i tsrc
1777 for %i in ($(SRC04)) do copy /Y %i tsrc
1778 for %i in ($(SRC05)) do copy /Y %i tsrc
1779 for %i in ($(SRC06)) do copy /Y %i tsrc
1780 for %i in ($(SRC07)) do copy /Y %i tsrc
1781 for %i in ($(SRC08)) do copy /Y %i tsrc
1782 for %i in ($(SRC09)) do copy /Y %i tsrc
1783 for %i in ($(SRC10)) do copy /Y %i tsrc
1784 for %i in ($(SRC11)) do copy /Y %i tsrc
1785 for %i in ($(SRC12)) do copy /Y %i tsrc
1788 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1789 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1790 move vdbe.new tsrc\vdbe.c
1791 echo > .target_source
1793 sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
1794 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
1795 copy $(TOP)\ext\session\sqlite3session.h .
1797 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1798 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1801 # Rule to build the amalgamation
1803 sqlite3.lo: $(SQLITE3C)
1804 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1807 # Rules to build the LEMON compiler generator
1809 lempar.c: $(TOP)\tool\lempar.c
1810 copy $(TOP)\tool\lempar.c .
1812 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1813 $(BCC) $(NO_WARN) -Daccess=_access \
1814 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1817 # Rules to build the source-id generator tool
1819 mksourceid.exe: $(TOP)\tool\mksourceid.c
1820 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1822 # Rules to build individual *.lo files from generated *.c files. This
1828 parse.lo: parse.c $(HDR)
1829 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1831 opcodes.lo: opcodes.c
1832 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1835 # Rule to build the Win32 resources object file.
1839 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H)
1840 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1841 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1842 echo #define SQLITE_RESOURCE_VERSION %%V \
1843 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1845 echo #endif >> sqlite3rc.h
1846 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1851 # Rules to build individual *.lo files from files in the src directory.
1853 alter.lo: $(TOP)\src\alter.c $(HDR)
1854 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1856 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1857 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1859 attach.lo: $(TOP)\src\attach.c $(HDR)
1860 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1862 auth.lo: $(TOP)\src\auth.c $(HDR)
1863 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1865 backup.lo: $(TOP)\src\backup.c $(HDR)
1866 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1868 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1869 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1871 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1872 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1874 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1875 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1877 build.lo: $(TOP)\src\build.c $(HDR)
1878 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1880 callback.lo: $(TOP)\src\callback.c $(HDR)
1881 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1883 complete.lo: $(TOP)\src\complete.c $(HDR)
1884 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1886 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1887 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1889 date.lo: $(TOP)\src\date.c $(HDR)
1890 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1892 dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
1893 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
1895 dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
1896 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1898 delete.lo: $(TOP)\src\delete.c $(HDR)
1899 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1901 expr.lo: $(TOP)\src\expr.c $(HDR)
1902 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1904 fault.lo: $(TOP)\src\fault.c $(HDR)
1905 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1907 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1908 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1910 func.lo: $(TOP)\src\func.c $(HDR)
1911 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1913 global.lo: $(TOP)\src\global.c $(HDR)
1914 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1916 hash.lo: $(TOP)\src\hash.c $(HDR)
1917 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1919 insert.lo: $(TOP)\src\insert.c $(HDR)
1920 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1922 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1923 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1925 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1926 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1928 main.lo: $(TOP)\src\main.c $(HDR)
1929 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1931 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1932 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
1934 mem0.lo: $(TOP)\src\mem0.c $(HDR)
1935 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
1937 mem1.lo: $(TOP)\src\mem1.c $(HDR)
1938 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
1940 mem2.lo: $(TOP)\src\mem2.c $(HDR)
1941 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
1943 mem3.lo: $(TOP)\src\mem3.c $(HDR)
1944 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
1946 mem5.lo: $(TOP)\src\mem5.c $(HDR)
1947 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
1949 memdb.lo: $(TOP)\src\memdb.c $(HDR)
1950 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memdb.c
1952 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
1953 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
1955 mutex.lo: $(TOP)\src\mutex.c $(HDR)
1956 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
1958 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
1959 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
1961 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
1962 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
1964 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
1965 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
1967 notify.lo: $(TOP)\src\notify.c $(HDR)
1968 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
1970 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1971 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
1973 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1974 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
1976 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1977 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
1979 os.lo: $(TOP)\src\os.c $(HDR)
1980 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
1982 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
1983 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
1985 os_win.lo: $(TOP)\src\os_win.c $(HDR)
1986 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
1988 pragma.lo: $(TOP)\src\pragma.c $(HDR)
1989 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
1991 prepare.lo: $(TOP)\src\prepare.c $(HDR)
1992 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
1994 printf.lo: $(TOP)\src\printf.c $(HDR)
1995 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
1997 random.lo: $(TOP)\src\random.c $(HDR)
1998 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
2000 resolve.lo: $(TOP)\src\resolve.c $(HDR)
2001 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
2003 rowset.lo: $(TOP)\src\rowset.c $(HDR)
2004 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
2006 select.lo: $(TOP)\src\select.c $(HDR)
2007 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
2009 status.lo: $(TOP)\src\status.c $(HDR)
2010 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
2012 table.lo: $(TOP)\src\table.c $(HDR)
2013 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
2015 threads.lo: $(TOP)\src\threads.c $(HDR)
2016 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
2018 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
2019 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
2021 treeview.lo: $(TOP)\src\treeview.c $(HDR)
2022 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
2024 trigger.lo: $(TOP)\src\trigger.c $(HDR)
2025 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
2027 update.lo: $(TOP)\src\update.c $(HDR)
2028 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
2030 upsert.lo: $(TOP)\src\upsert.c $(HDR)
2031 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\upsert.c
2033 utf.lo: $(TOP)\src\utf.c $(HDR)
2034 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
2036 util.lo: $(TOP)\src\util.c $(HDR)
2037 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
2039 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
2040 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
2042 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
2043 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
2045 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
2046 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
2048 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
2049 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
2051 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
2052 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
2054 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
2055 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
2057 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
2058 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
2060 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
2061 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
2063 vtab.lo: $(TOP)\src\vtab.c $(HDR)
2064 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
2066 wal.lo: $(TOP)\src\wal.c $(HDR)
2067 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
2069 walker.lo: $(TOP)\src\walker.c $(HDR)
2070 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
2072 where.lo: $(TOP)\src\where.c $(HDR)
2073 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
2075 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
2076 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
2078 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
2079 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
2081 window.lo: $(TOP)\src\window.c $(HDR)
2082 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\window.c
2084 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2085 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2087 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
2088 $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
2090 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2091 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2093 # Rules to build opcodes.c and opcodes.h
2095 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
2096 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
2098 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
2099 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
2101 # Rules to build parse.c and parse.h - the outputs of lemon.
2105 parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
2106 del /Q parse.y parse.h parse.h.temp 2>NUL
2107 copy $(TOP)\src\parse.y .
2108 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
2109 move parse.h parse.h.temp
2110 $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
2112 $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
2113 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
2115 sqlite3ext.h: .target_source
2116 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2117 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
2118 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
2119 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
2121 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
2124 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
2125 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
2126 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
2128 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
2129 .\mkkeywordhash.exe > keywordhash.h
2131 # Source files that go into making shell.c
2133 $(TOP)\src\shell.c.in \
2134 $(TOP)\ext\misc\appendvfs.c \
2135 $(TOP)\ext\misc\shathree.c \
2136 $(TOP)\ext\misc\fileio.c \
2137 $(TOP)\ext\misc\completion.c \
2138 $(TOP)\ext\expert\sqlite3expert.c \
2139 $(TOP)\ext\expert\sqlite3expert.h \
2140 $(TOP)\src\test_windirent.c
2142 # If use of zlib is enabled, add the "zipfile.c" source file.
2145 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\sqlar.c
2146 SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\zipfile.c
2149 shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
2150 $(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
2153 pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
2155 # Rules to build the extension objects.
2157 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
2158 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
2160 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
2161 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
2163 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
2164 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
2166 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
2167 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
2169 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
2170 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
2172 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
2173 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
2175 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
2176 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
2178 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
2179 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
2181 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
2182 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
2184 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
2185 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
2187 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
2188 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
2190 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
2191 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
2193 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
2194 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
2196 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
2197 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
2199 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
2200 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
2202 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
2203 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
2205 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
2206 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
2208 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
2209 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
2211 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
2212 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
2214 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
2215 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
2217 json1.lo: $(TOP)\ext\misc\json1.c $(HDR) $(EXTHDR)
2218 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\json1.c
2220 stmt.lo: $(TOP)\ext\misc\stmt.c $(HDR) $(EXTHDR)
2221 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\stmt.c
2223 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
2224 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
2226 sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
2227 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
2232 $(TOP)\ext\fts5\fts5.h \
2233 $(TOP)\ext\fts5\fts5Int.h \
2234 $(TOP)\ext\fts5\fts5_aux.c \
2235 $(TOP)\ext\fts5\fts5_buffer.c \
2236 $(TOP)\ext\fts5\fts5_main.c \
2237 $(TOP)\ext\fts5\fts5_config.c \
2238 $(TOP)\ext\fts5\fts5_expr.c \
2239 $(TOP)\ext\fts5\fts5_hash.c \
2240 $(TOP)\ext\fts5\fts5_index.c \
2241 fts5parse.c fts5parse.h \
2242 $(TOP)\ext\fts5\fts5_storage.c \
2243 $(TOP)\ext\fts5\fts5_tokenize.c \
2244 $(TOP)\ext\fts5\fts5_unicode2.c \
2245 $(TOP)\ext\fts5\fts5_varint.c \
2246 $(TOP)\ext\fts5\fts5_vocab.c
2249 $(TOP)\ext\lsm1\lsm.h \
2250 $(TOP)\ext\lsm1\lsmInt.h \
2251 $(TOP)\ext\lsm1\lsm_ckpt.c \
2252 $(TOP)\ext\lsm1\lsm_file.c \
2253 $(TOP)\ext\lsm1\lsm_log.c \
2254 $(TOP)\ext\lsm1\lsm_main.c \
2255 $(TOP)\ext\lsm1\lsm_mem.c \
2256 $(TOP)\ext\lsm1\lsm_mutex.c \
2257 $(TOP)\ext\lsm1\lsm_shared.c \
2258 $(TOP)\ext\lsm1\lsm_sorted.c \
2259 $(TOP)\ext\lsm1\lsm_str.c \
2260 $(TOP)\ext\lsm1\lsm_tree.c \
2261 $(TOP)\ext\lsm1\lsm_unix.c \
2262 $(TOP)\ext\lsm1\lsm_varint.c \
2263 $(TOP)\ext\lsm1\lsm_vtab.c \
2264 $(TOP)\ext\lsm1\lsm_win32.c
2266 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2267 copy $(TOP)\ext\fts5\fts5parse.y .
2268 del /Q fts5parse.h 2>NUL
2269 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
2271 fts5parse.h: fts5parse.c
2274 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2275 copy $(TOP)\ext\fts5\fts5.h .
2278 $(TCLSH_CMD) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
2279 copy $(TOP)\ext\lsm1\lsm.h .
2281 fts5.lo: fts5.c $(HDR) $(EXTHDR)
2282 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2284 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
2285 $(LTCOMPILE) $(NO_WARN) -c fts5.c
2287 fts5.dll: fts5_ext.lo
2288 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
2290 sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2291 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
2293 # Rules to build the 'testfixture' application.
2295 # If using the amalgamation, use sqlite3.c directly to build the test
2296 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
2297 # necessary because the test fixture requires non-API symbols which are
2298 # hidden when the library is built via the amalgamation).
2300 TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
2301 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2302 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
2303 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
2304 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
2305 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
2306 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
2307 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
2308 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
2310 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
2311 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
2312 !IF $(USE_AMALGAMATION)==0
2313 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2315 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2318 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
2320 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2321 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2322 echo #endif >> $(SQLITETCLDECLSH)
2323 type "$(TCLINCDIR)\tclDecls.h" \
2324 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
2325 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2326 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
2327 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
2328 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
2331 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2332 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2333 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2334 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
2335 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2338 testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
2339 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
2340 -DBUILD_sqlite -I$(TCLINCDIR) \
2341 $(TESTFIXTURE_SRC) \
2342 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2344 extensiontest: testfixture.exe testloadext.dll
2345 @set PATH=$(LIBTCLPATH);$(PATH)
2346 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
2348 coretestprogs: $(TESTPROGS)
2350 testprogs: coretestprogs srcck1.exe fuzzcheck.exe sessionfuzz.exe
2352 fulltest: $(TESTPROGS) fuzztest
2353 @set PATH=$(LIBTCLPATH);$(PATH)
2354 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
2356 soaktest: $(TESTPROGS)
2357 @set PATH=$(LIBTCLPATH);$(PATH)
2358 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
2360 fulltestonly: $(TESTPROGS) fuzztest
2361 @set PATH=$(LIBTCLPATH);$(PATH)
2362 .\testfixture.exe $(TOP)\test\full.test
2364 queryplantest: testfixture.exe shell
2365 @set PATH=$(LIBTCLPATH);$(PATH)
2366 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
2368 fuzztest: fuzzcheck.exe
2369 .\fuzzcheck.exe $(FUZZDATA)
2371 fastfuzztest: fuzzcheck.exe
2372 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
2374 # Minimal testing that runs in less than 3 minutes (on a fast machine)
2376 quicktest: testfixture.exe sourcetest
2377 @set PATH=$(LIBTCLPATH);$(PATH)
2378 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2380 # This is the common case. Run many tests that do not take too long,
2381 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2383 test: $(TESTPROGS) sourcetest fastfuzztest
2384 @set PATH=$(LIBTCLPATH);$(PATH)
2385 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
2387 smoketest: $(TESTPROGS)
2388 @set PATH=$(LIBTCLPATH);$(PATH)
2389 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
2391 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)
2392 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
2394 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
2395 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
2396 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2398 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
2399 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
2401 sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
2402 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
2403 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2405 sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
2406 $(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
2409 $(TOP)/tool/mkccode.tcl \
2411 $(TOP)/src/tclsqlite.c \
2412 $(TOP)/ext/repair/sqlite3_checker.tcl \
2413 $(TOP)/ext/repair/checkindex.c \
2414 $(TOP)/ext/repair/checkfreelist.c \
2415 $(TOP)/ext/misc/btreeinfo.c \
2416 $(TOP)/ext/repair/sqlite3_checker.c.in
2418 sqlite3_checker.c: $(CHECKER_DEPS)
2419 $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\ext\repair\sqlite3_checker.c.in > $@
2421 sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
2422 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
2423 /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
2425 dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
2426 $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
2427 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
2429 testloadext.lo: $(TOP)\src\test_loadext.c $(SQLITE3H)
2430 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
2432 testloadext.dll: testloadext.lo
2433 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2435 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
2436 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2437 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2439 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
2440 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2441 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2443 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
2444 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2445 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2447 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
2448 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2449 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2451 showshm.exe: $(TOP)\tool\showshm.c
2452 $(LTLINK) $(NO_WARN) $(TOP)\tool\showshm.c /link $(LDFLAGS) $(LTLINKOPTS)
2454 changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
2455 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2456 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2457 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2459 changesetfuzz.exe: $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) $(SQLITE3H)
2460 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2461 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
2462 $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2464 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
2465 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2466 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2468 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
2469 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2470 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2472 atrc.exe: $(TOP)\test\atrc.c $(SQLITE3C) $(SQLITE3H)
2473 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2474 $(TOP)\test\atrc.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2476 LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
2477 $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
2479 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
2480 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
2481 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2483 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
2484 $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
2485 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2487 kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
2488 $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
2489 $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2491 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
2492 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
2493 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
2495 LSMDIR=$(TOP)\ext\lsm1
2496 !INCLUDE $(LSMDIR)\Makefile.msc
2499 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
2503 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
2504 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
2505 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
2507 del /Q opcodes.c opcodes.h 2>NUL
2508 del /Q lemon.* lempar.c parse.* 2>NUL
2509 del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
2510 del /Q notasharedlib.* 2>NUL
2511 -rmdir /Q/S .deps 2>NUL
2512 -rmdir /Q/S .libs 2>NUL
2513 -rmdir /Q/S tsrc 2>NUL
2514 del /Q .target_source 2>NUL
2515 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
2516 del /Q lsm.dll lsmtest.exe 2>NUL
2517 del /Q testloadext.dll 2>NUL
2518 del /Q testfixture.exe test.db 2>NUL
2519 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
2520 del /Q changeset.exe 2>NUL
2521 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2522 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
2523 del /Q sqlite3.c sqlite3-*.c sqlite3.h 2>NUL
2524 del /Q sqlite3rc.h 2>NUL
2525 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
2526 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2527 del /Q sqlite-*-output.vsix 2>NUL
2528 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
2529 del /Q sqltclsh.* 2>NUL
2530 del /Q dbfuzz.exe sessionfuzz.exe 2>NUL
2531 del /Q kvtest.exe ossshell.exe scrub.exe 2>NUL
2532 del /Q showshm.exe sqlite3_checker.* sqlite3_expert.exe 2>NUL
2533 del /Q fts5.* fts5parse.* 2>NUL
2534 del /Q lsm.h lsm1.c 2>NUL