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".
13 # Set this non-0 to create and use the SQLite amalgamation file.
15 !IFNDEF USE_AMALGAMATION
19 # Set this non-0 to enable full warnings (-W4, etc) when compiling.
25 # Set this non-0 to use "stdcall" calling convention for the core library
26 # and shell executable.
32 # Set this non-0 to have the shell executable link against the core dynamic
39 # Set this non-0 to enable extra code that attempts to detect misuse of the
46 # If necessary, create a list of harmless compiler warnings to disable when
47 # compiling the various tools. For the SQLite source code itself, warnings,
48 # if any, will be disabled from within it.
51 !IF $(USE_FULLWARN)!=0
52 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
53 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
57 # Set this non-0 to use the library paths and other options necessary for
64 # Set this non-0 to split the SQLite amalgamation file into chunks to
65 # be used for debugging with Visual Studio.
67 !IFNDEF SPLIT_AMALGAMATION
68 SPLIT_AMALGAMATION = 0
71 # Set this non-0 to use the International Components for Unicode (ICU).
77 # Set this non-0 to dynamically link to the MSVC runtime library.
83 # Set this non-0 to link to the RPCRT4 library.
85 !IFNDEF USE_RPCRT4_LIB
89 # Set this non-0 to generate assembly code listings for the source code
96 # Set this non-0 to attempt setting the native compiler automatically
97 # for cross-compiling the command line tools needed during the compilation
104 # Set this non-0 to use the native libraries paths for cross-compiling
105 # the command line tools needed during the compilation process.
107 !IFNDEF USE_NATIVE_LIBPATHS
108 USE_NATIVE_LIBPATHS = 0
111 # Set this 0 to skip the compiling and embedding of version resources.
117 # Set this non-0 to compile binaries suitable for the WinRT environment.
118 # This setting does not apply to any binaries that require Tcl to operate
119 # properly (i.e. the text fixture, etc).
125 # Set this non-0 to compile binaries suitable for the UAP environment.
126 # This setting does not apply to any binaries that require Tcl to operate
127 # properly (i.e. the text fixture, etc).
133 # Set this non-0 to skip attempting to look for and/or link with the Tcl
140 # Set this to non-0 to create and use PDBs.
146 # Set this to non-0 to use the SQLite debugging heap subsystem.
152 # Set this to non-0 to use the Win32 native heap subsystem.
158 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
165 # Set this to one of the following values to enable various debugging
166 # features. Each level includes the debugging options from the previous
167 # levels. Currently, the recognized values for DEBUG are:
169 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
170 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
171 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
172 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
173 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
174 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
175 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
181 # Enable use of available compiler optimizations? Normally, this should be
182 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
183 # can be useful for testing.
185 !IFNDEF OPTIMIZATIONS
189 # These are the "standard" SQLite compilation options used when compiling for
190 # the Windows platform.
192 !IFNDEF OPT_FEATURE_FLAGS
193 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
194 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
195 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
198 ###############################################################################
199 ############################### END OF OPTIONS ################################
200 ###############################################################################
202 # This assumes that MSVC is always installed in 32-bit Program Files directory
203 # and sets the variable for use in locating other 32-bit installs accordingly.
205 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
206 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
208 # Check for the predefined command macro CC. This should point to the compiler
209 # binary for the target platform. If it is not defined, simply define it to
210 # the legacy default value 'cl.exe'.
216 # Check for the command macro LD. This should point to the linker binary for
217 # the target platform. If it is not defined, simply define it to the legacy
218 # default value 'link.exe'.
224 # Check for the predefined command macro RC. This should point to the resource
225 # compiler binary for the target platform. If it is not defined, simply define
226 # it to the legacy default value 'rc.exe'.
232 # Check for the MSVC runtime library path macro. Othertise, this value will
233 # default to the 'lib' directory underneath the MSVC installation directory.
236 CRTLIBPATH = $(VCINSTALLDIR)\lib
239 CRTLIBPATH = $(CRTLIBPATH:\\=\)
241 # Check for the command macro NCC. This should point to the compiler binary
242 # for the platform the compilation process is taking place on. If it is not
243 # defined, simply define it to have the same value as the CC macro. When
244 # cross-compiling, it is suggested that this macro be modified via the command
245 # line (since nmake itself does not provide a built-in method to guess it).
246 # For example, to use the x86 compiler when cross-compiling for x64, a command
247 # line similar to the following could be used (all on one line):
249 # nmake /f Makefile.msc sqlite3.dll
250 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
252 # Alternatively, the full path and file name to the compiler binary for the
253 # platform the compilation process is taking place may be specified (all on
256 # nmake /f Makefile.msc sqlite3.dll
257 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
258 # USE_NATIVE_LIBPATHS=1
262 !ELSEIF $(XCOMPILE)!=0
263 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
269 # Check for the MSVC native runtime library path macro. Othertise,
270 # this value will default to the 'lib' directory underneath the MSVC
271 # installation directory.
274 NCRTLIBPATH = $(VCINSTALLDIR)\lib
277 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
279 # Check for the Platform SDK library path macro. Othertise, this
280 # value will default to the 'lib' directory underneath the Windows
281 # SDK installation directory (the environment variable used appears
282 # to be available when using Visual C++ 2008 or later via the
286 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
289 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
291 # C compiler and options for use in building executables that
292 # will run on the platform that is doing the build.
294 !IF $(USE_FULLWARN)!=0
295 BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
297 BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
300 # Check if assembly code listings should be generated for the source
301 # code files to be compiled.
303 !IF $(USE_LISTINGS)!=0
307 # Check if the native library paths should be used when compiling
308 # the command line tools used during the compilation process. If
309 # so, set the necessary macro now.
311 !IF $(USE_NATIVE_LIBPATHS)!=0
312 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
315 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
316 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
320 # C compiler and options for use in building executables that
321 # will run on the target platform. (BCC and TCC are usually the
322 # same unless your are cross-compiling.)
324 !IF $(USE_FULLWARN)!=0
325 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
327 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
330 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
331 RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
333 # Check if we want to use the "stdcall" calling convention when compiling.
334 # This is not supported by the compilers for non-x86 platforms. It should
335 # also be noted here that building any target with these "stdcall" options
336 # will most likely fail if the Tcl library is also required. This is due
337 # to how the Tcl library functions are declared and exported (i.e. without
338 # an explicit calling convention, which results in "cdecl").
340 !IF $(USE_STDCALL)!=0
341 !IF "$(PLATFORM)"=="x86"
342 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
343 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
346 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
347 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
358 # These are additional compiler options used for the core library.
360 !IFNDEF CORE_COMPILE_OPTS
361 !IF $(DYNAMIC_SHELL)!=0
362 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
364 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
368 # These are the additional targets that the core library should depend on
371 !IFNDEF CORE_LINK_DEP
372 !IF $(DYNAMIC_SHELL)!=0
375 CORE_LINK_DEP = sqlite3.def
379 # These are additional linker options used for the core library.
381 !IFNDEF CORE_LINK_OPTS
382 !IF $(DYNAMIC_SHELL)!=0
385 CORE_LINK_OPTS = /DEF:sqlite3.def
389 # These are additional compiler options used for the shell executable.
391 !IFNDEF SHELL_COMPILE_OPTS
392 !IF $(DYNAMIC_SHELL)!=0
393 SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
395 SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS)
399 # This is the core library that the shell executable should depend on.
401 !IFNDEF SHELL_CORE_DEP
402 !IF $(DYNAMIC_SHELL)!=0
403 SHELL_CORE_DEP = sqlite3.dll
405 SHELL_CORE_DEP = libsqlite3.lib
409 # This is the core library that the shell executable should link with.
411 !IFNDEF SHELL_CORE_LIB
412 !IF $(DYNAMIC_SHELL)!=0
413 SHELL_CORE_LIB = sqlite3.lib
415 SHELL_CORE_LIB = libsqlite3.lib
419 # These are additional linker options used for the shell executable.
421 !IFNDEF SHELL_LINK_OPTS
422 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
425 # Check if assembly code listings should be generated for the source
426 # code files to be compiled.
428 !IF $(USE_LISTINGS)!=0
432 # When compiling the library for use in the WinRT environment,
433 # the following compile-time options must be used as well to
434 # disable use of Win32 APIs that are not available and to enable
435 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
438 TCC = $(TCC) -DSQLITE_OS_WINRT=1
439 RCC = $(RCC) -DSQLITE_OS_WINRT=1
440 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
441 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
444 # Also, we need to dynamically link to the correct MSVC runtime
445 # when compiling for WinRT (e.g. debug or release) OR if the
446 # USE_CRT_DLL option is set to force dynamically linking to the
447 # MSVC runtime library.
449 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
467 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
468 # any extension header files by default. For non-amalgamation
469 # builds, we need to make sure the compiler can find these.
471 !IF $(USE_AMALGAMATION)==0
472 TCC = $(TCC) -I$(TOP)\ext\fts3
473 RCC = $(RCC) -I$(TOP)\ext\fts3
474 TCC = $(TCC) -I$(TOP)\ext\rtree
475 RCC = $(RCC) -I$(TOP)\ext\rtree
478 # The mksqlite3c.tcl script accepts some options on the command
479 # line. When compiling with debugging enabled, some of these
480 # options are necessary in order to allow debugging symbols to
481 # work correctly with Visual Studio when using the amalgamation.
483 !IFNDEF MKSQLITE3C_ARGS
485 MKSQLITE3C_ARGS = --linemacros
491 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
492 # Omitting the define will cause extra debugging code to be inserted and
493 # includes extra comments when "EXPLAIN stmt" is used.
496 TCC = $(TCC) -DNDEBUG
497 BCC = $(BCC) -DNDEBUG
498 RCC = $(RCC) -DNDEBUG
501 !IF $(DEBUG)>0 || $(API_ARMOR)!=0
502 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
503 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
507 TCC = $(TCC) -DSQLITE_DEBUG=1
508 RCC = $(RCC) -DSQLITE_DEBUG=1
511 !IF $(DEBUG)>4 || $(OSTRACE)!=0
512 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
513 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
517 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
518 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
521 # Prevent warnings about "insecure" MSVC runtime library functions
524 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
525 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
526 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
528 # Prevent warnings about "deprecated" POSIX functions being used.
530 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
531 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
532 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
534 # Use the SQLite debugging heap subsystem?
537 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
538 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
540 # Use native Win32 heap subsystem instead of malloc/free?
542 !ELSEIF $(WIN32HEAP)!=0
543 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
544 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
546 # Validate the heap on every call into the native Win32 heap subsystem?
549 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
550 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
554 # The locations of the Tcl header and library files. Also, the library that
555 # non-stubs enabled programs using Tcl must link against. These variables
556 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
557 # prior to running nmake in order to match the actual installed location and
558 # version on this machine.
561 TCLINCDIR = c:\tcl\include
565 TCLLIBDIR = c:\tcl\lib
573 LIBTCLSTUB = tclstub85.lib
577 LIBTCLPATH = c:\tcl\bin
580 # The locations of the ICU header and library files. These variables
581 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
582 # prior to running nmake in order to match the actual installed location on
586 ICUINCDIR = c:\icu\include
590 ICULIBDIR = c:\icu\lib
594 LIBICU = icuuc.lib icuin.lib
597 # This is the command to use for tclsh - normally just "tclsh", but we may
598 # know the specific version we want to use. This variable (TCLSH_CMD) may be
599 # overridden via the environment prior to running nmake in order to select a
600 # specific Tcl shell to use.
606 # Compiler options needed for programs that use the readline() library.
608 !IFNDEF READLINE_FLAGS
609 READLINE_FLAGS = -DHAVE_READLINE=0
612 # The library that programs using readline() must link against.
618 # Should the database engine be compiled threadsafe
620 TCC = $(TCC) -DSQLITE_THREADSAFE=1
621 RCC = $(RCC) -DSQLITE_THREADSAFE=1
623 # Do threads override each others locks by default (1), or do we test (-1)
625 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
626 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
628 # Any target libraries which libsqlite must be linked against
634 # Flags controlling use of the in memory btree implementation
636 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
637 # default to file, 2 to default to memory, and 3 to force temporary
638 # tables to always be in memory.
640 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
641 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
643 # Enable/disable loadable extensions, and other optional features
644 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
645 # The same set of OMIT and ENABLE flags should be passed to the
646 # LEMON parser generator and the mkkeywordhash tool as well.
648 # These are the required SQLite compilation options used when compiling for
649 # the Windows platform.
651 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
653 # If we are linking to the RPCRT4 library, enable features that need it.
655 !IF $(USE_RPCRT4_LIB)!=0
656 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
659 # Add the required and optional SQLite compilation options into the command
660 # lines used to invoke the MSVC code and resource compilers.
662 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
663 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
665 # Add in any optional parameters specified on the commane line, e.g.
666 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
671 # If compiling for debugging, add some defines.
674 TCC = $(TCC) -D_DEBUG
675 BCC = $(BCC) -D_DEBUG
676 RCC = $(RCC) -D_DEBUG
679 # If optimizations are enabled or disabled (either implicitly or
680 # explicitly), add the necessary flags.
682 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
685 !ELSEIF $(OPTIMIZATIONS)>=3
688 !ELSEIF $(OPTIMIZATIONS)==2
691 !ELSEIF $(OPTIMIZATIONS)==1
696 # If symbols are enabled (or compiling for debugging), enable PDBs.
698 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
703 # If ICU support is enabled, add the compiler options for it.
706 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
707 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
708 TCC = $(TCC) -I$(TOP)\ext\icu
709 RCC = $(RCC) -I$(TOP)\ext\icu
710 TCC = $(TCC) -I$(ICUINCDIR)
711 RCC = $(RCC) -I$(ICUINCDIR)
714 # Command line prefixes for compiling code, compiling resources,
717 LTCOMPILE = $(TCC) -Fo$@
718 LTRCOMPILE = $(RCC) -r
720 LTLINK = $(TCC) -Fe$@
722 # If requested, link to the RPCRT4 library.
724 !IF $(USE_RPCRT4_LIB)!=0
725 LTLINK = $(LTLINK) rpcrt4.lib
728 # If a platform was set, force the linker to target that.
729 # Note that the vcvars*.bat family of batch files typically
730 # set this for you. Otherwise, the linker will attempt
731 # to deduce the binary type based on the object files.
733 LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
734 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
740 # When compiling for use in the WinRT environment, the following
741 # linker option must be used to mark the executable as runnable
742 # only in the context of an application container.
745 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
746 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
748 !IF "$(PLATFORM)"=="x86"
749 STORELIBPATH = $(CRTLIBPATH)\store
750 !ELSEIF "$(PLATFORM)"=="x64"
751 STORELIBPATH = $(CRTLIBPATH)\store\amd64
752 !ELSEIF "$(PLATFORM)"=="ARM"
753 STORELIBPATH = $(CRTLIBPATH)\store\arm
755 STORELIBPATH = $(CRTLIBPATH)\store
758 STORELIBPATH = $(STORELIBPATH:\\=\)
759 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
763 # When compiling for Windows Phone 8.1, an extra library path is
766 !IF $(USE_WP81_OPTS)!=0
768 !IF "$(PLATFORM)"=="x86"
769 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
770 !ELSEIF "$(PLATFORM)"=="ARM"
771 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
773 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
778 # When compiling for Windows Phone 8.1, some extra linker options
781 !IF $(USE_WP81_OPTS)!=0
783 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
785 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
786 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
787 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
790 # When compiling for UAP, some extra linker options are also required.
793 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
794 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
796 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
800 # If either debugging or symbols are enabled, enable PDBs.
802 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
803 LDFLAGS = /DEBUG $(LDOPTS)
808 # Start with the Tcl related linker options.
811 LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
815 # If ICU support is enabled, add the linker options for it.
818 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
819 LTLIBS = $(LTLIBS) $(LIBICU)
822 # You should not have to change anything below this line
823 ###############################################################################
825 # Object files for the SQLite library (non-amalgamation).
827 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
828 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
829 callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
830 expr.lo fault.lo fkey.lo \
831 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
832 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
833 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
835 func.lo global.lo hash.lo \
836 icu.lo insert.lo journal.lo legacy.lo loadext.lo \
837 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
839 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
840 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
841 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
842 random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
843 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
844 update.lo util.lo vacuum.lo \
845 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
846 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
849 # Object files for the amalgamation.
851 LIBOBJS1 = sqlite3.lo
853 # Determine the real value of LIBOBJ based on the 'configure' script
855 !IF $(USE_AMALGAMATION)==0
861 # Determine if embedded resource compilation and usage are enabled.
864 LIBRESOBJS = sqlite3res.lo
869 # All of the source code files.
873 $(TOP)\src\analyze.c \
874 $(TOP)\src\attach.c \
876 $(TOP)\src\backup.c \
877 $(TOP)\src\bitvec.c \
878 $(TOP)\src\btmutex.c \
881 $(TOP)\src\btreeInt.h \
883 $(TOP)\src\callback.c \
884 $(TOP)\src\complete.c \
887 $(TOP)\src\dbstat.c \
888 $(TOP)\src\delete.c \
893 $(TOP)\src\global.c \
896 $(TOP)\src\hwtime.h \
897 $(TOP)\src\insert.c \
898 $(TOP)\src\journal.c \
899 $(TOP)\src\legacy.c \
900 $(TOP)\src\loadext.c \
902 $(TOP)\src\malloc.c \
908 $(TOP)\src\memjournal.c \
912 $(TOP)\src\mutex_noop.c \
913 $(TOP)\src\mutex_unix.c \
914 $(TOP)\src\mutex_w32.c \
915 $(TOP)\src\notify.c \
918 $(TOP)\src\os_common.h \
919 $(TOP)\src\os_setup.h \
920 $(TOP)\src\os_unix.c \
921 $(TOP)\src\os_win.c \
927 $(TOP)\src\pcache.c \
928 $(TOP)\src\pcache.h \
929 $(TOP)\src\pcache1.c \
930 $(TOP)\src\pragma.c \
931 $(TOP)\src\pragma.h \
932 $(TOP)\src\prepare.c \
933 $(TOP)\src\printf.c \
934 $(TOP)\src\random.c \
935 $(TOP)\src\resolve.c \
936 $(TOP)\src\rowset.c \
937 $(TOP)\src\select.c \
938 $(TOP)\src\status.c \
940 $(TOP)\src\sqlite.h.in \
941 $(TOP)\src\sqlite3ext.h \
942 $(TOP)\src\sqliteInt.h \
943 $(TOP)\src\sqliteLimit.h \
945 $(TOP)\src\threads.c \
946 $(TOP)\src\tclsqlite.c \
947 $(TOP)\src\tokenize.c \
948 $(TOP)\src\treeview.c \
949 $(TOP)\src\trigger.c \
951 $(TOP)\src\update.c \
953 $(TOP)\src\vacuum.c \
956 $(TOP)\src\vdbeapi.c \
957 $(TOP)\src\vdbeaux.c \
958 $(TOP)\src\vdbeblob.c \
959 $(TOP)\src\vdbemem.c \
960 $(TOP)\src\vdbesort.c \
961 $(TOP)\src\vdbetrace.c \
962 $(TOP)\src\vdbeInt.h \
964 $(TOP)\src\vxworks.h \
967 $(TOP)\src\walker.c \
969 $(TOP)\src\wherecode.c \
970 $(TOP)\src\whereexpr.c \
971 $(TOP)\src\whereInt.h
973 # Source code for extensions
976 $(TOP)\ext\fts1\fts1.c \
977 $(TOP)\ext\fts1\fts1.h \
978 $(TOP)\ext\fts1\fts1_hash.c \
979 $(TOP)\ext\fts1\fts1_hash.h \
980 $(TOP)\ext\fts1\fts1_porter.c \
981 $(TOP)\ext\fts1\fts1_tokenizer.h \
982 $(TOP)\ext\fts1\fts1_tokenizer1.c \
983 $(TOP)\ext\fts2\fts2.c \
984 $(TOP)\ext\fts2\fts2.h \
985 $(TOP)\ext\fts2\fts2_hash.c \
986 $(TOP)\ext\fts2\fts2_hash.h \
987 $(TOP)\ext\fts2\fts2_icu.c \
988 $(TOP)\ext\fts2\fts2_porter.c \
989 $(TOP)\ext\fts2\fts2_tokenizer.h \
990 $(TOP)\ext\fts2\fts2_tokenizer.c \
991 $(TOP)\ext\fts2\fts2_tokenizer1.c
993 $(TOP)\ext\fts3\fts3.c \
994 $(TOP)\ext\fts3\fts3.h \
995 $(TOP)\ext\fts3\fts3Int.h \
996 $(TOP)\ext\fts3\fts3_aux.c \
997 $(TOP)\ext\fts3\fts3_expr.c \
998 $(TOP)\ext\fts3\fts3_hash.c \
999 $(TOP)\ext\fts3\fts3_hash.h \
1000 $(TOP)\ext\fts3\fts3_icu.c \
1001 $(TOP)\ext\fts3\fts3_porter.c \
1002 $(TOP)\ext\fts3\fts3_snippet.c \
1003 $(TOP)\ext\fts3\fts3_tokenizer.h \
1004 $(TOP)\ext\fts3\fts3_tokenizer.c \
1005 $(TOP)\ext\fts3\fts3_tokenizer1.c \
1006 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1007 $(TOP)\ext\fts3\fts3_unicode.c \
1008 $(TOP)\ext\fts3\fts3_unicode2.c \
1009 $(TOP)\ext\fts3\fts3_write.c \
1010 $(TOP)\ext\icu\sqliteicu.h \
1011 $(TOP)\ext\icu\icu.c \
1012 $(TOP)\ext\rtree\rtree.h \
1013 $(TOP)\ext\rtree\rtree.c \
1014 $(TOP)\ext\rbu\sqlite3rbu.h \
1015 $(TOP)\ext\rbu\sqlite3rbu.c \
1016 $(TOP)\ext\misc\json1.c
1019 # Generated source code files
1029 # All source code files.
1031 SRC = $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5)
1033 # Source code to the test files.
1036 $(TOP)\src\test1.c \
1037 $(TOP)\src\test2.c \
1038 $(TOP)\src\test3.c \
1039 $(TOP)\src\test4.c \
1040 $(TOP)\src\test5.c \
1041 $(TOP)\src\test6.c \
1042 $(TOP)\src\test7.c \
1043 $(TOP)\src\test8.c \
1044 $(TOP)\src\test9.c \
1045 $(TOP)\src\test_autoext.c \
1046 $(TOP)\src\test_async.c \
1047 $(TOP)\src\test_backup.c \
1048 $(TOP)\src\test_blob.c \
1049 $(TOP)\src\test_btree.c \
1050 $(TOP)\src\test_config.c \
1051 $(TOP)\src\test_demovfs.c \
1052 $(TOP)\src\test_devsym.c \
1053 $(TOP)\src\test_fs.c \
1054 $(TOP)\src\test_func.c \
1055 $(TOP)\src\test_hexio.c \
1056 $(TOP)\src\test_init.c \
1057 $(TOP)\src\test_intarray.c \
1058 $(TOP)\src\test_journal.c \
1059 $(TOP)\src\test_malloc.c \
1060 $(TOP)\src\test_multiplex.c \
1061 $(TOP)\src\test_mutex.c \
1062 $(TOP)\src\test_onefile.c \
1063 $(TOP)\src\test_osinst.c \
1064 $(TOP)\src\test_pcache.c \
1065 $(TOP)\src\test_quota.c \
1066 $(TOP)\src\test_rtree.c \
1067 $(TOP)\src\test_schema.c \
1068 $(TOP)\src\test_server.c \
1069 $(TOP)\src\test_superlock.c \
1070 $(TOP)\src\test_syscall.c \
1071 $(TOP)\src\test_tclvar.c \
1072 $(TOP)\src\test_thread.c \
1073 $(TOP)\src\test_vfs.c \
1074 $(TOP)\src\test_windirent.c \
1075 $(TOP)\src\test_wsd.c \
1076 $(TOP)\ext\fts3\fts3_term.c \
1077 $(TOP)\ext\fts3\fts3_test.c \
1078 $(TOP)\ext\rbu\test_rbu.c
1080 # Statically linked extensions
1083 $(TOP)\ext\misc\amatch.c \
1084 $(TOP)\ext\misc\closure.c \
1085 $(TOP)\ext\misc\eval.c \
1086 $(TOP)\ext\misc\fileio.c \
1087 $(TOP)\ext\misc\fuzzer.c \
1088 $(TOP)\ext\fts5\fts5_tcl.c \
1089 $(TOP)\ext\fts5\fts5_test_mi.c \
1090 $(TOP)\ext\misc\ieee754.c \
1091 $(TOP)\ext\misc\nextchar.c \
1092 $(TOP)\ext\misc\percentile.c \
1093 $(TOP)\ext\misc\regexp.c \
1094 $(TOP)\ext\misc\series.c \
1095 $(TOP)\ext\misc\spellfix.c \
1096 $(TOP)\ext\misc\totype.c \
1097 $(TOP)\ext\misc\wholenumber.c
1100 # Source code to the library files needed by the test fixture
1103 $(TOP)\src\attach.c \
1104 $(TOP)\src\backup.c \
1105 $(TOP)\src\bitvec.c \
1106 $(TOP)\src\btree.c \
1107 $(TOP)\src\build.c \
1108 $(TOP)\src\ctime.c \
1110 $(TOP)\src\dbstat.c \
1113 $(TOP)\src\insert.c \
1118 $(TOP)\src\os_unix.c \
1119 $(TOP)\src\os_win.c \
1120 $(TOP)\src\pager.c \
1121 $(TOP)\src\pragma.c \
1122 $(TOP)\src\prepare.c \
1123 $(TOP)\src\printf.c \
1124 $(TOP)\src\random.c \
1125 $(TOP)\src\pcache.c \
1126 $(TOP)\src\pcache1.c \
1127 $(TOP)\src\select.c \
1128 $(TOP)\src\tokenize.c \
1131 $(TOP)\src\vdbeapi.c \
1132 $(TOP)\src\vdbeaux.c \
1134 $(TOP)\src\vdbemem.c \
1135 $(TOP)\src\vdbesort.c \
1136 $(TOP)\src\vdbetrace.c \
1137 $(TOP)\src\where.c \
1138 $(TOP)\src\wherecode.c \
1139 $(TOP)\src\whereexpr.c \
1141 $(TOP)\ext\fts3\fts3.c \
1142 $(TOP)\ext\fts3\fts3_aux.c \
1143 $(TOP)\ext\fts3\fts3_expr.c \
1144 $(TOP)\ext\fts3\fts3_tokenizer.c \
1145 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1146 $(TOP)\ext\fts3\fts3_unicode.c \
1147 $(TOP)\ext\fts3\fts3_unicode2.c \
1148 $(TOP)\ext\fts3\fts3_write.c \
1149 $(TOP)\ext\async\sqlite3async.c
1151 # Header files used by all library source files.
1154 $(TOP)\src\btree.h \
1155 $(TOP)\src\btreeInt.h \
1157 $(TOP)\src\hwtime.h \
1160 $(TOP)\src\mutex.h \
1163 $(TOP)\src\os_common.h \
1164 $(TOP)\src\os_setup.h \
1165 $(TOP)\src\os_win.h \
1166 $(TOP)\src\pager.h \
1167 $(TOP)\src\pcache.h \
1169 $(TOP)\src\pragma.h \
1171 $(TOP)\src\sqlite3ext.h \
1172 $(TOP)\src\sqliteInt.h \
1173 $(TOP)\src\sqliteLimit.h \
1175 $(TOP)\src\vdbeInt.h \
1176 $(TOP)\src\vxworks.h \
1177 $(TOP)\src\whereInt.h
1179 # Header files used by extensions
1181 EXTHDR = $(EXTHDR) \
1182 $(TOP)\ext\fts1\fts1.h \
1183 $(TOP)\ext\fts1\fts1_hash.h \
1184 $(TOP)\ext\fts1\fts1_tokenizer.h
1185 EXTHDR = $(EXTHDR) \
1186 $(TOP)\ext\fts2\fts2.h \
1187 $(TOP)\ext\fts2\fts2_hash.h \
1188 $(TOP)\ext\fts2\fts2_tokenizer.h
1189 EXTHDR = $(EXTHDR) \
1190 $(TOP)\ext\fts3\fts3.h \
1191 $(TOP)\ext\fts3\fts3Int.h \
1192 $(TOP)\ext\fts3\fts3_hash.h \
1193 $(TOP)\ext\fts3\fts3_tokenizer.h
1194 EXTHDR = $(EXTHDR) \
1195 $(TOP)\ext\rtree\rtree.h
1196 EXTHDR = $(EXTHDR) \
1197 $(TOP)\ext\icu\sqliteicu.h
1198 EXTHDR = $(EXTHDR) \
1199 $(TOP)\ext\rtree\sqlite3rtree.h
1201 # executables needed for testing
1206 sqlite3_analyzer.exe \
1209 # Databases containing fuzzer test cases
1212 $(TOP)\test\fuzzdata1.db \
1213 $(TOP)\test\fuzzdata2.db \
1214 $(TOP)\test\fuzzdata3.db \
1215 $(TOP)\test\fuzzdata4.db
1217 # Extra compiler options for various shell tools
1219 SHELL_COMPILE_OPTS = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
1220 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1221 FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1223 # Standard options to testfixture
1225 TESTOPTS = --verbose=file --output=test-out.txt
1227 # This is the default Makefile target. The objects listed here
1228 # are what get build when you type just "make" with no arguments.
1230 all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
1232 libsqlite3.lib: $(LIBOBJ)
1233 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1235 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1236 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1238 sqlite3.exe: $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h
1239 $(LTLINK) $(SHELL_COMPILE_OPTS) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c \
1240 /link /pdb:sqlite3sh.pdb $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1242 sqldiff.exe: $(TOP)\tool\sqldiff.c sqlite3.c sqlite3.h
1243 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c sqlite3.c /link $(LDFLAGS) $(LTLINKOPTS)
1245 fuzzershell.exe: $(TOP)\tool\fuzzershell.c sqlite3.c sqlite3.h
1246 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) \
1247 $(TOP)\tool\fuzzershell.c sqlite3.c /link $(LDFLAGS) $(LTLINKOPTS)
1249 fuzzcheck.exe: $(TOP)\test\fuzzcheck.c sqlite3.c sqlite3.h
1250 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(TOP)\test\fuzzcheck.c sqlite3.c /link $(LDFLAGS) $(LTLINKOPTS)
1252 mptester.exe: $(TOP)\mptest\mptest.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h
1253 $(LTLINK) $(NO_WARN) $(SHELL_COMPILE_OPTS) $(TOP)\mptest\mptest.c \
1254 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(SHELL_LINK_OPTS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1256 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1257 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1259 mptest: mptester.exe
1260 del /Q mptest.db 2>NUL
1261 $(MPTEST1) --journalmode DELETE
1262 $(MPTEST2) --journalmode WAL
1263 $(MPTEST1) --journalmode WAL
1264 $(MPTEST2) --journalmode PERSIST
1265 $(MPTEST1) --journalmode PERSIST
1266 $(MPTEST2) --journalmode TRUNCATE
1267 $(MPTEST1) --journalmode TRUNCATE
1268 $(MPTEST2) --journalmode DELETE
1270 # This target creates a directory named "tsrc" and fills it with
1271 # copies of all of the C source code and header files needed to
1272 # build on the target system. Some of the C source code and header
1273 # files are automatically generated. This target takes care of
1274 # all that automatic generation.
1276 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c
1277 -rmdir /Q/S tsrc 2>NUL
1279 for %i in ($(SRC1)) do copy /Y %i tsrc
1280 for %i in ($(SRC2)) do copy /Y %i tsrc
1281 for %i in ($(SRC3)) do copy /Y %i tsrc
1282 for %i in ($(SRC4)) do copy /Y %i tsrc
1283 for %i in ($(SRC5)) do copy /Y %i tsrc
1286 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1287 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1288 move vdbe.new tsrc\vdbe.c
1289 echo > .target_source
1291 sqlite3.c: .target_source sqlite3ext.h $(TOP)\tool\mksqlite3c.tcl
1292 $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS)
1295 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1296 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1298 # Set the source code file to be used by executables and libraries when
1299 # they need the amalgamation.
1301 !IF $(SPLIT_AMALGAMATION)!=0
1302 SQLITE3C = sqlite3-all.c
1304 SQLITE3C = sqlite3.c
1307 # Rule to build the amalgamation
1309 sqlite3.lo: $(SQLITE3C)
1310 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1312 # Rules to build the LEMON compiler generator
1314 lempar.c: $(TOP)\tool\lempar.c
1315 copy $(TOP)\tool\lempar.c .
1317 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1318 $(BCC) $(NO_WARN) -Daccess=_access \
1319 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1321 # Rules to build individual *.lo files from generated *.c files. This
1327 parse.lo: parse.c $(HDR)
1328 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1330 opcodes.lo: opcodes.c
1331 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1333 # Rule to build the Win32 resources object file.
1336 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR)
1337 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1338 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1339 echo #define SQLITE_RESOURCE_VERSION %%V \
1340 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1342 echo #endif >> sqlite3rc.h
1343 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1346 # Rules to build individual *.lo files from files in the src directory.
1348 alter.lo: $(TOP)\src\alter.c $(HDR)
1349 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1351 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1352 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1354 attach.lo: $(TOP)\src\attach.c $(HDR)
1355 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1357 auth.lo: $(TOP)\src\auth.c $(HDR)
1358 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1360 backup.lo: $(TOP)\src\backup.c $(HDR)
1361 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1363 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1364 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1366 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1367 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1369 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1370 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1372 build.lo: $(TOP)\src\build.c $(HDR)
1373 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1375 callback.lo: $(TOP)\src\callback.c $(HDR)
1376 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1378 complete.lo: $(TOP)\src\complete.c $(HDR)
1379 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1381 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1382 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1384 date.lo: $(TOP)\src\date.c $(HDR)
1385 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1387 dbstat.lo: $(TOP)\src\date.c $(HDR)
1388 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1390 delete.lo: $(TOP)\src\delete.c $(HDR)
1391 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1393 expr.lo: $(TOP)\src\expr.c $(HDR)
1394 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1396 fault.lo: $(TOP)\src\fault.c $(HDR)
1397 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1399 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1400 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1402 func.lo: $(TOP)\src\func.c $(HDR)
1403 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1405 global.lo: $(TOP)\src\global.c $(HDR)
1406 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1408 hash.lo: $(TOP)\src\hash.c $(HDR)
1409 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1411 insert.lo: $(TOP)\src\insert.c $(HDR)
1412 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1414 journal.lo: $(TOP)\src\journal.c $(HDR)
1415 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\journal.c
1417 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1418 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1420 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1421 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1423 main.lo: $(TOP)\src\main.c $(HDR)
1424 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1426 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1427 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
1429 mem0.lo: $(TOP)\src\mem0.c $(HDR)
1430 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
1432 mem1.lo: $(TOP)\src\mem1.c $(HDR)
1433 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
1435 mem2.lo: $(TOP)\src\mem2.c $(HDR)
1436 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
1438 mem3.lo: $(TOP)\src\mem3.c $(HDR)
1439 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
1441 mem5.lo: $(TOP)\src\mem5.c $(HDR)
1442 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
1444 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
1445 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
1447 mutex.lo: $(TOP)\src\mutex.c $(HDR)
1448 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
1450 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
1451 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
1453 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
1454 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
1456 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
1457 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
1459 notify.lo: $(TOP)\src\notify.c $(HDR)
1460 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
1462 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1463 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
1465 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1466 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
1468 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1469 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
1471 os.lo: $(TOP)\src\os.c $(HDR)
1472 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
1474 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
1475 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
1477 os_win.lo: $(TOP)\src\os_win.c $(HDR)
1478 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
1480 pragma.lo: $(TOP)\src\pragma.c $(HDR)
1481 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
1483 prepare.lo: $(TOP)\src\prepare.c $(HDR)
1484 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
1486 printf.lo: $(TOP)\src\printf.c $(HDR)
1487 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
1489 random.lo: $(TOP)\src\random.c $(HDR)
1490 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
1492 resolve.lo: $(TOP)\src\resolve.c $(HDR)
1493 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
1495 rowset.lo: $(TOP)\src\rowset.c $(HDR)
1496 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
1498 select.lo: $(TOP)\src\select.c $(HDR)
1499 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
1501 status.lo: $(TOP)\src\status.c $(HDR)
1502 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
1504 table.lo: $(TOP)\src\table.c $(HDR)
1505 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
1507 threads.lo: $(TOP)\src\threads.c $(HDR)
1508 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
1510 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
1511 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
1513 treeview.lo: $(TOP)\src\treeview.c $(HDR)
1514 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
1516 trigger.lo: $(TOP)\src\trigger.c $(HDR)
1517 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
1519 update.lo: $(TOP)\src\update.c $(HDR)
1520 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
1522 utf.lo: $(TOP)\src\utf.c $(HDR)
1523 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
1525 util.lo: $(TOP)\src\util.c $(HDR)
1526 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
1528 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
1529 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
1531 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
1532 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
1534 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
1535 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
1537 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
1538 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
1540 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
1541 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
1543 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
1544 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
1546 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
1547 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
1549 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
1550 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
1552 vtab.lo: $(TOP)\src\vtab.c $(HDR)
1553 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
1555 wal.lo: $(TOP)\src\wal.c $(HDR)
1556 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
1558 walker.lo: $(TOP)\src\walker.c $(HDR)
1559 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
1561 where.lo: $(TOP)\src\where.c $(HDR)
1562 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
1564 wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
1565 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
1567 whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
1568 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
1570 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
1571 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1573 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
1574 $(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1576 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(LIBRESOBJS)
1577 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1579 # Rules to build opcodes.c and opcodes.h
1581 opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
1582 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
1584 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
1585 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
1587 # Rules to build parse.c and parse.h - the outputs of lemon.
1591 parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
1592 del /Q parse.y parse.h parse.h.temp 2>NUL
1593 copy $(TOP)\src\parse.y .
1594 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
1595 move parse.h parse.h.temp
1596 $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
1598 sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
1599 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h
1601 sqlite3ext.h: .target_source
1602 copy tsrc\sqlite3ext.h .
1604 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
1605 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \
1606 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1608 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
1609 .\mkkeywordhash.exe > keywordhash.h
1613 # Rules to build the extension objects.
1615 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1616 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1618 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1619 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1621 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
1622 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
1624 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
1625 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
1627 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
1628 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
1630 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
1631 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
1633 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
1634 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
1636 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
1637 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
1639 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
1640 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
1642 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
1643 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
1645 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
1646 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
1648 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
1649 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
1651 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
1652 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
1654 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
1655 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
1657 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
1658 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
1660 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
1661 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
1663 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1664 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
1666 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
1667 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
1669 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
1670 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
1672 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
1673 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
1675 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
1676 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
1681 $(TOP)\ext\fts5\fts5.h \
1682 $(TOP)\ext\fts5\fts5Int.h \
1683 $(TOP)\ext\fts5\fts5_aux.c \
1684 $(TOP)\ext\fts5\fts5_buffer.c \
1685 $(TOP)\ext\fts5\fts5_main.c \
1686 $(TOP)\ext\fts5\fts5_config.c \
1687 $(TOP)\ext\fts5\fts5_expr.c \
1688 $(TOP)\ext\fts5\fts5_hash.c \
1689 $(TOP)\ext\fts5\fts5_index.c \
1690 fts5parse.c fts5parse.h \
1691 $(TOP)\ext\fts5\fts5_storage.c \
1692 $(TOP)\ext\fts5\fts5_tokenize.c \
1693 $(TOP)\ext\fts5\fts5_unicode2.c \
1694 $(TOP)\ext\fts5\fts5_varint.c \
1695 $(TOP)\ext\fts5\fts5_vocab.c
1697 fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
1698 copy $(TOP)\ext\fts5\fts5parse.y .
1699 del /Q fts5parse.h 2>NUL
1700 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) fts5parse.y
1702 fts5parse.h: fts5parse.c
1705 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
1706 copy $(TOP)\ext\fts5\fts5.h .
1708 fts5.lo: fts5.c $(HDR) $(EXTHDR)
1709 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
1711 fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
1712 $(LTCOMPILE) $(NO_WARN) -c fts5.c
1714 fts5.dll: fts5_ext.lo
1715 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
1717 # Rules to build the 'testfixture' application.
1719 # If using the amalgamation, use sqlite3.c directly to build the test
1720 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
1721 # necessary because the test fixture requires non-API symbols which are
1722 # hidden when the library is built via the amalgamation).
1724 TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
1725 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
1726 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
1728 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) $(SHELL_CORE_DEP)
1729 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
1730 !IF $(USE_AMALGAMATION)==0
1731 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1733 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1736 testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
1737 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
1738 -DBUILD_sqlite -I$(TCLINCDIR) \
1739 $(TESTFIXTURE_SRC) \
1740 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1742 extensiontest: testfixture.exe testloadext.dll
1743 @set PATH=$(LIBTCLPATH);$(PATH)
1744 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
1746 fulltest: $(TESTPROGS) fuzztest
1747 @set PATH=$(LIBTCLPATH);$(PATH)
1748 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
1750 soaktest: $(TESTPROGS)
1751 @set PATH=$(LIBTCLPATH);$(PATH)
1752 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
1754 fulltestonly: $(TESTPROGS) fuzztest
1755 @set PATH=$(LIBTCLPATH);$(PATH)
1756 .\testfixture.exe $(TOP)\test\full.test
1758 queryplantest: testfixture.exe sqlite3.exe
1759 @set PATH=$(LIBTCLPATH);$(PATH)
1760 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
1762 fuzztest: fuzzcheck.exe
1763 .\fuzzcheck.exe $(FUZZDATA)
1765 fastfuzztest: fuzzcheck.exe
1766 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
1768 # Minimal testing that runs in less than 3 minutes (on a fast machine)
1770 quicktest: testfixture.exe
1771 @set PATH=$(LIBTCLPATH);$(PATH)
1772 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
1774 # This is the common case. Run many tests that do not take too long,
1775 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1777 test: $(TESTPROGS) fastfuzztest
1778 @set PATH=$(LIBTCLPATH);$(PATH)
1779 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
1781 smoketest: $(TESTPROGS)
1782 @set PATH=$(LIBTCLPATH);$(PATH)
1783 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
1785 sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
1786 echo #define TCLSH 2 > $@
1787 echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
1788 copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
1789 echo static const char *tclsh_main_loop(void){ >> $@
1790 echo static const char *zMainloop = >> $@
1791 $(TCLSH_CMD) $(TOP)\tool\tostr.tcl $(TOP)\tool\spaceanal.tcl >> $@
1792 echo ; return zMainloop; } >> $@
1794 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
1795 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
1796 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1798 testloadext.lo: $(TOP)\src\test_loadext.c
1799 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
1801 testloadext.dll: testloadext.lo
1802 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
1804 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C)
1805 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1806 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1808 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C)
1809 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1810 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1812 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C)
1813 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1814 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1816 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C)
1817 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1818 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1820 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C)
1821 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1822 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1824 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C)
1825 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1826 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1828 LogEst.exe: $(TOP)\tool\logest.c sqlite3.h
1829 $(LTLINK) $(NO_WARN) -Fe$@ $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
1831 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C)
1832 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1833 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1835 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C)
1836 $(LTLINK) $(NO_WARN) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1837 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1840 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
1841 del /Q *.bsc *.cod *.da *.bb *.bbg gmon.out 2>NUL
1842 del /Q sqlite3.h opcodes.c opcodes.h 2>NUL
1843 del /Q lemon.* lempar.c parse.* 2>NUL
1844 del /Q mkkeywordhash.* keywordhash.h 2>NUL
1845 del /Q notasharedlib.* 2>NUL
1846 -rmdir /Q/S .deps 2>NUL
1847 -rmdir /Q/S .libs 2>NUL
1848 -rmdir /Q/S quota2a 2>NUL
1849 -rmdir /Q/S quota2b 2>NUL
1850 -rmdir /Q/S quota2c 2>NUL
1851 -rmdir /Q/S tsrc 2>NUL
1852 del /Q .target_source 2>NUL
1853 del /Q tclsqlite3.exe 2>NUL
1854 del /Q testloadext.dll 2>NUL
1855 del /Q testfixture.exe test.db 2>NUL
1856 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL
1857 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
1858 del /Q mptester.exe wordcount.exe 2>NUL
1859 del /Q sqlite3.exe sqlite3.dll sqlite3.def 2>NUL
1860 del /Q sqlite3.c sqlite3-*.c 2>NUL
1861 del /Q sqlite3rc.h 2>NUL
1862 del /Q shell.c sqlite3ext.h 2>NUL
1863 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
1864 del /Q sqlite-*-output.vsix 2>NUL
1865 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe 2>NUL
1866 del /Q fts5.* fts5parse.* 2>NUL
1868 # Dynamic link library section.
1872 sqlite3.def: libsqlite3.lib
1873 echo EXPORTS > sqlite3.def
1874 dumpbin /all libsqlite3.lib \
1875 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3_.*)$$" \1 \
1876 | sort >> sqlite3.def
1878 sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1879 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)