blob: 5c72001532a2cb9ee0104b7f0f6589046227e9c4 [file] [log] [blame]
shanehb2f20bf2011-06-17 07:07:24 +00001#
shaneh603e4262011-06-17 18:52:07 +00002# nmake Makefile for SQLite
shanehb2f20bf2011-06-17 07:07:24 +00003#
mistachkin4712c212014-05-09 20:51:17 +00004###############################################################################
5############################## START OF OPTIONS ###############################
6###############################################################################
shanehb2f20bf2011-06-17 07:07:24 +00007
8# The toplevel directory of the source tree. This is the directory
9# that contains this "Makefile.msc".
10#
11TOP = .
12
shaneh6e7850c2011-06-17 15:57:07 +000013# Set this non-0 to create and use the SQLite amalgamation file.
14#
mistachkin0ec07442012-10-12 18:06:07 +000015!IFNDEF USE_AMALGAMATION
shaneh6e7850c2011-06-17 15:57:07 +000016USE_AMALGAMATION = 1
mistachkin0ec07442012-10-12 18:06:07 +000017!ENDIF
shaneh6e7850c2011-06-17 15:57:07 +000018
mistachkin2318d332015-01-12 18:02:52 +000019# Set this non-0 to enable full warnings (-W4, etc) when compiling.
20#
21!IFNDEF USE_FULLWARN
22USE_FULLWARN = 0
23!ENDIF
24
mistachkin44723ce2015-03-21 02:22:37 +000025# Set this non-0 to use "stdcall" calling convention for the core library
26# and shell executable.
27#
28!IFNDEF USE_STDCALL
29USE_STDCALL = 0
30!ENDIF
31
32# Set this non-0 to have the shell executable link against the core dynamic
33# link library.
34#
35!IFNDEF DYNAMIC_SHELL
36DYNAMIC_SHELL = 0
37!ENDIF
38
mistachkin13a24f82015-05-13 04:50:30 +000039# Set this non-0 to enable extra code that attempts to detect misuse of the
40# SQLite API.
41#
42!IFNDEF API_ARMOR
43API_ARMOR = 0
44!ENDIF
45
mistachkin2318d332015-01-12 18:02:52 +000046# If necessary, create a list of harmless compiler warnings to disable when
mistachkin44723ce2015-03-21 02:22:37 +000047# compiling the various tools. For the SQLite source code itself, warnings,
mistachkin2318d332015-01-12 18:02:52 +000048# if any, will be disabled from within it.
49#
50!IFNDEF NO_WARN
51!IF $(USE_FULLWARN)!=0
mistachkin22529172015-04-10 21:16:11 +000052NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
53NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
mistachkin2318d332015-01-12 18:02:52 +000054!ENDIF
55!ENDIF
56
mistachkina5e2b502014-05-12 22:36:50 +000057# Set this non-0 to use the library paths and other options necessary for
58# Windows Phone 8.1.
mistachkind9b3c542014-05-09 23:31:55 +000059#
60!IFNDEF USE_WP81_OPTS
61USE_WP81_OPTS = 0
62!ENDIF
63
mistachkin76510912013-10-11 23:01:18 +000064# Set this non-0 to split the SQLite amalgamation file into chunks to
65# be used for debugging with Visual Studio.
66#
67!IFNDEF SPLIT_AMALGAMATION
mistachkin0aedc6b2013-10-11 23:02:13 +000068SPLIT_AMALGAMATION = 0
mistachkin76510912013-10-11 23:01:18 +000069!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +000070
mistachkinc756ded2011-10-02 05:23:16 +000071# Set this non-0 to use the International Components for Unicode (ICU).
72#
mistachkin0ec07442012-10-12 18:06:07 +000073!IFNDEF USE_ICU
mistachkinc756ded2011-10-02 05:23:16 +000074USE_ICU = 0
mistachkin0ec07442012-10-12 18:06:07 +000075!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +000076
mistachkin8d967a92012-06-21 04:21:35 +000077# Set this non-0 to dynamically link to the MSVC runtime library.
78#
mistachkin0ec07442012-10-12 18:06:07 +000079!IFNDEF USE_CRT_DLL
mistachkin8d967a92012-06-21 04:21:35 +000080USE_CRT_DLL = 0
mistachkin0ec07442012-10-12 18:06:07 +000081!ENDIF
mistachkin8d967a92012-06-21 04:21:35 +000082
mistachkine45e0fb2015-01-21 00:48:46 +000083# Set this non-0 to link to the RPCRT4 library.
84#
85!IFNDEF USE_RPCRT4_LIB
86USE_RPCRT4_LIB = 0
87!ENDIF
88
mistachkin0157e012013-09-06 21:41:11 +000089# Set this non-0 to generate assembly code listings for the source code
90# files.
91#
92!IFNDEF USE_LISTINGS
93USE_LISTINGS = 0
94!ENDIF
95
mistachkin52fd8e12012-08-28 01:44:13 +000096# Set this non-0 to attempt setting the native compiler automatically
97# for cross-compiling the command line tools needed during the compilation
98# process.
99#
mistachkin0ec07442012-10-12 18:06:07 +0000100!IFNDEF XCOMPILE
mistachkin52fd8e12012-08-28 01:44:13 +0000101XCOMPILE = 0
mistachkin0ec07442012-10-12 18:06:07 +0000102!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000103
mistachkinbd58d5f2012-06-30 22:22:34 +0000104# Set this non-0 to use the native libraries paths for cross-compiling
105# the command line tools needed during the compilation process.
106#
mistachkin0ec07442012-10-12 18:06:07 +0000107!IFNDEF USE_NATIVE_LIBPATHS
mistachkinbd58d5f2012-06-30 22:22:34 +0000108USE_NATIVE_LIBPATHS = 0
mistachkin0ec07442012-10-12 18:06:07 +0000109!ENDIF
mistachkinbd58d5f2012-06-30 22:22:34 +0000110
mistachkin08c1c312012-10-06 03:48:25 +0000111# Set this 0 to skip the compiling and embedding of version resources.
112#
mistachkin0ec07442012-10-12 18:06:07 +0000113!IFNDEF USE_RC
mistachkin08c1c312012-10-06 03:48:25 +0000114USE_RC = 1
mistachkin0ec07442012-10-12 18:06:07 +0000115!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000116
mistachkin46b721a2012-03-23 12:28:21 +0000117# Set this non-0 to compile binaries suitable for the WinRT environment.
118# This setting does not apply to any binaries that require Tcl to operate
119# properly (i.e. the text fixture, etc).
120#
mistachkin0ec07442012-10-12 18:06:07 +0000121!IFNDEF FOR_WINRT
mistachkin46b721a2012-03-23 12:28:21 +0000122FOR_WINRT = 0
mistachkin0ec07442012-10-12 18:06:07 +0000123!ENDIF
mistachkin46b721a2012-03-23 12:28:21 +0000124
mistachkin318d38c2015-04-22 01:33:53 +0000125# Set this non-0 to compile binaries suitable for the UAP environment.
126# This setting does not apply to any binaries that require Tcl to operate
127# properly (i.e. the text fixture, etc).
128#
129!IFNDEF FOR_UAP
130FOR_UAP = 0
131!ENDIF
132
mistachkin31856a32012-07-27 07:13:25 +0000133# Set this non-0 to skip attempting to look for and/or link with the Tcl
134# runtime library.
135#
mistachkin0ec07442012-10-12 18:06:07 +0000136!IFNDEF NO_TCL
mistachkin31856a32012-07-27 07:13:25 +0000137NO_TCL = 0
mistachkin0ec07442012-10-12 18:06:07 +0000138!ENDIF
mistachkin31856a32012-07-27 07:13:25 +0000139
mistachkin4d60be52011-08-26 05:40:31 +0000140# Set this to non-0 to create and use PDBs.
141#
mistachkin0ec07442012-10-12 18:06:07 +0000142!IFNDEF SYMBOLS
mistachkin4d60be52011-08-26 05:40:31 +0000143SYMBOLS = 1
mistachkin0ec07442012-10-12 18:06:07 +0000144!ENDIF
mistachkin4d60be52011-08-26 05:40:31 +0000145
mistachkin2f7d5d82012-08-22 00:39:34 +0000146# Set this to non-0 to use the SQLite debugging heap subsystem.
147#
mistachkin0ec07442012-10-12 18:06:07 +0000148!IFNDEF MEMDEBUG
mistachkin2f7d5d82012-08-22 00:39:34 +0000149MEMDEBUG = 0
mistachkin0ec07442012-10-12 18:06:07 +0000150!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +0000151
152# Set this to non-0 to use the Win32 native heap subsystem.
153#
mistachkin0ec07442012-10-12 18:06:07 +0000154!IFNDEF WIN32HEAP
mistachkin2f7d5d82012-08-22 00:39:34 +0000155WIN32HEAP = 0
mistachkin0ec07442012-10-12 18:06:07 +0000156!ENDIF
mistachkinf2d25f22011-08-25 04:09:12 +0000157
mistachkinb10f22a2015-04-16 16:27:29 +0000158# Set this to non-0 to enable OSTRACE() macros, which can be useful when
159# debugging.
160#
161!IFNDEF OSTRACE
162OSTRACE = 0
163!ENDIF
164
mistachkinf2d25f22011-08-25 04:09:12 +0000165# Set this to one of the following values to enable various debugging
166# features. Each level includes the debugging options from the previous
167# levels. Currently, the recognized values for DEBUG are:
168#
169# 0 == NDEBUG: Disables assert() and other runtime diagnostics.
mistachkincd54bab2014-12-20 21:14:14 +0000170# 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
171# 2 == Disables NDEBUG and all optimizations and then enables PDBs.
172# 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
173# 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
174# 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
175# 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
mistachkinf2d25f22011-08-25 04:09:12 +0000176#
mistachkin0ec07442012-10-12 18:06:07 +0000177!IFNDEF DEBUG
mistachkinf2d25f22011-08-25 04:09:12 +0000178DEBUG = 0
mistachkin0ec07442012-10-12 18:06:07 +0000179!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000180
mistachkin8bcd3fa2013-08-29 01:03:38 +0000181# Enable use of available compiler optimizations? Normally, this should be
182# non-zero. Setting this to zero, thus disabling all compiler optimizations,
183# can be useful for testing.
184#
185!IFNDEF OPTIMIZATIONS
186OPTIMIZATIONS = 2
187!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000188
mistachkin4712c212014-05-09 20:51:17 +0000189# These are the "standard" SQLite compilation options used when compiling for
190# the Windows platform.
191#
192!IFNDEF OPT_FEATURE_FLAGS
193OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
194OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
195OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
196!ENDIF
197
198###############################################################################
199############################### END OF OPTIONS ################################
200###############################################################################
201
mistachkind9b3c542014-05-09 23:31:55 +0000202# This assumes that MSVC is always installed in 32-bit Program Files directory
203# and sets the variable for use in locating other 32-bit installs accordingly.
204#
205PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
206PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
207
mistachkine37f99c2012-06-30 16:22:05 +0000208# Check for the predefined command macro CC. This should point to the compiler
mistachkinbd58d5f2012-06-30 22:22:34 +0000209# binary for the target platform. If it is not defined, simply define it to
mistachkine37f99c2012-06-30 16:22:05 +0000210# the legacy default value 'cl.exe'.
211#
212!IFNDEF CC
213CC = cl.exe
214!ENDIF
215
mistachkin228aeff2012-06-30 19:24:09 +0000216# Check for the command macro LD. This should point to the linker binary for
mistachkinbd58d5f2012-06-30 22:22:34 +0000217# the target platform. If it is not defined, simply define it to the legacy
mistachkin228aeff2012-06-30 19:24:09 +0000218# default value 'link.exe'.
219#
220!IFNDEF LD
221LD = link.exe
222!ENDIF
223
mistachkin4d9d1f42012-09-03 10:32:32 +0000224# Check for the predefined command macro RC. This should point to the resource
225# compiler binary for the target platform. If it is not defined, simply define
226# it to the legacy default value 'rc.exe'.
227#
228!IFNDEF RC
229RC = rc.exe
230!ENDIF
231
mistachkin4712c212014-05-09 20:51:17 +0000232# Check for the MSVC runtime library path macro. Othertise, this value will
233# default to the 'lib' directory underneath the MSVC installation directory.
234#
235!IFNDEF CRTLIBPATH
236CRTLIBPATH = $(VCINSTALLDIR)\lib
237!ENDIF
238
239CRTLIBPATH = $(CRTLIBPATH:\\=\)
240
mistachkine37f99c2012-06-30 16:22:05 +0000241# Check for the command macro NCC. This should point to the compiler binary
mistachkinbd58d5f2012-06-30 22:22:34 +0000242# for the platform the compilation process is taking place on. If it is not
243# defined, simply define it to have the same value as the CC macro. When
mistachkine37f99c2012-06-30 16:22:05 +0000244# cross-compiling, it is suggested that this macro be modified via the command
245# line (since nmake itself does not provide a built-in method to guess it).
246# For example, to use the x86 compiler when cross-compiling for x64, a command
mistachkinbd58d5f2012-06-30 22:22:34 +0000247# line similar to the following could be used (all on one line):
mistachkine37f99c2012-06-30 16:22:05 +0000248#
mistachkin6f928332012-08-17 11:47:32 +0000249# nmake /f Makefile.msc sqlite3.dll
mistachkin52fd8e12012-08-28 01:44:13 +0000250# XCOMPILE=1 USE_NATIVE_LIBPATHS=1
251#
252# Alternatively, the full path and file name to the compiler binary for the
253# platform the compilation process is taking place may be specified (all on
254# one line):
255#
256# nmake /f Makefile.msc sqlite3.dll
mistachkinbd58d5f2012-06-30 22:22:34 +0000257# "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
258# USE_NATIVE_LIBPATHS=1
mistachkine37f99c2012-06-30 16:22:05 +0000259#
mistachkinfd0ba2a2012-07-27 08:21:45 +0000260!IFDEF NCC
261NCC = $(NCC:\\=\)
mistachkin52fd8e12012-08-28 01:44:13 +0000262!ELSEIF $(XCOMPILE)!=0
mistachkin5fac4202013-12-03 23:33:29 +0000263NCC = "$(VCINSTALLDIR)\bin\$(CC)"
mistachkin52fd8e12012-08-28 01:44:13 +0000264NCC = $(NCC:\\=\)
mistachkinfd0ba2a2012-07-27 08:21:45 +0000265!ELSE
mistachkine37f99c2012-06-30 16:22:05 +0000266NCC = $(CC)
267!ENDIF
268
mistachkin4712c212014-05-09 20:51:17 +0000269# Check for the MSVC native runtime library path macro. Othertise,
270# this value will default to the 'lib' directory underneath the MSVC
mistachkinbd58d5f2012-06-30 22:22:34 +0000271# installation directory.
272#
273!IFNDEF NCRTLIBPATH
274NCRTLIBPATH = $(VCINSTALLDIR)\lib
275!ENDIF
276
mistachkin0b5ae722012-07-27 23:03:47 +0000277NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
278
mistachkinbd58d5f2012-06-30 22:22:34 +0000279# Check for the Platform SDK library path macro. Othertise, this
280# value will default to the 'lib' directory underneath the Windows
281# SDK installation directory (the environment variable used appears
282# to be available when using Visual C++ 2008 or later via the
283# command line).
284#
285!IFNDEF NSDKLIBPATH
286NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
287!ENDIF
288
mistachkin0b5ae722012-07-27 23:03:47 +0000289NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
290
mistachkinbd58d5f2012-06-30 22:22:34 +0000291# C compiler and options for use in building executables that
shanehb2f20bf2011-06-17 07:07:24 +0000292# will run on the platform that is doing the build.
293#
mistachkin2318d332015-01-12 18:02:52 +0000294!IF $(USE_FULLWARN)!=0
mistachkinf170ea42015-10-16 20:13:57 +0000295BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000296!ELSE
mistachkinf170ea42015-10-16 20:13:57 +0000297BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000298!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000299
mistachkin0157e012013-09-06 21:41:11 +0000300# Check if assembly code listings should be generated for the source
301# code files to be compiled.
302#
303!IF $(USE_LISTINGS)!=0
304BCC = $(BCC) -FAcs
305!ENDIF
306
mistachkinbd58d5f2012-06-30 22:22:34 +0000307# Check if the native library paths should be used when compiling
308# the command line tools used during the compilation process. If
309# so, set the necessary macro now.
310#
311!IF $(USE_NATIVE_LIBPATHS)!=0
312NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
mistachkin6bbe3df2015-04-19 06:18:10 +0000313
314!IFDEF NUCRTLIBPATH
315NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
316NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
317!ENDIF
mistachkinbd58d5f2012-06-30 22:22:34 +0000318!ENDIF
319
320# C compiler and options for use in building executables that
shanehb2f20bf2011-06-17 07:07:24 +0000321# will run on the target platform. (BCC and TCC are usually the
322# same unless your are cross-compiling.)
323#
mistachkin2318d332015-01-12 18:02:52 +0000324!IF $(USE_FULLWARN)!=0
mistachkinf170ea42015-10-16 20:13:57 +0000325TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000326!ELSE
mistachkinf170ea42015-10-16 20:13:57 +0000327TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000328!ENDIF
329
330TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
mistachkinf170ea42015-10-16 20:13:57 +0000331RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
shaneh6e7850c2011-06-17 15:57:07 +0000332
mistachkin44723ce2015-03-21 02:22:37 +0000333# Check if we want to use the "stdcall" calling convention when compiling.
334# This is not supported by the compilers for non-x86 platforms. It should
335# also be noted here that building any target with these "stdcall" options
336# will most likely fail if the Tcl library is also required. This is due
337# to how the Tcl library functions are declared and exported (i.e. without
338# an explicit calling convention, which results in "cdecl").
339#
340!IF $(USE_STDCALL)!=0
341!IF "$(PLATFORM)"=="x86"
mistachkin59b9b022015-03-24 21:27:27 +0000342CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
343SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
mistachkin44723ce2015-03-21 02:22:37 +0000344!ELSE
345!IFNDEF PLATFORM
mistachkin59b9b022015-03-24 21:27:27 +0000346CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
347SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_STDCALL=__stdcall
mistachkin44723ce2015-03-21 02:22:37 +0000348!ELSE
349CORE_CCONV_OPTS =
350SHELL_CCONV_OPTS =
351!ENDIF
352!ENDIF
353!ELSE
354CORE_CCONV_OPTS =
355SHELL_CCONV_OPTS =
356!ENDIF
357
358# These are additional compiler options used for the core library.
359#
360!IFNDEF CORE_COMPILE_OPTS
mistachkin34a80652015-03-27 00:19:31 +0000361!IF $(DYNAMIC_SHELL)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000362CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
363!ELSE
364CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
365!ENDIF
366!ENDIF
367
368# These are the additional targets that the core library should depend on
369# when linking.
370#
371!IFNDEF CORE_LINK_DEP
mistachkin34a80652015-03-27 00:19:31 +0000372!IF $(DYNAMIC_SHELL)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000373CORE_LINK_DEP =
374!ELSE
375CORE_LINK_DEP = sqlite3.def
376!ENDIF
377!ENDIF
378
379# These are additional linker options used for the core library.
380#
381!IFNDEF CORE_LINK_OPTS
mistachkin34a80652015-03-27 00:19:31 +0000382!IF $(DYNAMIC_SHELL)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000383CORE_LINK_OPTS =
384!ELSE
385CORE_LINK_OPTS = /DEF:sqlite3.def
386!ENDIF
387!ENDIF
388
389# These are additional compiler options used for the shell executable.
390#
mistachkin8381be42015-10-09 14:23:56 +0000391!IFNDEF SHELL_COMPILE_OPTS
mistachkin44723ce2015-03-21 02:22:37 +0000392!IF $(DYNAMIC_SHELL)!=0
mistachkin8381be42015-10-09 14:23:56 +0000393SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
mistachkin44723ce2015-03-21 02:22:37 +0000394!ELSE
mistachkin8381be42015-10-09 14:23:56 +0000395SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS)
mistachkin44723ce2015-03-21 02:22:37 +0000396!ENDIF
397!ENDIF
398
399# This is the core library that the shell executable should depend on.
400#
401!IFNDEF SHELL_CORE_DEP
402!IF $(DYNAMIC_SHELL)!=0
403SHELL_CORE_DEP = sqlite3.dll
404!ELSE
405SHELL_CORE_DEP = libsqlite3.lib
406!ENDIF
407!ENDIF
408
409# This is the core library that the shell executable should link with.
410#
411!IFNDEF SHELL_CORE_LIB
412!IF $(DYNAMIC_SHELL)!=0
413SHELL_CORE_LIB = sqlite3.lib
414!ELSE
415SHELL_CORE_LIB = libsqlite3.lib
416!ENDIF
417!ENDIF
418
419# These are additional linker options used for the shell executable.
420#
421!IFNDEF SHELL_LINK_OPTS
422SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
423!ENDIF
424
mistachkin0157e012013-09-06 21:41:11 +0000425# Check if assembly code listings should be generated for the source
426# code files to be compiled.
427#
428!IF $(USE_LISTINGS)!=0
429TCC = $(TCC) -FAcs
430!ENDIF
shaneh6e7850c2011-06-17 15:57:07 +0000431
mistachkinf39eaf22012-03-20 02:18:42 +0000432# When compiling the library for use in the WinRT environment,
mistachkin46b721a2012-03-23 12:28:21 +0000433# the following compile-time options must be used as well to
mistachkinf39eaf22012-03-20 02:18:42 +0000434# disable use of Win32 APIs that are not available and to enable
435# use of Win32 APIs that are specific to Windows 8 and/or WinRT.
436#
mistachkin46b721a2012-03-23 12:28:21 +0000437!IF $(FOR_WINRT)!=0
mistachkin8d967a92012-06-21 04:21:35 +0000438TCC = $(TCC) -DSQLITE_OS_WINRT=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000439RCC = $(RCC) -DSQLITE_OS_WINRT=1
mistachkin08c1c312012-10-06 03:48:25 +0000440TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
441RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
mistachkin8d967a92012-06-21 04:21:35 +0000442!ENDIF
443
444# Also, we need to dynamically link to the correct MSVC runtime
445# when compiling for WinRT (e.g. debug or release) OR if the
446# USE_CRT_DLL option is set to force dynamically linking to the
447# MSVC runtime library.
448#
449!IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
mistachkincd54bab2014-12-20 21:14:14 +0000450!IF $(DEBUG)>1
mistachkin8d967a92012-06-21 04:21:35 +0000451TCC = $(TCC) -MDd
mistachkin08c1c312012-10-06 03:48:25 +0000452BCC = $(BCC) -MDd
mistachkin8d967a92012-06-21 04:21:35 +0000453!ELSE
454TCC = $(TCC) -MD
mistachkin08c1c312012-10-06 03:48:25 +0000455BCC = $(BCC) -MD
mistachkin8d967a92012-06-21 04:21:35 +0000456!ENDIF
457!ELSE
mistachkincd54bab2014-12-20 21:14:14 +0000458!IF $(DEBUG)>1
mistachkin8d967a92012-06-21 04:21:35 +0000459TCC = $(TCC) -MTd
mistachkin08c1c312012-10-06 03:48:25 +0000460BCC = $(BCC) -MTd
mistachkin8d967a92012-06-21 04:21:35 +0000461!ELSE
462TCC = $(TCC) -MT
mistachkin08c1c312012-10-06 03:48:25 +0000463BCC = $(BCC) -MT
mistachkin8d967a92012-06-21 04:21:35 +0000464!ENDIF
mistachkin46b721a2012-03-23 12:28:21 +0000465!ENDIF
mistachkinf39eaf22012-03-20 02:18:42 +0000466
467# The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
shaneh6e7850c2011-06-17 15:57:07 +0000468# any extension header files by default. For non-amalgamation
469# builds, we need to make sure the compiler can find these.
470#
471!IF $(USE_AMALGAMATION)==0
472TCC = $(TCC) -I$(TOP)\ext\fts3
mistachkin4d9d1f42012-09-03 10:32:32 +0000473RCC = $(RCC) -I$(TOP)\ext\fts3
shaneh6e7850c2011-06-17 15:57:07 +0000474TCC = $(TCC) -I$(TOP)\ext\rtree
mistachkin4d9d1f42012-09-03 10:32:32 +0000475RCC = $(RCC) -I$(TOP)\ext\rtree
shaneh6e7850c2011-06-17 15:57:07 +0000476!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000477
mistachkinb0427512014-01-30 11:12:52 +0000478# The mksqlite3c.tcl script accepts some options on the command
479# line. When compiling with debugging enabled, some of these
480# options are necessary in order to allow debugging symbols to
481# work correctly with Visual Studio when using the amalgamation.
482#
mistachkin22529172015-04-10 21:16:11 +0000483!IFNDEF MKSQLITE3C_ARGS
mistachkincd54bab2014-12-20 21:14:14 +0000484!IF $(DEBUG)>1
mistachkinb0427512014-01-30 11:12:52 +0000485MKSQLITE3C_ARGS = --linemacros
486!ELSE
487MKSQLITE3C_ARGS =
shanehb2f20bf2011-06-17 07:07:24 +0000488!ENDIF
mistachkin22529172015-04-10 21:16:11 +0000489!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000490
491# Define -DNDEBUG to compile without debugging (i.e., for production usage)
492# Omitting the define will cause extra debugging code to be inserted and
493# includes extra comments when "EXPLAIN stmt" is used.
494#
mistachkin753c5442011-08-25 02:02:25 +0000495!IF $(DEBUG)==0
shanehb2f20bf2011-06-17 07:07:24 +0000496TCC = $(TCC) -DNDEBUG
mistachkinfec360a2012-04-18 10:29:21 +0000497BCC = $(BCC) -DNDEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000498RCC = $(RCC) -DNDEBUG
mistachkin753c5442011-08-25 02:02:25 +0000499!ENDIF
500
mistachkin13a24f82015-05-13 04:50:30 +0000501!IF $(DEBUG)>0 || $(API_ARMOR)!=0
502TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
503RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
mistachkincd54bab2014-12-20 21:14:14 +0000504!ENDIF
505
506!IF $(DEBUG)>2
mistachkin13a24f82015-05-13 04:50:30 +0000507TCC = $(TCC) -DSQLITE_DEBUG=1
508RCC = $(RCC) -DSQLITE_DEBUG=1
mistachkin753c5442011-08-25 02:02:25 +0000509!ENDIF
510
mistachkinb10f22a2015-04-16 16:27:29 +0000511!IF $(DEBUG)>4 || $(OSTRACE)!=0
512TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
513RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
mistachkin753c5442011-08-25 02:02:25 +0000514!ENDIF
515
mistachkincd54bab2014-12-20 21:14:14 +0000516!IF $(DEBUG)>5
mistachkin13a24f82015-05-13 04:50:30 +0000517TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
518RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
mistachkin753c5442011-08-25 02:02:25 +0000519!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000520
mistachkinbd58d5f2012-06-30 22:22:34 +0000521# Prevent warnings about "insecure" MSVC runtime library functions
522# being used.
mistachkin176f1b42011-08-02 23:34:00 +0000523#
524TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkinfec360a2012-04-18 10:29:21 +0000525BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkin4d9d1f42012-09-03 10:32:32 +0000526RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkin176f1b42011-08-02 23:34:00 +0000527
mistachkinbd58d5f2012-06-30 22:22:34 +0000528# Prevent warnings about "deprecated" POSIX functions being used.
529#
530TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
531BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
mistachkin4d9d1f42012-09-03 10:32:32 +0000532RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
mistachkinbd58d5f2012-06-30 22:22:34 +0000533
mistachkin2f7d5d82012-08-22 00:39:34 +0000534# Use the SQLite debugging heap subsystem?
mistachkin1b186a92011-08-24 16:13:57 +0000535#
mistachkin2f7d5d82012-08-22 00:39:34 +0000536!IF $(MEMDEBUG)!=0
537TCC = $(TCC) -DSQLITE_MEMDEBUG=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000538RCC = $(RCC) -DSQLITE_MEMDEBUG=1
mistachkin2f7d5d82012-08-22 00:39:34 +0000539
mistachkin2f7d5d82012-08-22 00:39:34 +0000540# Use native Win32 heap subsystem instead of malloc/free?
541#
542!ELSEIF $(WIN32HEAP)!=0
543TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000544RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
mistachkin753c5442011-08-25 02:02:25 +0000545
mistachkin753c5442011-08-25 02:02:25 +0000546# Validate the heap on every call into the native Win32 heap subsystem?
547#
mistachkincd54bab2014-12-20 21:14:14 +0000548!IF $(DEBUG)>3
mistachkin753c5442011-08-25 02:02:25 +0000549TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000550RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
mistachkin753c5442011-08-25 02:02:25 +0000551!ENDIF
mistachkin468690e2011-08-24 17:42:22 +0000552!ENDIF
mistachkin1b186a92011-08-24 16:13:57 +0000553
mistachkin5b0b6fd2011-06-25 01:14:36 +0000554# The locations of the Tcl header and library files. Also, the library that
555# non-stubs enabled programs using Tcl must link against. These variables
556# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
557# prior to running nmake in order to match the actual installed location and
558# version on this machine.
shanehb2f20bf2011-06-17 07:07:24 +0000559#
mistachkine37f99c2012-06-30 16:22:05 +0000560!IFNDEF TCLINCDIR
shanehb2f20bf2011-06-17 07:07:24 +0000561TCLINCDIR = c:\tcl\include
mistachkine37f99c2012-06-30 16:22:05 +0000562!ENDIF
mistachkin5b0b6fd2011-06-25 01:14:36 +0000563
mistachkine37f99c2012-06-30 16:22:05 +0000564!IFNDEF TCLLIBDIR
shanehb2f20bf2011-06-17 07:07:24 +0000565TCLLIBDIR = c:\tcl\lib
mistachkine37f99c2012-06-30 16:22:05 +0000566!ENDIF
mistachkin5b0b6fd2011-06-25 01:14:36 +0000567
mistachkine37f99c2012-06-30 16:22:05 +0000568!IFNDEF LIBTCL
mistachkin5b0b6fd2011-06-25 01:14:36 +0000569LIBTCL = tcl85.lib
mistachkine37f99c2012-06-30 16:22:05 +0000570!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000571
mistachkin5b663502015-10-10 23:39:55 +0000572!IFNDEF LIBTCLSTUB
573LIBTCLSTUB = tclstub85.lib
574!ENDIF
575
mistachkin88739962015-10-14 23:04:08 +0000576!IFNDEF LIBTCLPATH
577LIBTCLPATH = c:\tcl\bin
578!ENDIF
579
mistachkinc756ded2011-10-02 05:23:16 +0000580# The locations of the ICU header and library files. These variables
581# (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
582# prior to running nmake in order to match the actual installed location on
583# this machine.
584#
mistachkine37f99c2012-06-30 16:22:05 +0000585!IFNDEF ICUINCDIR
mistachkinc756ded2011-10-02 05:23:16 +0000586ICUINCDIR = c:\icu\include
mistachkine37f99c2012-06-30 16:22:05 +0000587!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000588
mistachkine37f99c2012-06-30 16:22:05 +0000589!IFNDEF ICULIBDIR
mistachkinc756ded2011-10-02 05:23:16 +0000590ICULIBDIR = c:\icu\lib
mistachkine37f99c2012-06-30 16:22:05 +0000591!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000592
mistachkine37f99c2012-06-30 16:22:05 +0000593!IFNDEF LIBICU
mistachkinc756ded2011-10-02 05:23:16 +0000594LIBICU = icuuc.lib icuin.lib
mistachkine37f99c2012-06-30 16:22:05 +0000595!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000596
shanehb2f20bf2011-06-17 07:07:24 +0000597# This is the command to use for tclsh - normally just "tclsh", but we may
mistachkin5b0b6fd2011-06-25 01:14:36 +0000598# know the specific version we want to use. This variable (TCLSH_CMD) may be
599# overridden via the environment prior to running nmake in order to select a
600# specific Tcl shell to use.
shanehb2f20bf2011-06-17 07:07:24 +0000601#
mistachkine37f99c2012-06-30 16:22:05 +0000602!IFNDEF TCLSH_CMD
shanehb2f20bf2011-06-17 07:07:24 +0000603TCLSH_CMD = tclsh85
mistachkine37f99c2012-06-30 16:22:05 +0000604!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000605
606# Compiler options needed for programs that use the readline() library.
607#
mistachkin8bcd3fa2013-08-29 01:03:38 +0000608!IFNDEF READLINE_FLAGS
shaneh6e7850c2011-06-17 15:57:07 +0000609READLINE_FLAGS = -DHAVE_READLINE=0
mistachkin8bcd3fa2013-08-29 01:03:38 +0000610!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000611
612# The library that programs using readline() must link against.
613#
mistachkin8bcd3fa2013-08-29 01:03:38 +0000614!IFNDEF LIBREADLINE
shaneh6e7850c2011-06-17 15:57:07 +0000615LIBREADLINE =
mistachkin8bcd3fa2013-08-29 01:03:38 +0000616!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000617
618# Should the database engine be compiled threadsafe
619#
620TCC = $(TCC) -DSQLITE_THREADSAFE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000621RCC = $(RCC) -DSQLITE_THREADSAFE=1
shanehb2f20bf2011-06-17 07:07:24 +0000622
623# Do threads override each others locks by default (1), or do we test (-1)
624#
625TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
mistachkin4d9d1f42012-09-03 10:32:32 +0000626RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
shanehb2f20bf2011-06-17 07:07:24 +0000627
628# Any target libraries which libsqlite must be linked against
shaneh6e7850c2011-06-17 15:57:07 +0000629#
mistachkine37f99c2012-06-30 16:22:05 +0000630!IFNDEF TLIBS
shaneh6e7850c2011-06-17 15:57:07 +0000631TLIBS =
mistachkine37f99c2012-06-30 16:22:05 +0000632!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000633
634# Flags controlling use of the in memory btree implementation
635#
636# SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
637# default to file, 2 to default to memory, and 3 to force temporary
638# tables to always be in memory.
639#
shaneh6e7850c2011-06-17 15:57:07 +0000640TCC = $(TCC) -DSQLITE_TEMP_STORE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000641RCC = $(RCC) -DSQLITE_TEMP_STORE=1
shanehb2f20bf2011-06-17 07:07:24 +0000642
643# Enable/disable loadable extensions, and other optional features
shaneh6e7850c2011-06-17 15:57:07 +0000644# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
645# The same set of OMIT and ENABLE flags should be passed to the
shanehb2f20bf2011-06-17 07:07:24 +0000646# LEMON parser generator and the mkkeywordhash tool as well.
647
mistachkin4712c212014-05-09 20:51:17 +0000648# These are the required SQLite compilation options used when compiling for
649# the Windows platform.
650#
651REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
shanehb2f20bf2011-06-17 07:07:24 +0000652
mistachkine45e0fb2015-01-21 00:48:46 +0000653# If we are linking to the RPCRT4 library, enable features that need it.
654#
655!IF $(USE_RPCRT4_LIB)!=0
656REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
657!ENDIF
658
mistachkin4712c212014-05-09 20:51:17 +0000659# Add the required and optional SQLite compilation options into the command
660# lines used to invoke the MSVC code and resource compilers.
661#
662TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
663RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
shanehb2f20bf2011-06-17 07:07:24 +0000664
mistachkin4712c212014-05-09 20:51:17 +0000665# Add in any optional parameters specified on the commane line, e.g.
666# nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
667#
shanehb2f20bf2011-06-17 07:07:24 +0000668TCC = $(TCC) $(OPTS)
mistachkin4d9d1f42012-09-03 10:32:32 +0000669RCC = $(RCC) $(OPTS)
shanehb2f20bf2011-06-17 07:07:24 +0000670
mistachkin8bcd3fa2013-08-29 01:03:38 +0000671# If compiling for debugging, add some defines.
mistachkin4712c212014-05-09 20:51:17 +0000672#
mistachkincd54bab2014-12-20 21:14:14 +0000673!IF $(DEBUG)>1
mistachkin8bcd3fa2013-08-29 01:03:38 +0000674TCC = $(TCC) -D_DEBUG
675BCC = $(BCC) -D_DEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000676RCC = $(RCC) -D_DEBUG
mistachkin4d60be52011-08-26 05:40:31 +0000677!ENDIF
678
mistachkin8bcd3fa2013-08-29 01:03:38 +0000679# If optimizations are enabled or disabled (either implicitly or
680# explicitly), add the necessary flags.
mistachkin4712c212014-05-09 20:51:17 +0000681#
mistachkincd54bab2014-12-20 21:14:14 +0000682!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
mistachkin8bcd3fa2013-08-29 01:03:38 +0000683TCC = $(TCC) -Od
684BCC = $(BCC) -Od
685!ELSEIF $(OPTIMIZATIONS)>=3
686TCC = $(TCC) -Ox
687BCC = $(BCC) -Ox
688!ELSEIF $(OPTIMIZATIONS)==2
689TCC = $(TCC) -O2
690BCC = $(BCC) -O2
691!ELSEIF $(OPTIMIZATIONS)==1
692TCC = $(TCC) -O1
693BCC = $(BCC) -O1
694!ENDIF
695
696# If symbols are enabled (or compiling for debugging), enable PDBs.
mistachkin4712c212014-05-09 20:51:17 +0000697#
mistachkincd54bab2014-12-20 21:14:14 +0000698!IF $(DEBUG)>1 || $(SYMBOLS)!=0
mistachkin4d60be52011-08-26 05:40:31 +0000699TCC = $(TCC) -Zi
mistachkinfec360a2012-04-18 10:29:21 +0000700BCC = $(BCC) -Zi
mistachkin753c5442011-08-25 02:02:25 +0000701!ENDIF
702
mistachkinc756ded2011-10-02 05:23:16 +0000703# If ICU support is enabled, add the compiler options for it.
mistachkin4712c212014-05-09 20:51:17 +0000704#
mistachkinc756ded2011-10-02 05:23:16 +0000705!IF $(USE_ICU)!=0
706TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000707RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
mistachkinc756ded2011-10-02 05:23:16 +0000708TCC = $(TCC) -I$(TOP)\ext\icu
mistachkin4d9d1f42012-09-03 10:32:32 +0000709RCC = $(RCC) -I$(TOP)\ext\icu
mistachkinc756ded2011-10-02 05:23:16 +0000710TCC = $(TCC) -I$(ICUINCDIR)
mistachkin4d9d1f42012-09-03 10:32:32 +0000711RCC = $(RCC) -I$(ICUINCDIR)
mistachkinc756ded2011-10-02 05:23:16 +0000712!ENDIF
713
mistachkin4d9d1f42012-09-03 10:32:32 +0000714# Command line prefixes for compiling code, compiling resources,
715# linking, etc.
mistachkin4712c212014-05-09 20:51:17 +0000716#
shanehb2f20bf2011-06-17 07:07:24 +0000717LTCOMPILE = $(TCC) -Fo$@
mistachkin4d9d1f42012-09-03 10:32:32 +0000718LTRCOMPILE = $(RCC) -r
shanehb2f20bf2011-06-17 07:07:24 +0000719LTLIB = lib.exe
shaneh2a0b9ef2011-06-20 20:52:32 +0000720LTLINK = $(TCC) -Fe$@
721
mistachkine45e0fb2015-01-21 00:48:46 +0000722# If requested, link to the RPCRT4 library.
723#
724!IF $(USE_RPCRT4_LIB)!=0
725LTLINK = $(LTLINK) rpcrt4.lib
726!ENDIF
727
shaneh2a0b9ef2011-06-20 20:52:32 +0000728# If a platform was set, force the linker to target that.
729# Note that the vcvars*.bat family of batch files typically
730# set this for you. Otherwise, the linker will attempt
731# to deduce the binary type based on the object files.
mistachkine37f99c2012-06-30 16:22:05 +0000732!IFDEF PLATFORM
mistachkin44723ce2015-03-21 02:22:37 +0000733LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
734LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
735!ELSE
736LTLINKOPTS = /NOLOGO
737LTLIBOPTS = /NOLOGO
shaneh2a0b9ef2011-06-20 20:52:32 +0000738!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000739
mistachkina6ff8572012-04-17 21:00:12 +0000740# When compiling for use in the WinRT environment, the following
741# linker option must be used to mark the executable as runnable
742# only in the context of an application container.
743#
744!IF $(FOR_WINRT)!=0
745LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
mistachkin318d38c2015-04-22 01:33:53 +0000746!IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
mistachkinf6a23422014-05-05 20:24:34 +0000747!IFNDEF STORELIBPATH
mistachkinda5b1cd2013-07-10 19:39:02 +0000748!IF "$(PLATFORM)"=="x86"
mistachkin4712c212014-05-09 20:51:17 +0000749STORELIBPATH = $(CRTLIBPATH)\store
mistachkinda5b1cd2013-07-10 19:39:02 +0000750!ELSEIF "$(PLATFORM)"=="x64"
mistachkin4712c212014-05-09 20:51:17 +0000751STORELIBPATH = $(CRTLIBPATH)\store\amd64
mistachkin4eaa1292013-07-10 21:33:25 +0000752!ELSEIF "$(PLATFORM)"=="ARM"
mistachkin4712c212014-05-09 20:51:17 +0000753STORELIBPATH = $(CRTLIBPATH)\store\arm
mistachkin4eaa1292013-07-10 21:33:25 +0000754!ELSE
mistachkin4712c212014-05-09 20:51:17 +0000755STORELIBPATH = $(CRTLIBPATH)\store
mistachkinda5b1cd2013-07-10 19:39:02 +0000756!ENDIF
757!ENDIF
mistachkinf6a23422014-05-05 20:24:34 +0000758STORELIBPATH = $(STORELIBPATH:\\=\)
759LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
760!ENDIF
mistachkina6ff8572012-04-17 21:00:12 +0000761!ENDIF
762
mistachkind9b3c542014-05-09 23:31:55 +0000763# When compiling for Windows Phone 8.1, an extra library path is
764# required.
765#
766!IF $(USE_WP81_OPTS)!=0
767!IFNDEF WP81LIBPATH
768!IF "$(PLATFORM)"=="x86"
769WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
770!ELSEIF "$(PLATFORM)"=="ARM"
771WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
772!ELSE
773WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
774!ENDIF
775!ENDIF
776!ENDIF
777
778# When compiling for Windows Phone 8.1, some extra linker options
779# are also required.
780#
781!IF $(USE_WP81_OPTS)!=0
782!IFDEF WP81LIBPATH
783LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
784!ENDIF
785LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
786LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
787LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
788!ENDIF
789
mistachkin318d38c2015-04-22 01:33:53 +0000790# When compiling for UAP, some extra linker options are also required.
791#
792!IF $(FOR_UAP)!=0
793LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
794LTLINKOPTS = $(LTLINKOPTS) mincore.lib
795!IFDEF PSDKLIBPATH
796LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
797!ENDIF
798!ENDIF
799
mistachkinfec360a2012-04-18 10:29:21 +0000800# If either debugging or symbols are enabled, enable PDBs.
mistachkin4712c212014-05-09 20:51:17 +0000801#
mistachkincd54bab2014-12-20 21:14:14 +0000802!IF $(DEBUG)>1 || $(SYMBOLS)!=0
mistachkinf170ea42015-10-16 20:13:57 +0000803LDFLAGS = /DEBUG $(LDOPTS)
804!ELSE
805LDFLAGS = $(LDOPTS)
mistachkin753c5442011-08-25 02:02:25 +0000806!ENDIF
807
mistachkinc756ded2011-10-02 05:23:16 +0000808# Start with the Tcl related linker options.
mistachkin4712c212014-05-09 20:51:17 +0000809#
mistachkin31856a32012-07-27 07:13:25 +0000810!IF $(NO_TCL)==0
mistachkinc756ded2011-10-02 05:23:16 +0000811LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
812LTLIBS = $(LIBTCL)
mistachkin31856a32012-07-27 07:13:25 +0000813!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000814
815# If ICU support is enabled, add the linker options for it.
mistachkin4712c212014-05-09 20:51:17 +0000816#
mistachkinc756ded2011-10-02 05:23:16 +0000817!IF $(USE_ICU)!=0
818LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
819LTLIBS = $(LTLIBS) $(LIBICU)
820!ENDIF
821
shanehb2f20bf2011-06-17 07:07:24 +0000822# You should not have to change anything below this line
823###############################################################################
824
shanehb2f20bf2011-06-17 07:07:24 +0000825# Object files for the SQLite library (non-amalgamation).
826#
mistachkinf67feef2013-07-29 19:03:20 +0000827LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000828 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
drh1a4a6802015-05-04 18:31:09 +0000829 callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000830 expr.lo fault.lo fkey.lo \
drh391d4ba2012-05-28 20:22:16 +0000831 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
832 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
drh4d648c72013-04-22 17:07:56 +0000833 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
mistachkined52f9f2015-06-26 04:34:36 +0000834 fts5.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000835 func.lo global.lo hash.lo \
836 icu.lo insert.lo journal.lo legacy.lo loadext.lo \
837 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
838 memjournal.lo \
mistachkinf1c6bc52012-06-21 15:09:20 +0000839 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
840 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
mistachkinf67feef2013-07-29 19:03:20 +0000841 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000842 random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
drh38b41492015-06-08 15:08:15 +0000843 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000844 update.lo util.lo vacuum.lo \
mistachkinf67feef2013-07-29 19:03:20 +0000845 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
drh6c1f4ef2015-06-08 14:23:15 +0000846 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
847 utf.lo vtab.lo
shanehb2f20bf2011-06-17 07:07:24 +0000848
849# Object files for the amalgamation.
850#
851LIBOBJS1 = sqlite3.lo
852
853# Determine the real value of LIBOBJ based on the 'configure' script
854#
855!IF $(USE_AMALGAMATION)==0
856LIBOBJ = $(LIBOBJS0)
857!ELSE
858LIBOBJ = $(LIBOBJS1)
859!ENDIF
860
mistachkin08c1c312012-10-06 03:48:25 +0000861# Determine if embedded resource compilation and usage are enabled.
862#
863!IF $(USE_RC)!=0
864LIBRESOBJS = sqlite3res.lo
865!ELSE
866LIBRESOBJS =
867!ENDIF
868
shanehb2f20bf2011-06-17 07:07:24 +0000869# All of the source code files.
870#
drh62679202015-01-29 18:38:05 +0000871SRC1 = \
shanehb2f20bf2011-06-17 07:07:24 +0000872 $(TOP)\src\alter.c \
873 $(TOP)\src\analyze.c \
874 $(TOP)\src\attach.c \
875 $(TOP)\src\auth.c \
876 $(TOP)\src\backup.c \
877 $(TOP)\src\bitvec.c \
878 $(TOP)\src\btmutex.c \
879 $(TOP)\src\btree.c \
880 $(TOP)\src\btree.h \
881 $(TOP)\src\btreeInt.h \
882 $(TOP)\src\build.c \
883 $(TOP)\src\callback.c \
884 $(TOP)\src\complete.c \
885 $(TOP)\src\ctime.c \
886 $(TOP)\src\date.c \
drh1a4a6802015-05-04 18:31:09 +0000887 $(TOP)\src\dbstat.c \
shanehb2f20bf2011-06-17 07:07:24 +0000888 $(TOP)\src\delete.c \
889 $(TOP)\src\expr.c \
890 $(TOP)\src\fault.c \
891 $(TOP)\src\fkey.c \
892 $(TOP)\src\func.c \
893 $(TOP)\src\global.c \
894 $(TOP)\src\hash.c \
895 $(TOP)\src\hash.h \
896 $(TOP)\src\hwtime.h \
897 $(TOP)\src\insert.c \
898 $(TOP)\src\journal.c \
899 $(TOP)\src\legacy.c \
900 $(TOP)\src\loadext.c \
901 $(TOP)\src\main.c \
902 $(TOP)\src\malloc.c \
903 $(TOP)\src\mem0.c \
904 $(TOP)\src\mem1.c \
905 $(TOP)\src\mem2.c \
906 $(TOP)\src\mem3.c \
907 $(TOP)\src\mem5.c \
908 $(TOP)\src\memjournal.c \
mistachkin2318d332015-01-12 18:02:52 +0000909 $(TOP)\src\msvc.h \
shanehb2f20bf2011-06-17 07:07:24 +0000910 $(TOP)\src\mutex.c \
911 $(TOP)\src\mutex.h \
912 $(TOP)\src\mutex_noop.c \
shanehb2f20bf2011-06-17 07:07:24 +0000913 $(TOP)\src\mutex_unix.c \
914 $(TOP)\src\mutex_w32.c \
915 $(TOP)\src\notify.c \
916 $(TOP)\src\os.c \
917 $(TOP)\src\os.h \
918 $(TOP)\src\os_common.h \
mistachkinf74b9e02013-11-26 01:00:31 +0000919 $(TOP)\src\os_setup.h \
shanehb2f20bf2011-06-17 07:07:24 +0000920 $(TOP)\src\os_unix.c \
921 $(TOP)\src\os_win.c \
drh62679202015-01-29 18:38:05 +0000922 $(TOP)\src\os_win.h
923SRC2 = \
shanehb2f20bf2011-06-17 07:07:24 +0000924 $(TOP)\src\pager.c \
925 $(TOP)\src\pager.h \
926 $(TOP)\src\parse.y \
927 $(TOP)\src\pcache.c \
928 $(TOP)\src\pcache.h \
929 $(TOP)\src\pcache1.c \
930 $(TOP)\src\pragma.c \
drh67e65e52015-02-02 21:34:54 +0000931 $(TOP)\src\pragma.h \
shanehb2f20bf2011-06-17 07:07:24 +0000932 $(TOP)\src\prepare.c \
933 $(TOP)\src\printf.c \
934 $(TOP)\src\random.c \
935 $(TOP)\src\resolve.c \
936 $(TOP)\src\rowset.c \
937 $(TOP)\src\select.c \
938 $(TOP)\src\status.c \
939 $(TOP)\src\shell.c \
940 $(TOP)\src\sqlite.h.in \
941 $(TOP)\src\sqlite3ext.h \
942 $(TOP)\src\sqliteInt.h \
943 $(TOP)\src\sqliteLimit.h \
944 $(TOP)\src\table.c \
drhf51446a2012-07-21 19:40:42 +0000945 $(TOP)\src\threads.c \
shanehb2f20bf2011-06-17 07:07:24 +0000946 $(TOP)\src\tclsqlite.c \
947 $(TOP)\src\tokenize.c \
drh38b41492015-06-08 15:08:15 +0000948 $(TOP)\src\treeview.c \
shanehb2f20bf2011-06-17 07:07:24 +0000949 $(TOP)\src\trigger.c \
950 $(TOP)\src\utf.c \
951 $(TOP)\src\update.c \
952 $(TOP)\src\util.c \
953 $(TOP)\src\vacuum.c \
954 $(TOP)\src\vdbe.c \
955 $(TOP)\src\vdbe.h \
956 $(TOP)\src\vdbeapi.c \
957 $(TOP)\src\vdbeaux.c \
958 $(TOP)\src\vdbeblob.c \
959 $(TOP)\src\vdbemem.c \
mistachkin81c428a2011-08-17 02:19:54 +0000960 $(TOP)\src\vdbesort.c \
shanehb2f20bf2011-06-17 07:07:24 +0000961 $(TOP)\src\vdbetrace.c \
962 $(TOP)\src\vdbeInt.h \
963 $(TOP)\src\vtab.c \
drh8cd5b252015-03-02 22:06:43 +0000964 $(TOP)\src\vxworks.h \
shanehb2f20bf2011-06-17 07:07:24 +0000965 $(TOP)\src\wal.c \
966 $(TOP)\src\wal.h \
967 $(TOP)\src\walker.c \
drhe54df422013-11-12 18:37:25 +0000968 $(TOP)\src\where.c \
drh6f82e852015-06-06 20:12:09 +0000969 $(TOP)\src\wherecode.c \
drh6c1f4ef2015-06-08 14:23:15 +0000970 $(TOP)\src\whereexpr.c \
drhe54df422013-11-12 18:37:25 +0000971 $(TOP)\src\whereInt.h
shanehb2f20bf2011-06-17 07:07:24 +0000972
973# Source code for extensions
974#
drh62679202015-01-29 18:38:05 +0000975SRC3 = \
shanehb2f20bf2011-06-17 07:07:24 +0000976 $(TOP)\ext\fts1\fts1.c \
977 $(TOP)\ext\fts1\fts1.h \
978 $(TOP)\ext\fts1\fts1_hash.c \
979 $(TOP)\ext\fts1\fts1_hash.h \
980 $(TOP)\ext\fts1\fts1_porter.c \
981 $(TOP)\ext\fts1\fts1_tokenizer.h \
drh62679202015-01-29 18:38:05 +0000982 $(TOP)\ext\fts1\fts1_tokenizer1.c \
shanehb2f20bf2011-06-17 07:07:24 +0000983 $(TOP)\ext\fts2\fts2.c \
984 $(TOP)\ext\fts2\fts2.h \
985 $(TOP)\ext\fts2\fts2_hash.c \
986 $(TOP)\ext\fts2\fts2_hash.h \
987 $(TOP)\ext\fts2\fts2_icu.c \
988 $(TOP)\ext\fts2\fts2_porter.c \
989 $(TOP)\ext\fts2\fts2_tokenizer.h \
990 $(TOP)\ext\fts2\fts2_tokenizer.c \
991 $(TOP)\ext\fts2\fts2_tokenizer1.c
drh62679202015-01-29 18:38:05 +0000992SRC4 = \
shanehb2f20bf2011-06-17 07:07:24 +0000993 $(TOP)\ext\fts3\fts3.c \
994 $(TOP)\ext\fts3\fts3.h \
995 $(TOP)\ext\fts3\fts3Int.h \
996 $(TOP)\ext\fts3\fts3_aux.c \
997 $(TOP)\ext\fts3\fts3_expr.c \
998 $(TOP)\ext\fts3\fts3_hash.c \
999 $(TOP)\ext\fts3\fts3_hash.h \
1000 $(TOP)\ext\fts3\fts3_icu.c \
1001 $(TOP)\ext\fts3\fts3_porter.c \
1002 $(TOP)\ext\fts3\fts3_snippet.c \
1003 $(TOP)\ext\fts3\fts3_tokenizer.h \
1004 $(TOP)\ext\fts3\fts3_tokenizer.c \
1005 $(TOP)\ext\fts3\fts3_tokenizer1.c \
drh4d648c72013-04-22 17:07:56 +00001006 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +00001007 $(TOP)\ext\fts3\fts3_unicode.c \
1008 $(TOP)\ext\fts3\fts3_unicode2.c \
drh62679202015-01-29 18:38:05 +00001009 $(TOP)\ext\fts3\fts3_write.c \
shanehb2f20bf2011-06-17 07:07:24 +00001010 $(TOP)\ext\icu\sqliteicu.h \
drh62679202015-01-29 18:38:05 +00001011 $(TOP)\ext\icu\icu.c \
shanehb2f20bf2011-06-17 07:07:24 +00001012 $(TOP)\ext\rtree\rtree.h \
drh7ac07bd2015-05-19 22:56:45 +00001013 $(TOP)\ext\rtree\rtree.c \
drhcfb8f8d2015-07-23 20:44:49 +00001014 $(TOP)\ext\rbu\sqlite3rbu.h \
drh50065652015-10-08 19:29:18 +00001015 $(TOP)\ext\rbu\sqlite3rbu.c \
1016 $(TOP)\ext\misc\json1.c
shanehb2f20bf2011-06-17 07:07:24 +00001017
1018
1019# Generated source code files
1020#
drh62679202015-01-29 18:38:05 +00001021SRC5 = \
shanehb2f20bf2011-06-17 07:07:24 +00001022 keywordhash.h \
1023 opcodes.c \
1024 opcodes.h \
1025 parse.c \
1026 parse.h \
1027 sqlite3.h
1028
drh62679202015-01-29 18:38:05 +00001029# All source code files.
1030#
1031SRC = $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5)
1032
shanehb2f20bf2011-06-17 07:07:24 +00001033# Source code to the test files.
1034#
1035TESTSRC = \
1036 $(TOP)\src\test1.c \
1037 $(TOP)\src\test2.c \
1038 $(TOP)\src\test3.c \
1039 $(TOP)\src\test4.c \
1040 $(TOP)\src\test5.c \
1041 $(TOP)\src\test6.c \
1042 $(TOP)\src\test7.c \
1043 $(TOP)\src\test8.c \
1044 $(TOP)\src\test9.c \
1045 $(TOP)\src\test_autoext.c \
1046 $(TOP)\src\test_async.c \
1047 $(TOP)\src\test_backup.c \
drh5de7d962014-12-05 00:17:39 +00001048 $(TOP)\src\test_blob.c \
shanehb2f20bf2011-06-17 07:07:24 +00001049 $(TOP)\src\test_btree.c \
1050 $(TOP)\src\test_config.c \
1051 $(TOP)\src\test_demovfs.c \
1052 $(TOP)\src\test_devsym.c \
mistachkin413c63b2013-01-17 03:18:14 +00001053 $(TOP)\src\test_fs.c \
shanehb2f20bf2011-06-17 07:07:24 +00001054 $(TOP)\src\test_func.c \
shanehb2f20bf2011-06-17 07:07:24 +00001055 $(TOP)\src\test_hexio.c \
1056 $(TOP)\src\test_init.c \
1057 $(TOP)\src\test_intarray.c \
1058 $(TOP)\src\test_journal.c \
1059 $(TOP)\src\test_malloc.c \
1060 $(TOP)\src\test_multiplex.c \
1061 $(TOP)\src\test_mutex.c \
1062 $(TOP)\src\test_onefile.c \
1063 $(TOP)\src\test_osinst.c \
1064 $(TOP)\src\test_pcache.c \
1065 $(TOP)\src\test_quota.c \
1066 $(TOP)\src\test_rtree.c \
1067 $(TOP)\src\test_schema.c \
1068 $(TOP)\src\test_server.c \
1069 $(TOP)\src\test_superlock.c \
1070 $(TOP)\src\test_syscall.c \
shanehb2f20bf2011-06-17 07:07:24 +00001071 $(TOP)\src\test_tclvar.c \
1072 $(TOP)\src\test_thread.c \
1073 $(TOP)\src\test_vfs.c \
mistachkin92af1eb2015-11-30 23:29:07 +00001074 $(TOP)\src\test_windirent.c \
shanehb2f20bf2011-06-17 07:07:24 +00001075 $(TOP)\src\test_wsd.c \
1076 $(TOP)\ext\fts3\fts3_term.c \
drh7ac07bd2015-05-19 22:56:45 +00001077 $(TOP)\ext\fts3\fts3_test.c \
drhcfb8f8d2015-07-23 20:44:49 +00001078 $(TOP)\ext\rbu\test_rbu.c
shanehb2f20bf2011-06-17 07:07:24 +00001079
drhe50db1c2013-04-25 14:31:46 +00001080# Statically linked extensions
1081#
drh1fb64af2013-04-25 14:36:28 +00001082TESTEXT = \
drh8416fc72013-04-25 16:42:55 +00001083 $(TOP)\ext\misc\amatch.c \
1084 $(TOP)\ext\misc\closure.c \
drh1728bcb2014-11-10 16:49:56 +00001085 $(TOP)\ext\misc\eval.c \
drh51ed2982014-06-16 12:44:32 +00001086 $(TOP)\ext\misc\fileio.c \
drhe50db1c2013-04-25 14:31:46 +00001087 $(TOP)\ext\misc\fuzzer.c \
mistachkined52f9f2015-06-26 04:34:36 +00001088 $(TOP)\ext\fts5\fts5_tcl.c \
dand3789c02015-08-04 20:29:00 +00001089 $(TOP)\ext\fts5\fts5_test_mi.c \
drh8416fc72013-04-25 16:42:55 +00001090 $(TOP)\ext\misc\ieee754.c \
drhea41dc42013-04-25 19:31:33 +00001091 $(TOP)\ext\misc\nextchar.c \
drhdef33672013-05-28 20:25:54 +00001092 $(TOP)\ext\misc\percentile.c \
drhe50db1c2013-04-25 14:31:46 +00001093 $(TOP)\ext\misc\regexp.c \
drh398f8722015-08-19 13:54:20 +00001094 $(TOP)\ext\misc\series.c \
drhb7045ab2013-04-25 14:59:01 +00001095 $(TOP)\ext\misc\spellfix.c \
drh5f8cdac2013-10-14 21:14:42 +00001096 $(TOP)\ext\misc\totype.c \
drhe50db1c2013-04-25 14:31:46 +00001097 $(TOP)\ext\misc\wholenumber.c
1098
1099
shanehb2f20bf2011-06-17 07:07:24 +00001100# Source code to the library files needed by the test fixture
1101#
1102TESTSRC2 = \
1103 $(TOP)\src\attach.c \
1104 $(TOP)\src\backup.c \
1105 $(TOP)\src\bitvec.c \
1106 $(TOP)\src\btree.c \
1107 $(TOP)\src\build.c \
1108 $(TOP)\src\ctime.c \
1109 $(TOP)\src\date.c \
drh1a4a6802015-05-04 18:31:09 +00001110 $(TOP)\src\dbstat.c \
shanehb2f20bf2011-06-17 07:07:24 +00001111 $(TOP)\src\expr.c \
1112 $(TOP)\src\func.c \
1113 $(TOP)\src\insert.c \
1114 $(TOP)\src\wal.c \
mistachkin06006632013-05-15 20:35:13 +00001115 $(TOP)\src\main.c \
shanehb2f20bf2011-06-17 07:07:24 +00001116 $(TOP)\src\mem5.c \
1117 $(TOP)\src\os.c \
shanehb2f20bf2011-06-17 07:07:24 +00001118 $(TOP)\src\os_unix.c \
1119 $(TOP)\src\os_win.c \
1120 $(TOP)\src\pager.c \
1121 $(TOP)\src\pragma.c \
1122 $(TOP)\src\prepare.c \
1123 $(TOP)\src\printf.c \
1124 $(TOP)\src\random.c \
1125 $(TOP)\src\pcache.c \
1126 $(TOP)\src\pcache1.c \
1127 $(TOP)\src\select.c \
1128 $(TOP)\src\tokenize.c \
1129 $(TOP)\src\utf.c \
1130 $(TOP)\src\util.c \
1131 $(TOP)\src\vdbeapi.c \
1132 $(TOP)\src\vdbeaux.c \
1133 $(TOP)\src\vdbe.c \
1134 $(TOP)\src\vdbemem.c \
mistachkin81c428a2011-08-17 02:19:54 +00001135 $(TOP)\src\vdbesort.c \
shanehb2f20bf2011-06-17 07:07:24 +00001136 $(TOP)\src\vdbetrace.c \
1137 $(TOP)\src\where.c \
drh6f82e852015-06-06 20:12:09 +00001138 $(TOP)\src\wherecode.c \
drh6c1f4ef2015-06-08 14:23:15 +00001139 $(TOP)\src\whereexpr.c \
shanehb2f20bf2011-06-17 07:07:24 +00001140 parse.c \
1141 $(TOP)\ext\fts3\fts3.c \
1142 $(TOP)\ext\fts3\fts3_aux.c \
1143 $(TOP)\ext\fts3\fts3_expr.c \
shanehb2f20bf2011-06-17 07:07:24 +00001144 $(TOP)\ext\fts3\fts3_tokenizer.c \
drh4d648c72013-04-22 17:07:56 +00001145 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +00001146 $(TOP)\ext\fts3\fts3_unicode.c \
1147 $(TOP)\ext\fts3\fts3_unicode2.c \
shanehb2f20bf2011-06-17 07:07:24 +00001148 $(TOP)\ext\fts3\fts3_write.c \
1149 $(TOP)\ext\async\sqlite3async.c
1150
1151# Header files used by all library source files.
1152#
1153HDR = \
1154 $(TOP)\src\btree.h \
1155 $(TOP)\src\btreeInt.h \
1156 $(TOP)\src\hash.h \
1157 $(TOP)\src\hwtime.h \
1158 keywordhash.h \
mistachkin2318d332015-01-12 18:02:52 +00001159 $(TOP)\src\msvc.h \
shanehb2f20bf2011-06-17 07:07:24 +00001160 $(TOP)\src\mutex.h \
1161 opcodes.h \
1162 $(TOP)\src\os.h \
1163 $(TOP)\src\os_common.h \
mistachkinf74b9e02013-11-26 01:00:31 +00001164 $(TOP)\src\os_setup.h \
mistachkin8bc52622013-11-25 09:36:07 +00001165 $(TOP)\src\os_win.h \
shanehb2f20bf2011-06-17 07:07:24 +00001166 $(TOP)\src\pager.h \
1167 $(TOP)\src\pcache.h \
shaneh6e7850c2011-06-17 15:57:07 +00001168 parse.h \
drh67e65e52015-02-02 21:34:54 +00001169 $(TOP)\src\pragma.h \
shaneh6e7850c2011-06-17 15:57:07 +00001170 sqlite3.h \
shanehb2f20bf2011-06-17 07:07:24 +00001171 $(TOP)\src\sqlite3ext.h \
shaneh6e7850c2011-06-17 15:57:07 +00001172 $(TOP)\src\sqliteInt.h \
shanehb2f20bf2011-06-17 07:07:24 +00001173 $(TOP)\src\sqliteLimit.h \
1174 $(TOP)\src\vdbe.h \
drhe54df422013-11-12 18:37:25 +00001175 $(TOP)\src\vdbeInt.h \
drh8cd5b252015-03-02 22:06:43 +00001176 $(TOP)\src\vxworks.h \
drhe54df422013-11-12 18:37:25 +00001177 $(TOP)\src\whereInt.h
shanehb2f20bf2011-06-17 07:07:24 +00001178
1179# Header files used by extensions
1180#
1181EXTHDR = $(EXTHDR) \
1182 $(TOP)\ext\fts1\fts1.h \
1183 $(TOP)\ext\fts1\fts1_hash.h \
1184 $(TOP)\ext\fts1\fts1_tokenizer.h
1185EXTHDR = $(EXTHDR) \
1186 $(TOP)\ext\fts2\fts2.h \
1187 $(TOP)\ext\fts2\fts2_hash.h \
1188 $(TOP)\ext\fts2\fts2_tokenizer.h
1189EXTHDR = $(EXTHDR) \
1190 $(TOP)\ext\fts3\fts3.h \
1191 $(TOP)\ext\fts3\fts3Int.h \
1192 $(TOP)\ext\fts3\fts3_hash.h \
1193 $(TOP)\ext\fts3\fts3_tokenizer.h
1194EXTHDR = $(EXTHDR) \
1195 $(TOP)\ext\rtree\rtree.h
1196EXTHDR = $(EXTHDR) \
1197 $(TOP)\ext\icu\sqliteicu.h
1198EXTHDR = $(EXTHDR) \
1199 $(TOP)\ext\rtree\sqlite3rtree.h
1200
mistachkind4ab1032015-05-11 16:27:33 +00001201# executables needed for testing
drhf4375442015-05-11 12:15:45 +00001202#
1203TESTPROGS = \
1204 testfixture.exe \
1205 sqlite3.exe \
1206 sqlite3_analyzer.exe \
1207 sqldiff.exe
1208
drhea93c702015-05-26 18:15:08 +00001209# Databases containing fuzzer test cases
1210#
1211FUZZDATA = \
1212 $(TOP)\test\fuzzdata1.db \
1213 $(TOP)\test\fuzzdata2.db \
drh64ff56f2015-09-23 11:59:50 +00001214 $(TOP)\test\fuzzdata3.db \
1215 $(TOP)\test\fuzzdata4.db
drhea93c702015-05-26 18:15:08 +00001216
drh50065652015-10-08 19:29:18 +00001217# Extra compiler options for various shell tools
drhd7f2bea2015-09-19 14:32:51 +00001218#
mistachkin8381be42015-10-09 14:23:56 +00001219SHELL_COMPILE_OPTS = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
1220FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
1221FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
drhd7f2bea2015-09-19 14:32:51 +00001222
drh905da632015-06-10 18:53:09 +00001223# Standard options to testfixture
1224#
1225TESTOPTS = --verbose=file --output=test-out.txt
drhf4375442015-05-11 12:15:45 +00001226
shanehb2f20bf2011-06-17 07:07:24 +00001227# This is the default Makefile target. The objects listed here
1228# are what get build when you type just "make" with no arguments.
1229#
mistachkin5b0b6fd2011-06-25 01:14:36 +00001230all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
shanehb2f20bf2011-06-17 07:07:24 +00001231
shanehb2f20bf2011-06-17 07:07:24 +00001232libsqlite3.lib: $(LIBOBJ)
shaneh29ebea82011-06-21 18:12:07 +00001233 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001234
1235libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
mistachkin5b663502015-10-10 23:39:55 +00001236 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001237
drh50065652015-10-08 19:29:18 +00001238sqlite3.exe: $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h
mistachkin8381be42015-10-09 14:23:56 +00001239 $(LTLINK) $(SHELL_COMPILE_OPTS) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c \
mistachkin78e3f612015-10-14 20:01:12 +00001240 /link /pdb:sqlite3sh.pdb $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001241
drhd62c0f42015-04-09 13:34:29 +00001242sqldiff.exe: $(TOP)\tool\sqldiff.c sqlite3.c sqlite3.h
mistachkin78e3f612015-10-14 20:01:12 +00001243 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c sqlite3.c /link $(LDFLAGS) $(LTLINKOPTS)
drhd62c0f42015-04-09 13:34:29 +00001244
drh50065652015-10-08 19:29:18 +00001245fuzzershell.exe: $(TOP)\tool\fuzzershell.c sqlite3.c sqlite3.h
mistachkin8381be42015-10-09 14:23:56 +00001246 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) \
mistachkin78e3f612015-10-14 20:01:12 +00001247 $(TOP)\tool\fuzzershell.c sqlite3.c /link $(LDFLAGS) $(LTLINKOPTS)
drh268e72f2015-04-17 14:30:49 +00001248
drh50065652015-10-08 19:29:18 +00001249fuzzcheck.exe: $(TOP)\test\fuzzcheck.c sqlite3.c sqlite3.h
mistachkin78e3f612015-10-14 20:01:12 +00001250 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(TOP)\test\fuzzcheck.c sqlite3.c /link $(LDFLAGS) $(LTLINKOPTS)
drh1573dc32015-05-25 22:29:26 +00001251
mistachkin44723ce2015-03-21 02:22:37 +00001252mptester.exe: $(TOP)\mptest\mptest.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h
mistachkin27b1c8a2015-05-26 03:31:46 +00001253 $(LTLINK) $(NO_WARN) $(SHELL_COMPILE_OPTS) $(TOP)\mptest\mptest.c \
mistachkin78e3f612015-10-14 20:01:12 +00001254 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(SHELL_LINK_OPTS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001255
mistachkineb48b062015-03-31 17:45:44 +00001256MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1257MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
mistachkin4d2daba2015-03-31 16:42:16 +00001258
drhfe0ba712015-03-31 13:46:13 +00001259mptest: mptester.exe
mistachkin4d2daba2015-03-31 16:42:16 +00001260 del /Q mptest.db 2>NUL
drhfe0ba712015-03-31 13:46:13 +00001261 $(MPTEST1) --journalmode DELETE
1262 $(MPTEST2) --journalmode WAL
1263 $(MPTEST1) --journalmode WAL
1264 $(MPTEST2) --journalmode PERSIST
1265 $(MPTEST1) --journalmode PERSIST
1266 $(MPTEST2) --journalmode TRUNCATE
1267 $(MPTEST1) --journalmode TRUNCATE
1268 $(MPTEST2) --journalmode DELETE
1269
shanehb2f20bf2011-06-17 07:07:24 +00001270# This target creates a directory named "tsrc" and fills it with
1271# copies of all of the C source code and header files needed to
1272# build on the target system. Some of the C source code and header
1273# files are automatically generated. This target takes care of
1274# all that automatic generation.
1275#
drh50065652015-10-08 19:29:18 +00001276.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c
mistachkin44723ce2015-03-21 02:22:37 +00001277 -rmdir /Q/S tsrc 2>NUL
shanehb2f20bf2011-06-17 07:07:24 +00001278 -mkdir tsrc
drh62679202015-01-29 18:38:05 +00001279 for %i in ($(SRC1)) do copy /Y %i tsrc
1280 for %i in ($(SRC2)) do copy /Y %i tsrc
1281 for %i in ($(SRC3)) do copy /Y %i tsrc
1282 for %i in ($(SRC4)) do copy /Y %i tsrc
1283 for %i in ($(SRC5)) do copy /Y %i tsrc
drh50065652015-10-08 19:29:18 +00001284 copy /Y fts5.c tsrc
1285 copy /Y fts5.h tsrc
mistachkin44723ce2015-03-21 02:22:37 +00001286 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
drh2dc06482013-12-11 00:59:10 +00001287 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
shanehb2f20bf2011-06-17 07:07:24 +00001288 move vdbe.new tsrc\vdbe.c
1289 echo > .target_source
1290
mistachkin357e42d2015-09-21 23:53:42 +00001291sqlite3.c: .target_source sqlite3ext.h $(TOP)\tool\mksqlite3c.tcl
drh1a4a6802015-05-04 18:31:09 +00001292 $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS)
drh339d6c62013-03-19 16:12:40 +00001293 copy tsrc\shell.c .
shanehb2f20bf2011-06-17 07:07:24 +00001294
mistachkin48dd9de2012-12-06 04:33:13 +00001295sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1296 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
drh75e7bc12011-07-22 11:23:49 +00001297
mistachkin76510912013-10-11 23:01:18 +00001298# Set the source code file to be used by executables and libraries when
1299# they need the amalgamation.
1300#
1301!IF $(SPLIT_AMALGAMATION)!=0
1302SQLITE3C = sqlite3-all.c
1303!ELSE
1304SQLITE3C = sqlite3.c
1305!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +00001306
shaneh6e7850c2011-06-17 15:57:07 +00001307# Rule to build the amalgamation
shanehb2f20bf2011-06-17 07:07:24 +00001308#
mistachkin76510912013-10-11 23:01:18 +00001309sqlite3.lo: $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001310 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +00001311
1312# Rules to build the LEMON compiler generator
1313#
drh82415f22015-11-09 19:33:42 +00001314lempar.c: $(TOP)\tool\lempar.c
1315 copy $(TOP)\tool\lempar.c .
shanehb2f20bf2011-06-17 07:07:24 +00001316
1317lemon.exe: $(TOP)\tool\lemon.c lempar.c
mistachkin2318d332015-01-12 18:02:52 +00001318 $(BCC) $(NO_WARN) -Daccess=_access \
mistachkin460cd9c2015-10-14 22:46:37 +00001319 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +00001320
1321# Rules to build individual *.lo files from generated *.c files. This
1322# applies to:
1323#
1324# parse.lo
1325# opcodes.lo
1326#
1327parse.lo: parse.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001328 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
shanehb2f20bf2011-06-17 07:07:24 +00001329
1330opcodes.lo: opcodes.c
mistachkin44723ce2015-03-21 02:22:37 +00001331 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +00001332
mistachkin4d9d1f42012-09-03 10:32:32 +00001333# Rule to build the Win32 resources object file.
1334#
mistachkin08c1c312012-10-06 03:48:25 +00001335!IF $(USE_RC)!=0
1336$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR)
mistachkin4d9d1f42012-09-03 10:32:32 +00001337 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
mistachkin8ccc6d42012-09-27 21:03:53 +00001338 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
mistachkin4d9d1f42012-09-03 10:32:32 +00001339 echo #define SQLITE_RESOURCE_VERSION %%V \
mistachkin946ef602015-10-10 01:55:57 +00001340 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
mistachkin4d9d1f42012-09-03 10:32:32 +00001341 )
1342 echo #endif >> sqlite3rc.h
mistachkin08c1c312012-10-06 03:48:25 +00001343 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1344!ENDIF
mistachkin4d9d1f42012-09-03 10:32:32 +00001345
shanehb2f20bf2011-06-17 07:07:24 +00001346# Rules to build individual *.lo files from files in the src directory.
1347#
1348alter.lo: $(TOP)\src\alter.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001349 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
shanehb2f20bf2011-06-17 07:07:24 +00001350
1351analyze.lo: $(TOP)\src\analyze.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001352 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
shanehb2f20bf2011-06-17 07:07:24 +00001353
1354attach.lo: $(TOP)\src\attach.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001355 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
shanehb2f20bf2011-06-17 07:07:24 +00001356
1357auth.lo: $(TOP)\src\auth.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001358 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
shanehb2f20bf2011-06-17 07:07:24 +00001359
1360backup.lo: $(TOP)\src\backup.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001361 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
shanehb2f20bf2011-06-17 07:07:24 +00001362
1363bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001364 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
shanehb2f20bf2011-06-17 07:07:24 +00001365
1366btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001367 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
shanehb2f20bf2011-06-17 07:07:24 +00001368
1369btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
mistachkin44723ce2015-03-21 02:22:37 +00001370 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
shanehb2f20bf2011-06-17 07:07:24 +00001371
1372build.lo: $(TOP)\src\build.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001373 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
shanehb2f20bf2011-06-17 07:07:24 +00001374
1375callback.lo: $(TOP)\src\callback.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001376 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
shanehb2f20bf2011-06-17 07:07:24 +00001377
1378complete.lo: $(TOP)\src\complete.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001379 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
shanehb2f20bf2011-06-17 07:07:24 +00001380
1381ctime.lo: $(TOP)\src\ctime.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001382 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
shanehb2f20bf2011-06-17 07:07:24 +00001383
1384date.lo: $(TOP)\src\date.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001385 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
shanehb2f20bf2011-06-17 07:07:24 +00001386
drh1a4a6802015-05-04 18:31:09 +00001387dbstat.lo: $(TOP)\src\date.c $(HDR)
1388 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1389
shanehb2f20bf2011-06-17 07:07:24 +00001390delete.lo: $(TOP)\src\delete.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001391 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
shanehb2f20bf2011-06-17 07:07:24 +00001392
1393expr.lo: $(TOP)\src\expr.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001394 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
shanehb2f20bf2011-06-17 07:07:24 +00001395
1396fault.lo: $(TOP)\src\fault.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001397 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
shanehb2f20bf2011-06-17 07:07:24 +00001398
1399fkey.lo: $(TOP)\src\fkey.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001400 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
shanehb2f20bf2011-06-17 07:07:24 +00001401
1402func.lo: $(TOP)\src\func.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001403 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
shanehb2f20bf2011-06-17 07:07:24 +00001404
1405global.lo: $(TOP)\src\global.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001406 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
shanehb2f20bf2011-06-17 07:07:24 +00001407
1408hash.lo: $(TOP)\src\hash.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001409 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001410
1411insert.lo: $(TOP)\src\insert.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001412 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
shanehb2f20bf2011-06-17 07:07:24 +00001413
1414journal.lo: $(TOP)\src\journal.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001415 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\journal.c
shanehb2f20bf2011-06-17 07:07:24 +00001416
1417legacy.lo: $(TOP)\src\legacy.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001418 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
shanehb2f20bf2011-06-17 07:07:24 +00001419
1420loadext.lo: $(TOP)\src\loadext.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001421 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
shanehb2f20bf2011-06-17 07:07:24 +00001422
1423main.lo: $(TOP)\src\main.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001424 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
shanehb2f20bf2011-06-17 07:07:24 +00001425
1426malloc.lo: $(TOP)\src\malloc.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001427 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
shanehb2f20bf2011-06-17 07:07:24 +00001428
1429mem0.lo: $(TOP)\src\mem0.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001430 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
shanehb2f20bf2011-06-17 07:07:24 +00001431
1432mem1.lo: $(TOP)\src\mem1.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001433 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
shanehb2f20bf2011-06-17 07:07:24 +00001434
1435mem2.lo: $(TOP)\src\mem2.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001436 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
shanehb2f20bf2011-06-17 07:07:24 +00001437
1438mem3.lo: $(TOP)\src\mem3.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001439 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
shanehb2f20bf2011-06-17 07:07:24 +00001440
1441mem5.lo: $(TOP)\src\mem5.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001442 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
shanehb2f20bf2011-06-17 07:07:24 +00001443
1444memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001445 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
shanehb2f20bf2011-06-17 07:07:24 +00001446
1447mutex.lo: $(TOP)\src\mutex.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001448 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
shanehb2f20bf2011-06-17 07:07:24 +00001449
1450mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001451 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
shanehb2f20bf2011-06-17 07:07:24 +00001452
shanehb2f20bf2011-06-17 07:07:24 +00001453mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001454 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001455
1456mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001457 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
shanehb2f20bf2011-06-17 07:07:24 +00001458
1459notify.lo: $(TOP)\src\notify.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001460 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
shanehb2f20bf2011-06-17 07:07:24 +00001461
1462pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
mistachkin44723ce2015-03-21 02:22:37 +00001463 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
shanehb2f20bf2011-06-17 07:07:24 +00001464
1465pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
mistachkin44723ce2015-03-21 02:22:37 +00001466 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
shanehb2f20bf2011-06-17 07:07:24 +00001467
1468pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
mistachkin44723ce2015-03-21 02:22:37 +00001469 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
shanehb2f20bf2011-06-17 07:07:24 +00001470
1471os.lo: $(TOP)\src\os.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001472 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
shanehb2f20bf2011-06-17 07:07:24 +00001473
1474os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001475 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001476
1477os_win.lo: $(TOP)\src\os_win.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001478 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
shanehb2f20bf2011-06-17 07:07:24 +00001479
shanehb2f20bf2011-06-17 07:07:24 +00001480pragma.lo: $(TOP)\src\pragma.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001481 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
shanehb2f20bf2011-06-17 07:07:24 +00001482
1483prepare.lo: $(TOP)\src\prepare.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001484 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
shanehb2f20bf2011-06-17 07:07:24 +00001485
1486printf.lo: $(TOP)\src\printf.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001487 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
shanehb2f20bf2011-06-17 07:07:24 +00001488
1489random.lo: $(TOP)\src\random.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001490 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
shanehb2f20bf2011-06-17 07:07:24 +00001491
1492resolve.lo: $(TOP)\src\resolve.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001493 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
shanehb2f20bf2011-06-17 07:07:24 +00001494
1495rowset.lo: $(TOP)\src\rowset.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001496 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
shanehb2f20bf2011-06-17 07:07:24 +00001497
1498select.lo: $(TOP)\src\select.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001499 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
shanehb2f20bf2011-06-17 07:07:24 +00001500
1501status.lo: $(TOP)\src\status.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001502 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
shanehb2f20bf2011-06-17 07:07:24 +00001503
1504table.lo: $(TOP)\src\table.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001505 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
shanehb2f20bf2011-06-17 07:07:24 +00001506
drhf51446a2012-07-21 19:40:42 +00001507threads.lo: $(TOP)\src\threads.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001508 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
drhf51446a2012-07-21 19:40:42 +00001509
shanehb2f20bf2011-06-17 07:07:24 +00001510tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001511 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
shanehb2f20bf2011-06-17 07:07:24 +00001512
drh38b41492015-06-08 15:08:15 +00001513treeview.lo: $(TOP)\src\treeview.c $(HDR)
1514 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
1515
shanehb2f20bf2011-06-17 07:07:24 +00001516trigger.lo: $(TOP)\src\trigger.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001517 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
shanehb2f20bf2011-06-17 07:07:24 +00001518
1519update.lo: $(TOP)\src\update.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001520 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
shanehb2f20bf2011-06-17 07:07:24 +00001521
1522utf.lo: $(TOP)\src\utf.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001523 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
shanehb2f20bf2011-06-17 07:07:24 +00001524
1525util.lo: $(TOP)\src\util.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001526 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
shanehb2f20bf2011-06-17 07:07:24 +00001527
1528vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001529 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
shanehb2f20bf2011-06-17 07:07:24 +00001530
1531vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001532 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
shanehb2f20bf2011-06-17 07:07:24 +00001533
1534vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001535 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
shanehb2f20bf2011-06-17 07:07:24 +00001536
1537vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001538 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
shanehb2f20bf2011-06-17 07:07:24 +00001539
1540vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001541 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
shanehb2f20bf2011-06-17 07:07:24 +00001542
1543vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001544 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
shanehb2f20bf2011-06-17 07:07:24 +00001545
mistachkin81c428a2011-08-17 02:19:54 +00001546vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001547 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
mistachkin81c428a2011-08-17 02:19:54 +00001548
shanehb2f20bf2011-06-17 07:07:24 +00001549vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001550 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
shanehb2f20bf2011-06-17 07:07:24 +00001551
1552vtab.lo: $(TOP)\src\vtab.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001553 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
shanehb2f20bf2011-06-17 07:07:24 +00001554
1555wal.lo: $(TOP)\src\wal.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001556 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
shanehb2f20bf2011-06-17 07:07:24 +00001557
1558walker.lo: $(TOP)\src\walker.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001559 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
shanehb2f20bf2011-06-17 07:07:24 +00001560
1561where.lo: $(TOP)\src\where.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001562 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
shanehb2f20bf2011-06-17 07:07:24 +00001563
drh6f82e852015-06-06 20:12:09 +00001564wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
1565 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
1566
drh6c1f4ef2015-06-08 14:23:15 +00001567whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
1568 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
1569
shanehb2f20bf2011-06-17 07:07:24 +00001570tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001571 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
shanehb2f20bf2011-06-17 07:07:24 +00001572
1573tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001574 $(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
shanehb2f20bf2011-06-17 07:07:24 +00001575
mistachkin44723ce2015-03-21 02:22:37 +00001576tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(LIBRESOBJS)
mistachkin78e3f612015-10-14 20:01:12 +00001577 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001578
1579# Rules to build opcodes.c and opcodes.h
1580#
drh7651e0a2015-10-07 12:11:36 +00001581opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
1582 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +00001583
drhb15393b2015-10-07 02:52:09 +00001584opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
mistachkin946ef602015-10-10 01:55:57 +00001585 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
shanehb2f20bf2011-06-17 07:07:24 +00001586
1587# Rules to build parse.c and parse.h - the outputs of lemon.
1588#
1589parse.h: parse.c
1590
drh60a15a42015-10-07 12:21:14 +00001591parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
mistachkin44723ce2015-03-21 02:22:37 +00001592 del /Q parse.y parse.h parse.h.temp 2>NUL
shanehb2f20bf2011-06-17 07:07:24 +00001593 copy $(TOP)\src\parse.y .
mistachkin4712c212014-05-09 20:51:17 +00001594 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
shanehb2f20bf2011-06-17 07:07:24 +00001595 move parse.h parse.h.temp
drh60a15a42015-10-07 12:21:14 +00001596 $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
shanehb2f20bf2011-06-17 07:07:24 +00001597
1598sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
mistachkin3f40d402014-02-13 21:57:48 +00001599 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h
shanehb2f20bf2011-06-17 07:07:24 +00001600
mistachkinc978f2d2015-09-21 23:49:35 +00001601sqlite3ext.h: .target_source
1602 copy tsrc\sqlite3ext.h .
1603
shanehb2f20bf2011-06-17 07:07:24 +00001604mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
mistachkin2318d332015-01-12 18:02:52 +00001605 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \
mistachkin460cd9c2015-10-14 22:46:37 +00001606 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +00001607
1608keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
mistachkin5b0b6fd2011-06-25 01:14:36 +00001609 .\mkkeywordhash.exe > keywordhash.h
shanehb2f20bf2011-06-17 07:07:24 +00001610
1611
1612
1613# Rules to build the extension objects.
1614#
1615icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001616 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
shanehb2f20bf2011-06-17 07:07:24 +00001617
1618fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001619 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
shanehb2f20bf2011-06-17 07:07:24 +00001620
1621fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001622 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001623
1624fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001625 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
shanehb2f20bf2011-06-17 07:07:24 +00001626
1627fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001628 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
shanehb2f20bf2011-06-17 07:07:24 +00001629
1630fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001631 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
shanehb2f20bf2011-06-17 07:07:24 +00001632
1633fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001634 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
shanehb2f20bf2011-06-17 07:07:24 +00001635
1636fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001637 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
shanehb2f20bf2011-06-17 07:07:24 +00001638
1639fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001640 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
shanehb2f20bf2011-06-17 07:07:24 +00001641
1642fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001643 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
shanehb2f20bf2011-06-17 07:07:24 +00001644
1645fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001646 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001647
1648fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001649 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
shanehb2f20bf2011-06-17 07:07:24 +00001650
1651fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001652 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
shanehb2f20bf2011-06-17 07:07:24 +00001653
1654fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001655 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
shanehb2f20bf2011-06-17 07:07:24 +00001656
1657fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001658 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
shanehb2f20bf2011-06-17 07:07:24 +00001659
1660fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001661 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
shanehb2f20bf2011-06-17 07:07:24 +00001662
drh4d648c72013-04-22 17:07:56 +00001663fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001664 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
drh4d648c72013-04-22 17:07:56 +00001665
drh391d4ba2012-05-28 20:22:16 +00001666fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001667 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
drh391d4ba2012-05-28 20:22:16 +00001668
1669fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001670 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
drh391d4ba2012-05-28 20:22:16 +00001671
shanehb2f20bf2011-06-17 07:07:24 +00001672fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001673 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
shanehb2f20bf2011-06-17 07:07:24 +00001674
1675rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001676 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
shanehb2f20bf2011-06-17 07:07:24 +00001677
mistachkined52f9f2015-06-26 04:34:36 +00001678# FTS5 things
1679#
1680FTS5_SRC = \
1681 $(TOP)\ext\fts5\fts5.h \
1682 $(TOP)\ext\fts5\fts5Int.h \
1683 $(TOP)\ext\fts5\fts5_aux.c \
1684 $(TOP)\ext\fts5\fts5_buffer.c \
1685 $(TOP)\ext\fts5\fts5_main.c \
1686 $(TOP)\ext\fts5\fts5_config.c \
1687 $(TOP)\ext\fts5\fts5_expr.c \
1688 $(TOP)\ext\fts5\fts5_hash.c \
1689 $(TOP)\ext\fts5\fts5_index.c \
1690 fts5parse.c fts5parse.h \
1691 $(TOP)\ext\fts5\fts5_storage.c \
1692 $(TOP)\ext\fts5\fts5_tokenize.c \
1693 $(TOP)\ext\fts5\fts5_unicode2.c \
1694 $(TOP)\ext\fts5\fts5_varint.c \
1695 $(TOP)\ext\fts5\fts5_vocab.c
1696
1697fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
1698 copy $(TOP)\ext\fts5\fts5parse.y .
1699 del /Q fts5parse.h 2>NUL
1700 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) fts5parse.y
mistachkined52f9f2015-06-26 04:34:36 +00001701
1702fts5parse.h: fts5parse.c
1703
1704fts5.c: $(FTS5_SRC)
1705 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
dana153bbc2015-07-02 20:12:34 +00001706 copy $(TOP)\ext\fts5\fts5.h .
mistachkined52f9f2015-06-26 04:34:36 +00001707
1708fts5.lo: fts5.c $(HDR) $(EXTHDR)
mistachkin95ae9582015-06-26 20:45:43 +00001709 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
1710
1711fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
mistachkinae6ca8e2015-07-02 16:50:43 +00001712 $(LTCOMPILE) $(NO_WARN) -c fts5.c
shanehb2f20bf2011-06-17 07:07:24 +00001713
mistachkin95ae9582015-06-26 20:45:43 +00001714fts5.dll: fts5_ext.lo
1715 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
mistachkinb39e8cf2015-06-26 16:17:36 +00001716
shanehb2f20bf2011-06-17 07:07:24 +00001717# Rules to build the 'testfixture' application.
1718#
1719# If using the amalgamation, use sqlite3.c directly to build the test
1720# fixture. Otherwise link against libsqlite3.lib. (This distinction is
1721# necessary because the test fixture requires non-API symbols which are
1722# hidden when the library is built via the amalgamation).
1723#
1724TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
mistachkin27b2f052015-01-12 19:49:46 +00001725TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
1726TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
shanehb2f20bf2011-06-17 07:07:24 +00001727
mistachkin44723ce2015-03-21 02:22:37 +00001728TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) $(SHELL_CORE_DEP)
mistachkin76510912013-10-11 23:01:18 +00001729TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +00001730!IF $(USE_AMALGAMATION)==0
1731TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1732!ELSE
1733TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1734!ENDIF
1735
mistachkin08c1c312012-10-06 03:48:25 +00001736testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001737 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
shanehb2f20bf2011-06-17 07:07:24 +00001738 -DBUILD_sqlite -I$(TCLINCDIR) \
shaneh2a0b9ef2011-06-20 20:52:32 +00001739 $(TESTFIXTURE_SRC) \
mistachkin78e3f612015-10-14 20:01:12 +00001740 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001741
mistachkin1925a2e2014-02-24 21:20:25 +00001742extensiontest: testfixture.exe testloadext.dll
mistachkin88739962015-10-14 23:04:08 +00001743 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001744 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00001745
drhf4375442015-05-11 12:15:45 +00001746fulltest: $(TESTPROGS) fuzztest
mistachkin88739962015-10-14 23:04:08 +00001747 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001748 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00001749
drhea93c702015-05-26 18:15:08 +00001750soaktest: $(TESTPROGS)
mistachkin88739962015-10-14 23:04:08 +00001751 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001752 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00001753
drhf4375442015-05-11 12:15:45 +00001754fulltestonly: $(TESTPROGS) fuzztest
mistachkin88739962015-10-14 23:04:08 +00001755 @set PATH=$(LIBTCLPATH);$(PATH)
mistachkinc60941f2012-09-13 01:51:02 +00001756 .\testfixture.exe $(TOP)\test\full.test
1757
mistachkin036acf32013-07-20 00:34:31 +00001758queryplantest: testfixture.exe sqlite3.exe
mistachkin88739962015-10-14 23:04:08 +00001759 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001760 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
mistachkin036acf32013-07-20 00:34:31 +00001761
drhea93c702015-05-26 18:15:08 +00001762fuzztest: fuzzcheck.exe
drha523e312015-07-24 17:26:13 +00001763 .\fuzzcheck.exe $(FUZZDATA)
1764
1765fastfuzztest: fuzzcheck.exe
drh53e66c32015-07-24 15:49:23 +00001766 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
drhf3320712015-04-25 13:39:29 +00001767
drh905da632015-06-10 18:53:09 +00001768# Minimal testing that runs in less than 3 minutes (on a fast machine)
1769#
mistachkin033eb6c2015-06-10 22:03:40 +00001770quicktest: testfixture.exe
mistachkin88739962015-10-14 23:04:08 +00001771 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001772 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
1773
1774# This is the common case. Run many tests that do not take too long,
1775# including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1776#
drha523e312015-07-24 17:26:13 +00001777test: $(TESTPROGS) fastfuzztest
mistachkin88739962015-10-14 23:04:08 +00001778 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001779 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00001780
drhea93c702015-05-26 18:15:08 +00001781smoketest: $(TESTPROGS)
mistachkin88739962015-10-14 23:04:08 +00001782 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00001783 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
mistachkin00eb70d2015-04-04 00:02:07 +00001784
drh1a4a6802015-05-04 18:31:09 +00001785sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
mistachkind4ab1032015-05-11 16:27:33 +00001786 echo #define TCLSH 2 > $@
1787 echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
1788 copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
mistachkin9a55e312011-09-22 00:06:44 +00001789 echo static const char *tclsh_main_loop(void){ >> $@
1790 echo static const char *zMainloop = >> $@
drh48cc9a32015-10-07 12:36:42 +00001791 $(TCLSH_CMD) $(TOP)\tool\tostr.tcl $(TOP)\tool\spaceanal.tcl >> $@
mistachkin9a55e312011-09-22 00:06:44 +00001792 echo ; return zMainloop; } >> $@
shanehb2f20bf2011-06-17 07:07:24 +00001793
mistachkin08c1c312012-10-06 03:48:25 +00001794sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
mistachkind4ab1032015-05-11 16:27:33 +00001795 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
mistachkin78e3f612015-10-14 20:01:12 +00001796 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001797
mistachkin1925a2e2014-02-24 21:20:25 +00001798testloadext.lo: $(TOP)\src\test_loadext.c
mistachkin44723ce2015-03-21 02:22:37 +00001799 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
mistachkin1925a2e2014-02-24 21:20:25 +00001800
1801testloadext.dll: testloadext.lo
1802 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
1803
mistachkinb0427512014-01-30 11:12:52 +00001804showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001805 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001806 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh9ac3c1e2013-11-07 18:37:31 +00001807
drh4bb77ec2014-06-30 11:14:26 +00001808showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001809 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001810 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00001811
1812showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001813 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001814 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00001815
1816showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001817 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001818 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00001819
mistachkinde545272014-07-07 17:57:50 +00001820fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001821 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001822 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
mistachkinde545272014-07-07 17:57:50 +00001823
drh4bb77ec2014-06-30 11:14:26 +00001824rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001825 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001826 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00001827
drh267a13f2014-06-18 18:10:12 +00001828LogEst.exe: $(TOP)\tool\logest.c sqlite3.h
mistachkin78e3f612015-10-14 20:01:12 +00001829 $(LTLINK) $(NO_WARN) -Fe$@ $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
drh267a13f2014-06-18 18:10:12 +00001830
mistachkinb0427512014-01-30 11:12:52 +00001831wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001832 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001833 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh9ac3c1e2013-11-07 18:37:31 +00001834
mistachkinb0427512014-01-30 11:12:52 +00001835speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001836 $(LTLINK) $(NO_WARN) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00001837 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00001838
shaneh6e7850c2011-06-17 15:57:07 +00001839clean:
mistachkin8dd3ff12015-05-16 03:41:41 +00001840 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
1841 del /Q *.bsc *.cod *.da *.bb *.bbg gmon.out 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00001842 del /Q sqlite3.h opcodes.c opcodes.h 2>NUL
1843 del /Q lemon.* lempar.c parse.* 2>NUL
1844 del /Q mkkeywordhash.* keywordhash.h 2>NUL
1845 del /Q notasharedlib.* 2>NUL
1846 -rmdir /Q/S .deps 2>NUL
1847 -rmdir /Q/S .libs 2>NUL
1848 -rmdir /Q/S quota2a 2>NUL
1849 -rmdir /Q/S quota2b 2>NUL
1850 -rmdir /Q/S quota2c 2>NUL
1851 -rmdir /Q/S tsrc 2>NUL
1852 del /Q .target_source 2>NUL
mistachkin44723ce2015-03-21 02:22:37 +00001853 del /Q tclsqlite3.exe 2>NUL
1854 del /Q testloadext.dll 2>NUL
1855 del /Q testfixture.exe test.db 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00001856 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL
1857 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
mistachkin44723ce2015-03-21 02:22:37 +00001858 del /Q mptester.exe wordcount.exe 2>NUL
1859 del /Q sqlite3.exe sqlite3.dll sqlite3.def 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00001860 del /Q sqlite3.c sqlite3-*.c 2>NUL
1861 del /Q sqlite3rc.h 2>NUL
1862 del /Q shell.c sqlite3ext.h 2>NUL
mistachkin44723ce2015-03-21 02:22:37 +00001863 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00001864 del /Q sqlite-*-output.vsix 2>NUL
mistachkin7a94e6b2015-05-26 03:24:33 +00001865 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe 2>NUL
mistachkinbc50bb72015-07-14 21:56:53 +00001866 del /Q fts5.* fts5parse.* 2>NUL
shanehb2f20bf2011-06-17 07:07:24 +00001867
mistachkin4d9d1f42012-09-03 10:32:32 +00001868# Dynamic link library section.
shanehb2f20bf2011-06-17 07:07:24 +00001869#
1870dll: sqlite3.dll
1871
shaneh6e7850c2011-06-17 15:57:07 +00001872sqlite3.def: libsqlite3.lib
mistachkin5b0b6fd2011-06-25 01:14:36 +00001873 echo EXPORTS > sqlite3.def
shaneh6e7850c2011-06-17 15:57:07 +00001874 dumpbin /all libsqlite3.lib \
mistachkinba461ca2015-10-10 02:06:05 +00001875 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3_.*)$$" \1 \
mistachkin5b0b6fd2011-06-25 01:14:36 +00001876 | sort >> sqlite3.def
shanehb2f20bf2011-06-17 07:07:24 +00001877
mistachkin44723ce2015-03-21 02:22:37 +00001878sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
1879 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)