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 # If necessary, create a list of harmless compiler warnings to disable when
26 # compiling the build tools. For the SQLite source code itself, warnings,
27 # if any, will be disabled from within it.
30 !IF $(USE_FULLWARN)!=0
31 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4152 -wd4189 -wd4206 -wd4210
32 NO_WARN = $(NO_WARN) -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
36 # Set this non-0 to use the library paths and other options necessary for
43 # Set this non-0 to split the SQLite amalgamation file into chunks to
44 # be used for debugging with Visual Studio.
46 !IFNDEF SPLIT_AMALGAMATION
47 SPLIT_AMALGAMATION = 0
50 # Set this non-0 to use the International Components for Unicode (ICU).
56 # Set this non-0 to dynamically link to the MSVC runtime library.
62 # Set this non-0 to generate assembly code listings for the source code
69 # Set this non-0 to attempt setting the native compiler automatically
70 # for cross-compiling the command line tools needed during the compilation
77 # Set this non-0 to use the native libraries paths for cross-compiling
78 # the command line tools needed during the compilation process.
80 !IFNDEF USE_NATIVE_LIBPATHS
81 USE_NATIVE_LIBPATHS = 0
84 # Set this 0 to skip the compiling and embedding of version resources.
90 # Set this non-0 to compile binaries suitable for the WinRT environment.
91 # This setting does not apply to any binaries that require Tcl to operate
92 # properly (i.e. the text fixture, etc).
98 # Set this non-0 to skip attempting to look for and/or link with the Tcl
105 # Set this to non-0 to create and use PDBs.
111 # Set this to non-0 to use the SQLite debugging heap subsystem.
117 # Set this to non-0 to use the Win32 native heap subsystem.
123 # Set this to one of the following values to enable various debugging
124 # features. Each level includes the debugging options from the previous
125 # levels. Currently, the recognized values for DEBUG are:
127 # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
128 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
129 # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
130 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
131 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
132 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
133 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
139 # Enable use of available compiler optimizations? Normally, this should be
140 # non-zero. Setting this to zero, thus disabling all compiler optimizations,
141 # can be useful for testing.
143 !IFNDEF OPTIMIZATIONS
147 # These are the "standard" SQLite compilation options used when compiling for
148 # the Windows platform.
150 !IFNDEF OPT_FEATURE_FLAGS
151 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
152 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
153 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
156 ###############################################################################
157 ############################### END OF OPTIONS ################################
158 ###############################################################################
160 # This assumes that MSVC is always installed in 32-bit Program Files directory
161 # and sets the variable for use in locating other 32-bit installs accordingly.
163 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
164 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
166 # Check for the predefined command macro CC. This should point to the compiler
167 # binary for the target platform. If it is not defined, simply define it to
168 # the legacy default value 'cl.exe'.
174 # Check for the command macro LD. This should point to the linker binary for
175 # the target platform. If it is not defined, simply define it to the legacy
176 # default value 'link.exe'.
182 # Check for the predefined command macro RC. This should point to the resource
183 # compiler binary for the target platform. If it is not defined, simply define
184 # it to the legacy default value 'rc.exe'.
190 # Check for the MSVC runtime library path macro. Othertise, this value will
191 # default to the 'lib' directory underneath the MSVC installation directory.
194 CRTLIBPATH = $(VCINSTALLDIR)\lib
197 CRTLIBPATH = $(CRTLIBPATH:\\=\)
199 # Check for the command macro NCC. This should point to the compiler binary
200 # for the platform the compilation process is taking place on. If it is not
201 # defined, simply define it to have the same value as the CC macro. When
202 # cross-compiling, it is suggested that this macro be modified via the command
203 # line (since nmake itself does not provide a built-in method to guess it).
204 # For example, to use the x86 compiler when cross-compiling for x64, a command
205 # line similar to the following could be used (all on one line):
207 # nmake /f Makefile.msc sqlite3.dll
208 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
210 # Alternatively, the full path and file name to the compiler binary for the
211 # platform the compilation process is taking place may be specified (all on
214 # nmake /f Makefile.msc sqlite3.dll
215 # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
216 # USE_NATIVE_LIBPATHS=1
220 !ELSEIF $(XCOMPILE)!=0
221 NCC = "$(VCINSTALLDIR)\bin\$(CC)"
227 # Check for the MSVC native runtime library path macro. Othertise,
228 # this value will default to the 'lib' directory underneath the MSVC
229 # installation directory.
232 NCRTLIBPATH = $(VCINSTALLDIR)\lib
235 NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
237 # Check for the Platform SDK library path macro. Othertise, this
238 # value will default to the 'lib' directory underneath the Windows
239 # SDK installation directory (the environment variable used appears
240 # to be available when using Visual C++ 2008 or later via the
244 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
247 NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
249 # C compiler and options for use in building executables that
250 # will run on the platform that is doing the build.
252 !IF $(USE_FULLWARN)!=0
258 # Check if assembly code listings should be generated for the source
259 # code files to be compiled.
261 !IF $(USE_LISTINGS)!=0
265 # Check if the native library paths should be used when compiling
266 # the command line tools used during the compilation process. If
267 # so, set the necessary macro now.
269 !IF $(USE_NATIVE_LIBPATHS)!=0
270 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
273 # C compiler and options for use in building executables that
274 # will run on the target platform. (BCC and TCC are usually the
275 # same unless your are cross-compiling.)
277 !IF $(USE_FULLWARN)!=0
278 TCC = $(CC) -W4 -DINCLUDE_MSVC_H=1
283 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
284 RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src
286 # Check if assembly code listings should be generated for the source
287 # code files to be compiled.
289 !IF $(USE_LISTINGS)!=0
293 # When compiling the library for use in the WinRT environment,
294 # the following compile-time options must be used as well to
295 # disable use of Win32 APIs that are not available and to enable
296 # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
299 TCC = $(TCC) -DSQLITE_OS_WINRT=1
300 RCC = $(RCC) -DSQLITE_OS_WINRT=1
301 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
302 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
305 # Also, we need to dynamically link to the correct MSVC runtime
306 # when compiling for WinRT (e.g. debug or release) OR if the
307 # USE_CRT_DLL option is set to force dynamically linking to the
308 # MSVC runtime library.
310 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
328 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
329 # any extension header files by default. For non-amalgamation
330 # builds, we need to make sure the compiler can find these.
332 !IF $(USE_AMALGAMATION)==0
333 TCC = $(TCC) -I$(TOP)\ext\fts3
334 RCC = $(RCC) -I$(TOP)\ext\fts3
335 TCC = $(TCC) -I$(TOP)\ext\rtree
336 RCC = $(RCC) -I$(TOP)\ext\rtree
339 # The mksqlite3c.tcl script accepts some options on the command
340 # line. When compiling with debugging enabled, some of these
341 # options are necessary in order to allow debugging symbols to
342 # work correctly with Visual Studio when using the amalgamation.
345 MKSQLITE3C_ARGS = --linemacros
350 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
351 # Omitting the define will cause extra debugging code to be inserted and
352 # includes extra comments when "EXPLAIN stmt" is used.
355 TCC = $(TCC) -DNDEBUG
356 BCC = $(BCC) -DNDEBUG
357 RCC = $(RCC) -DNDEBUG
361 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR
362 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR
366 TCC = $(TCC) -DSQLITE_DEBUG
367 RCC = $(RCC) -DSQLITE_DEBUG
371 TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1
372 RCC = $(RCC) -DSQLITE_DEBUG_OS_TRACE=1
376 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
377 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE
380 # Prevent warnings about "insecure" MSVC runtime library functions
383 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
384 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
385 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
387 # Prevent warnings about "deprecated" POSIX functions being used.
389 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
390 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
391 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
393 # Use the SQLite debugging heap subsystem?
396 TCC = $(TCC) -DSQLITE_MEMDEBUG=1
397 RCC = $(RCC) -DSQLITE_MEMDEBUG=1
399 # Use native Win32 heap subsystem instead of malloc/free?
401 !ELSEIF $(WIN32HEAP)!=0
402 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
403 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
405 # Validate the heap on every call into the native Win32 heap subsystem?
408 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
409 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
413 # The locations of the Tcl header and library files. Also, the library that
414 # non-stubs enabled programs using Tcl must link against. These variables
415 # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
416 # prior to running nmake in order to match the actual installed location and
417 # version on this machine.
420 TCLINCDIR = c:\tcl\include
424 TCLLIBDIR = c:\tcl\lib
431 # The locations of the ICU header and library files. These variables
432 # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
433 # prior to running nmake in order to match the actual installed location on
437 ICUINCDIR = c:\icu\include
441 ICULIBDIR = c:\icu\lib
445 LIBICU = icuuc.lib icuin.lib
448 # This is the command to use for tclsh - normally just "tclsh", but we may
449 # know the specific version we want to use. This variable (TCLSH_CMD) may be
450 # overridden via the environment prior to running nmake in order to select a
451 # specific Tcl shell to use.
457 # Compiler options needed for programs that use the readline() library.
459 !IFNDEF READLINE_FLAGS
460 READLINE_FLAGS = -DHAVE_READLINE=0
463 # The library that programs using readline() must link against.
469 # Should the database engine be compiled threadsafe
471 TCC = $(TCC) -DSQLITE_THREADSAFE=1
472 RCC = $(RCC) -DSQLITE_THREADSAFE=1
474 # Do threads override each others locks by default (1), or do we test (-1)
476 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
477 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
479 # Any target libraries which libsqlite must be linked against
485 # Flags controlling use of the in memory btree implementation
487 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
488 # default to file, 2 to default to memory, and 3 to force temporary
489 # tables to always be in memory.
491 TCC = $(TCC) -DSQLITE_TEMP_STORE=1
492 RCC = $(RCC) -DSQLITE_TEMP_STORE=1
494 # Enable/disable loadable extensions, and other optional features
495 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
496 # The same set of OMIT and ENABLE flags should be passed to the
497 # LEMON parser generator and the mkkeywordhash tool as well.
499 # These are the required SQLite compilation options used when compiling for
500 # the Windows platform.
502 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
504 # Add the required and optional SQLite compilation options into the command
505 # lines used to invoke the MSVC code and resource compilers.
507 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
508 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
510 # Add in any optional parameters specified on the commane line, e.g.
511 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
516 # If compiling for debugging, add some defines.
519 TCC = $(TCC) -D_DEBUG
520 BCC = $(BCC) -D_DEBUG
521 RCC = $(RCC) -D_DEBUG
524 # If optimizations are enabled or disabled (either implicitly or
525 # explicitly), add the necessary flags.
527 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
530 !ELSEIF $(OPTIMIZATIONS)>=3
533 !ELSEIF $(OPTIMIZATIONS)==2
536 !ELSEIF $(OPTIMIZATIONS)==1
541 # If symbols are enabled (or compiling for debugging), enable PDBs.
543 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
548 # If ICU support is enabled, add the compiler options for it.
551 TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
552 RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
553 TCC = $(TCC) -I$(TOP)\ext\icu
554 RCC = $(RCC) -I$(TOP)\ext\icu
555 TCC = $(TCC) -I$(ICUINCDIR)
556 RCC = $(RCC) -I$(ICUINCDIR)
559 # Command line prefixes for compiling code, compiling resources,
562 LTCOMPILE = $(TCC) -Fo$@
563 LTRCOMPILE = $(RCC) -r
565 LTLINK = $(TCC) -Fe$@
567 # If a platform was set, force the linker to target that.
568 # Note that the vcvars*.bat family of batch files typically
569 # set this for you. Otherwise, the linker will attempt
570 # to deduce the binary type based on the object files.
572 LTLINKOPTS = /MACHINE:$(PLATFORM)
573 LTLIBOPTS = /MACHINE:$(PLATFORM)
576 # When compiling for use in the WinRT environment, the following
577 # linker option must be used to mark the executable as runnable
578 # only in the context of an application container.
581 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
582 !IF "$(VISUALSTUDIOVERSION)"=="12.0"
584 !IF "$(PLATFORM)"=="x86"
585 STORELIBPATH = $(CRTLIBPATH)\store
586 !ELSEIF "$(PLATFORM)"=="x64"
587 STORELIBPATH = $(CRTLIBPATH)\store\amd64
588 !ELSEIF "$(PLATFORM)"=="ARM"
589 STORELIBPATH = $(CRTLIBPATH)\store\arm
591 STORELIBPATH = $(CRTLIBPATH)\store
594 STORELIBPATH = $(STORELIBPATH:\\=\)
595 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
599 # When compiling for Windows Phone 8.1, an extra library path is
602 !IF $(USE_WP81_OPTS)!=0
604 !IF "$(PLATFORM)"=="x86"
605 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
606 !ELSEIF "$(PLATFORM)"=="ARM"
607 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
609 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
614 # When compiling for Windows Phone 8.1, some extra linker options
617 !IF $(USE_WP81_OPTS)!=0
619 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
621 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
622 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
623 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
626 # If either debugging or symbols are enabled, enable PDBs.
628 !IF $(DEBUG)>1 || $(SYMBOLS)!=0
632 # Start with the Tcl related linker options.
635 LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
639 # If ICU support is enabled, add the linker options for it.
642 LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
643 LTLIBS = $(LTLIBS) $(LIBICU)
646 # nawk compatible awk.
652 # You should not have to change anything below this line
653 ###############################################################################
655 # Object files for the SQLite library (non-amalgamation).
657 LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
658 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
659 callback.lo complete.lo ctime.lo date.lo delete.lo \
660 expr.lo fault.lo fkey.lo \
661 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
662 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
663 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
664 func.lo global.lo hash.lo \
665 icu.lo insert.lo journal.lo legacy.lo loadext.lo \
666 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
668 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
669 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
670 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
671 random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
672 table.lo threads.lo tokenize.lo trigger.lo \
673 update.lo util.lo vacuum.lo \
674 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
675 vdbetrace.lo wal.lo walker.lo where.lo utf.lo vtab.lo
677 # Object files for the amalgamation.
679 LIBOBJS1 = sqlite3.lo
681 # Determine the real value of LIBOBJ based on the 'configure' script
683 !IF $(USE_AMALGAMATION)==0
689 # Determine if embedded resource compilation and usage are enabled.
692 LIBRESOBJS = sqlite3res.lo
697 # All of the source code files.
700 $(TOP)\src\crypto.c \
701 $(TOP)\src\crypto_cc.c \
702 $(TOP)\src\crypto_impl.c \
703 $(TOP)\src\crypto_libtomcrypt.c \
704 $(TOP)\src\crypto_openssl.c \
705 $(TOP)\src\crypto.h \
706 $(TOP)\src\sqlcipher.h \
708 $(TOP)\src\analyze.c \
709 $(TOP)\src\attach.c \
711 $(TOP)\src\backup.c \
712 $(TOP)\src\bitvec.c \
713 $(TOP)\src\btmutex.c \
716 $(TOP)\src\btreeInt.h \
718 $(TOP)\src\callback.c \
719 $(TOP)\src\complete.c \
722 $(TOP)\src\delete.c \
727 $(TOP)\src\global.c \
730 $(TOP)\src\hwtime.h \
731 $(TOP)\src\insert.c \
732 $(TOP)\src\journal.c \
733 $(TOP)\src\legacy.c \
734 $(TOP)\src\loadext.c \
736 $(TOP)\src\malloc.c \
742 $(TOP)\src\memjournal.c \
746 $(TOP)\src\mutex_noop.c \
747 $(TOP)\src\mutex_unix.c \
748 $(TOP)\src\mutex_w32.c \
749 $(TOP)\src\notify.c \
752 $(TOP)\src\os_common.h \
753 $(TOP)\src\os_setup.h \
754 $(TOP)\src\os_unix.c \
755 $(TOP)\src\os_win.c \
756 $(TOP)\src\os_win.h \
760 $(TOP)\src\pcache.c \
761 $(TOP)\src\pcache.h \
762 $(TOP)\src\pcache1.c \
763 $(TOP)\src\pragma.c \
764 $(TOP)\src\prepare.c \
765 $(TOP)\src\printf.c \
766 $(TOP)\src\random.c \
767 $(TOP)\src\resolve.c \
768 $(TOP)\src\rowset.c \
769 $(TOP)\src\select.c \
770 $(TOP)\src\status.c \
772 $(TOP)\src\sqlite.h.in \
773 $(TOP)\src\sqlite3ext.h \
774 $(TOP)\src\sqliteInt.h \
775 $(TOP)\src\sqliteLimit.h \
777 $(TOP)\src\threads.c \
778 $(TOP)\src\tclsqlite.c \
779 $(TOP)\src\tokenize.c \
780 $(TOP)\src\trigger.c \
782 $(TOP)\src\update.c \
784 $(TOP)\src\vacuum.c \
787 $(TOP)\src\vdbeapi.c \
788 $(TOP)\src\vdbeaux.c \
789 $(TOP)\src\vdbeblob.c \
790 $(TOP)\src\vdbemem.c \
791 $(TOP)\src\vdbesort.c \
792 $(TOP)\src\vdbetrace.c \
793 $(TOP)\src\vdbeInt.h \
797 $(TOP)\src\walker.c \
799 $(TOP)\src\whereInt.h
801 # Source code for extensions
804 $(TOP)\ext\fts1\fts1.c \
805 $(TOP)\ext\fts1\fts1.h \
806 $(TOP)\ext\fts1\fts1_hash.c \
807 $(TOP)\ext\fts1\fts1_hash.h \
808 $(TOP)\ext\fts1\fts1_porter.c \
809 $(TOP)\ext\fts1\fts1_tokenizer.h \
810 $(TOP)\ext\fts1\fts1_tokenizer1.c
812 $(TOP)\ext\fts2\fts2.c \
813 $(TOP)\ext\fts2\fts2.h \
814 $(TOP)\ext\fts2\fts2_hash.c \
815 $(TOP)\ext\fts2\fts2_hash.h \
816 $(TOP)\ext\fts2\fts2_icu.c \
817 $(TOP)\ext\fts2\fts2_porter.c \
818 $(TOP)\ext\fts2\fts2_tokenizer.h \
819 $(TOP)\ext\fts2\fts2_tokenizer.c \
820 $(TOP)\ext\fts2\fts2_tokenizer1.c
822 $(TOP)\ext\fts3\fts3.c \
823 $(TOP)\ext\fts3\fts3.h \
824 $(TOP)\ext\fts3\fts3Int.h \
825 $(TOP)\ext\fts3\fts3_aux.c \
826 $(TOP)\ext\fts3\fts3_expr.c \
827 $(TOP)\ext\fts3\fts3_hash.c \
828 $(TOP)\ext\fts3\fts3_hash.h \
829 $(TOP)\ext\fts3\fts3_icu.c \
830 $(TOP)\ext\fts3\fts3_porter.c \
831 $(TOP)\ext\fts3\fts3_snippet.c \
832 $(TOP)\ext\fts3\fts3_tokenizer.h \
833 $(TOP)\ext\fts3\fts3_tokenizer.c \
834 $(TOP)\ext\fts3\fts3_tokenizer1.c \
835 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
836 $(TOP)\ext\fts3\fts3_unicode.c \
837 $(TOP)\ext\fts3\fts3_unicode2.c \
838 $(TOP)\ext\fts3\fts3_write.c
840 $(TOP)\ext\icu\sqliteicu.h \
843 $(TOP)\ext\rtree\rtree.h \
844 $(TOP)\ext\rtree\rtree.c
847 # Generated source code files
857 # Source code to the test files.
869 $(TOP)\src\test_autoext.c \
870 $(TOP)\src\test_async.c \
871 $(TOP)\src\test_backup.c \
872 $(TOP)\src\test_blob.c \
873 $(TOP)\src\test_btree.c \
874 $(TOP)\src\test_config.c \
875 $(TOP)\src\test_demovfs.c \
876 $(TOP)\src\test_devsym.c \
877 $(TOP)\src\test_fs.c \
878 $(TOP)\src\test_func.c \
879 $(TOP)\src\test_hexio.c \
880 $(TOP)\src\test_init.c \
881 $(TOP)\src\test_intarray.c \
882 $(TOP)\src\test_journal.c \
883 $(TOP)\src\test_malloc.c \
884 $(TOP)\src\test_multiplex.c \
885 $(TOP)\src\test_mutex.c \
886 $(TOP)\src\test_onefile.c \
887 $(TOP)\src\test_osinst.c \
888 $(TOP)\src\test_pcache.c \
889 $(TOP)\src\test_quota.c \
890 $(TOP)\src\test_rtree.c \
891 $(TOP)\src\test_schema.c \
892 $(TOP)\src\test_server.c \
893 $(TOP)\src\test_superlock.c \
894 $(TOP)\src\test_syscall.c \
895 $(TOP)\src\test_stat.c \
896 $(TOP)\src\test_tclvar.c \
897 $(TOP)\src\test_thread.c \
898 $(TOP)\src\test_vfs.c \
899 $(TOP)\src\test_wsd.c \
900 $(TOP)\ext\fts3\fts3_term.c \
901 $(TOP)\ext\fts3\fts3_test.c
903 # Statically linked extensions
906 $(TOP)\ext\misc\amatch.c \
907 $(TOP)\ext\misc\closure.c \
908 $(TOP)\ext\misc\eval.c \
909 $(TOP)\ext\misc\fileio.c \
910 $(TOP)\ext\misc\fuzzer.c \
911 $(TOP)\ext\misc\ieee754.c \
912 $(TOP)\ext\misc\nextchar.c \
913 $(TOP)\ext\misc\percentile.c \
914 $(TOP)\ext\misc\regexp.c \
915 $(TOP)\ext\misc\spellfix.c \
916 $(TOP)\ext\misc\totype.c \
917 $(TOP)\ext\misc\wholenumber.c
920 # Source code to the library files needed by the test fixture
923 $(TOP)\src\attach.c \
924 $(TOP)\src\backup.c \
925 $(TOP)\src\bitvec.c \
932 $(TOP)\src\insert.c \
937 $(TOP)\src\os_unix.c \
938 $(TOP)\src\os_win.c \
940 $(TOP)\src\pragma.c \
941 $(TOP)\src\prepare.c \
942 $(TOP)\src\printf.c \
943 $(TOP)\src\random.c \
944 $(TOP)\src\pcache.c \
945 $(TOP)\src\pcache1.c \
946 $(TOP)\src\select.c \
947 $(TOP)\src\tokenize.c \
950 $(TOP)\src\vdbeapi.c \
951 $(TOP)\src\vdbeaux.c \
953 $(TOP)\src\vdbemem.c \
954 $(TOP)\src\vdbesort.c \
955 $(TOP)\src\vdbetrace.c \
958 $(TOP)\ext\fts3\fts3.c \
959 $(TOP)\ext\fts3\fts3_aux.c \
960 $(TOP)\ext\fts3\fts3_expr.c \
961 $(TOP)\ext\fts3\fts3_tokenizer.c \
962 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
963 $(TOP)\ext\fts3\fts3_unicode.c \
964 $(TOP)\ext\fts3\fts3_unicode2.c \
965 $(TOP)\ext\fts3\fts3_write.c \
966 $(TOP)\ext\async\sqlite3async.c
968 # Header files used by all library source files.
972 $(TOP)\src\btreeInt.h \
974 $(TOP)\src\hwtime.h \
980 $(TOP)\src\os_common.h \
981 $(TOP)\src\os_setup.h \
982 $(TOP)\src\os_win.h \
984 $(TOP)\src\pcache.h \
987 $(TOP)\src\sqlite3ext.h \
988 $(TOP)\src\sqliteInt.h \
989 $(TOP)\src\sqliteLimit.h \
991 $(TOP)\src\vdbeInt.h \
992 $(TOP)\src\whereInt.h
994 # Header files used by extensions
997 $(TOP)\ext\fts1\fts1.h \
998 $(TOP)\ext\fts1\fts1_hash.h \
999 $(TOP)\ext\fts1\fts1_tokenizer.h
1000 EXTHDR = $(EXTHDR) \
1001 $(TOP)\ext\fts2\fts2.h \
1002 $(TOP)\ext\fts2\fts2_hash.h \
1003 $(TOP)\ext\fts2\fts2_tokenizer.h
1004 EXTHDR = $(EXTHDR) \
1005 $(TOP)\ext\fts3\fts3.h \
1006 $(TOP)\ext\fts3\fts3Int.h \
1007 $(TOP)\ext\fts3\fts3_hash.h \
1008 $(TOP)\ext\fts3\fts3_tokenizer.h
1009 EXTHDR = $(EXTHDR) \
1010 $(TOP)\ext\rtree\rtree.h
1011 EXTHDR = $(EXTHDR) \
1012 $(TOP)\ext\icu\sqliteicu.h
1013 EXTHDR = $(EXTHDR) \
1014 $(TOP)\ext\rtree\sqlite3rtree.h
1016 # This is the default Makefile target. The objects listed here
1017 # are what get build when you type just "make" with no arguments.
1019 all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
1021 libsqlite3.lib: $(LIBOBJ)
1022 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1024 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
1025 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
1027 sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
1028 $(LTLINK) $(READLINE_FLAGS) $(TOP)\src\shell.c \
1029 /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1031 mptester.exe: $(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
1032 $(LTLINK) $(TOP)\mptest\mptest.c \
1033 /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1035 # This target creates a directory named "tsrc" and fills it with
1036 # copies of all of the C source code and header files needed to
1037 # build on the target system. Some of the C source code and header
1038 # files are automatically generated. This target takes care of
1039 # all that automatic generation.
1041 .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl
1044 for %i in ($(SRC)) do copy /Y %i tsrc
1045 del /Q tsrc\sqlite.h.in tsrc\parse.y
1046 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1047 move vdbe.new tsrc\vdbe.c
1048 echo > .target_source
1050 sqlite3.c: .target_source $(TOP)\tool\mksqlite3c.tcl
1051 $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS)
1053 copy tsrc\sqlite3ext.h .
1055 sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1056 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1058 # Set the source code file to be used by executables and libraries when
1059 # they need the amalgamation.
1061 !IF $(SPLIT_AMALGAMATION)!=0
1062 SQLITE3C = sqlite3-all.c
1064 SQLITE3C = sqlite3.c
1067 # Rule to build the amalgamation
1069 sqlite3.lo: $(SQLITE3C)
1070 $(LTCOMPILE) -c $(SQLITE3C)
1072 # Rules to build the LEMON compiler generator
1074 lempar.c: $(TOP)\src\lempar.c
1075 copy $(TOP)\src\lempar.c .
1077 lemon.exe: $(TOP)\tool\lemon.c lempar.c
1078 $(BCC) $(NO_WARN) -Daccess=_access \
1079 -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
1081 # Rules to build individual *.lo files from generated *.c files. This
1087 parse.lo: parse.c $(HDR)
1088 $(LTCOMPILE) -c parse.c
1090 opcodes.lo: opcodes.c
1091 $(LTCOMPILE) -c opcodes.c
1093 # Rule to build the Win32 resources object file.
1096 $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR)
1097 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1098 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1099 echo #define SQLITE_RESOURCE_VERSION %%V \
1100 | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
1102 echo #endif >> sqlite3rc.h
1103 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1106 # Rules to build individual *.lo files from files in the src directory.
1108 alter.lo: $(TOP)\src\alter.c $(HDR)
1109 $(LTCOMPILE) -c $(TOP)\src\alter.c
1111 analyze.lo: $(TOP)\src\analyze.c $(HDR)
1112 $(LTCOMPILE) -c $(TOP)\src\analyze.c
1114 attach.lo: $(TOP)\src\attach.c $(HDR)
1115 $(LTCOMPILE) -c $(TOP)\src\attach.c
1117 auth.lo: $(TOP)\src\auth.c $(HDR)
1118 $(LTCOMPILE) -c $(TOP)\src\auth.c
1120 backup.lo: $(TOP)\src\backup.c $(HDR)
1121 $(LTCOMPILE) -c $(TOP)\src\backup.c
1123 bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
1124 $(LTCOMPILE) -c $(TOP)\src\bitvec.c
1126 btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
1127 $(LTCOMPILE) -c $(TOP)\src\btmutex.c
1129 btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1130 $(LTCOMPILE) -c $(TOP)\src\btree.c
1132 build.lo: $(TOP)\src\build.c $(HDR)
1133 $(LTCOMPILE) -c $(TOP)\src\build.c
1135 callback.lo: $(TOP)\src\callback.c $(HDR)
1136 $(LTCOMPILE) -c $(TOP)\src\callback.c
1138 complete.lo: $(TOP)\src\complete.c $(HDR)
1139 $(LTCOMPILE) -c $(TOP)\src\complete.c
1141 ctime.lo: $(TOP)\src\ctime.c $(HDR)
1142 $(LTCOMPILE) -c $(TOP)\src\ctime.c
1144 date.lo: $(TOP)\src\date.c $(HDR)
1145 $(LTCOMPILE) -c $(TOP)\src\date.c
1147 delete.lo: $(TOP)\src\delete.c $(HDR)
1148 $(LTCOMPILE) -c $(TOP)\src\delete.c
1150 expr.lo: $(TOP)\src\expr.c $(HDR)
1151 $(LTCOMPILE) -c $(TOP)\src\expr.c
1153 fault.lo: $(TOP)\src\fault.c $(HDR)
1154 $(LTCOMPILE) -c $(TOP)\src\fault.c
1156 fkey.lo: $(TOP)\src\fkey.c $(HDR)
1157 $(LTCOMPILE) -c $(TOP)\src\fkey.c
1159 func.lo: $(TOP)\src\func.c $(HDR)
1160 $(LTCOMPILE) -c $(TOP)\src\func.c
1162 global.lo: $(TOP)\src\global.c $(HDR)
1163 $(LTCOMPILE) -c $(TOP)\src\global.c
1165 hash.lo: $(TOP)\src\hash.c $(HDR)
1166 $(LTCOMPILE) -c $(TOP)\src\hash.c
1168 insert.lo: $(TOP)\src\insert.c $(HDR)
1169 $(LTCOMPILE) -c $(TOP)\src\insert.c
1171 journal.lo: $(TOP)\src\journal.c $(HDR)
1172 $(LTCOMPILE) -c $(TOP)\src\journal.c
1174 legacy.lo: $(TOP)\src\legacy.c $(HDR)
1175 $(LTCOMPILE) -c $(TOP)\src\legacy.c
1177 loadext.lo: $(TOP)\src\loadext.c $(HDR)
1178 $(LTCOMPILE) -c $(TOP)\src\loadext.c
1180 main.lo: $(TOP)\src\main.c $(HDR)
1181 $(LTCOMPILE) -c $(TOP)\src\main.c
1183 malloc.lo: $(TOP)\src\malloc.c $(HDR)
1184 $(LTCOMPILE) -c $(TOP)\src\malloc.c
1186 mem0.lo: $(TOP)\src\mem0.c $(HDR)
1187 $(LTCOMPILE) -c $(TOP)\src\mem0.c
1189 mem1.lo: $(TOP)\src\mem1.c $(HDR)
1190 $(LTCOMPILE) -c $(TOP)\src\mem1.c
1192 mem2.lo: $(TOP)\src\mem2.c $(HDR)
1193 $(LTCOMPILE) -c $(TOP)\src\mem2.c
1195 mem3.lo: $(TOP)\src\mem3.c $(HDR)
1196 $(LTCOMPILE) -c $(TOP)\src\mem3.c
1198 mem5.lo: $(TOP)\src\mem5.c $(HDR)
1199 $(LTCOMPILE) -c $(TOP)\src\mem5.c
1201 memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
1202 $(LTCOMPILE) -c $(TOP)\src\memjournal.c
1204 mutex.lo: $(TOP)\src\mutex.c $(HDR)
1205 $(LTCOMPILE) -c $(TOP)\src\mutex.c
1207 mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
1208 $(LTCOMPILE) -c $(TOP)\src\mutex_noop.c
1210 mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
1211 $(LTCOMPILE) -c $(TOP)\src\mutex_unix.c
1213 mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
1214 $(LTCOMPILE) -c $(TOP)\src\mutex_w32.c
1216 notify.lo: $(TOP)\src\notify.c $(HDR)
1217 $(LTCOMPILE) -c $(TOP)\src\notify.c
1219 pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1220 $(LTCOMPILE) -c $(TOP)\src\pager.c
1222 pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1223 $(LTCOMPILE) -c $(TOP)\src\pcache.c
1225 pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1226 $(LTCOMPILE) -c $(TOP)\src\pcache1.c
1228 os.lo: $(TOP)\src\os.c $(HDR)
1229 $(LTCOMPILE) -c $(TOP)\src\os.c
1231 os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
1232 $(LTCOMPILE) -c $(TOP)\src\os_unix.c
1234 os_win.lo: $(TOP)\src\os_win.c $(HDR)
1235 $(LTCOMPILE) -c $(TOP)\src\os_win.c
1237 pragma.lo: $(TOP)\src\pragma.c $(HDR)
1238 $(LTCOMPILE) -c $(TOP)\src\pragma.c
1240 prepare.lo: $(TOP)\src\prepare.c $(HDR)
1241 $(LTCOMPILE) -c $(TOP)\src\prepare.c
1243 printf.lo: $(TOP)\src\printf.c $(HDR)
1244 $(LTCOMPILE) -c $(TOP)\src\printf.c
1246 random.lo: $(TOP)\src\random.c $(HDR)
1247 $(LTCOMPILE) -c $(TOP)\src\random.c
1249 resolve.lo: $(TOP)\src\resolve.c $(HDR)
1250 $(LTCOMPILE) -c $(TOP)\src\resolve.c
1252 rowset.lo: $(TOP)\src\rowset.c $(HDR)
1253 $(LTCOMPILE) -c $(TOP)\src\rowset.c
1255 select.lo: $(TOP)\src\select.c $(HDR)
1256 $(LTCOMPILE) -c $(TOP)\src\select.c
1258 status.lo: $(TOP)\src\status.c $(HDR)
1259 $(LTCOMPILE) -c $(TOP)\src\status.c
1261 table.lo: $(TOP)\src\table.c $(HDR)
1262 $(LTCOMPILE) -c $(TOP)\src\table.c
1264 threads.lo: $(TOP)\src\threads.c $(HDR)
1265 $(LTCOMPILE) -c $(TOP)\src\threads.c
1267 tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
1268 $(LTCOMPILE) -c $(TOP)\src\tokenize.c
1270 trigger.lo: $(TOP)\src\trigger.c $(HDR)
1271 $(LTCOMPILE) -c $(TOP)\src\trigger.c
1273 update.lo: $(TOP)\src\update.c $(HDR)
1274 $(LTCOMPILE) -c $(TOP)\src\update.c
1276 utf.lo: $(TOP)\src\utf.c $(HDR)
1277 $(LTCOMPILE) -c $(TOP)\src\utf.c
1279 util.lo: $(TOP)\src\util.c $(HDR)
1280 $(LTCOMPILE) -c $(TOP)\src\util.c
1282 vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
1283 $(LTCOMPILE) -c $(TOP)\src\vacuum.c
1285 vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
1286 $(LTCOMPILE) -c $(TOP)\src\vdbe.c
1288 vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
1289 $(LTCOMPILE) -c $(TOP)\src\vdbeapi.c
1291 vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
1292 $(LTCOMPILE) -c $(TOP)\src\vdbeaux.c
1294 vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
1295 $(LTCOMPILE) -c $(TOP)\src\vdbeblob.c
1297 vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
1298 $(LTCOMPILE) -c $(TOP)\src\vdbemem.c
1300 vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
1301 $(LTCOMPILE) -c $(TOP)\src\vdbesort.c
1303 vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
1304 $(LTCOMPILE) -c $(TOP)\src\vdbetrace.c
1306 vtab.lo: $(TOP)\src\vtab.c $(HDR)
1307 $(LTCOMPILE) -c $(TOP)\src\vtab.c
1309 wal.lo: $(TOP)\src\wal.c $(HDR)
1310 $(LTCOMPILE) -c $(TOP)\src\wal.c
1312 walker.lo: $(TOP)\src\walker.c $(HDR)
1313 $(LTCOMPILE) -c $(TOP)\src\walker.c
1315 where.lo: $(TOP)\src\where.c $(HDR)
1316 $(LTCOMPILE) -c $(TOP)\src\where.c
1318 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
1319 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1321 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
1322 $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1324 tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS)
1325 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1327 # Rules to build opcodes.c and opcodes.h
1329 opcodes.c: opcodes.h $(TOP)\mkopcodec.awk
1330 $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c
1332 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk
1333 type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h
1335 # Rules to build parse.c and parse.h - the outputs of lemon.
1339 parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
1340 del /Q parse.y parse.h parse.h.temp
1341 copy $(TOP)\src\parse.y .
1342 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
1343 move parse.h parse.h.temp
1344 $(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
1346 sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
1347 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h
1349 mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
1350 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \
1351 $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
1353 keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
1354 .\mkkeywordhash.exe > keywordhash.h
1358 # Rules to build the extension objects.
1360 icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1361 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1363 fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1364 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1366 fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
1367 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
1369 fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
1370 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
1372 fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
1373 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
1375 fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
1376 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
1378 fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
1379 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
1381 fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
1382 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
1384 fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
1385 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
1387 fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
1388 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
1390 fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
1391 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
1393 fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
1394 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
1396 fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
1397 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
1399 fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
1400 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
1402 fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
1403 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
1405 fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
1406 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
1408 fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1409 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
1411 fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
1412 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
1414 fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
1415 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
1417 fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
1418 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
1420 rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
1421 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
1424 # Rules to build the 'testfixture' application.
1426 # If using the amalgamation, use sqlite3.c directly to build the test
1427 # fixture. Otherwise link against libsqlite3.lib. (This distinction is
1428 # necessary because the test fixture requires non-API symbols which are
1429 # hidden when the library is built via the amalgamation).
1431 TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
1432 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
1433 TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
1435 TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib
1436 TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
1437 !IF $(USE_AMALGAMATION)==0
1438 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1440 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1443 testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
1444 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
1445 -DBUILD_sqlite -I$(TCLINCDIR) \
1446 $(TESTFIXTURE_SRC) \
1447 /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1449 extensiontest: testfixture.exe testloadext.dll
1450 .\testfixture.exe $(TOP)\test\loadext.test
1452 fulltest: testfixture.exe sqlite3.exe
1453 .\testfixture.exe $(TOP)\test\all.test
1455 soaktest: testfixture.exe sqlite3.exe
1456 .\testfixture.exe $(TOP)\test\all.test -soak=1
1458 fulltestonly: testfixture.exe sqlite3.exe
1459 .\testfixture.exe $(TOP)\test\full.test
1461 queryplantest: testfixture.exe sqlite3.exe
1462 .\testfixture.exe $(TOP)\test\permutations.test queryplanner
1464 test: testfixture.exe sqlite3.exe
1465 .\testfixture.exe $(TOP)\test\veryquick.test
1467 sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
1468 copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@
1469 echo static const char *tclsh_main_loop(void){ >> $@
1470 echo static const char *zMainloop = >> $@
1471 $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
1472 echo ; return zMainloop; } >> $@
1474 sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
1475 $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
1476 /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1478 testloadext.lo: $(TOP)\src\test_loadext.c
1479 $(LTCOMPILE) -c $(TOP)\src\test_loadext.c
1481 testloadext.dll: testloadext.lo
1482 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
1484 showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C)
1485 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1486 $(TOP)\tool\showdb.c $(SQLITE3C)
1488 showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C)
1489 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1490 $(TOP)\tool\showstat4.c $(SQLITE3C)
1492 showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C)
1493 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1494 $(TOP)\tool\showjournal.c $(SQLITE3C)
1496 showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C)
1497 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1498 $(TOP)\tool\showwal.c $(SQLITE3C)
1500 fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C)
1501 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1502 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C)
1504 rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C)
1505 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1506 $(TOP)\tool\rollback-test.c $(SQLITE3C)
1508 LogEst.exe: $(TOP)\tool\logest.c sqlite3.h
1509 $(LTLINK) -Fe$@ $(TOP)\tool\LogEst.c
1511 wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C)
1512 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1513 $(TOP)\test\wordcount.c $(SQLITE3C)
1515 speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C)
1516 $(LTLINK) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1517 $(TOP)\test\speedtest1.c $(SQLITE3C)
1520 del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
1521 del /Q *.cod *.da *.bb *.bbg gmon.out
1522 del /Q sqlite3.h opcodes.c opcodes.h
1523 del /Q lemon.* lempar.c parse.*
1524 del /Q mkkeywordhash.* keywordhash.h
1525 del /Q notasharedlib.*
1532 del /Q .target_source
1533 del /Q tclsqlite3.exe tclsqlite3.exp
1534 del /Q testloadext.dll testloadext.exp
1535 del /Q testfixture.exe testfixture.exp test.db
1536 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe
1537 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe
1538 del /Q wordcount.exe
1539 del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1540 del /Q sqlite3.c sqlite3-*.c
1542 del /Q shell.c sqlite3ext.h
1543 del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c
1544 del /Q sqlite-*-output.vsix
1547 # Dynamic link library section.
1551 sqlite3.def: libsqlite3.lib
1552 echo EXPORTS > sqlite3.def
1553 dumpbin /all libsqlite3.lib \
1554 | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
1555 | sort >> sqlite3.def
1557 sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def
1558 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)