Support building for Windows 10 desktop using 'MinCore.lib'.
[sqlite.git] / Makefile.msc
blob3427b8177a406c5dac61a7db44db1b35fbacc435
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".
11 TOP = .
13 # <<mark>>
14 # Set this non-0 to create and use the SQLite amalgamation file.
16 !IFNDEF USE_AMALGAMATION
17 USE_AMALGAMATION = 1
18 !ENDIF
19 # <</mark>>
21 # Set this non-0 to enable full warnings (-W4, etc) when compiling.
23 !IFNDEF USE_FULLWARN
24 USE_FULLWARN = 0
25 !ENDIF
27 # Set this non-0 to use "stdcall" calling convention for the core library
28 # and shell executable.
30 !IFNDEF USE_STDCALL
31 USE_STDCALL = 0
32 !ENDIF
34 # Set this non-0 to have the shell executable link against the core dynamic
35 # link library.
37 !IFNDEF DYNAMIC_SHELL
38 DYNAMIC_SHELL = 0
39 !ENDIF
41 # Set this non-0 to enable extra code that attempts to detect misuse of the
42 # SQLite API.
44 !IFNDEF API_ARMOR
45 API_ARMOR = 0
46 !ENDIF
48 # If necessary, create a list of harmless compiler warnings to disable when
49 # compiling the various tools.  For the SQLite source code itself, warnings,
50 # if any, will be disabled from within it.
52 !IFNDEF NO_WARN
53 !IF $(USE_FULLWARN)!=0
54 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
55 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
56 !ENDIF
57 !ENDIF
59 # Set this non-0 to use the library paths and other options necessary for
60 # Windows Phone 8.1.
62 !IFNDEF USE_WP81_OPTS
63 USE_WP81_OPTS = 0
64 !ENDIF
66 # Set this non-0 to split the SQLite amalgamation file into chunks to
67 # be used for debugging with Visual Studio.
69 !IFNDEF SPLIT_AMALGAMATION
70 SPLIT_AMALGAMATION = 0
71 !ENDIF
73 # <<mark>>
74 # Set this non-0 to use the International Components for Unicode (ICU).
76 !IFNDEF USE_ICU
77 USE_ICU = 0
78 !ENDIF
79 # <</mark>>
81 # Set this non-0 to dynamically link to the MSVC runtime library.
83 !IFNDEF USE_CRT_DLL
84 USE_CRT_DLL = 0
85 !ENDIF
87 # Set this non-0 to link to the RPCRT4 library.
89 !IFNDEF USE_RPCRT4_LIB
90 USE_RPCRT4_LIB = 0
91 !ENDIF
93 # Set this non-0 to generate assembly code listings for the source code
94 # files.
96 !IFNDEF USE_LISTINGS
97 USE_LISTINGS = 0
98 !ENDIF
100 # Set this non-0 to attempt setting the native compiler automatically
101 # for cross-compiling the command line tools needed during the compilation
102 # process.
104 !IFNDEF XCOMPILE
105 XCOMPILE = 0
106 !ENDIF
108 # Set this non-0 to use the native libraries paths for cross-compiling
109 # the command line tools needed during the compilation process.
111 !IFNDEF USE_NATIVE_LIBPATHS
112 USE_NATIVE_LIBPATHS = 0
113 !ENDIF
115 # Set this 0 to skip the compiling and embedding of version resources.
117 !IFNDEF USE_RC
118 USE_RC = 1
119 !ENDIF
121 # Set this non-0 to compile binaries suitable for the WinRT environment.
122 # This setting does not apply to any binaries that require Tcl to operate
123 # properly (i.e. the text fixture, etc).
125 !IFNDEF FOR_WINRT
126 FOR_WINRT = 0
127 !ENDIF
129 # Set this non-0 to compile binaries suitable for the UAP environment.
130 # This setting does not apply to any binaries that require Tcl to operate
131 # properly (i.e. the text fixture, etc).
133 !IFNDEF FOR_UAP
134 FOR_UAP = 0
135 !ENDIF
137 # Set this non-0 to compile binaries suitable for the Windows 10 platform.
139 !IFNDEF FOR_WIN10
140 FOR_WIN10 = 0
141 !ENDIF
143 # <<mark>>
144 # Set this non-0 to skip attempting to look for and/or link with the Tcl
145 # runtime library.
147 !IFNDEF NO_TCL
148 NO_TCL = 0
149 !ENDIF
150 # <</mark>>
152 # Set this to non-0 to create and use PDBs.
154 !IFNDEF SYMBOLS
155 SYMBOLS = 1
156 !ENDIF
158 # Set this to non-0 to use the SQLite debugging heap subsystem.
160 !IFNDEF MEMDEBUG
161 MEMDEBUG = 0
162 !ENDIF
164 # Set this to non-0 to use the Win32 native heap subsystem.
166 !IFNDEF WIN32HEAP
167 WIN32HEAP = 0
168 !ENDIF
170 # Set this to non-0 to enable OSTRACE() macros, which can be useful when
171 # debugging.
173 !IFNDEF OSTRACE
174 OSTRACE = 0
175 !ENDIF
177 # Set this to one of the following values to enable various debugging
178 # features.  Each level includes the debugging options from the previous
179 # levels.  Currently, the recognized values for DEBUG are:
181 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
182 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
183 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
184 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
185 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
186 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
187 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
189 !IFNDEF DEBUG
190 DEBUG = 0
191 !ENDIF
193 # Enable use of available compiler optimizations?  Normally, this should be
194 # non-zero.  Setting this to zero, thus disabling all compiler optimizations,
195 # can be useful for testing.
197 !IFNDEF OPTIMIZATIONS
198 OPTIMIZATIONS = 2
199 !ENDIF
201 # Set the source code file to be used by executables and libraries when
202 # they need the amalgamation.
204 !IFNDEF SQLITE3C
205 !IF $(SPLIT_AMALGAMATION)!=0
206 SQLITE3C = sqlite3-all.c
207 !ELSE
208 SQLITE3C = sqlite3.c
209 !ENDIF
210 !ENDIF
212 # Set the include code file to be used by executables and libraries when
213 # they need SQLite.
215 !IFNDEF SQLITE3H
216 SQLITE3H = sqlite3.h
217 !ENDIF
219 # This is the name to use for the SQLite dynamic link library (DLL).
221 !IFNDEF SQLITE3DLL
222 SQLITE3DLL = sqlite3.dll
223 !ENDIF
225 # This is the name to use for the SQLite import library (LIB).
227 !IFNDEF SQLITE3LIB
228 SQLITE3LIB = sqlite3.lib
229 !ENDIF
231 # This is the name to use for the SQLite shell executable (EXE).
233 !IFNDEF SQLITE3EXE
234 SQLITE3EXE = sqlite3.exe
235 !ENDIF
237 # This is the argument used to set the program database (PDB) file for the
238 # SQLite shell executable (EXE).
240 !IFNDEF SQLITE3EXEPDB
241 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
242 !ENDIF
244 # These are the "standard" SQLite compilation options used when compiling for
245 # the Windows platform.
247 !IFNDEF OPT_FEATURE_FLAGS
248 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
249 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
250 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
251 !ENDIF
253 # These are the "extended" SQLite compilation options used when compiling for
254 # the Windows 10 platform.
256 !IFNDEF EXT_FEATURE_FLAGS
257 !IF $(FOR_WIN10)!=0
258 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
259 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
260 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
261 !ELSE
262 EXT_FEATURE_FLAGS =
263 !ENDIF
264 !ENDIF
266 ###############################################################################
267 ############################### END OF OPTIONS ################################
268 ###############################################################################
270 # This assumes that MSVC is always installed in 32-bit Program Files directory
271 # and sets the variable for use in locating other 32-bit installs accordingly.
273 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
274 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
276 # Check for the predefined command macro CC.  This should point to the compiler
277 # binary for the target platform.  If it is not defined, simply define it to
278 # the legacy default value 'cl.exe'.
280 !IFNDEF CC
281 CC = cl.exe
282 !ENDIF
284 # Check for the command macro LD.  This should point to the linker binary for
285 # the target platform.  If it is not defined, simply define it to the legacy
286 # default value 'link.exe'.
288 !IFNDEF LD
289 LD = link.exe
290 !ENDIF
292 # Check for the predefined command macro RC.  This should point to the resource
293 # compiler binary for the target platform.  If it is not defined, simply define
294 # it to the legacy default value 'rc.exe'.
296 !IFNDEF RC
297 RC = rc.exe
298 !ENDIF
300 # Check for the MSVC runtime library path macro.  Othertise, this value will
301 # default to the 'lib' directory underneath the MSVC installation directory.
303 !IFNDEF CRTLIBPATH
304 CRTLIBPATH = $(VCINSTALLDIR)\lib
305 !ENDIF
307 CRTLIBPATH = $(CRTLIBPATH:\\=\)
309 # Check for the command macro NCC.  This should point to the compiler binary
310 # for the platform the compilation process is taking place on.  If it is not
311 # defined, simply define it to have the same value as the CC macro.  When
312 # cross-compiling, it is suggested that this macro be modified via the command
313 # line (since nmake itself does not provide a built-in method to guess it).
314 # For example, to use the x86 compiler when cross-compiling for x64, a command
315 # line similar to the following could be used (all on one line):
317 #     nmake /f Makefile.msc sqlite3.dll
318 #           XCOMPILE=1 USE_NATIVE_LIBPATHS=1
320 # Alternatively, the full path and file name to the compiler binary for the
321 # platform the compilation process is taking place may be specified (all on
322 # one line):
324 #     nmake /f Makefile.msc sqlite3.dll
325 #           "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
326 #           USE_NATIVE_LIBPATHS=1
328 !IFDEF NCC
329 NCC = $(NCC:\\=\)
330 !ELSEIF $(XCOMPILE)!=0
331 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
332 NCC = $(NCC:\\=\)
333 !ELSE
334 NCC = $(CC)
335 !ENDIF
337 # Check for the MSVC native runtime library path macro.  Othertise,
338 # this value will default to the 'lib' directory underneath the MSVC
339 # installation directory.
341 !IFNDEF NCRTLIBPATH
342 NCRTLIBPATH = $(VCINSTALLDIR)\lib
343 !ENDIF
345 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
347 # Check for the Platform SDK library path macro.  Othertise, this
348 # value will default to the 'lib' directory underneath the Windows
349 # SDK installation directory (the environment variable used appears
350 # to be available when using Visual C++ 2008 or later via the
351 # command line).
353 !IFNDEF NSDKLIBPATH
354 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
355 !ENDIF
357 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
359 # C compiler and options for use in building executables that
360 # will run on the platform that is doing the build.
362 !IF $(USE_FULLWARN)!=0
363 BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
364 !ELSE
365 BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
366 !ENDIF
368 # Check if assembly code listings should be generated for the source
369 # code files to be compiled.
371 !IF $(USE_LISTINGS)!=0
372 BCC = $(BCC) -FAcs
373 !ENDIF
375 # Check if the native library paths should be used when compiling
376 # the command line tools used during the compilation process.  If
377 # so, set the necessary macro now.
379 !IF $(USE_NATIVE_LIBPATHS)!=0
380 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
382 !IFDEF NUCRTLIBPATH
383 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
384 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
385 !ENDIF
386 !ENDIF
388 # C compiler and options for use in building executables that
389 # will run on the target platform.  (BCC and TCC are usually the
390 # same unless your are cross-compiling.)
392 !IF $(USE_FULLWARN)!=0
393 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
394 !ELSE
395 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
396 !ENDIF
398 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src -fp:precise
399 RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
401 # Adjust the names of the primary targets for use with Windows 10.
403 !IF $(FOR_WIN10)!=0
404 SQLITE3DLL = winsqlite3.dll
405 SQLITE3LIB = winsqlite3.lib
406 SQLITE3EXE = winsqlite3shell.exe
407 SQLITE3EXEPDB =
408 !ENDIF
410 # Check if we want to use the "stdcall" calling convention when compiling.
411 # This is not supported by the compilers for non-x86 platforms.  It should
412 # also be noted here that building any target with these "stdcall" options
413 # will most likely fail if the Tcl library is also required.  This is due
414 # to how the Tcl library functions are declared and exported (i.e. without
415 # an explicit calling convention, which results in "cdecl").
417 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
418 !IF "$(PLATFORM)"=="x86"
419 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
420 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
421 !ELSE
422 !IFNDEF PLATFORM
423 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
424 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
425 !ELSE
426 CORE_CCONV_OPTS =
427 SHELL_CCONV_OPTS =
428 !ENDIF
429 !ENDIF
430 !ELSE
431 CORE_CCONV_OPTS =
432 SHELL_CCONV_OPTS =
433 !ENDIF
435 # These are additional compiler options used for the core library.
437 !IFNDEF CORE_COMPILE_OPTS
438 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
439 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
440 !ELSE
441 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
442 !ENDIF
443 !ENDIF
445 # These are the additional targets that the core library should depend on
446 # when linking.
448 !IFNDEF CORE_LINK_DEP
449 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
450 CORE_LINK_DEP =
451 !ELSE
452 CORE_LINK_DEP = sqlite3.def
453 !ENDIF
454 !ENDIF
456 # These are additional linker options used for the core library.
458 !IFNDEF CORE_LINK_OPTS
459 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
460 CORE_LINK_OPTS =
461 !ELSE
462 CORE_LINK_OPTS = /DEF:sqlite3.def
463 !ENDIF
464 !ENDIF
466 # These are additional compiler options used for the shell executable.
468 !IFNDEF SHELL_COMPILE_OPTS
469 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
470 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
471 !ELSE
472 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
473 !ENDIF
474 !ENDIF
476 # This is the source code that the shell executable should be compiled
477 # with.
479 !IFNDEF SHELL_CORE_SRC
480 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
481 SHELL_CORE_SRC =
482 !ELSE
483 SHELL_CORE_SRC = $(SQLITE3C)
484 !ENDIF
485 !ENDIF
487 # This is the core library that the shell executable should depend on.
489 !IFNDEF SHELL_CORE_DEP
490 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
491 SHELL_CORE_DEP = $(SQLITE3DLL)
492 !ELSE
493 SHELL_CORE_DEP =
494 !ENDIF
495 !ENDIF
497 # This is the core library that the shell executable should link with.
499 !IFNDEF SHELL_CORE_LIB
500 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
501 SHELL_CORE_LIB = $(SQLITE3LIB)
502 !ELSE
503 SHELL_CORE_LIB =
504 !ENDIF
505 !ENDIF
507 # These are additional linker options used for the shell executable.
509 !IFNDEF SHELL_LINK_OPTS
510 SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
511 !ENDIF
513 # Check if assembly code listings should be generated for the source
514 # code files to be compiled.
516 !IF $(USE_LISTINGS)!=0
517 TCC = $(TCC) -FAcs
518 !ENDIF
520 # When compiling the library for use in the WinRT environment,
521 # the following compile-time options must be used as well to
522 # disable use of Win32 APIs that are not available and to enable
523 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
525 !IF $(FOR_WINRT)!=0
526 TCC = $(TCC) -DSQLITE_OS_WINRT=1
527 RCC = $(RCC) -DSQLITE_OS_WINRT=1
528 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
529 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
530 !ENDIF
532 # C compiler options for the Windows 10 platform (needs MSVC 2015).
534 !IF $(FOR_WIN10)!=0
535 TCC = $(TCC) /guard:cf -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
536 BCC = $(BCC) /guard:cf -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
537 !ENDIF
539 # Also, we need to dynamically link to the correct MSVC runtime
540 # when compiling for WinRT (e.g. debug or release) OR if the
541 # USE_CRT_DLL option is set to force dynamically linking to the
542 # MSVC runtime library.
544 !IF $(FOR_WINRT)!=0 || $(FOR_WIN10)!=0 || $(USE_CRT_DLL)!=0
545 !IF $(DEBUG)>1
546 TCC = $(TCC) -MDd
547 BCC = $(BCC) -MDd
548 !ELSE
549 TCC = $(TCC) -MD
550 BCC = $(BCC) -MD
551 !ENDIF
552 !ELSE
553 !IF $(DEBUG)>1
554 TCC = $(TCC) -MTd
555 BCC = $(BCC) -MTd
556 !ELSE
557 TCC = $(TCC) -MT
558 BCC = $(BCC) -MT
559 !ENDIF
560 !ENDIF
562 # <<mark>>
563 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
564 # any extension header files by default.  For non-amalgamation
565 # builds, we need to make sure the compiler can find these.
567 !IF $(USE_AMALGAMATION)==0
568 TCC = $(TCC) -I$(TOP)\ext\fts3
569 RCC = $(RCC) -I$(TOP)\ext\fts3
570 TCC = $(TCC) -I$(TOP)\ext\rtree
571 RCC = $(RCC) -I$(TOP)\ext\rtree
572 !ENDIF
574 # The mksqlite3c.tcl script accepts some options on the command
575 # line.  When compiling with debugging enabled, some of these
576 # options are necessary in order to allow debugging symbols to
577 # work correctly with Visual Studio when using the amalgamation.
579 !IFNDEF MKSQLITE3C_ARGS
580 !IF $(DEBUG)>1
581 MKSQLITE3C_ARGS = --linemacros
582 !ELSE
583 MKSQLITE3C_ARGS =
584 !ENDIF
585 !ENDIF
586 # <</mark>>
588 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
589 # Omitting the define will cause extra debugging code to be inserted and
590 # includes extra comments when "EXPLAIN stmt" is used.
592 !IF $(DEBUG)==0
593 TCC = $(TCC) -DNDEBUG
594 BCC = $(BCC) -DNDEBUG
595 RCC = $(RCC) -DNDEBUG
596 !ENDIF
598 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
599 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
600 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
601 !ENDIF
603 !IF $(DEBUG)>2
604 TCC = $(TCC) -DSQLITE_DEBUG=1
605 RCC = $(RCC) -DSQLITE_DEBUG=1
606 !ENDIF
608 !IF $(DEBUG)>4 || $(OSTRACE)!=0
609 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
610 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
611 !ENDIF
613 !IF $(DEBUG)>5
614 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
615 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
616 !ENDIF
618 # Prevent warnings about "insecure" MSVC runtime library functions
619 # being used.
621 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
622 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
623 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
625 # Prevent warnings about "deprecated" POSIX functions being used.
627 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
628 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
629 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
631 # Use the SQLite debugging heap subsystem?
633 !IF $(MEMDEBUG)!=0
634 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
635 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
637 # Use native Win32 heap subsystem instead of malloc/free?
639 !ELSEIF $(WIN32HEAP)!=0
640 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
641 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
643 # Validate the heap on every call into the native Win32 heap subsystem?
645 !IF $(DEBUG)>3
646 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
647 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
648 !ENDIF
649 !ENDIF
651 # <<mark>>
652 # The locations of the Tcl header and library files.  Also, the library that
653 # non-stubs enabled programs using Tcl must link against.  These variables
654 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
655 # prior to running nmake in order to match the actual installed location and
656 # version on this machine.
658 !IFNDEF TCLINCDIR
659 TCLINCDIR = c:\tcl\include
660 !ENDIF
662 !IFNDEF TCLLIBDIR
663 TCLLIBDIR = c:\tcl\lib
664 !ENDIF
666 !IFNDEF LIBTCL
667 LIBTCL = tcl85.lib
668 !ENDIF
670 !IFNDEF LIBTCLSTUB
671 LIBTCLSTUB = tclstub85.lib
672 !ENDIF
674 !IFNDEF LIBTCLPATH
675 LIBTCLPATH = c:\tcl\bin
676 !ENDIF
678 # The locations of the ICU header and library files.  These variables
679 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
680 # prior to running nmake in order to match the actual installed location on
681 # this machine.
683 !IFNDEF ICUINCDIR
684 ICUINCDIR = c:\icu\include
685 !ENDIF
687 !IFNDEF ICULIBDIR
688 ICULIBDIR = c:\icu\lib
689 !ENDIF
691 !IFNDEF LIBICU
692 LIBICU = icuuc.lib icuin.lib
693 !ENDIF
695 # This is the command to use for tclsh - normally just "tclsh", but we may
696 # know the specific version we want to use.  This variable (TCLSH_CMD) may be
697 # overridden via the environment prior to running nmake in order to select a
698 # specific Tcl shell to use.
700 !IFNDEF TCLSH_CMD
701 TCLSH_CMD = tclsh85
702 !ENDIF
703 # <</mark>>
705 # Compiler options needed for programs that use the readline() library.
707 !IFNDEF READLINE_FLAGS
708 READLINE_FLAGS = -DHAVE_READLINE=0
709 !ENDIF
711 # The library that programs using readline() must link against.
713 !IFNDEF LIBREADLINE
714 LIBREADLINE =
715 !ENDIF
717 # Should the database engine be compiled threadsafe
719 TCC = $(TCC) -DSQLITE_THREADSAFE=1
720 RCC = $(RCC) -DSQLITE_THREADSAFE=1
722 # Do threads override each others locks by default (1), or do we test (-1)
724 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
725 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
727 # Any target libraries which libsqlite must be linked against
729 !IFNDEF TLIBS
730 TLIBS =
731 !ENDIF
733 # Flags controlling use of the in memory btree implementation
735 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
736 # default to file, 2 to default to memory, and 3 to force temporary
737 # tables to always be in memory.
739 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
740 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
742 # Enable/disable loadable extensions, and other optional features
743 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
744 # The same set of OMIT and ENABLE flags should be passed to the
745 # LEMON parser generator and the mkkeywordhash tool as well.
747 # These are the required SQLite compilation options used when compiling for
748 # the Windows platform.
750 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
752 # If we are linking to the RPCRT4 library, enable features that need it.
754 !IF $(USE_RPCRT4_LIB)!=0
755 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
756 !ENDIF
758 # Add the required and optional SQLite compilation options into the command
759 # lines used to invoke the MSVC code and resource compilers.
761 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
762 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
764 # Add in any optional parameters specified on the commane line, e.g.
765 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
767 TCC = $(TCC) $(OPTS)
768 RCC = $(RCC) $(OPTS)
770 # If compiling for debugging, add some defines.
772 !IF $(DEBUG)>1
773 TCC = $(TCC) -D_DEBUG
774 BCC = $(BCC) -D_DEBUG
775 RCC = $(RCC) -D_DEBUG
776 !ENDIF
778 # If optimizations are enabled or disabled (either implicitly or
779 # explicitly), add the necessary flags.
781 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
782 TCC = $(TCC) -Od
783 BCC = $(BCC) -Od
784 !ELSEIF $(OPTIMIZATIONS)>=3
785 TCC = $(TCC) -Ox
786 BCC = $(BCC) -Ox
787 !ELSEIF $(OPTIMIZATIONS)==2
788 TCC = $(TCC) -O2
789 BCC = $(BCC) -O2
790 !ELSEIF $(OPTIMIZATIONS)==1
791 TCC = $(TCC) -O1
792 BCC = $(BCC) -O1
793 !ENDIF
795 # If symbols are enabled (or compiling for debugging), enable PDBs.
797 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
798 TCC = $(TCC) -Zi
799 BCC = $(BCC) -Zi
800 !ENDIF
802 # <<mark>>
803 # If ICU support is enabled, add the compiler options for it.
805 !IF $(USE_ICU)!=0
806 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
807 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
808 TCC = $(TCC) -I$(TOP)\ext\icu
809 RCC = $(RCC) -I$(TOP)\ext\icu
810 TCC = $(TCC) -I$(ICUINCDIR)
811 RCC = $(RCC) -I$(ICUINCDIR)
812 !ENDIF
813 # <</mark>>
815 # Command line prefixes for compiling code, compiling resources,
816 # linking, etc.
818 LTCOMPILE = $(TCC) -Fo$@
819 LTRCOMPILE = $(RCC) -r
820 LTLIB = lib.exe
821 LTLINK = $(TCC) -Fe$@
823 # If requested, link to the RPCRT4 library.
825 !IF $(USE_RPCRT4_LIB)!=0
826 LTLINK = $(LTLINK) rpcrt4.lib
827 !ENDIF
829 # If a platform was set, force the linker to target that.
830 # Note that the vcvars*.bat family of batch files typically
831 # set this for you.  Otherwise, the linker will attempt
832 # to deduce the binary type based on the object files.
833 !IFDEF PLATFORM
834 LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
835 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
836 !ELSE
837 LTLINKOPTS = /NOLOGO
838 LTLIBOPTS = /NOLOGO
839 !ENDIF
841 # When compiling for use in the WinRT environment, the following
842 # linker option must be used to mark the executable as runnable
843 # only in the context of an application container.
845 !IF $(FOR_WINRT)!=0
846 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
847 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
848 !IFNDEF STORELIBPATH
849 !IF "$(PLATFORM)"=="x86"
850 STORELIBPATH = $(CRTLIBPATH)\store
851 !ELSEIF "$(PLATFORM)"=="x64"
852 STORELIBPATH = $(CRTLIBPATH)\store\amd64
853 !ELSEIF "$(PLATFORM)"=="ARM"
854 STORELIBPATH = $(CRTLIBPATH)\store\arm
855 !ELSE
856 STORELIBPATH = $(CRTLIBPATH)\store
857 !ENDIF
858 !ENDIF
859 STORELIBPATH = $(STORELIBPATH:\\=\)
860 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
861 !ENDIF
862 !ENDIF
864 # When compiling for Windows Phone 8.1, an extra library path is
865 # required.
867 !IF $(USE_WP81_OPTS)!=0
868 !IFNDEF WP81LIBPATH
869 !IF "$(PLATFORM)"=="x86"
870 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
871 !ELSEIF "$(PLATFORM)"=="ARM"
872 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
873 !ELSE
874 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
875 !ENDIF
876 !ENDIF
877 !ENDIF
879 # When compiling for Windows Phone 8.1, some extra linker options
880 # are also required.
882 !IF $(USE_WP81_OPTS)!=0
883 !IFDEF WP81LIBPATH
884 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
885 !ENDIF
886 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
887 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
888 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
889 !ENDIF
891 # When compiling for UAP, some extra linker options are also required.
893 !IF $(FOR_UAP)!=0 || $(FOR_WIN10)!=0
894 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
895 LTLINKOPTS = $(LTLINKOPTS) mincore.lib
896 !IFDEF PSDKLIBPATH
897 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
898 !ENDIF
899 !ENDIF
901 # If either debugging or symbols are enabled, enable PDBs.
903 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
904 LDFLAGS = /DEBUG $(LDOPTS)
905 !ELSE
906 LDFLAGS = $(LDOPTS)
907 !ENDIF
909 # <<mark>>
910 # Start with the Tcl related linker options.
912 !IF $(NO_TCL)==0
913 LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
914 LTLIBS = $(LIBTCL)
915 !ENDIF
917 # If ICU support is enabled, add the linker options for it.
919 !IF $(USE_ICU)!=0
920 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
921 LTLIBS = $(LTLIBS) $(LIBICU)
922 !ENDIF
923 # <</mark>>
925 # You should not have to change anything below this line
926 ###############################################################################
928 # <<mark>>
929 # Object files for the SQLite library (non-amalgamation).
931 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
932          backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
933          callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
934          expr.lo fault.lo fkey.lo \
935          fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
936          fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
937          fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
938          fts5.lo \
939          func.lo global.lo hash.lo \
940          icu.lo insert.lo journal.lo legacy.lo loadext.lo \
941          main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
942          memjournal.lo \
943          mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
944          notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
945          pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
946          random.lo resolve.lo rowset.lo rtree.lo select.lo sqlite3rbu.lo status.lo \
947          table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
948          update.lo util.lo vacuum.lo \
949          vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
950          vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
951          utf.lo vtab.lo
952 # <</mark>>
954 # Object files for the amalgamation.
956 LIBOBJS1 = sqlite3.lo
958 # Determine the real value of LIBOBJ based on the 'configure' script
960 # <<mark>>
961 !IF $(USE_AMALGAMATION)==0
962 LIBOBJ = $(LIBOBJS0)
963 !ELSE
964 # <</mark>>
965 LIBOBJ = $(LIBOBJS1)
966 # <<mark>>
967 !ENDIF
968 # <</mark>>
970 # Determine if embedded resource compilation and usage are enabled.
972 !IF $(USE_RC)!=0
973 LIBRESOBJS = sqlite3res.lo
974 !ELSE
975 LIBRESOBJS =
976 !ENDIF
978 # <<mark>>
979 # All of the source code files.
981 SRC1 = \
982   $(TOP)\src\alter.c \
983   $(TOP)\src\analyze.c \
984   $(TOP)\src\attach.c \
985   $(TOP)\src\auth.c \
986   $(TOP)\src\backup.c \
987   $(TOP)\src\bitvec.c \
988   $(TOP)\src\btmutex.c \
989   $(TOP)\src\btree.c \
990   $(TOP)\src\btree.h \
991   $(TOP)\src\btreeInt.h \
992   $(TOP)\src\build.c \
993   $(TOP)\src\callback.c \
994   $(TOP)\src\complete.c \
995   $(TOP)\src\ctime.c \
996   $(TOP)\src\date.c \
997   $(TOP)\src\dbstat.c \
998   $(TOP)\src\delete.c \
999   $(TOP)\src\expr.c \
1000   $(TOP)\src\fault.c \
1001   $(TOP)\src\fkey.c \
1002   $(TOP)\src\func.c \
1003   $(TOP)\src\global.c \
1004   $(TOP)\src\hash.c \
1005   $(TOP)\src\hash.h \
1006   $(TOP)\src\hwtime.h \
1007   $(TOP)\src\insert.c \
1008   $(TOP)\src\journal.c \
1009   $(TOP)\src\legacy.c \
1010   $(TOP)\src\loadext.c \
1011   $(TOP)\src\main.c \
1012   $(TOP)\src\malloc.c \
1013   $(TOP)\src\mem0.c \
1014   $(TOP)\src\mem1.c \
1015   $(TOP)\src\mem2.c \
1016   $(TOP)\src\mem3.c \
1017   $(TOP)\src\mem5.c \
1018   $(TOP)\src\memjournal.c \
1019   $(TOP)\src\msvc.h \
1020   $(TOP)\src\mutex.c \
1021   $(TOP)\src\mutex.h \
1022   $(TOP)\src\mutex_noop.c \
1023   $(TOP)\src\mutex_unix.c \
1024   $(TOP)\src\mutex_w32.c \
1025   $(TOP)\src\notify.c \
1026   $(TOP)\src\os.c \
1027   $(TOP)\src\os.h \
1028   $(TOP)\src\os_common.h \
1029   $(TOP)\src\os_setup.h \
1030   $(TOP)\src\os_unix.c \
1031   $(TOP)\src\os_win.c \
1032   $(TOP)\src\os_win.h
1033 SRC2 = \
1034   $(TOP)\src\pager.c \
1035   $(TOP)\src\pager.h \
1036   $(TOP)\src\parse.y \
1037   $(TOP)\src\pcache.c \
1038   $(TOP)\src\pcache.h \
1039   $(TOP)\src\pcache1.c \
1040   $(TOP)\src\pragma.c \
1041   $(TOP)\src\pragma.h \
1042   $(TOP)\src\prepare.c \
1043   $(TOP)\src\printf.c \
1044   $(TOP)\src\random.c \
1045   $(TOP)\src\resolve.c \
1046   $(TOP)\src\rowset.c \
1047   $(TOP)\src\select.c \
1048   $(TOP)\src\status.c \
1049   $(TOP)\src\shell.c \
1050   $(TOP)\src\sqlite.h.in \
1051   $(TOP)\src\sqlite3ext.h \
1052   $(TOP)\src\sqliteInt.h \
1053   $(TOP)\src\sqliteLimit.h \
1054   $(TOP)\src\table.c \
1055   $(TOP)\src\threads.c \
1056   $(TOP)\src\tclsqlite.c \
1057   $(TOP)\src\tokenize.c \
1058   $(TOP)\src\treeview.c \
1059   $(TOP)\src\trigger.c \
1060   $(TOP)\src\utf.c \
1061   $(TOP)\src\update.c \
1062   $(TOP)\src\util.c \
1063   $(TOP)\src\vacuum.c \
1064   $(TOP)\src\vdbe.c \
1065   $(TOP)\src\vdbe.h \
1066   $(TOP)\src\vdbeapi.c \
1067   $(TOP)\src\vdbeaux.c \
1068   $(TOP)\src\vdbeblob.c \
1069   $(TOP)\src\vdbemem.c \
1070   $(TOP)\src\vdbesort.c \
1071   $(TOP)\src\vdbetrace.c \
1072   $(TOP)\src\vdbeInt.h \
1073   $(TOP)\src\vtab.c \
1074   $(TOP)\src\vxworks.h \
1075   $(TOP)\src\wal.c \
1076   $(TOP)\src\wal.h \
1077   $(TOP)\src\walker.c \
1078   $(TOP)\src\where.c \
1079   $(TOP)\src\wherecode.c \
1080   $(TOP)\src\whereexpr.c \
1081   $(TOP)\src\whereInt.h
1083 # Source code for extensions
1085 SRC3 = \
1086   $(TOP)\ext\fts1\fts1.c \
1087   $(TOP)\ext\fts1\fts1.h \
1088   $(TOP)\ext\fts1\fts1_hash.c \
1089   $(TOP)\ext\fts1\fts1_hash.h \
1090   $(TOP)\ext\fts1\fts1_porter.c \
1091   $(TOP)\ext\fts1\fts1_tokenizer.h \
1092   $(TOP)\ext\fts1\fts1_tokenizer1.c \
1093   $(TOP)\ext\fts2\fts2.c \
1094   $(TOP)\ext\fts2\fts2.h \
1095   $(TOP)\ext\fts2\fts2_hash.c \
1096   $(TOP)\ext\fts2\fts2_hash.h \
1097   $(TOP)\ext\fts2\fts2_icu.c \
1098   $(TOP)\ext\fts2\fts2_porter.c \
1099   $(TOP)\ext\fts2\fts2_tokenizer.h \
1100   $(TOP)\ext\fts2\fts2_tokenizer.c \
1101   $(TOP)\ext\fts2\fts2_tokenizer1.c
1102 SRC4 = \
1103   $(TOP)\ext\fts3\fts3.c \
1104   $(TOP)\ext\fts3\fts3.h \
1105   $(TOP)\ext\fts3\fts3Int.h \
1106   $(TOP)\ext\fts3\fts3_aux.c \
1107   $(TOP)\ext\fts3\fts3_expr.c \
1108   $(TOP)\ext\fts3\fts3_hash.c \
1109   $(TOP)\ext\fts3\fts3_hash.h \
1110   $(TOP)\ext\fts3\fts3_icu.c \
1111   $(TOP)\ext\fts3\fts3_porter.c \
1112   $(TOP)\ext\fts3\fts3_snippet.c \
1113   $(TOP)\ext\fts3\fts3_tokenizer.h \
1114   $(TOP)\ext\fts3\fts3_tokenizer.c \
1115   $(TOP)\ext\fts3\fts3_tokenizer1.c \
1116   $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1117   $(TOP)\ext\fts3\fts3_unicode.c \
1118   $(TOP)\ext\fts3\fts3_unicode2.c \
1119   $(TOP)\ext\fts3\fts3_write.c \
1120   $(TOP)\ext\icu\sqliteicu.h \
1121   $(TOP)\ext\icu\icu.c \
1122   $(TOP)\ext\rtree\rtree.h \
1123   $(TOP)\ext\rtree\rtree.c \
1124   $(TOP)\ext\rbu\sqlite3rbu.h \
1125   $(TOP)\ext\rbu\sqlite3rbu.c \
1126   $(TOP)\ext\misc\json1.c
1129 # Generated source code files
1131 SRC5 = \
1132   keywordhash.h \
1133   opcodes.c \
1134   opcodes.h \
1135   parse.c \
1136   parse.h \
1137   $(SQLITE3H)
1139 # All source code files.
1141 SRC = $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5)
1143 # Source code to the test files.
1145 TESTSRC = \
1146   $(TOP)\src\test1.c \
1147   $(TOP)\src\test2.c \
1148   $(TOP)\src\test3.c \
1149   $(TOP)\src\test4.c \
1150   $(TOP)\src\test5.c \
1151   $(TOP)\src\test6.c \
1152   $(TOP)\src\test7.c \
1153   $(TOP)\src\test8.c \
1154   $(TOP)\src\test9.c \
1155   $(TOP)\src\test_autoext.c \
1156   $(TOP)\src\test_async.c \
1157   $(TOP)\src\test_backup.c \
1158   $(TOP)\src\test_blob.c \
1159   $(TOP)\src\test_btree.c \
1160   $(TOP)\src\test_config.c \
1161   $(TOP)\src\test_demovfs.c \
1162   $(TOP)\src\test_devsym.c \
1163   $(TOP)\src\test_fs.c \
1164   $(TOP)\src\test_func.c \
1165   $(TOP)\src\test_hexio.c \
1166   $(TOP)\src\test_init.c \
1167   $(TOP)\src\test_intarray.c \
1168   $(TOP)\src\test_journal.c \
1169   $(TOP)\src\test_malloc.c \
1170   $(TOP)\src\test_multiplex.c \
1171   $(TOP)\src\test_mutex.c \
1172   $(TOP)\src\test_onefile.c \
1173   $(TOP)\src\test_osinst.c \
1174   $(TOP)\src\test_pcache.c \
1175   $(TOP)\src\test_quota.c \
1176   $(TOP)\src\test_rtree.c \
1177   $(TOP)\src\test_schema.c \
1178   $(TOP)\src\test_server.c \
1179   $(TOP)\src\test_superlock.c \
1180   $(TOP)\src\test_syscall.c \
1181   $(TOP)\src\test_tclvar.c \
1182   $(TOP)\src\test_thread.c \
1183   $(TOP)\src\test_vfs.c \
1184   $(TOP)\src\test_windirent.c \
1185   $(TOP)\src\test_wsd.c \
1186   $(TOP)\ext\fts3\fts3_term.c \
1187   $(TOP)\ext\fts3\fts3_test.c \
1188   $(TOP)\ext\rbu\test_rbu.c
1190 # Statically linked extensions
1192 TESTEXT = \
1193   $(TOP)\ext\misc\amatch.c \
1194   $(TOP)\ext\misc\closure.c \
1195   $(TOP)\ext\misc\eval.c \
1196   $(TOP)\ext\misc\fileio.c \
1197   $(TOP)\ext\misc\fuzzer.c \
1198   $(TOP)\ext\fts5\fts5_tcl.c \
1199   $(TOP)\ext\fts5\fts5_test_mi.c \
1200   $(TOP)\ext\fts5\fts5_test_tok.c \
1201   $(TOP)\ext\misc\ieee754.c \
1202   $(TOP)\ext\misc\nextchar.c \
1203   $(TOP)\ext\misc\percentile.c \
1204   $(TOP)\ext\misc\regexp.c \
1205   $(TOP)\ext\misc\series.c \
1206   $(TOP)\ext\misc\spellfix.c \
1207   $(TOP)\ext\misc\totype.c \
1208   $(TOP)\ext\misc\wholenumber.c
1211 # Source code to the library files needed by the test fixture
1213 TESTSRC2 = \
1214   $(TOP)\src\attach.c \
1215   $(TOP)\src\backup.c \
1216   $(TOP)\src\bitvec.c \
1217   $(TOP)\src\btree.c \
1218   $(TOP)\src\build.c \
1219   $(TOP)\src\ctime.c \
1220   $(TOP)\src\date.c \
1221   $(TOP)\src\dbstat.c \
1222   $(TOP)\src\expr.c \
1223   $(TOP)\src\func.c \
1224   $(TOP)\src\insert.c \
1225   $(TOP)\src\wal.c \
1226   $(TOP)\src\main.c \
1227   $(TOP)\src\mem5.c \
1228   $(TOP)\src\os.c \
1229   $(TOP)\src\os_unix.c \
1230   $(TOP)\src\os_win.c \
1231   $(TOP)\src\pager.c \
1232   $(TOP)\src\pragma.c \
1233   $(TOP)\src\prepare.c \
1234   $(TOP)\src\printf.c \
1235   $(TOP)\src\random.c \
1236   $(TOP)\src\pcache.c \
1237   $(TOP)\src\pcache1.c \
1238   $(TOP)\src\select.c \
1239   $(TOP)\src\tokenize.c \
1240   $(TOP)\src\utf.c \
1241   $(TOP)\src\util.c \
1242   $(TOP)\src\vdbeapi.c \
1243   $(TOP)\src\vdbeaux.c \
1244   $(TOP)\src\vdbe.c \
1245   $(TOP)\src\vdbemem.c \
1246   $(TOP)\src\vdbesort.c \
1247   $(TOP)\src\vdbetrace.c \
1248   $(TOP)\src\where.c \
1249   $(TOP)\src\wherecode.c \
1250   $(TOP)\src\whereexpr.c \
1251   parse.c \
1252   $(TOP)\ext\fts3\fts3.c \
1253   $(TOP)\ext\fts3\fts3_aux.c \
1254   $(TOP)\ext\fts3\fts3_expr.c \
1255   $(TOP)\ext\fts3\fts3_tokenizer.c \
1256   $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
1257   $(TOP)\ext\fts3\fts3_unicode.c \
1258   $(TOP)\ext\fts3\fts3_unicode2.c \
1259   $(TOP)\ext\fts3\fts3_write.c \
1260   $(TOP)\ext\async\sqlite3async.c
1262 # Header files used by all library source files.
1264 HDR = \
1265    $(TOP)\src\btree.h \
1266    $(TOP)\src\btreeInt.h \
1267    $(TOP)\src\hash.h \
1268    $(TOP)\src\hwtime.h \
1269    keywordhash.h \
1270    $(TOP)\src\msvc.h \
1271    $(TOP)\src\mutex.h \
1272    opcodes.h \
1273    $(TOP)\src\os.h \
1274    $(TOP)\src\os_common.h \
1275    $(TOP)\src\os_setup.h \
1276    $(TOP)\src\os_win.h \
1277    $(TOP)\src\pager.h \
1278    $(TOP)\src\pcache.h \
1279    parse.h \
1280    $(TOP)\src\pragma.h \
1281    $(SQLITE3H) \
1282    $(TOP)\src\sqlite3ext.h \
1283    $(TOP)\src\sqliteInt.h \
1284    $(TOP)\src\sqliteLimit.h \
1285    $(TOP)\src\vdbe.h \
1286    $(TOP)\src\vdbeInt.h \
1287    $(TOP)\src\vxworks.h \
1288    $(TOP)\src\whereInt.h
1290 # Header files used by extensions
1292 EXTHDR = $(EXTHDR) \
1293   $(TOP)\ext\fts1\fts1.h \
1294   $(TOP)\ext\fts1\fts1_hash.h \
1295   $(TOP)\ext\fts1\fts1_tokenizer.h
1296 EXTHDR = $(EXTHDR) \
1297   $(TOP)\ext\fts2\fts2.h \
1298   $(TOP)\ext\fts2\fts2_hash.h \
1299   $(TOP)\ext\fts2\fts2_tokenizer.h
1300 EXTHDR = $(EXTHDR) \
1301   $(TOP)\ext\fts3\fts3.h \
1302   $(TOP)\ext\fts3\fts3Int.h \
1303   $(TOP)\ext\fts3\fts3_hash.h \
1304   $(TOP)\ext\fts3\fts3_tokenizer.h
1305 EXTHDR = $(EXTHDR) \
1306   $(TOP)\ext\rtree\rtree.h
1307 EXTHDR = $(EXTHDR) \
1308   $(TOP)\ext\icu\sqliteicu.h
1309 EXTHDR = $(EXTHDR) \
1310   $(TOP)\ext\rtree\sqlite3rtree.h
1312 # executables needed for testing
1314 TESTPROGS = \
1315   testfixture.exe \
1316   $(SQLITE3EXE) \
1317   sqlite3_analyzer.exe \
1318   sqldiff.exe
1320 # Databases containing fuzzer test cases
1322 FUZZDATA = \
1323   $(TOP)\test\fuzzdata1.db \
1324   $(TOP)\test\fuzzdata2.db \
1325   $(TOP)\test\fuzzdata3.db \
1326   $(TOP)\test\fuzzdata4.db
1327 # <</mark>>
1329 # Additional compiler options for the shell.  These are only effective
1330 # when the shell is not being dynamically linked.
1332 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
1333 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
1334 !ENDIF
1336 # <<mark>>
1337 # Extra compiler options for various test tools.
1339 MPTESTER_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS5
1340 FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1341 FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
1343 # Standard options to testfixture.
1345 TESTOPTS = --verbose=file --output=test-out.txt
1347 # Extra targets for the "all" target that require Tcl.
1349 !IF $(NO_TCL)==0
1350 ALL_TCL_TARGETS = libtclsqlite3.lib
1351 !ELSE
1352 ALL_TCL_TARGETS =
1353 !ENDIF
1354 # <</mark>>
1356 # This is the default Makefile target.  The objects listed here
1357 # are what get build when you type just "make" with no arguments.
1359 all:    dll libsqlite3.lib shell $(ALL_TCL_TARGETS)
1361 # Dynamic link library section.
1363 dll: $(SQLITE3DLL)
1365 # Shell executable.
1367 shell: $(SQLITE3EXE)
1369 libsqlite3.lib: $(LIBOBJ)
1370         $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1372 # <<mark>>
1373 libtclsqlite3.lib:      tclsqlite.lo libsqlite3.lib
1374         $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
1375 # <</mark>>
1377 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1378         $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1380 # <<mark>>
1381 sqlite3.def: libsqlite3.lib
1382         echo EXPORTS > sqlite3.def
1383         dumpbin /all libsqlite3.lib \
1384                 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3_.*)$$" \1 \
1385                 | sort >> sqlite3.def
1386 # <</mark>>
1388 $(SQLITE3EXE):  $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1389         $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c $(SHELL_CORE_SRC) \
1390                 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1392 # <<mark>>
1393 sqldiff.exe:    $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1394         $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1396 fuzzershell.exe:        $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1397         $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1399 fuzzcheck.exe:  $(TOP)\test\fuzzcheck.c $(SQLITE3C) $(SQLITE3H)
1400         $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(TOP)\test\fuzzcheck.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1402 mptester.exe:   $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1403         $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1405 MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1406 MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
1408 mptest: mptester.exe
1409         del /Q mptest.db 2>NUL
1410         $(MPTEST1) --journalmode DELETE
1411         $(MPTEST2) --journalmode WAL
1412         $(MPTEST1) --journalmode WAL
1413         $(MPTEST2) --journalmode PERSIST
1414         $(MPTEST1) --journalmode PERSIST
1415         $(MPTEST2) --journalmode TRUNCATE
1416         $(MPTEST1) --journalmode TRUNCATE
1417         $(MPTEST2) --journalmode DELETE
1419 # This target creates a directory named "tsrc" and fills it with
1420 # copies of all of the C source code and header files needed to
1421 # build on the target system.  Some of the C source code and header
1422 # files are automatically generated.  This target takes care of
1423 # all that automatic generation.
1425 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c
1426         -rmdir /Q/S tsrc 2>NUL
1427         -mkdir tsrc
1428         for %i in ($(SRC1)) do copy /Y %i tsrc
1429         for %i in ($(SRC2)) do copy /Y %i tsrc
1430         for %i in ($(SRC3)) do copy /Y %i tsrc
1431         for %i in ($(SRC4)) do copy /Y %i tsrc
1432         for %i in ($(SRC5)) do copy /Y %i tsrc
1433         copy /Y fts5.c tsrc
1434         copy /Y fts5.h tsrc
1435         del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
1436         $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1437         move vdbe.new tsrc\vdbe.c
1438         echo > .target_source
1440 sqlite3.c:      .target_source sqlite3ext.h $(TOP)\tool\mksqlite3c.tcl
1441         $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS)
1442         copy tsrc\shell.c .
1444 sqlite3-all.c:  sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1445         $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1446 # <</mark>>
1448 # Rule to build the amalgamation
1450 sqlite3.lo:     $(SQLITE3C)
1451         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
1453 # <<mark>>
1454 # Rules to build the LEMON compiler generator
1456 lempar.c:       $(TOP)\tool\lempar.c
1457         copy $(TOP)\tool\lempar.c .
1459 lemon.exe:      $(TOP)\tool\lemon.c lempar.c
1460         $(BCC) $(NO_WARN) -Daccess=_access \
1461                 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1463 # Rules to build individual *.lo files from generated *.c files. This
1464 # applies to:
1466 #     parse.lo
1467 #     opcodes.lo
1469 parse.lo:       parse.c $(HDR)
1470         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
1472 opcodes.lo:     opcodes.c
1473         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
1474 # <</mark>>
1476 # Rule to build the Win32 resources object file.
1478 !IF $(USE_RC)!=0
1479 # <<block1>>
1480 $(LIBRESOBJS):  $(TOP)\src\sqlite3.rc $(SQLITE3H)
1481         echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1482         for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1483                 echo #define SQLITE_RESOURCE_VERSION %%V \
1484                         | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
1485         )
1486         echo #endif >> sqlite3rc.h
1487         $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1488 # <</block1>>
1489 !ENDIF
1491 # <<mark>>
1492 # Rules to build individual *.lo files from files in the src directory.
1494 alter.lo:       $(TOP)\src\alter.c $(HDR)
1495         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
1497 analyze.lo:     $(TOP)\src\analyze.c $(HDR)
1498         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
1500 attach.lo:      $(TOP)\src\attach.c $(HDR)
1501         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
1503 auth.lo:        $(TOP)\src\auth.c $(HDR)
1504         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
1506 backup.lo:      $(TOP)\src\backup.c $(HDR)
1507         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
1509 bitvec.lo:      $(TOP)\src\bitvec.c $(HDR)
1510         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
1512 btmutex.lo:     $(TOP)\src\btmutex.c $(HDR)
1513         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
1515 btree.lo:       $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1516         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
1518 build.lo:       $(TOP)\src\build.c $(HDR)
1519         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
1521 callback.lo:    $(TOP)\src\callback.c $(HDR)
1522         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
1524 complete.lo:    $(TOP)\src\complete.c $(HDR)
1525         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
1527 ctime.lo:       $(TOP)\src\ctime.c $(HDR)
1528         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
1530 date.lo:        $(TOP)\src\date.c $(HDR)
1531         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
1533 dbstat.lo:      $(TOP)\src\date.c $(HDR)
1534         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1536 delete.lo:      $(TOP)\src\delete.c $(HDR)
1537         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
1539 expr.lo:        $(TOP)\src\expr.c $(HDR)
1540         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
1542 fault.lo:       $(TOP)\src\fault.c $(HDR)
1543         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
1545 fkey.lo:        $(TOP)\src\fkey.c $(HDR)
1546         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
1548 func.lo:        $(TOP)\src\func.c $(HDR)
1549         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
1551 global.lo:      $(TOP)\src\global.c $(HDR)
1552         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
1554 hash.lo:        $(TOP)\src\hash.c $(HDR)
1555         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
1557 insert.lo:      $(TOP)\src\insert.c $(HDR)
1558         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
1560 journal.lo:     $(TOP)\src\journal.c $(HDR)
1561         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\journal.c
1563 legacy.lo:      $(TOP)\src\legacy.c $(HDR)
1564         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
1566 loadext.lo:     $(TOP)\src\loadext.c $(HDR)
1567         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
1569 main.lo:        $(TOP)\src\main.c $(HDR)
1570         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
1572 malloc.lo:      $(TOP)\src\malloc.c $(HDR)
1573         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
1575 mem0.lo:        $(TOP)\src\mem0.c $(HDR)
1576         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
1578 mem1.lo:        $(TOP)\src\mem1.c $(HDR)
1579         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
1581 mem2.lo:        $(TOP)\src\mem2.c $(HDR)
1582         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
1584 mem3.lo:        $(TOP)\src\mem3.c $(HDR)
1585         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
1587 mem5.lo:        $(TOP)\src\mem5.c $(HDR)
1588         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
1590 memjournal.lo:  $(TOP)\src\memjournal.c $(HDR)
1591         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
1593 mutex.lo:       $(TOP)\src\mutex.c $(HDR)
1594         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
1596 mutex_noop.lo:  $(TOP)\src\mutex_noop.c $(HDR)
1597         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
1599 mutex_unix.lo:  $(TOP)\src\mutex_unix.c $(HDR)
1600         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
1602 mutex_w32.lo:   $(TOP)\src\mutex_w32.c $(HDR)
1603         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
1605 notify.lo:      $(TOP)\src\notify.c $(HDR)
1606         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
1608 pager.lo:       $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1609         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
1611 pcache.lo:      $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1612         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
1614 pcache1.lo:     $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1615         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
1617 os.lo:  $(TOP)\src\os.c $(HDR)
1618         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
1620 os_unix.lo:     $(TOP)\src\os_unix.c $(HDR)
1621         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
1623 os_win.lo:      $(TOP)\src\os_win.c $(HDR)
1624         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
1626 pragma.lo:      $(TOP)\src\pragma.c $(HDR)
1627         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
1629 prepare.lo:     $(TOP)\src\prepare.c $(HDR)
1630         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
1632 printf.lo:      $(TOP)\src\printf.c $(HDR)
1633         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
1635 random.lo:      $(TOP)\src\random.c $(HDR)
1636         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
1638 resolve.lo:     $(TOP)\src\resolve.c $(HDR)
1639         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
1641 rowset.lo:      $(TOP)\src\rowset.c $(HDR)
1642         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
1644 select.lo:      $(TOP)\src\select.c $(HDR)
1645         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
1647 status.lo:      $(TOP)\src\status.c $(HDR)
1648         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
1650 table.lo:       $(TOP)\src\table.c $(HDR)
1651         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
1653 threads.lo:     $(TOP)\src\threads.c $(HDR)
1654         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
1656 tokenize.lo:    $(TOP)\src\tokenize.c keywordhash.h $(HDR)
1657         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
1659 treeview.lo:    $(TOP)\src\treeview.c $(HDR)
1660         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
1662 trigger.lo:     $(TOP)\src\trigger.c $(HDR)
1663         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
1665 update.lo:      $(TOP)\src\update.c $(HDR)
1666         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
1668 utf.lo: $(TOP)\src\utf.c $(HDR)
1669         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
1671 util.lo:        $(TOP)\src\util.c $(HDR)
1672         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
1674 vacuum.lo:      $(TOP)\src\vacuum.c $(HDR)
1675         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
1677 vdbe.lo:        $(TOP)\src\vdbe.c $(HDR)
1678         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
1680 vdbeapi.lo:     $(TOP)\src\vdbeapi.c $(HDR)
1681         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
1683 vdbeaux.lo:     $(TOP)\src\vdbeaux.c $(HDR)
1684         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
1686 vdbeblob.lo:    $(TOP)\src\vdbeblob.c $(HDR)
1687         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
1689 vdbemem.lo:     $(TOP)\src\vdbemem.c $(HDR)
1690         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
1692 vdbesort.lo:    $(TOP)\src\vdbesort.c $(HDR)
1693         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
1695 vdbetrace.lo:   $(TOP)\src\vdbetrace.c $(HDR)
1696         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
1698 vtab.lo:        $(TOP)\src\vtab.c $(HDR)
1699         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
1701 wal.lo: $(TOP)\src\wal.c $(HDR)
1702         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
1704 walker.lo:      $(TOP)\src\walker.c $(HDR)
1705         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
1707 where.lo:       $(TOP)\src\where.c $(HDR)
1708         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
1710 wherecode.lo:   $(TOP)\src\wherecode.c $(HDR)
1711         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
1713 whereexpr.lo:   $(TOP)\src\whereexpr.c $(HDR)
1714         $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
1716 tclsqlite.lo:   $(TOP)\src\tclsqlite.c $(HDR)
1717         $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1719 tclsqlite-shell.lo:     $(TOP)\src\tclsqlite.c $(HDR)
1720         $(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1722 tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
1723         $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1725 # Rules to build opcodes.c and opcodes.h
1727 opcodes.c:      opcodes.h $(TOP)\tool\mkopcodec.tcl
1728         $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
1730 opcodes.h:      parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
1731         type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
1733 # Rules to build parse.c and parse.h - the outputs of lemon.
1735 parse.h:        parse.c
1737 parse.c:        $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
1738         del /Q parse.y parse.h parse.h.temp 2>NUL
1739         copy $(TOP)\src\parse.y .
1740         .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
1741         move parse.h parse.h.temp
1742         $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
1744 $(SQLITE3H):    $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
1745         $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H)
1747 sqlite3ext.h: .target_source
1748         copy tsrc\sqlite3ext.h .
1750 mkkeywordhash.exe:      $(TOP)\tool\mkkeywordhash.c
1751         $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
1752                 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
1754 keywordhash.h:  $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
1755         .\mkkeywordhash.exe > keywordhash.h
1759 # Rules to build the extension objects.
1761 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1762         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1764 fts2.lo:        $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1765         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1767 fts2_hash.lo:   $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
1768         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
1770 fts2_icu.lo:    $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
1771         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
1773 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
1774         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
1776 fts2_tokenizer.lo:      $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
1777         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
1779 fts2_tokenizer1.lo:     $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
1780         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
1782 fts3.lo:        $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
1783         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
1785 fts3_aux.lo:    $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
1786         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
1788 fts3_expr.lo:   $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
1789         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
1791 fts3_hash.lo:   $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
1792         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
1794 fts3_icu.lo:    $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
1795         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
1797 fts3_snippet.lo:        $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
1798         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
1800 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
1801         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
1803 fts3_tokenizer.lo:      $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
1804         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
1806 fts3_tokenizer1.lo:     $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
1807         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
1809 fts3_tokenize_vtab.lo:  $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1810         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
1812 fts3_unicode.lo:        $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
1813         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
1815 fts3_unicode2.lo:       $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
1816         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
1818 fts3_write.lo:  $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
1819         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
1821 rtree.lo:       $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
1822         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
1824 # FTS5 things
1826 FTS5_SRC = \
1827    $(TOP)\ext\fts5\fts5.h \
1828    $(TOP)\ext\fts5\fts5Int.h \
1829    $(TOP)\ext\fts5\fts5_aux.c \
1830    $(TOP)\ext\fts5\fts5_buffer.c \
1831    $(TOP)\ext\fts5\fts5_main.c \
1832    $(TOP)\ext\fts5\fts5_config.c \
1833    $(TOP)\ext\fts5\fts5_expr.c \
1834    $(TOP)\ext\fts5\fts5_hash.c \
1835    $(TOP)\ext\fts5\fts5_index.c \
1836    fts5parse.c fts5parse.h \
1837    $(TOP)\ext\fts5\fts5_storage.c \
1838    $(TOP)\ext\fts5\fts5_tokenize.c \
1839    $(TOP)\ext\fts5\fts5_unicode2.c \
1840    $(TOP)\ext\fts5\fts5_varint.c \
1841    $(TOP)\ext\fts5\fts5_vocab.c
1843 fts5parse.c:    $(TOP)\ext\fts5\fts5parse.y lemon.exe
1844         copy $(TOP)\ext\fts5\fts5parse.y .
1845         del /Q fts5parse.h 2>NUL
1846         .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
1848 fts5parse.h: fts5parse.c
1850 fts5.c: $(FTS5_SRC)
1851         $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
1852         copy $(TOP)\ext\fts5\fts5.h .
1854 fts5.lo:        fts5.c $(HDR) $(EXTHDR)
1855         $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
1857 fts5_ext.lo:    fts5.c $(HDR) $(EXTHDR)
1858         $(LTCOMPILE) $(NO_WARN) -c fts5.c
1860 fts5.dll:       fts5_ext.lo
1861         $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
1863 sqlite3rbu.lo:  $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
1864         $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
1866 # Rules to build the 'testfixture' application.
1868 # If using the amalgamation, use sqlite3.c directly to build the test
1869 # fixture.  Otherwise link against libsqlite3.lib.  (This distinction is
1870 # necessary because the test fixture requires non-API symbols which are
1871 # hidden when the library is built via the amalgamation).
1873 TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
1874 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
1875 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
1877 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) $(SHELL_CORE_DEP)
1878 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
1879 !IF $(USE_AMALGAMATION)==0
1880 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1881 !ELSE
1882 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1883 !ENDIF
1885 testfixture.exe:        $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR)
1886         $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
1887                 -DBUILD_sqlite -I$(TCLINCDIR) \
1888                 $(TESTFIXTURE_SRC) \
1889                 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1891 extensiontest: testfixture.exe testloadext.dll
1892         @set PATH=$(LIBTCLPATH);$(PATH)
1893         .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
1895 fulltest:       $(TESTPROGS) fuzztest
1896         @set PATH=$(LIBTCLPATH);$(PATH)
1897         .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
1899 soaktest:       $(TESTPROGS)
1900         @set PATH=$(LIBTCLPATH);$(PATH)
1901         .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
1903 fulltestonly:   $(TESTPROGS) fuzztest
1904         @set PATH=$(LIBTCLPATH);$(PATH)
1905         .\testfixture.exe $(TOP)\test\full.test
1907 queryplantest:  testfixture.exe shell
1908         @set PATH=$(LIBTCLPATH);$(PATH)
1909         .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
1911 fuzztest:       fuzzcheck.exe
1912         .\fuzzcheck.exe $(FUZZDATA)
1914 fastfuzztest:   fuzzcheck.exe
1915         .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
1917 # Minimal testing that runs in less than 3 minutes (on a fast machine)
1919 quicktest:      testfixture.exe
1920         @set PATH=$(LIBTCLPATH);$(PATH)
1921         .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
1923 # This is the common case.  Run many tests that do not take too long,
1924 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1926 test:   $(TESTPROGS) fastfuzztest
1927         @set PATH=$(LIBTCLPATH);$(PATH)
1928         .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
1930 smoketest:      $(TESTPROGS)
1931         @set PATH=$(LIBTCLPATH);$(PATH)
1932         .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
1934 sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
1935         echo #define TCLSH 2 > $@
1936         echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
1937         copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
1938         echo static const char *tclsh_main_loop(void){ >> $@
1939         echo static const char *zMainloop = >> $@
1940         $(TCLSH_CMD) $(TOP)\tool\tostr.tcl $(TOP)\tool\spaceanal.tcl >> $@
1941         echo ; return zMainloop; } >> $@
1943 sqlite3_analyzer.exe:   sqlite3_analyzer.c $(LIBRESOBJS)
1944         $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
1945                 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1947 testloadext.lo: $(TOP)\src\test_loadext.c
1948         $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
1950 testloadext.dll: testloadext.lo
1951         $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
1953 showdb.exe:     $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
1954         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1955                 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1957 showstat4.exe:  $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
1958         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1959                 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1961 showjournal.exe:        $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
1962         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1963                 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1965 showwal.exe:    $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
1966         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1967                 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1969 fts3view.exe:   $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
1970         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1971                 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1973 rollback-test.exe:      $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
1974         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1975                 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1977 LogEst.exe:     $(TOP)\tool\logest.c $(SQLITE3H)
1978         $(LTLINK) $(NO_WARN) -Fe$@ $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
1980 wordcount.exe:  $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
1981         $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1982                 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1984 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
1985         $(LTLINK) $(NO_WARN) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1986                 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1988 rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
1989         $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU -Fe$@ \
1990                 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1991 # <</mark>>
1993 clean:
1994         del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
1995         del /Q *.bsc *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
1996 # <<mark>>
1997         del /Q $(SQLITE3C) $(SQLITE3H) opcodes.c opcodes.h 2>NUL
1998         del /Q lemon.* lempar.c parse.* 2>NUL
1999         del /Q mkkeywordhash.* keywordhash.h 2>NUL
2000         del /Q notasharedlib.* 2>NUL
2001         -rmdir /Q/S .deps 2>NUL
2002         -rmdir /Q/S .libs 2>NUL
2003         -rmdir /Q/S quota2a 2>NUL
2004         -rmdir /Q/S quota2b 2>NUL
2005         -rmdir /Q/S quota2c 2>NUL
2006         -rmdir /Q/S tsrc 2>NUL
2007         del /Q .target_source 2>NUL
2008         del /Q tclsqlite3.exe 2>NUL
2009         del /Q testloadext.dll 2>NUL
2010         del /Q testfixture.exe test.db 2>NUL
2011         del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL
2012         del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
2013         del /Q mptester.exe wordcount.exe rbu.exe 2>NUL
2014         del /Q $(SQLITE3EXE) $(SQLITE3DLL) sqlite3.def 2>NUL
2015         del /Q sqlite3.c sqlite3-*.c 2>NUL
2016         del /Q sqlite3rc.h 2>NUL
2017         del /Q shell.c sqlite3ext.h 2>NUL
2018         del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
2019         del /Q sqlite-*-output.vsix 2>NUL
2020         del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe 2>NUL
2021         del /Q fts5.* fts5parse.* 2>NUL
2022 # <</mark>>