blob: d4aba301fba3c705a80df5fee4c57b7e6775761b [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
mistachkin3e786092016-01-23 07:53:04 +000013# <<mark>>
shaneh6e7850c2011-06-17 15:57:07 +000014# Set this non-0 to create and use the SQLite amalgamation file.
15#
mistachkin0ec07442012-10-12 18:06:07 +000016!IFNDEF USE_AMALGAMATION
shaneh6e7850c2011-06-17 15:57:07 +000017USE_AMALGAMATION = 1
mistachkin0ec07442012-10-12 18:06:07 +000018!ENDIF
mistachkin3e786092016-01-23 07:53:04 +000019# <</mark>>
shaneh6e7850c2011-06-17 15:57:07 +000020
mistachkin2318d332015-01-12 18:02:52 +000021# Set this non-0 to enable full warnings (-W4, etc) when compiling.
22#
23!IFNDEF USE_FULLWARN
24USE_FULLWARN = 0
25!ENDIF
26
mistachkin24b6b812016-08-24 18:21:58 +000027# Set this non-0 to enable full runtime error checks (-RTC1, etc). This
28# has no effect if (any) optimizations are enabled.
29#
30!IFNDEF USE_RUNTIME_CHECKS
31USE_RUNTIME_CHECKS = 0
32!ENDIF
33
mistachkin4ef916e2016-08-24 19:58:46 +000034# Set this non-0 to create a SQLite amalgamation file that excludes the
35# various built-in extensions.
36#
37!IFNDEF MINIMAL_AMALGAMATION
38MINIMAL_AMALGAMATION = 0
39!ENDIF
40
mistachkin44723ce2015-03-21 02:22:37 +000041# Set this non-0 to use "stdcall" calling convention for the core library
42# and shell executable.
43#
44!IFNDEF USE_STDCALL
45USE_STDCALL = 0
46!ENDIF
47
48# Set this non-0 to have the shell executable link against the core dynamic
49# link library.
50#
51!IFNDEF DYNAMIC_SHELL
52DYNAMIC_SHELL = 0
53!ENDIF
54
mistachkin13a24f82015-05-13 04:50:30 +000055# Set this non-0 to enable extra code that attempts to detect misuse of the
56# SQLite API.
57#
58!IFNDEF API_ARMOR
59API_ARMOR = 0
60!ENDIF
61
mistachkin2318d332015-01-12 18:02:52 +000062# If necessary, create a list of harmless compiler warnings to disable when
mistachkin44723ce2015-03-21 02:22:37 +000063# compiling the various tools. For the SQLite source code itself, warnings,
mistachkin2318d332015-01-12 18:02:52 +000064# if any, will be disabled from within it.
65#
66!IFNDEF NO_WARN
67!IF $(USE_FULLWARN)!=0
mistachkin22529172015-04-10 21:16:11 +000068NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
mistachkinb9becaa2015-12-16 23:30:30 +000069NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706
mistachkin2318d332015-01-12 18:02:52 +000070!ENDIF
71!ENDIF
72
mistachkina5e2b502014-05-12 22:36:50 +000073# Set this non-0 to use the library paths and other options necessary for
74# Windows Phone 8.1.
mistachkind9b3c542014-05-09 23:31:55 +000075#
76!IFNDEF USE_WP81_OPTS
77USE_WP81_OPTS = 0
78!ENDIF
79
mistachkin76510912013-10-11 23:01:18 +000080# Set this non-0 to split the SQLite amalgamation file into chunks to
81# be used for debugging with Visual Studio.
82#
83!IFNDEF SPLIT_AMALGAMATION
mistachkin0aedc6b2013-10-11 23:02:13 +000084SPLIT_AMALGAMATION = 0
mistachkin76510912013-10-11 23:01:18 +000085!ENDIF
86
mistachkin3e786092016-01-23 07:53:04 +000087# <<mark>>
mistachkinc756ded2011-10-02 05:23:16 +000088# Set this non-0 to use the International Components for Unicode (ICU).
89#
mistachkin0ec07442012-10-12 18:06:07 +000090!IFNDEF USE_ICU
mistachkinc756ded2011-10-02 05:23:16 +000091USE_ICU = 0
mistachkin0ec07442012-10-12 18:06:07 +000092!ENDIF
mistachkin3e786092016-01-23 07:53:04 +000093# <</mark>>
mistachkinc756ded2011-10-02 05:23:16 +000094
mistachkin8d967a92012-06-21 04:21:35 +000095# Set this non-0 to dynamically link to the MSVC runtime library.
96#
mistachkin0ec07442012-10-12 18:06:07 +000097!IFNDEF USE_CRT_DLL
mistachkin8d967a92012-06-21 04:21:35 +000098USE_CRT_DLL = 0
mistachkin0ec07442012-10-12 18:06:07 +000099!ENDIF
mistachkin8d967a92012-06-21 04:21:35 +0000100
mistachkine45e0fb2015-01-21 00:48:46 +0000101# Set this non-0 to link to the RPCRT4 library.
102#
103!IFNDEF USE_RPCRT4_LIB
104USE_RPCRT4_LIB = 0
105!ENDIF
106
mistachkin0157e012013-09-06 21:41:11 +0000107# Set this non-0 to generate assembly code listings for the source code
108# files.
109#
110!IFNDEF USE_LISTINGS
111USE_LISTINGS = 0
112!ENDIF
113
mistachkin52fd8e12012-08-28 01:44:13 +0000114# Set this non-0 to attempt setting the native compiler automatically
115# for cross-compiling the command line tools needed during the compilation
116# process.
117#
mistachkin0ec07442012-10-12 18:06:07 +0000118!IFNDEF XCOMPILE
mistachkin52fd8e12012-08-28 01:44:13 +0000119XCOMPILE = 0
mistachkin0ec07442012-10-12 18:06:07 +0000120!ENDIF
mistachkin52fd8e12012-08-28 01:44:13 +0000121
mistachkinbd58d5f2012-06-30 22:22:34 +0000122# Set this non-0 to use the native libraries paths for cross-compiling
123# the command line tools needed during the compilation process.
124#
mistachkin0ec07442012-10-12 18:06:07 +0000125!IFNDEF USE_NATIVE_LIBPATHS
mistachkinbd58d5f2012-06-30 22:22:34 +0000126USE_NATIVE_LIBPATHS = 0
mistachkin0ec07442012-10-12 18:06:07 +0000127!ENDIF
mistachkinbd58d5f2012-06-30 22:22:34 +0000128
mistachkin08c1c312012-10-06 03:48:25 +0000129# Set this 0 to skip the compiling and embedding of version resources.
130#
mistachkin0ec07442012-10-12 18:06:07 +0000131!IFNDEF USE_RC
mistachkin08c1c312012-10-06 03:48:25 +0000132USE_RC = 1
mistachkin0ec07442012-10-12 18:06:07 +0000133!ENDIF
mistachkin08c1c312012-10-06 03:48:25 +0000134
mistachkin46b721a2012-03-23 12:28:21 +0000135# Set this non-0 to compile binaries suitable for the WinRT environment.
136# This setting does not apply to any binaries that require Tcl to operate
137# properly (i.e. the text fixture, etc).
138#
mistachkin0ec07442012-10-12 18:06:07 +0000139!IFNDEF FOR_WINRT
mistachkin46b721a2012-03-23 12:28:21 +0000140FOR_WINRT = 0
mistachkin0ec07442012-10-12 18:06:07 +0000141!ENDIF
mistachkin46b721a2012-03-23 12:28:21 +0000142
mistachkina819aed2016-02-12 05:19:29 +0000143# Set this non-0 to compile binaries suitable for the UWP environment.
mistachkin318d38c2015-04-22 01:33:53 +0000144# This setting does not apply to any binaries that require Tcl to operate
145# properly (i.e. the text fixture, etc).
146#
mistachkina819aed2016-02-12 05:19:29 +0000147!IFNDEF FOR_UWP
148FOR_UWP = 0
mistachkin318d38c2015-04-22 01:33:53 +0000149!ENDIF
150
mistachkin5d4d9412016-01-22 03:54:36 +0000151# Set this non-0 to compile binaries suitable for the Windows 10 platform.
mistachkinedcb4eb2016-01-22 01:25:15 +0000152#
153!IFNDEF FOR_WIN10
154FOR_WIN10 = 0
155!ENDIF
156
mistachkin3e786092016-01-23 07:53:04 +0000157# <<mark>>
mistachkin31856a32012-07-27 07:13:25 +0000158# Set this non-0 to skip attempting to look for and/or link with the Tcl
159# runtime library.
160#
mistachkin0ec07442012-10-12 18:06:07 +0000161!IFNDEF NO_TCL
mistachkin31856a32012-07-27 07:13:25 +0000162NO_TCL = 0
mistachkin0ec07442012-10-12 18:06:07 +0000163!ENDIF
mistachkin3e786092016-01-23 07:53:04 +0000164# <</mark>>
mistachkin31856a32012-07-27 07:13:25 +0000165
mistachkin4d60be52011-08-26 05:40:31 +0000166# Set this to non-0 to create and use PDBs.
167#
mistachkin0ec07442012-10-12 18:06:07 +0000168!IFNDEF SYMBOLS
mistachkin4d60be52011-08-26 05:40:31 +0000169SYMBOLS = 1
mistachkin0ec07442012-10-12 18:06:07 +0000170!ENDIF
mistachkin4d60be52011-08-26 05:40:31 +0000171
mistachkin2f7d5d82012-08-22 00:39:34 +0000172# Set this to non-0 to use the SQLite debugging heap subsystem.
173#
mistachkin0ec07442012-10-12 18:06:07 +0000174!IFNDEF MEMDEBUG
mistachkin2f7d5d82012-08-22 00:39:34 +0000175MEMDEBUG = 0
mistachkin0ec07442012-10-12 18:06:07 +0000176!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +0000177
178# Set this to non-0 to use the Win32 native heap subsystem.
179#
mistachkin0ec07442012-10-12 18:06:07 +0000180!IFNDEF WIN32HEAP
mistachkin2f7d5d82012-08-22 00:39:34 +0000181WIN32HEAP = 0
mistachkin0ec07442012-10-12 18:06:07 +0000182!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +0000183
mistachkinb10f22a2015-04-16 16:27:29 +0000184# Set this to non-0 to enable OSTRACE() macros, which can be useful when
185# debugging.
186#
187!IFNDEF OSTRACE
188OSTRACE = 0
189!ENDIF
190
mistachkinf2d25f22011-08-25 04:09:12 +0000191# Set this to one of the following values to enable various debugging
192# features. Each level includes the debugging options from the previous
193# levels. Currently, the recognized values for DEBUG are:
194#
195# 0 == NDEBUG: Disables assert() and other runtime diagnostics.
mistachkincd54bab2014-12-20 21:14:14 +0000196# 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
197# 2 == Disables NDEBUG and all optimizations and then enables PDBs.
198# 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
199# 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
200# 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
201# 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
mistachkinf2d25f22011-08-25 04:09:12 +0000202#
mistachkin0ec07442012-10-12 18:06:07 +0000203!IFNDEF DEBUG
mistachkinf2d25f22011-08-25 04:09:12 +0000204DEBUG = 0
mistachkin0ec07442012-10-12 18:06:07 +0000205!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000206
mistachkin8bcd3fa2013-08-29 01:03:38 +0000207# Enable use of available compiler optimizations? Normally, this should be
208# non-zero. Setting this to zero, thus disabling all compiler optimizations,
209# can be useful for testing.
210#
211!IFNDEF OPTIMIZATIONS
212OPTIMIZATIONS = 2
213!ENDIF
214
mistachkin12b35ea2016-05-03 19:40:54 +0000215# Set this to non-0 to enable support for the session extension.
216#
217!IFNDEF SESSION
218SESSION = 0
219!ENDIF
220
mistachkin5d4d9412016-01-22 03:54:36 +0000221# Set the source code file to be used by executables and libraries when
222# they need the amalgamation.
223#
224!IFNDEF SQLITE3C
225!IF $(SPLIT_AMALGAMATION)!=0
226SQLITE3C = sqlite3-all.c
227!ELSE
228SQLITE3C = sqlite3.c
229!ENDIF
230!ENDIF
231
232# Set the include code file to be used by executables and libraries when
233# they need SQLite.
234#
235!IFNDEF SQLITE3H
236SQLITE3H = sqlite3.h
237!ENDIF
238
mistachkinedcb4eb2016-01-22 01:25:15 +0000239# This is the name to use for the SQLite dynamic link library (DLL).
240#
241!IFNDEF SQLITE3DLL
mistachkinb0c99af2016-02-19 05:07:56 +0000242!IF $(FOR_WIN10)!=0
243SQLITE3DLL = winsqlite3.dll
244!ELSE
mistachkinedcb4eb2016-01-22 01:25:15 +0000245SQLITE3DLL = sqlite3.dll
246!ENDIF
mistachkinb0c99af2016-02-19 05:07:56 +0000247!ENDIF
mistachkinedcb4eb2016-01-22 01:25:15 +0000248
249# This is the name to use for the SQLite import library (LIB).
250#
251!IFNDEF SQLITE3LIB
mistachkinb0c99af2016-02-19 05:07:56 +0000252!IF $(FOR_WIN10)!=0
253SQLITE3LIB = winsqlite3.lib
254!ELSE
mistachkinedcb4eb2016-01-22 01:25:15 +0000255SQLITE3LIB = sqlite3.lib
256!ENDIF
mistachkinb0c99af2016-02-19 05:07:56 +0000257!ENDIF
mistachkinedcb4eb2016-01-22 01:25:15 +0000258
259# This is the name to use for the SQLite shell executable (EXE).
260#
261!IFNDEF SQLITE3EXE
mistachkinb0c99af2016-02-19 05:07:56 +0000262!IF $(FOR_WIN10)!=0
263SQLITE3EXE = winsqlite3shell.exe
264!ELSE
mistachkinedcb4eb2016-01-22 01:25:15 +0000265SQLITE3EXE = sqlite3.exe
266!ENDIF
mistachkinb0c99af2016-02-19 05:07:56 +0000267!ENDIF
mistachkinedcb4eb2016-01-22 01:25:15 +0000268
269# This is the argument used to set the program database (PDB) file for the
270# SQLite shell executable (EXE).
271#
272!IFNDEF SQLITE3EXEPDB
mistachkinb0c99af2016-02-19 05:07:56 +0000273!IF $(FOR_WIN10)!=0
274SQLITE3EXEPDB =
275!ELSE
mistachkinedcb4eb2016-01-22 01:25:15 +0000276SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
277!ENDIF
mistachkinb0c99af2016-02-19 05:07:56 +0000278!ENDIF
mistachkinedcb4eb2016-01-22 01:25:15 +0000279
mistachkincc0164b2016-09-05 20:46:02 +0000280# <<mark>>
mistachkin4ef916e2016-08-24 19:58:46 +0000281# These are the names of the customized Tcl header files used by various parts
282# of this makefile when the stdcall calling convention is in use. It is not
283# used for any other purpose.
284#
285!IFNDEF SQLITETCLH
286SQLITETCLH = sqlite_tcl.h
287!ENDIF
288
289!IFNDEF SQLITETCLDECLSH
290SQLITETCLDECLSH = sqlite_tclDecls.h
291!ENDIF
292
293# These are the additional targets that the targets that integrate with the
294# Tcl library should depend on when compiling, etc.
295#
296!IFNDEF SQLITE_TCL_DEP
297!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
298SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
299!ELSE
300SQLITE_TCL_DEP =
301!ENDIF
302!ENDIF
mistachkincc0164b2016-09-05 20:46:02 +0000303# <</mark>>
mistachkin4ef916e2016-08-24 19:58:46 +0000304
mistachkin4712c212014-05-09 20:51:17 +0000305# These are the "standard" SQLite compilation options used when compiling for
306# the Windows platform.
307#
308!IFNDEF OPT_FEATURE_FLAGS
mistachkin4ef916e2016-08-24 19:58:46 +0000309!IF $(MINIMAL_AMALGAMATION)==0
mistachkin4712c212014-05-09 20:51:17 +0000310OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
311OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
mistachkin4ef916e2016-08-24 19:58:46 +0000312!ENDIF
mistachkin4712c212014-05-09 20:51:17 +0000313OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
drh5e18d402016-05-03 13:14:18 +0000314!ENDIF
315
mistachkin12b35ea2016-05-03 19:40:54 +0000316# Should the session extension be enabled? If so, add compilation options
317# to enable it.
drh5e18d402016-05-03 13:14:18 +0000318#
drh5e18d402016-05-03 13:14:18 +0000319!IF $(SESSION)!=0
mistachkin05004782016-03-30 16:23:06 +0000320OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
321OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
mistachkin4712c212014-05-09 20:51:17 +0000322!ENDIF
323
mistachkinedcb4eb2016-01-22 01:25:15 +0000324# These are the "extended" SQLite compilation options used when compiling for
325# the Windows 10 platform.
326#
327!IFNDEF EXT_FEATURE_FLAGS
328!IF $(FOR_WIN10)!=0
329EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
330EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
331EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
332!ELSE
333EXT_FEATURE_FLAGS =
334!ENDIF
335!ENDIF
336
mistachkin4712c212014-05-09 20:51:17 +0000337###############################################################################
338############################### END OF OPTIONS ################################
339###############################################################################
340
mistachkin55e88d92016-02-08 20:40:57 +0000341# When compiling for the Windows 10 platform, the PLATFORM macro must be set
342# to an appropriate value (e.g. x86, x64, arm, arm64, etc).
343#
344!IF $(FOR_WIN10)!=0
345!IFNDEF PLATFORM
346!ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
347!ENDIF
348!ENDIF
349
mistachkind9b3c542014-05-09 23:31:55 +0000350# This assumes that MSVC is always installed in 32-bit Program Files directory
351# and sets the variable for use in locating other 32-bit installs accordingly.
352#
353PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
354PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
355
mistachkine37f99c2012-06-30 16:22:05 +0000356# Check for the predefined command macro CC. This should point to the compiler
mistachkinbd58d5f2012-06-30 22:22:34 +0000357# binary for the target platform. If it is not defined, simply define it to
mistachkine37f99c2012-06-30 16:22:05 +0000358# the legacy default value 'cl.exe'.
359#
360!IFNDEF CC
361CC = cl.exe
362!ENDIF
363
mistachkin9aeb9712016-02-26 23:13:16 +0000364# Check for the predefined command macro CSC. This should point to a working
365# C Sharp compiler binary. If it is not defined, simply define it to the
366# legacy default value 'csc.exe'.
367#
368!IFNDEF CSC
369CSC = csc.exe
370!ENDIF
371
mistachkin228aeff2012-06-30 19:24:09 +0000372# Check for the command macro LD. This should point to the linker binary for
mistachkinbd58d5f2012-06-30 22:22:34 +0000373# the target platform. If it is not defined, simply define it to the legacy
mistachkin228aeff2012-06-30 19:24:09 +0000374# default value 'link.exe'.
375#
376!IFNDEF LD
377LD = link.exe
378!ENDIF
379
mistachkin4d9d1f42012-09-03 10:32:32 +0000380# Check for the predefined command macro RC. This should point to the resource
381# compiler binary for the target platform. If it is not defined, simply define
382# it to the legacy default value 'rc.exe'.
383#
384!IFNDEF RC
385RC = rc.exe
386!ENDIF
387
mistachkine48f1ed2016-02-08 20:45:37 +0000388# Check for the MSVC runtime library path macro. Otherwise, this value will
mistachkin4712c212014-05-09 20:51:17 +0000389# default to the 'lib' directory underneath the MSVC installation directory.
390#
391!IFNDEF CRTLIBPATH
392CRTLIBPATH = $(VCINSTALLDIR)\lib
393!ENDIF
394
395CRTLIBPATH = $(CRTLIBPATH:\\=\)
396
mistachkine37f99c2012-06-30 16:22:05 +0000397# Check for the command macro NCC. This should point to the compiler binary
mistachkinbd58d5f2012-06-30 22:22:34 +0000398# for the platform the compilation process is taking place on. If it is not
399# defined, simply define it to have the same value as the CC macro. When
mistachkine37f99c2012-06-30 16:22:05 +0000400# cross-compiling, it is suggested that this macro be modified via the command
401# line (since nmake itself does not provide a built-in method to guess it).
402# For example, to use the x86 compiler when cross-compiling for x64, a command
mistachkinbd58d5f2012-06-30 22:22:34 +0000403# line similar to the following could be used (all on one line):
mistachkine37f99c2012-06-30 16:22:05 +0000404#
mistachkin6f928332012-08-17 11:47:32 +0000405# nmake /f Makefile.msc sqlite3.dll
mistachkin52fd8e12012-08-28 01:44:13 +0000406# XCOMPILE=1 USE_NATIVE_LIBPATHS=1
407#
408# Alternatively, the full path and file name to the compiler binary for the
409# platform the compilation process is taking place may be specified (all on
410# one line):
411#
412# nmake /f Makefile.msc sqlite3.dll
mistachkinbd58d5f2012-06-30 22:22:34 +0000413# "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
414# USE_NATIVE_LIBPATHS=1
mistachkine37f99c2012-06-30 16:22:05 +0000415#
mistachkinfd0ba2a2012-07-27 08:21:45 +0000416!IFDEF NCC
417NCC = $(NCC:\\=\)
mistachkin52fd8e12012-08-28 01:44:13 +0000418!ELSEIF $(XCOMPILE)!=0
mistachkin5fac4202013-12-03 23:33:29 +0000419NCC = "$(VCINSTALLDIR)\bin\$(CC)"
mistachkin52fd8e12012-08-28 01:44:13 +0000420NCC = $(NCC:\\=\)
mistachkinfd0ba2a2012-07-27 08:21:45 +0000421!ELSE
mistachkine37f99c2012-06-30 16:22:05 +0000422NCC = $(CC)
423!ENDIF
424
mistachkine48f1ed2016-02-08 20:45:37 +0000425# Check for the MSVC native runtime library path macro. Otherwise,
mistachkin4712c212014-05-09 20:51:17 +0000426# this value will default to the 'lib' directory underneath the MSVC
mistachkinbd58d5f2012-06-30 22:22:34 +0000427# installation directory.
428#
429!IFNDEF NCRTLIBPATH
430NCRTLIBPATH = $(VCINSTALLDIR)\lib
431!ENDIF
432
mistachkin0b5ae722012-07-27 23:03:47 +0000433NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
434
mistachkine48f1ed2016-02-08 20:45:37 +0000435# Check for the Platform SDK library path macro. Otherwise, this
mistachkinbd58d5f2012-06-30 22:22:34 +0000436# value will default to the 'lib' directory underneath the Windows
437# SDK installation directory (the environment variable used appears
438# to be available when using Visual C++ 2008 or later via the
439# command line).
440#
441!IFNDEF NSDKLIBPATH
442NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
443!ENDIF
444
mistachkin0b5ae722012-07-27 23:03:47 +0000445NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
446
mistachkine48f1ed2016-02-08 20:45:37 +0000447# Check for the UCRT library path macro. Otherwise, this value will
mistachkina6f28892016-02-05 19:40:23 +0000448# default to the version-specific, platform-specific 'lib' directory
449# underneath the Windows SDK installation directory.
450#
451!IFNDEF UCRTLIBPATH
452UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
453!ENDIF
454
455UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
456
mistachkinbd58d5f2012-06-30 22:22:34 +0000457# C compiler and options for use in building executables that
shanehb2f20bf2011-06-17 07:07:24 +0000458# will run on the platform that is doing the build.
459#
mistachkin2318d332015-01-12 18:02:52 +0000460!IF $(USE_FULLWARN)!=0
mistachkinf170ea42015-10-16 20:13:57 +0000461BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000462!ELSE
mistachkinf170ea42015-10-16 20:13:57 +0000463BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000464!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000465
mistachkin0157e012013-09-06 21:41:11 +0000466# Check if assembly code listings should be generated for the source
467# code files to be compiled.
468#
469!IF $(USE_LISTINGS)!=0
470BCC = $(BCC) -FAcs
471!ENDIF
472
mistachkinbd58d5f2012-06-30 22:22:34 +0000473# Check if the native library paths should be used when compiling
474# the command line tools used during the compilation process. If
475# so, set the necessary macro now.
476#
477!IF $(USE_NATIVE_LIBPATHS)!=0
478NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
mistachkin6bbe3df2015-04-19 06:18:10 +0000479
480!IFDEF NUCRTLIBPATH
481NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
482NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
483!ENDIF
mistachkinbd58d5f2012-06-30 22:22:34 +0000484!ENDIF
485
486# C compiler and options for use in building executables that
shanehb2f20bf2011-06-17 07:07:24 +0000487# will run on the target platform. (BCC and TCC are usually the
488# same unless your are cross-compiling.)
489#
mistachkin2318d332015-01-12 18:02:52 +0000490!IF $(USE_FULLWARN)!=0
mistachkinf170ea42015-10-16 20:13:57 +0000491TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000492!ELSE
mistachkinf170ea42015-10-16 20:13:57 +0000493TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
mistachkin2318d332015-01-12 18:02:52 +0000494!ENDIF
495
mistachkin8988aee2016-02-10 21:45:25 +0000496TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
497RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
shaneh6e7850c2011-06-17 15:57:07 +0000498
mistachkin44723ce2015-03-21 02:22:37 +0000499# Check if we want to use the "stdcall" calling convention when compiling.
500# This is not supported by the compilers for non-x86 platforms. It should
501# also be noted here that building any target with these "stdcall" options
502# will most likely fail if the Tcl library is also required. This is due
503# to how the Tcl library functions are declared and exported (i.e. without
504# an explicit calling convention, which results in "cdecl").
505#
mistachkinedcb4eb2016-01-22 01:25:15 +0000506!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000507!IF "$(PLATFORM)"=="x86"
mistachkin69def7f2016-07-28 04:14:37 +0000508CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
509SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
mistachkinf27a80c2016-07-28 16:09:52 +0000510# <<mark>>
mistachkin52b1dbb2016-07-28 14:37:04 +0000511TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
mistachkinf27a80c2016-07-28 16:09:52 +0000512# <</mark>>
mistachkin44723ce2015-03-21 02:22:37 +0000513!ELSE
514!IFNDEF PLATFORM
mistachkin69def7f2016-07-28 04:14:37 +0000515CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
516SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
mistachkinf27a80c2016-07-28 16:09:52 +0000517# <<mark>>
mistachkin52b1dbb2016-07-28 14:37:04 +0000518TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
mistachkinf27a80c2016-07-28 16:09:52 +0000519# <</mark>>
mistachkin44723ce2015-03-21 02:22:37 +0000520!ELSE
521CORE_CCONV_OPTS =
522SHELL_CCONV_OPTS =
mistachkinf27a80c2016-07-28 16:09:52 +0000523# <<mark>>
mistachkin69def7f2016-07-28 04:14:37 +0000524TEST_CCONV_OPTS =
mistachkinf27a80c2016-07-28 16:09:52 +0000525# <</mark>>
mistachkin44723ce2015-03-21 02:22:37 +0000526!ENDIF
527!ENDIF
528!ELSE
529CORE_CCONV_OPTS =
530SHELL_CCONV_OPTS =
mistachkinf27a80c2016-07-28 16:09:52 +0000531# <<mark>>
mistachkin69def7f2016-07-28 04:14:37 +0000532TEST_CCONV_OPTS =
mistachkinf27a80c2016-07-28 16:09:52 +0000533# <</mark>>
mistachkin44723ce2015-03-21 02:22:37 +0000534!ENDIF
535
536# These are additional compiler options used for the core library.
537#
538!IFNDEF CORE_COMPILE_OPTS
mistachkinedcb4eb2016-01-22 01:25:15 +0000539!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000540CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
541!ELSE
542CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
543!ENDIF
544!ENDIF
545
546# These are the additional targets that the core library should depend on
547# when linking.
548#
549!IFNDEF CORE_LINK_DEP
mistachkin9b88ace2016-02-26 21:01:37 +0000550!IF $(DYNAMIC_SHELL)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000551CORE_LINK_DEP =
mistachkin9b88ace2016-02-26 21:01:37 +0000552!ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
mistachkin44723ce2015-03-21 02:22:37 +0000553CORE_LINK_DEP = sqlite3.def
mistachkin9b88ace2016-02-26 21:01:37 +0000554!ELSE
555CORE_LINK_DEP =
mistachkin44723ce2015-03-21 02:22:37 +0000556!ENDIF
557!ENDIF
558
559# These are additional linker options used for the core library.
560#
561!IFNDEF CORE_LINK_OPTS
mistachkin9b88ace2016-02-26 21:01:37 +0000562!IF $(DYNAMIC_SHELL)!=0
mistachkin44723ce2015-03-21 02:22:37 +0000563CORE_LINK_OPTS =
mistachkin9b88ace2016-02-26 21:01:37 +0000564!ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
mistachkin44723ce2015-03-21 02:22:37 +0000565CORE_LINK_OPTS = /DEF:sqlite3.def
mistachkin9b88ace2016-02-26 21:01:37 +0000566!ELSE
567CORE_LINK_OPTS =
mistachkin44723ce2015-03-21 02:22:37 +0000568!ENDIF
569!ENDIF
570
571# These are additional compiler options used for the shell executable.
572#
573!IFNDEF SHELL_COMPILE_OPTS
mistachkinedcb4eb2016-01-22 01:25:15 +0000574!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
mistachkin5d4d9412016-01-22 03:54:36 +0000575SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
mistachkin44723ce2015-03-21 02:22:37 +0000576!ELSE
mistachkin5d4d9412016-01-22 03:54:36 +0000577SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
578!ENDIF
579!ENDIF
580
581# This is the source code that the shell executable should be compiled
582# with.
583#
584!IFNDEF SHELL_CORE_SRC
585!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
586SHELL_CORE_SRC =
587!ELSE
588SHELL_CORE_SRC = $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +0000589!ENDIF
590!ENDIF
591
592# This is the core library that the shell executable should depend on.
593#
594!IFNDEF SHELL_CORE_DEP
mistachkinedcb4eb2016-01-22 01:25:15 +0000595!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
596SHELL_CORE_DEP = $(SQLITE3DLL)
mistachkin44723ce2015-03-21 02:22:37 +0000597!ELSE
mistachkin5d4d9412016-01-22 03:54:36 +0000598SHELL_CORE_DEP =
mistachkin44723ce2015-03-21 02:22:37 +0000599!ENDIF
600!ENDIF
601
602# This is the core library that the shell executable should link with.
603#
604!IFNDEF SHELL_CORE_LIB
mistachkinedcb4eb2016-01-22 01:25:15 +0000605!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
606SHELL_CORE_LIB = $(SQLITE3LIB)
mistachkin44723ce2015-03-21 02:22:37 +0000607!ELSE
mistachkin5d4d9412016-01-22 03:54:36 +0000608SHELL_CORE_LIB =
mistachkin44723ce2015-03-21 02:22:37 +0000609!ENDIF
610!ENDIF
611
612# These are additional linker options used for the shell executable.
613#
614!IFNDEF SHELL_LINK_OPTS
615SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
616!ENDIF
617
mistachkin0157e012013-09-06 21:41:11 +0000618# Check if assembly code listings should be generated for the source
619# code files to be compiled.
620#
621!IF $(USE_LISTINGS)!=0
622TCC = $(TCC) -FAcs
623!ENDIF
624
mistachkinf39eaf22012-03-20 02:18:42 +0000625# When compiling the library for use in the WinRT environment,
mistachkin46b721a2012-03-23 12:28:21 +0000626# the following compile-time options must be used as well to
mistachkinf39eaf22012-03-20 02:18:42 +0000627# disable use of Win32 APIs that are not available and to enable
628# use of Win32 APIs that are specific to Windows 8 and/or WinRT.
629#
mistachkin46b721a2012-03-23 12:28:21 +0000630!IF $(FOR_WINRT)!=0
mistachkin8d967a92012-06-21 04:21:35 +0000631TCC = $(TCC) -DSQLITE_OS_WINRT=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000632RCC = $(RCC) -DSQLITE_OS_WINRT=1
mistachkin08c1c312012-10-06 03:48:25 +0000633TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
634RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
mistachkin8d967a92012-06-21 04:21:35 +0000635!ENDIF
636
mistachkin5d4d9412016-01-22 03:54:36 +0000637# C compiler options for the Windows 10 platform (needs MSVC 2015).
mistachkinedcb4eb2016-01-22 01:25:15 +0000638#
639!IF $(FOR_WIN10)!=0
mistachkin406eeff2016-02-09 18:28:20 +0000640TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
641BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
mistachkinedcb4eb2016-01-22 01:25:15 +0000642!ENDIF
643
mistachkin8d967a92012-06-21 04:21:35 +0000644# Also, we need to dynamically link to the correct MSVC runtime
645# when compiling for WinRT (e.g. debug or release) OR if the
646# USE_CRT_DLL option is set to force dynamically linking to the
647# MSVC runtime library.
648#
mistachkina6f28892016-02-05 19:40:23 +0000649!IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
mistachkincd54bab2014-12-20 21:14:14 +0000650!IF $(DEBUG)>1
mistachkin8d967a92012-06-21 04:21:35 +0000651TCC = $(TCC) -MDd
mistachkin08c1c312012-10-06 03:48:25 +0000652BCC = $(BCC) -MDd
mistachkin8d967a92012-06-21 04:21:35 +0000653!ELSE
654TCC = $(TCC) -MD
mistachkin08c1c312012-10-06 03:48:25 +0000655BCC = $(BCC) -MD
mistachkin8d967a92012-06-21 04:21:35 +0000656!ENDIF
657!ELSE
mistachkincd54bab2014-12-20 21:14:14 +0000658!IF $(DEBUG)>1
mistachkin8d967a92012-06-21 04:21:35 +0000659TCC = $(TCC) -MTd
mistachkin08c1c312012-10-06 03:48:25 +0000660BCC = $(BCC) -MTd
mistachkin8d967a92012-06-21 04:21:35 +0000661!ELSE
662TCC = $(TCC) -MT
mistachkin08c1c312012-10-06 03:48:25 +0000663BCC = $(BCC) -MT
mistachkin8d967a92012-06-21 04:21:35 +0000664!ENDIF
mistachkin46b721a2012-03-23 12:28:21 +0000665!ENDIF
mistachkinf39eaf22012-03-20 02:18:42 +0000666
mistachkin3e786092016-01-23 07:53:04 +0000667# <<mark>>
mistachkinf39eaf22012-03-20 02:18:42 +0000668# The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
shaneh6e7850c2011-06-17 15:57:07 +0000669# any extension header files by default. For non-amalgamation
670# builds, we need to make sure the compiler can find these.
671#
672!IF $(USE_AMALGAMATION)==0
673TCC = $(TCC) -I$(TOP)\ext\fts3
mistachkin4d9d1f42012-09-03 10:32:32 +0000674RCC = $(RCC) -I$(TOP)\ext\fts3
shaneh6e7850c2011-06-17 15:57:07 +0000675TCC = $(TCC) -I$(TOP)\ext\rtree
mistachkin4d9d1f42012-09-03 10:32:32 +0000676RCC = $(RCC) -I$(TOP)\ext\rtree
drh498dcae2013-03-13 11:42:00 +0000677TCC = $(TCC) -I$(TOP)\ext\session
mistachkin38b4daa2013-03-13 19:02:39 +0000678RCC = $(RCC) -I$(TOP)\ext\session
shaneh6e7850c2011-06-17 15:57:07 +0000679!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000680
mistachkinb0427512014-01-30 11:12:52 +0000681# The mksqlite3c.tcl script accepts some options on the command
682# line. When compiling with debugging enabled, some of these
683# options are necessary in order to allow debugging symbols to
684# work correctly with Visual Studio when using the amalgamation.
685#
mistachkin4ef916e2016-08-24 19:58:46 +0000686!IFNDEF MKSQLITE3C_TOOL
687!IF $(MINIMAL_AMALGAMATION)!=0
688MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
689!ELSE
690MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
691!ENDIF
692!ENDIF
693
mistachkin22529172015-04-10 21:16:11 +0000694!IFNDEF MKSQLITE3C_ARGS
mistachkincd54bab2014-12-20 21:14:14 +0000695!IF $(DEBUG)>1
mistachkinb0427512014-01-30 11:12:52 +0000696MKSQLITE3C_ARGS = --linemacros
697!ELSE
698MKSQLITE3C_ARGS =
699!ENDIF
mistachkin4ef916e2016-08-24 19:58:46 +0000700!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
701MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
702!ENDIF
703!ENDIF
704
705# The mksqlite3h.tcl script accepts some options on the command line.
706# When compiling with stdcall support, some of these options are
707# necessary.
708#
709!IFNDEF MKSQLITE3H_ARGS
710!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
711MKSQLITE3H_ARGS = --useapicall
712!ELSE
713MKSQLITE3H_ARGS =
714!ENDIF
mistachkin22529172015-04-10 21:16:11 +0000715!ENDIF
mistachkin3e786092016-01-23 07:53:04 +0000716# <</mark>>
mistachkinb0427512014-01-30 11:12:52 +0000717
shanehb2f20bf2011-06-17 07:07:24 +0000718# Define -DNDEBUG to compile without debugging (i.e., for production usage)
719# Omitting the define will cause extra debugging code to be inserted and
720# includes extra comments when "EXPLAIN stmt" is used.
721#
mistachkin753c5442011-08-25 02:02:25 +0000722!IF $(DEBUG)==0
shanehb2f20bf2011-06-17 07:07:24 +0000723TCC = $(TCC) -DNDEBUG
mistachkinfec360a2012-04-18 10:29:21 +0000724BCC = $(BCC) -DNDEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000725RCC = $(RCC) -DNDEBUG
mistachkin753c5442011-08-25 02:02:25 +0000726!ENDIF
727
mistachkinedcb4eb2016-01-22 01:25:15 +0000728!IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
mistachkin13a24f82015-05-13 04:50:30 +0000729TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
730RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
mistachkincd54bab2014-12-20 21:14:14 +0000731!ENDIF
732
733!IF $(DEBUG)>2
mistachkin13a24f82015-05-13 04:50:30 +0000734TCC = $(TCC) -DSQLITE_DEBUG=1
735RCC = $(RCC) -DSQLITE_DEBUG=1
mistachkin753c5442011-08-25 02:02:25 +0000736!ENDIF
737
mistachkinb10f22a2015-04-16 16:27:29 +0000738!IF $(DEBUG)>4 || $(OSTRACE)!=0
739TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
740RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
mistachkin753c5442011-08-25 02:02:25 +0000741!ENDIF
742
mistachkincd54bab2014-12-20 21:14:14 +0000743!IF $(DEBUG)>5
mistachkin13a24f82015-05-13 04:50:30 +0000744TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
745RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
mistachkin753c5442011-08-25 02:02:25 +0000746!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000747
mistachkinbd58d5f2012-06-30 22:22:34 +0000748# Prevent warnings about "insecure" MSVC runtime library functions
749# being used.
mistachkin176f1b42011-08-02 23:34:00 +0000750#
751TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkinfec360a2012-04-18 10:29:21 +0000752BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkin4d9d1f42012-09-03 10:32:32 +0000753RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkin176f1b42011-08-02 23:34:00 +0000754
mistachkinbd58d5f2012-06-30 22:22:34 +0000755# Prevent warnings about "deprecated" POSIX functions being used.
756#
757TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
758BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
mistachkin4d9d1f42012-09-03 10:32:32 +0000759RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
mistachkinbd58d5f2012-06-30 22:22:34 +0000760
mistachkin2f7d5d82012-08-22 00:39:34 +0000761# Use the SQLite debugging heap subsystem?
mistachkin1b186a92011-08-24 16:13:57 +0000762#
mistachkin2f7d5d82012-08-22 00:39:34 +0000763!IF $(MEMDEBUG)!=0
764TCC = $(TCC) -DSQLITE_MEMDEBUG=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000765RCC = $(RCC) -DSQLITE_MEMDEBUG=1
mistachkin2f7d5d82012-08-22 00:39:34 +0000766
mistachkin2f7d5d82012-08-22 00:39:34 +0000767# Use native Win32 heap subsystem instead of malloc/free?
768#
769!ELSEIF $(WIN32HEAP)!=0
770TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000771RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
mistachkin753c5442011-08-25 02:02:25 +0000772
mistachkin753c5442011-08-25 02:02:25 +0000773# Validate the heap on every call into the native Win32 heap subsystem?
774#
mistachkincd54bab2014-12-20 21:14:14 +0000775!IF $(DEBUG)>3
mistachkin753c5442011-08-25 02:02:25 +0000776TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000777RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
mistachkin753c5442011-08-25 02:02:25 +0000778!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +0000779!ENDIF
mistachkin1b186a92011-08-24 16:13:57 +0000780
mistachkin3e786092016-01-23 07:53:04 +0000781# <<mark>>
mistachkin5b0b6fd2011-06-25 01:14:36 +0000782# The locations of the Tcl header and library files. Also, the library that
783# non-stubs enabled programs using Tcl must link against. These variables
784# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
785# prior to running nmake in order to match the actual installed location and
786# version on this machine.
shanehb2f20bf2011-06-17 07:07:24 +0000787#
mistachkine37f99c2012-06-30 16:22:05 +0000788!IFNDEF TCLINCDIR
shanehb2f20bf2011-06-17 07:07:24 +0000789TCLINCDIR = c:\tcl\include
mistachkine37f99c2012-06-30 16:22:05 +0000790!ENDIF
mistachkin5b0b6fd2011-06-25 01:14:36 +0000791
mistachkine37f99c2012-06-30 16:22:05 +0000792!IFNDEF TCLLIBDIR
shanehb2f20bf2011-06-17 07:07:24 +0000793TCLLIBDIR = c:\tcl\lib
mistachkine37f99c2012-06-30 16:22:05 +0000794!ENDIF
mistachkin5b0b6fd2011-06-25 01:14:36 +0000795
mistachkine37f99c2012-06-30 16:22:05 +0000796!IFNDEF LIBTCL
drh506a1402016-11-02 19:49:22 +0000797LIBTCL = tcl86.lib
mistachkine37f99c2012-06-30 16:22:05 +0000798!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000799
mistachkin5b663502015-10-10 23:39:55 +0000800!IFNDEF LIBTCLSTUB
drh506a1402016-11-02 19:49:22 +0000801LIBTCLSTUB = tclstub86.lib
mistachkin5b663502015-10-10 23:39:55 +0000802!ENDIF
803
mistachkin88739962015-10-14 23:04:08 +0000804!IFNDEF LIBTCLPATH
805LIBTCLPATH = c:\tcl\bin
806!ENDIF
807
mistachkinc756ded2011-10-02 05:23:16 +0000808# The locations of the ICU header and library files. These variables
809# (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
810# prior to running nmake in order to match the actual installed location on
811# this machine.
812#
mistachkine37f99c2012-06-30 16:22:05 +0000813!IFNDEF ICUINCDIR
mistachkinc756ded2011-10-02 05:23:16 +0000814ICUINCDIR = c:\icu\include
mistachkine37f99c2012-06-30 16:22:05 +0000815!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000816
mistachkine37f99c2012-06-30 16:22:05 +0000817!IFNDEF ICULIBDIR
mistachkinc756ded2011-10-02 05:23:16 +0000818ICULIBDIR = c:\icu\lib
mistachkine37f99c2012-06-30 16:22:05 +0000819!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000820
mistachkine37f99c2012-06-30 16:22:05 +0000821!IFNDEF LIBICU
mistachkinc756ded2011-10-02 05:23:16 +0000822LIBICU = icuuc.lib icuin.lib
mistachkine37f99c2012-06-30 16:22:05 +0000823!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000824
shanehb2f20bf2011-06-17 07:07:24 +0000825# This is the command to use for tclsh - normally just "tclsh", but we may
mistachkin5b0b6fd2011-06-25 01:14:36 +0000826# know the specific version we want to use. This variable (TCLSH_CMD) may be
827# overridden via the environment prior to running nmake in order to select a
828# specific Tcl shell to use.
shanehb2f20bf2011-06-17 07:07:24 +0000829#
mistachkine37f99c2012-06-30 16:22:05 +0000830!IFNDEF TCLSH_CMD
drh506a1402016-11-02 19:49:22 +0000831TCLSH_CMD = tclsh
mistachkine37f99c2012-06-30 16:22:05 +0000832!ENDIF
mistachkin3e786092016-01-23 07:53:04 +0000833# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +0000834
835# Compiler options needed for programs that use the readline() library.
836#
mistachkin8bcd3fa2013-08-29 01:03:38 +0000837!IFNDEF READLINE_FLAGS
shaneh6e7850c2011-06-17 15:57:07 +0000838READLINE_FLAGS = -DHAVE_READLINE=0
mistachkin8bcd3fa2013-08-29 01:03:38 +0000839!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000840
841# The library that programs using readline() must link against.
842#
mistachkin8bcd3fa2013-08-29 01:03:38 +0000843!IFNDEF LIBREADLINE
shaneh6e7850c2011-06-17 15:57:07 +0000844LIBREADLINE =
mistachkin8bcd3fa2013-08-29 01:03:38 +0000845!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000846
847# Should the database engine be compiled threadsafe
848#
849TCC = $(TCC) -DSQLITE_THREADSAFE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000850RCC = $(RCC) -DSQLITE_THREADSAFE=1
shanehb2f20bf2011-06-17 07:07:24 +0000851
852# Do threads override each others locks by default (1), or do we test (-1)
853#
854TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
mistachkin4d9d1f42012-09-03 10:32:32 +0000855RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
shanehb2f20bf2011-06-17 07:07:24 +0000856
857# Any target libraries which libsqlite must be linked against
shaneh6e7850c2011-06-17 15:57:07 +0000858#
mistachkine37f99c2012-06-30 16:22:05 +0000859!IFNDEF TLIBS
shaneh6e7850c2011-06-17 15:57:07 +0000860TLIBS =
mistachkine37f99c2012-06-30 16:22:05 +0000861!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000862
863# Flags controlling use of the in memory btree implementation
864#
865# SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
866# default to file, 2 to default to memory, and 3 to force temporary
867# tables to always be in memory.
868#
shaneh6e7850c2011-06-17 15:57:07 +0000869TCC = $(TCC) -DSQLITE_TEMP_STORE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000870RCC = $(RCC) -DSQLITE_TEMP_STORE=1
shanehb2f20bf2011-06-17 07:07:24 +0000871
872# Enable/disable loadable extensions, and other optional features
shaneh6e7850c2011-06-17 15:57:07 +0000873# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
874# The same set of OMIT and ENABLE flags should be passed to the
shanehb2f20bf2011-06-17 07:07:24 +0000875# LEMON parser generator and the mkkeywordhash tool as well.
876
mistachkin4712c212014-05-09 20:51:17 +0000877# These are the required SQLite compilation options used when compiling for
878# the Windows platform.
879#
880REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
shanehb2f20bf2011-06-17 07:07:24 +0000881
mistachkine45e0fb2015-01-21 00:48:46 +0000882# If we are linking to the RPCRT4 library, enable features that need it.
883#
884!IF $(USE_RPCRT4_LIB)!=0
885REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
886!ENDIF
887
mistachkin4712c212014-05-09 20:51:17 +0000888# Add the required and optional SQLite compilation options into the command
889# lines used to invoke the MSVC code and resource compilers.
890#
mistachkinedcb4eb2016-01-22 01:25:15 +0000891TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
892RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
shanehb2f20bf2011-06-17 07:07:24 +0000893
mistachkin4712c212014-05-09 20:51:17 +0000894# Add in any optional parameters specified on the commane line, e.g.
895# nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
896#
shanehb2f20bf2011-06-17 07:07:24 +0000897TCC = $(TCC) $(OPTS)
mistachkin4d9d1f42012-09-03 10:32:32 +0000898RCC = $(RCC) $(OPTS)
shanehb2f20bf2011-06-17 07:07:24 +0000899
mistachkin8bcd3fa2013-08-29 01:03:38 +0000900# If compiling for debugging, add some defines.
mistachkin4712c212014-05-09 20:51:17 +0000901#
mistachkincd54bab2014-12-20 21:14:14 +0000902!IF $(DEBUG)>1
mistachkin8bcd3fa2013-08-29 01:03:38 +0000903TCC = $(TCC) -D_DEBUG
904BCC = $(BCC) -D_DEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000905RCC = $(RCC) -D_DEBUG
mistachkin4d60be52011-08-26 05:40:31 +0000906!ENDIF
907
mistachkin8bcd3fa2013-08-29 01:03:38 +0000908# If optimizations are enabled or disabled (either implicitly or
909# explicitly), add the necessary flags.
mistachkin4712c212014-05-09 20:51:17 +0000910#
mistachkincd54bab2014-12-20 21:14:14 +0000911!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
mistachkin8bcd3fa2013-08-29 01:03:38 +0000912TCC = $(TCC) -Od
913BCC = $(BCC) -Od
mistachkin24b6b812016-08-24 18:21:58 +0000914!IF $(USE_RUNTIME_CHECKS)!=0
915TCC = $(TCC) -RTC1
916BCC = $(BCC) -RTC1
917!ENDIF
mistachkin8bcd3fa2013-08-29 01:03:38 +0000918!ELSEIF $(OPTIMIZATIONS)>=3
919TCC = $(TCC) -Ox
920BCC = $(BCC) -Ox
921!ELSEIF $(OPTIMIZATIONS)==2
922TCC = $(TCC) -O2
923BCC = $(BCC) -O2
924!ELSEIF $(OPTIMIZATIONS)==1
925TCC = $(TCC) -O1
926BCC = $(BCC) -O1
927!ENDIF
928
929# If symbols are enabled (or compiling for debugging), enable PDBs.
mistachkin4712c212014-05-09 20:51:17 +0000930#
mistachkincd54bab2014-12-20 21:14:14 +0000931!IF $(DEBUG)>1 || $(SYMBOLS)!=0
mistachkin4d60be52011-08-26 05:40:31 +0000932TCC = $(TCC) -Zi
mistachkinfec360a2012-04-18 10:29:21 +0000933BCC = $(BCC) -Zi
mistachkin753c5442011-08-25 02:02:25 +0000934!ENDIF
935
mistachkin3e786092016-01-23 07:53:04 +0000936# <<mark>>
mistachkinc756ded2011-10-02 05:23:16 +0000937# If ICU support is enabled, add the compiler options for it.
mistachkin4712c212014-05-09 20:51:17 +0000938#
mistachkinc756ded2011-10-02 05:23:16 +0000939!IF $(USE_ICU)!=0
940TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000941RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
mistachkinc756ded2011-10-02 05:23:16 +0000942TCC = $(TCC) -I$(TOP)\ext\icu
mistachkin4d9d1f42012-09-03 10:32:32 +0000943RCC = $(RCC) -I$(TOP)\ext\icu
mistachkinc756ded2011-10-02 05:23:16 +0000944TCC = $(TCC) -I$(ICUINCDIR)
mistachkin4d9d1f42012-09-03 10:32:32 +0000945RCC = $(RCC) -I$(ICUINCDIR)
mistachkinc756ded2011-10-02 05:23:16 +0000946!ENDIF
mistachkin3e786092016-01-23 07:53:04 +0000947# <</mark>>
mistachkinc756ded2011-10-02 05:23:16 +0000948
mistachkin4d9d1f42012-09-03 10:32:32 +0000949# Command line prefixes for compiling code, compiling resources,
950# linking, etc.
mistachkin4712c212014-05-09 20:51:17 +0000951#
shanehb2f20bf2011-06-17 07:07:24 +0000952LTCOMPILE = $(TCC) -Fo$@
mistachkin4d9d1f42012-09-03 10:32:32 +0000953LTRCOMPILE = $(RCC) -r
shanehb2f20bf2011-06-17 07:07:24 +0000954LTLIB = lib.exe
shaneh2a0b9ef2011-06-20 20:52:32 +0000955LTLINK = $(TCC) -Fe$@
956
mistachkine45e0fb2015-01-21 00:48:46 +0000957# If requested, link to the RPCRT4 library.
958#
959!IF $(USE_RPCRT4_LIB)!=0
960LTLINK = $(LTLINK) rpcrt4.lib
961!ENDIF
962
shaneh2a0b9ef2011-06-20 20:52:32 +0000963# If a platform was set, force the linker to target that.
964# Note that the vcvars*.bat family of batch files typically
965# set this for you. Otherwise, the linker will attempt
966# to deduce the binary type based on the object files.
mistachkine37f99c2012-06-30 16:22:05 +0000967!IFDEF PLATFORM
mistachkin44723ce2015-03-21 02:22:37 +0000968LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
969LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
970!ELSE
971LTLINKOPTS = /NOLOGO
972LTLIBOPTS = /NOLOGO
shaneh2a0b9ef2011-06-20 20:52:32 +0000973!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000974
mistachkina6ff8572012-04-17 21:00:12 +0000975# When compiling for use in the WinRT environment, the following
976# linker option must be used to mark the executable as runnable
977# only in the context of an application container.
978#
979!IF $(FOR_WINRT)!=0
980LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
mistachkin318d38c2015-04-22 01:33:53 +0000981!IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
mistachkinf6a23422014-05-05 20:24:34 +0000982!IFNDEF STORELIBPATH
mistachkinda5b1cd2013-07-10 19:39:02 +0000983!IF "$(PLATFORM)"=="x86"
mistachkin4712c212014-05-09 20:51:17 +0000984STORELIBPATH = $(CRTLIBPATH)\store
mistachkinda5b1cd2013-07-10 19:39:02 +0000985!ELSEIF "$(PLATFORM)"=="x64"
mistachkin4712c212014-05-09 20:51:17 +0000986STORELIBPATH = $(CRTLIBPATH)\store\amd64
mistachkin4eaa1292013-07-10 21:33:25 +0000987!ELSEIF "$(PLATFORM)"=="ARM"
mistachkin4712c212014-05-09 20:51:17 +0000988STORELIBPATH = $(CRTLIBPATH)\store\arm
mistachkin4eaa1292013-07-10 21:33:25 +0000989!ELSE
mistachkin4712c212014-05-09 20:51:17 +0000990STORELIBPATH = $(CRTLIBPATH)\store
mistachkinda5b1cd2013-07-10 19:39:02 +0000991!ENDIF
992!ENDIF
mistachkinf6a23422014-05-05 20:24:34 +0000993STORELIBPATH = $(STORELIBPATH:\\=\)
994LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
995!ENDIF
mistachkina6ff8572012-04-17 21:00:12 +0000996!ENDIF
997
mistachkind9b3c542014-05-09 23:31:55 +0000998# When compiling for Windows Phone 8.1, an extra library path is
999# required.
1000#
1001!IF $(USE_WP81_OPTS)!=0
1002!IFNDEF WP81LIBPATH
1003!IF "$(PLATFORM)"=="x86"
1004WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
1005!ELSEIF "$(PLATFORM)"=="ARM"
1006WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
1007!ELSE
1008WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
mistachkinc756ded2011-10-02 05:23:16 +00001009!ENDIF
mistachkin31856a32012-07-27 07:13:25 +00001010!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +00001011!ENDIF
1012
mistachkind9b3c542014-05-09 23:31:55 +00001013# When compiling for Windows Phone 8.1, some extra linker options
1014# are also required.
1015#
1016!IF $(USE_WP81_OPTS)!=0
1017!IFDEF WP81LIBPATH
1018LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
1019!ENDIF
1020LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
1021LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
1022LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
1023!ENDIF
1024
mistachkina819aed2016-02-12 05:19:29 +00001025# When compiling for UWP or the Windows 10 platform, some extra linker
mistachkin55e88d92016-02-08 20:40:57 +00001026# options are also required.
mistachkin318d38c2015-04-22 01:33:53 +00001027#
mistachkina819aed2016-02-12 05:19:29 +00001028!IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
mistachkin318d38c2015-04-22 01:33:53 +00001029LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
1030LTLINKOPTS = $(LTLINKOPTS) mincore.lib
1031!IFDEF PSDKLIBPATH
1032LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
1033!ENDIF
1034!ENDIF
1035
mistachkina6f28892016-02-05 19:40:23 +00001036!IF $(FOR_WIN10)!=0
mistachkin406eeff2016-02-09 18:28:20 +00001037LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
mistachkina6f28892016-02-05 19:40:23 +00001038!IF $(DEBUG)>1
1039LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
1040!ELSE
1041LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
1042!ENDIF
1043!ENDIF
1044
shanehb2f20bf2011-06-17 07:07:24 +00001045# If either debugging or symbols are enabled, enable PDBs.
mistachkin4712c212014-05-09 20:51:17 +00001046#
mistachkincd54bab2014-12-20 21:14:14 +00001047!IF $(DEBUG)>1 || $(SYMBOLS)!=0
mistachkinf170ea42015-10-16 20:13:57 +00001048LDFLAGS = /DEBUG $(LDOPTS)
1049!ELSE
1050LDFLAGS = $(LDOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00001051!ENDIF
1052
mistachkin3e786092016-01-23 07:53:04 +00001053# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001054# Start with the Tcl related linker options.
mistachkin4712c212014-05-09 20:51:17 +00001055#
shanehb2f20bf2011-06-17 07:07:24 +00001056!IF $(NO_TCL)==0
1057LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
1058LTLIBS = $(LIBTCL)
mistachkin31856a32012-07-27 07:13:25 +00001059!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +00001060
1061# If ICU support is enabled, add the linker options for it.
mistachkin4712c212014-05-09 20:51:17 +00001062#
shanehb2f20bf2011-06-17 07:07:24 +00001063!IF $(USE_ICU)!=0
1064LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
1065LTLIBS = $(LTLIBS) $(LIBICU)
1066!ENDIF
mistachkin3e786092016-01-23 07:53:04 +00001067# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001068
shanehb2f20bf2011-06-17 07:07:24 +00001069# You should not have to change anything below this line
1070###############################################################################
1071
mistachkin3e786092016-01-23 07:53:04 +00001072# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001073# Object files for the SQLite library (non-amalgamation).
1074#
mistachkinf67feef2013-07-29 19:03:20 +00001075LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
shanehb2f20bf2011-06-17 07:07:24 +00001076 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
drh1a4a6802015-05-04 18:31:09 +00001077 callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
shanehb2f20bf2011-06-17 07:07:24 +00001078 expr.lo fault.lo fkey.lo \
drh391d4ba2012-05-28 20:22:16 +00001079 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
1080 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
drh4d648c72013-04-22 17:07:56 +00001081 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
mistachkined52f9f2015-06-26 04:34:36 +00001082 fts5.lo \
shanehb2f20bf2011-06-17 07:07:24 +00001083 func.lo global.lo hash.lo \
drhc2f18ad2016-03-05 15:35:09 +00001084 icu.lo insert.lo legacy.lo loadext.lo \
shanehb2f20bf2011-06-17 07:07:24 +00001085 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
1086 memjournal.lo \
mistachkinf1c6bc52012-06-21 15:09:20 +00001087 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
1088 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
mistachkinf67feef2013-07-29 19:03:20 +00001089 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
drh498dcae2013-03-13 11:42:00 +00001090 random.lo resolve.lo rowset.lo rtree.lo \
drhcb75bff2016-01-14 14:48:17 +00001091 sqlite3session.lo select.lo sqlite3rbu.lo status.lo \
drh38b41492015-06-08 15:08:15 +00001092 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
shanehb2f20bf2011-06-17 07:07:24 +00001093 update.lo util.lo vacuum.lo \
mistachkinf67feef2013-07-29 19:03:20 +00001094 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
drh6c1f4ef2015-06-08 14:23:15 +00001095 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
1096 utf.lo vtab.lo
mistachkin3e786092016-01-23 07:53:04 +00001097# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001098
1099# Object files for the amalgamation.
1100#
1101LIBOBJS1 = sqlite3.lo
1102
1103# Determine the real value of LIBOBJ based on the 'configure' script
1104#
mistachkin3e786092016-01-23 07:53:04 +00001105# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001106!IF $(USE_AMALGAMATION)==0
1107LIBOBJ = $(LIBOBJS0)
1108!ELSE
mistachkin3e786092016-01-23 07:53:04 +00001109# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001110LIBOBJ = $(LIBOBJS1)
mistachkin3e786092016-01-23 07:53:04 +00001111# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001112!ENDIF
mistachkin3e786092016-01-23 07:53:04 +00001113# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001114
mistachkin08c1c312012-10-06 03:48:25 +00001115# Determine if embedded resource compilation and usage are enabled.
1116#
1117!IF $(USE_RC)!=0
1118LIBRESOBJS = sqlite3res.lo
1119!ELSE
1120LIBRESOBJS =
1121!ENDIF
1122
mistachkin3e786092016-01-23 07:53:04 +00001123# <<mark>>
mistachkinc04c54b2016-02-11 21:28:16 +00001124# Core source code files, part 1.
shanehb2f20bf2011-06-17 07:07:24 +00001125#
mistachkinc04c54b2016-02-11 21:28:16 +00001126SRC00 = \
shanehb2f20bf2011-06-17 07:07:24 +00001127 $(TOP)\src\alter.c \
1128 $(TOP)\src\analyze.c \
1129 $(TOP)\src\attach.c \
1130 $(TOP)\src\auth.c \
1131 $(TOP)\src\backup.c \
1132 $(TOP)\src\bitvec.c \
1133 $(TOP)\src\btmutex.c \
1134 $(TOP)\src\btree.c \
shanehb2f20bf2011-06-17 07:07:24 +00001135 $(TOP)\src\build.c \
1136 $(TOP)\src\callback.c \
1137 $(TOP)\src\complete.c \
1138 $(TOP)\src\ctime.c \
1139 $(TOP)\src\date.c \
drh1a4a6802015-05-04 18:31:09 +00001140 $(TOP)\src\dbstat.c \
shanehb2f20bf2011-06-17 07:07:24 +00001141 $(TOP)\src\delete.c \
1142 $(TOP)\src\expr.c \
1143 $(TOP)\src\fault.c \
1144 $(TOP)\src\fkey.c \
1145 $(TOP)\src\func.c \
1146 $(TOP)\src\global.c \
1147 $(TOP)\src\hash.c \
shanehb2f20bf2011-06-17 07:07:24 +00001148 $(TOP)\src\insert.c \
shanehb2f20bf2011-06-17 07:07:24 +00001149 $(TOP)\src\legacy.c \
1150 $(TOP)\src\loadext.c \
1151 $(TOP)\src\main.c \
1152 $(TOP)\src\malloc.c \
1153 $(TOP)\src\mem0.c \
1154 $(TOP)\src\mem1.c \
1155 $(TOP)\src\mem2.c \
1156 $(TOP)\src\mem3.c \
1157 $(TOP)\src\mem5.c \
1158 $(TOP)\src\memjournal.c \
1159 $(TOP)\src\mutex.c \
shanehb2f20bf2011-06-17 07:07:24 +00001160 $(TOP)\src\mutex_noop.c \
shanehb2f20bf2011-06-17 07:07:24 +00001161 $(TOP)\src\mutex_unix.c \
1162 $(TOP)\src\mutex_w32.c \
1163 $(TOP)\src\notify.c \
1164 $(TOP)\src\os.c \
shanehb2f20bf2011-06-17 07:07:24 +00001165 $(TOP)\src\os_unix.c \
mistachkinc04c54b2016-02-11 21:28:16 +00001166 $(TOP)\src\os_win.c
1167
1168# Core source code files, part 2.
1169#
1170SRC01 = \
shanehb2f20bf2011-06-17 07:07:24 +00001171 $(TOP)\src\pager.c \
shanehb2f20bf2011-06-17 07:07:24 +00001172 $(TOP)\src\pcache.c \
shanehb2f20bf2011-06-17 07:07:24 +00001173 $(TOP)\src\pcache1.c \
1174 $(TOP)\src\pragma.c \
1175 $(TOP)\src\prepare.c \
1176 $(TOP)\src\printf.c \
1177 $(TOP)\src\random.c \
1178 $(TOP)\src\resolve.c \
1179 $(TOP)\src\rowset.c \
1180 $(TOP)\src\select.c \
1181 $(TOP)\src\status.c \
shanehb2f20bf2011-06-17 07:07:24 +00001182 $(TOP)\src\table.c \
drhf51446a2012-07-21 19:40:42 +00001183 $(TOP)\src\threads.c \
shanehb2f20bf2011-06-17 07:07:24 +00001184 $(TOP)\src\tclsqlite.c \
1185 $(TOP)\src\tokenize.c \
drh38b41492015-06-08 15:08:15 +00001186 $(TOP)\src\treeview.c \
shanehb2f20bf2011-06-17 07:07:24 +00001187 $(TOP)\src\trigger.c \
1188 $(TOP)\src\utf.c \
1189 $(TOP)\src\update.c \
1190 $(TOP)\src\util.c \
1191 $(TOP)\src\vacuum.c \
1192 $(TOP)\src\vdbe.c \
shanehb2f20bf2011-06-17 07:07:24 +00001193 $(TOP)\src\vdbeapi.c \
1194 $(TOP)\src\vdbeaux.c \
1195 $(TOP)\src\vdbeblob.c \
1196 $(TOP)\src\vdbemem.c \
mistachkin81c428a2011-08-17 02:19:54 +00001197 $(TOP)\src\vdbesort.c \
shanehb2f20bf2011-06-17 07:07:24 +00001198 $(TOP)\src\vdbetrace.c \
shanehb2f20bf2011-06-17 07:07:24 +00001199 $(TOP)\src\vtab.c \
1200 $(TOP)\src\wal.c \
shanehb2f20bf2011-06-17 07:07:24 +00001201 $(TOP)\src\walker.c \
drhe54df422013-11-12 18:37:25 +00001202 $(TOP)\src\where.c \
drh6f82e852015-06-06 20:12:09 +00001203 $(TOP)\src\wherecode.c \
mistachkinc04c54b2016-02-11 21:28:16 +00001204 $(TOP)\src\whereexpr.c
1205
1206# Shell source code files.
1207#
1208SRC02 = \
1209 $(TOP)\src\shell.c
1210
1211# Core miscellaneous files.
1212#
1213SRC03 = \
1214 $(TOP)\src\parse.y
1215
1216# Core header files, part 1.
1217#
1218SRC04 = \
1219 $(TOP)\src\btree.h \
1220 $(TOP)\src\btreeInt.h \
1221 $(TOP)\src\hash.h \
1222 $(TOP)\src\hwtime.h \
1223 $(TOP)\src\msvc.h \
1224 $(TOP)\src\mutex.h \
1225 $(TOP)\src\os.h \
1226 $(TOP)\src\os_common.h \
1227 $(TOP)\src\os_setup.h \
1228 $(TOP)\src\os_win.h
1229
1230# Core header files, part 2.
1231#
1232SRC05 = \
1233 $(TOP)\src\pager.h \
1234 $(TOP)\src\pcache.h \
1235 $(TOP)\src\pragma.h \
1236 $(TOP)\src\sqlite.h.in \
1237 $(TOP)\src\sqlite3ext.h \
1238 $(TOP)\src\sqliteInt.h \
1239 $(TOP)\src\sqliteLimit.h \
1240 $(TOP)\src\vdbe.h \
1241 $(TOP)\src\vdbeInt.h \
1242 $(TOP)\src\vxworks.h \
1243 $(TOP)\src\wal.h \
drhe54df422013-11-12 18:37:25 +00001244 $(TOP)\src\whereInt.h
shanehb2f20bf2011-06-17 07:07:24 +00001245
mistachkinc04c54b2016-02-11 21:28:16 +00001246# Extension source code files, part 1.
shanehb2f20bf2011-06-17 07:07:24 +00001247#
mistachkinc04c54b2016-02-11 21:28:16 +00001248SRC06 = \
shanehb2f20bf2011-06-17 07:07:24 +00001249 $(TOP)\ext\fts1\fts1.c \
shanehb2f20bf2011-06-17 07:07:24 +00001250 $(TOP)\ext\fts1\fts1_hash.c \
shanehb2f20bf2011-06-17 07:07:24 +00001251 $(TOP)\ext\fts1\fts1_porter.c \
drh62679202015-01-29 18:38:05 +00001252 $(TOP)\ext\fts1\fts1_tokenizer1.c \
shanehb2f20bf2011-06-17 07:07:24 +00001253 $(TOP)\ext\fts2\fts2.c \
shanehb2f20bf2011-06-17 07:07:24 +00001254 $(TOP)\ext\fts2\fts2_hash.c \
shanehb2f20bf2011-06-17 07:07:24 +00001255 $(TOP)\ext\fts2\fts2_icu.c \
1256 $(TOP)\ext\fts2\fts2_porter.c \
shanehb2f20bf2011-06-17 07:07:24 +00001257 $(TOP)\ext\fts2\fts2_tokenizer.c \
1258 $(TOP)\ext\fts2\fts2_tokenizer1.c
mistachkinc04c54b2016-02-11 21:28:16 +00001259
1260# Extension source code files, part 2.
1261#
1262SRC07 = \
shanehb2f20bf2011-06-17 07:07:24 +00001263 $(TOP)\ext\fts3\fts3.c \
shanehb2f20bf2011-06-17 07:07:24 +00001264 $(TOP)\ext\fts3\fts3_aux.c \
1265 $(TOP)\ext\fts3\fts3_expr.c \
1266 $(TOP)\ext\fts3\fts3_hash.c \
shanehb2f20bf2011-06-17 07:07:24 +00001267 $(TOP)\ext\fts3\fts3_icu.c \
1268 $(TOP)\ext\fts3\fts3_porter.c \
1269 $(TOP)\ext\fts3\fts3_snippet.c \
shanehb2f20bf2011-06-17 07:07:24 +00001270 $(TOP)\ext\fts3\fts3_tokenizer.c \
1271 $(TOP)\ext\fts3\fts3_tokenizer1.c \
drh4d648c72013-04-22 17:07:56 +00001272 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +00001273 $(TOP)\ext\fts3\fts3_unicode.c \
1274 $(TOP)\ext\fts3\fts3_unicode2.c \
drh62679202015-01-29 18:38:05 +00001275 $(TOP)\ext\fts3\fts3_write.c \
drh62679202015-01-29 18:38:05 +00001276 $(TOP)\ext\icu\icu.c \
drhedea9112015-03-24 19:02:13 +00001277 $(TOP)\ext\rtree\rtree.c \
drhdbbd8162015-05-19 23:04:26 +00001278 $(TOP)\ext\session\sqlite3session.c \
drh50065652015-10-08 19:29:18 +00001279 $(TOP)\ext\rbu\sqlite3rbu.c \
1280 $(TOP)\ext\misc\json1.c
shanehb2f20bf2011-06-17 07:07:24 +00001281
mistachkinc04c54b2016-02-11 21:28:16 +00001282# Extension header files, part 1.
1283#
1284SRC08 = \
1285 $(TOP)\ext\fts1\fts1.h \
1286 $(TOP)\ext\fts1\fts1_hash.h \
1287 $(TOP)\ext\fts1\fts1_tokenizer.h \
1288 $(TOP)\ext\fts2\fts2.h \
1289 $(TOP)\ext\fts2\fts2_hash.h \
1290 $(TOP)\ext\fts2\fts2_tokenizer.h
1291
1292# Extension header files, part 2.
1293#
1294SRC09 = \
1295 $(TOP)\ext\fts3\fts3.h \
1296 $(TOP)\ext\fts3\fts3Int.h \
1297 $(TOP)\ext\fts3\fts3_hash.h \
1298 $(TOP)\ext\fts3\fts3_tokenizer.h \
1299 $(TOP)\ext\icu\sqliteicu.h \
1300 $(TOP)\ext\rtree\rtree.h \
mistachkin05004782016-03-30 16:23:06 +00001301 $(TOP)\ext\rbu\sqlite3rbu.h \
1302 $(TOP)\ext\session\sqlite3session.h
shanehb2f20bf2011-06-17 07:07:24 +00001303
1304# Generated source code files
1305#
mistachkinc04c54b2016-02-11 21:28:16 +00001306SRC10 = \
shanehb2f20bf2011-06-17 07:07:24 +00001307 opcodes.c \
mistachkinc04c54b2016-02-11 21:28:16 +00001308 parse.c
1309
1310# Generated header files
1311#
1312SRC11 = \
1313 keywordhash.h \
shanehb2f20bf2011-06-17 07:07:24 +00001314 opcodes.h \
shanehb2f20bf2011-06-17 07:07:24 +00001315 parse.h \
mistachkin5d4d9412016-01-22 03:54:36 +00001316 $(SQLITE3H)
shanehb2f20bf2011-06-17 07:07:24 +00001317
mistachkin52b1dbb2016-07-28 14:37:04 +00001318# Generated Tcl header files
1319#
mistachkin4ef916e2016-08-24 19:58:46 +00001320!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
mistachkin52b1dbb2016-07-28 14:37:04 +00001321SRC12 = \
mistachkin4ef916e2016-08-24 19:58:46 +00001322 $(SQLITETCLH) \
1323 $(SQLITETCLDECLSH)
1324!ELSE
1325SRC12 =
1326!ENDIF
mistachkin52b1dbb2016-07-28 14:37:04 +00001327
drh62679202015-01-29 18:38:05 +00001328# All source code files.
1329#
mistachkinc04c54b2016-02-11 21:28:16 +00001330SRC = $(SRC00) $(SRC01) $(SRC02) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
drh62679202015-01-29 18:38:05 +00001331
shanehb2f20bf2011-06-17 07:07:24 +00001332# Source code to the test files.
1333#
1334TESTSRC = \
1335 $(TOP)\src\test1.c \
1336 $(TOP)\src\test2.c \
1337 $(TOP)\src\test3.c \
1338 $(TOP)\src\test4.c \
1339 $(TOP)\src\test5.c \
1340 $(TOP)\src\test6.c \
1341 $(TOP)\src\test7.c \
1342 $(TOP)\src\test8.c \
1343 $(TOP)\src\test9.c \
1344 $(TOP)\src\test_autoext.c \
1345 $(TOP)\src\test_async.c \
1346 $(TOP)\src\test_backup.c \
drhddebf162016-03-04 02:59:35 +00001347 $(TOP)\src\test_bestindex.c \
drh5de7d962014-12-05 00:17:39 +00001348 $(TOP)\src\test_blob.c \
shanehb2f20bf2011-06-17 07:07:24 +00001349 $(TOP)\src\test_btree.c \
1350 $(TOP)\src\test_config.c \
dan000f95b2016-09-09 20:00:40 +00001351 $(TOP)\src\test_delete.c \
shanehb2f20bf2011-06-17 07:07:24 +00001352 $(TOP)\src\test_demovfs.c \
1353 $(TOP)\src\test_devsym.c \
mistachkin413c63b2013-01-17 03:18:14 +00001354 $(TOP)\src\test_fs.c \
shanehb2f20bf2011-06-17 07:07:24 +00001355 $(TOP)\src\test_func.c \
shanehb2f20bf2011-06-17 07:07:24 +00001356 $(TOP)\src\test_hexio.c \
1357 $(TOP)\src\test_init.c \
1358 $(TOP)\src\test_intarray.c \
1359 $(TOP)\src\test_journal.c \
1360 $(TOP)\src\test_malloc.c \
1361 $(TOP)\src\test_multiplex.c \
1362 $(TOP)\src\test_mutex.c \
1363 $(TOP)\src\test_onefile.c \
1364 $(TOP)\src\test_osinst.c \
1365 $(TOP)\src\test_pcache.c \
1366 $(TOP)\src\test_quota.c \
1367 $(TOP)\src\test_rtree.c \
1368 $(TOP)\src\test_schema.c \
1369 $(TOP)\src\test_server.c \
1370 $(TOP)\src\test_superlock.c \
1371 $(TOP)\src\test_syscall.c \
shanehb2f20bf2011-06-17 07:07:24 +00001372 $(TOP)\src\test_tclvar.c \
1373 $(TOP)\src\test_thread.c \
1374 $(TOP)\src\test_vfs.c \
mistachkin92af1eb2015-11-30 23:29:07 +00001375 $(TOP)\src\test_windirent.c \
shanehb2f20bf2011-06-17 07:07:24 +00001376 $(TOP)\src\test_wsd.c \
1377 $(TOP)\ext\fts3\fts3_term.c \
mistachkinadb96a62012-01-16 12:33:36 +00001378 $(TOP)\ext\fts3\fts3_test.c \
mistachkin05004782016-03-30 16:23:06 +00001379 $(TOP)\ext\rbu\test_rbu.c \
1380 $(TOP)\ext\session\test_session.c
shanehb2f20bf2011-06-17 07:07:24 +00001381
mistachkinc04c54b2016-02-11 21:28:16 +00001382# Statically linked extensions.
drhe50db1c2013-04-25 14:31:46 +00001383#
drh1fb64af2013-04-25 14:36:28 +00001384TESTEXT = \
drh8416fc72013-04-25 16:42:55 +00001385 $(TOP)\ext\misc\amatch.c \
drh2e3f87a2016-07-03 02:35:47 +00001386 $(TOP)\ext\misc\carray.c \
drh8416fc72013-04-25 16:42:55 +00001387 $(TOP)\ext\misc\closure.c \
drh35db31b2016-06-02 23:13:21 +00001388 $(TOP)\ext\misc\csv.c \
drh1728bcb2014-11-10 16:49:56 +00001389 $(TOP)\ext\misc\eval.c \
drh51ed2982014-06-16 12:44:32 +00001390 $(TOP)\ext\misc\fileio.c \
drhe50db1c2013-04-25 14:31:46 +00001391 $(TOP)\ext\misc\fuzzer.c \
mistachkined52f9f2015-06-26 04:34:36 +00001392 $(TOP)\ext\fts5\fts5_tcl.c \
dand3789c02015-08-04 20:29:00 +00001393 $(TOP)\ext\fts5\fts5_test_mi.c \
dan2cfe0492016-01-14 20:05:59 +00001394 $(TOP)\ext\fts5\fts5_test_tok.c \
drh8416fc72013-04-25 16:42:55 +00001395 $(TOP)\ext\misc\ieee754.c \
drhea41dc42013-04-25 19:31:33 +00001396 $(TOP)\ext\misc\nextchar.c \
drhdef33672013-05-28 20:25:54 +00001397 $(TOP)\ext\misc\percentile.c \
drhe50db1c2013-04-25 14:31:46 +00001398 $(TOP)\ext\misc\regexp.c \
drh6bada272016-08-09 21:08:42 +00001399 $(TOP)\ext\misc\remember.c \
drh398f8722015-08-19 13:54:20 +00001400 $(TOP)\ext\misc\series.c \
drhb7045ab2013-04-25 14:59:01 +00001401 $(TOP)\ext\misc\spellfix.c \
drh5f8cdac2013-10-14 21:14:42 +00001402 $(TOP)\ext\misc\totype.c \
drhe50db1c2013-04-25 14:31:46 +00001403 $(TOP)\ext\misc\wholenumber.c
1404
shanehb2f20bf2011-06-17 07:07:24 +00001405# Source code to the library files needed by the test fixture
mistachkinadb96a62012-01-16 12:33:36 +00001406# (non-amalgamation)
shanehb2f20bf2011-06-17 07:07:24 +00001407#
1408TESTSRC2 = \
mistachkinc04c54b2016-02-11 21:28:16 +00001409 $(SRC00) \
1410 $(SRC01) \
1411 $(SRC06) \
1412 $(SRC07) \
1413 $(SRC10) \
mistachkin05004782016-03-30 16:23:06 +00001414 $(TOP)\ext\async\sqlite3async.c
shanehb2f20bf2011-06-17 07:07:24 +00001415
1416# Header files used by all library source files.
1417#
1418HDR = \
1419 $(TOP)\src\btree.h \
1420 $(TOP)\src\btreeInt.h \
1421 $(TOP)\src\hash.h \
1422 $(TOP)\src\hwtime.h \
1423 keywordhash.h \
mistachkin2318d332015-01-12 18:02:52 +00001424 $(TOP)\src\msvc.h \
shanehb2f20bf2011-06-17 07:07:24 +00001425 $(TOP)\src\mutex.h \
1426 opcodes.h \
1427 $(TOP)\src\os.h \
1428 $(TOP)\src\os_common.h \
mistachkinf74b9e02013-11-26 01:00:31 +00001429 $(TOP)\src\os_setup.h \
mistachkin8bc52622013-11-25 09:36:07 +00001430 $(TOP)\src\os_win.h \
shanehb2f20bf2011-06-17 07:07:24 +00001431 $(TOP)\src\pager.h \
1432 $(TOP)\src\pcache.h \
shaneh6e7850c2011-06-17 15:57:07 +00001433 parse.h \
drh67e65e52015-02-02 21:34:54 +00001434 $(TOP)\src\pragma.h \
mistachkin5d4d9412016-01-22 03:54:36 +00001435 $(SQLITE3H) \
mistachkine37f7392016-07-28 19:28:35 +00001436 sqlite3ext.h \
shaneh6e7850c2011-06-17 15:57:07 +00001437 $(TOP)\src\sqliteInt.h \
shanehb2f20bf2011-06-17 07:07:24 +00001438 $(TOP)\src\sqliteLimit.h \
1439 $(TOP)\src\vdbe.h \
drhe54df422013-11-12 18:37:25 +00001440 $(TOP)\src\vdbeInt.h \
drh8cd5b252015-03-02 22:06:43 +00001441 $(TOP)\src\vxworks.h \
drhe54df422013-11-12 18:37:25 +00001442 $(TOP)\src\whereInt.h
shanehb2f20bf2011-06-17 07:07:24 +00001443
1444# Header files used by extensions
1445#
1446EXTHDR = $(EXTHDR) \
1447 $(TOP)\ext\fts1\fts1.h \
1448 $(TOP)\ext\fts1\fts1_hash.h \
1449 $(TOP)\ext\fts1\fts1_tokenizer.h
1450EXTHDR = $(EXTHDR) \
1451 $(TOP)\ext\fts2\fts2.h \
1452 $(TOP)\ext\fts2\fts2_hash.h \
1453 $(TOP)\ext\fts2\fts2_tokenizer.h
1454EXTHDR = $(EXTHDR) \
1455 $(TOP)\ext\fts3\fts3.h \
1456 $(TOP)\ext\fts3\fts3Int.h \
1457 $(TOP)\ext\fts3\fts3_hash.h \
1458 $(TOP)\ext\fts3\fts3_tokenizer.h
1459EXTHDR = $(EXTHDR) \
1460 $(TOP)\ext\rtree\rtree.h
1461EXTHDR = $(EXTHDR) \
1462 $(TOP)\ext\icu\sqliteicu.h
1463EXTHDR = $(EXTHDR) \
1464 $(TOP)\ext\rtree\sqlite3rtree.h
mistachkinadb96a62012-01-16 12:33:36 +00001465EXTHDR = $(EXTHDR) \
1466 $(TOP)\ext\session\sqlite3session.h
shanehb2f20bf2011-06-17 07:07:24 +00001467
mistachkind4ab1032015-05-11 16:27:33 +00001468# executables needed for testing
drhf4375442015-05-11 12:15:45 +00001469#
1470TESTPROGS = \
1471 testfixture.exe \
mistachkinedcb4eb2016-01-22 01:25:15 +00001472 $(SQLITE3EXE) \
drhf4375442015-05-11 12:15:45 +00001473 sqlite3_analyzer.exe \
drh290fcaa2016-06-08 01:03:05 +00001474 sqldiff.exe \
1475 dbhash.exe
drhf4375442015-05-11 12:15:45 +00001476
drhea93c702015-05-26 18:15:08 +00001477# Databases containing fuzzer test cases
1478#
1479FUZZDATA = \
1480 $(TOP)\test\fuzzdata1.db \
1481 $(TOP)\test\fuzzdata2.db \
drh64ff56f2015-09-23 11:59:50 +00001482 $(TOP)\test\fuzzdata3.db \
drh362b66f2016-11-14 18:27:41 +00001483 $(TOP)\test\fuzzdata4.db \
1484 $(TOP)\test\fuzzdata5.db
mistachkin3e786092016-01-23 07:53:04 +00001485# <</mark>>
drhea93c702015-05-26 18:15:08 +00001486
mistachkin5d4d9412016-01-22 03:54:36 +00001487# Additional compiler options for the shell. These are only effective
1488# when the shell is not being dynamically linked.
drhd7f2bea2015-09-19 14:32:51 +00001489#
mistachkin5d4d9412016-01-22 03:54:36 +00001490!IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
drh70ae0e92016-08-04 13:23:28 +00001491SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
mistachkinedcb4eb2016-01-22 01:25:15 +00001492!ENDIF
1493
mistachkin3e786092016-01-23 07:53:04 +00001494# <<mark>>
mistachkin5d4d9412016-01-22 03:54:36 +00001495# Extra compiler options for various test tools.
1496#
1497MPTESTER_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS5
mistachkin8381be42015-10-09 14:23:56 +00001498FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
drh362b66f2016-11-14 18:27:41 +00001499FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ
1500FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1501OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
drhf4375442015-05-11 12:15:45 +00001502
mistachkin5d4d9412016-01-22 03:54:36 +00001503# Standard options to testfixture.
drh905da632015-06-10 18:53:09 +00001504#
1505TESTOPTS = --verbose=file --output=test-out.txt
drhf4375442015-05-11 12:15:45 +00001506
mistachkind5be6f02016-01-27 07:28:33 +00001507# Extra targets for the "all" target that require Tcl.
1508#
1509!IF $(NO_TCL)==0
1510ALL_TCL_TARGETS = libtclsqlite3.lib
1511!ELSE
1512ALL_TCL_TARGETS =
1513!ENDIF
mistachkin3e786092016-01-23 07:53:04 +00001514# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001515
1516# This is the default Makefile target. The objects listed here
1517# are what get build when you type just "make" with no arguments.
1518#
mistachkind5be6f02016-01-27 07:28:33 +00001519all: dll libsqlite3.lib shell $(ALL_TCL_TARGETS)
shanehb2f20bf2011-06-17 07:07:24 +00001520
mistachkina8a18732016-01-22 22:16:50 +00001521# Dynamic link library section.
1522#
mistachkin9b88ace2016-02-26 21:01:37 +00001523dll: $(SQLITE3DLL)
mistachkina8a18732016-01-22 22:16:50 +00001524
1525# Shell executable.
1526#
mistachkin9b88ace2016-02-26 21:01:37 +00001527shell: $(SQLITE3EXE)
shanehb2f20bf2011-06-17 07:07:24 +00001528
mistachkinb0c99af2016-02-19 05:07:56 +00001529# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001530libsqlite3.lib: $(LIBOBJ)
shaneh29ebea82011-06-21 18:12:07 +00001531 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001532
1533libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
mistachkin5b663502015-10-10 23:39:55 +00001534 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
mistachkin3e786092016-01-23 07:53:04 +00001535# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001536
mistachkin9b88ace2016-02-26 21:01:37 +00001537$(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
mistachkina8a18732016-01-22 22:16:50 +00001538 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001539
mistachkin9aeb9712016-02-26 23:13:16 +00001540# <<block2>>
mistachkin9b88ace2016-02-26 21:01:37 +00001541sqlite3.def: libsqlite3.lib
mistachkina8a18732016-01-22 22:16:50 +00001542 echo EXPORTS > sqlite3.def
1543 dumpbin /all libsqlite3.lib \
mistachkin9b88ace2016-02-26 21:01:37 +00001544 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3_[^@]*)(?:@\d+)?$$" \1 \
mistachkina8a18732016-01-22 22:16:50 +00001545 | sort >> sqlite3.def
mistachkin9aeb9712016-02-26 23:13:16 +00001546# <</block2>>
drhd62c0f42015-04-09 13:34:29 +00001547
mistachkin5d4d9412016-01-22 03:54:36 +00001548$(SQLITE3EXE): $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
1549 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c $(SHELL_CORE_SRC) \
mistachkinedcb4eb2016-01-22 01:25:15 +00001550 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
drh268e72f2015-04-17 14:30:49 +00001551
mistachkin3e786092016-01-23 07:53:04 +00001552# <<mark>>
mistachkin5d4d9412016-01-22 03:54:36 +00001553sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
1554 $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
mistachkin44723ce2015-03-21 02:22:37 +00001555
drh290fcaa2016-06-08 01:03:05 +00001556dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
1557 $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1558
drhda110bf2016-05-05 17:15:23 +00001559scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
1560 $(LTLINK) $(NO_WARN) $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1561
drhfd0d93f2016-02-07 00:08:08 +00001562srcck1.exe: $(TOP)\tool\srcck1.c
1563 $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
1564
1565sourcetest: srcck1.exe sqlite3.c
1566 srcck1.exe sqlite3.c
1567
mistachkin5d4d9412016-01-22 03:54:36 +00001568fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
1569 $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drhbc94dbb2013-04-08 14:28:33 +00001570
drh362b66f2016-11-14 18:27:41 +00001571fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
1572 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
1573
1574ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
1575 $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh1573dc32015-05-25 22:29:26 +00001576
mistachkin5d4d9412016-01-22 03:54:36 +00001577mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
1578 $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drhbc94dbb2013-04-08 14:28:33 +00001579
mistachkineb48b062015-03-31 17:45:44 +00001580MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
1581MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
mistachkin4d2daba2015-03-31 16:42:16 +00001582
drhfe0ba712015-03-31 13:46:13 +00001583mptest: mptester.exe
mistachkin4d2daba2015-03-31 16:42:16 +00001584 del /Q mptest.db 2>NUL
drhfe0ba712015-03-31 13:46:13 +00001585 $(MPTEST1) --journalmode DELETE
1586 $(MPTEST2) --journalmode WAL
1587 $(MPTEST1) --journalmode WAL
1588 $(MPTEST2) --journalmode PERSIST
1589 $(MPTEST1) --journalmode PERSIST
1590 $(MPTEST2) --journalmode TRUNCATE
1591 $(MPTEST1) --journalmode TRUNCATE
1592 $(MPTEST2) --journalmode DELETE
1593
shanehb2f20bf2011-06-17 07:07:24 +00001594# This target creates a directory named "tsrc" and fills it with
1595# copies of all of the C source code and header files needed to
1596# build on the target system. Some of the C source code and header
1597# files are automatically generated. This target takes care of
1598# all that automatic generation.
1599#
mistachkin4ef916e2016-08-24 19:58:46 +00001600.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP)
mistachkin44723ce2015-03-21 02:22:37 +00001601 -rmdir /Q/S tsrc 2>NUL
shanehb2f20bf2011-06-17 07:07:24 +00001602 -mkdir tsrc
mistachkine2eb2592016-02-11 21:38:05 +00001603 for %i in ($(SRC00)) do copy /Y %i tsrc
1604 for %i in ($(SRC01)) do copy /Y %i tsrc
1605 for %i in ($(SRC02)) do copy /Y %i tsrc
1606 for %i in ($(SRC03)) do copy /Y %i tsrc
1607 for %i in ($(SRC04)) do copy /Y %i tsrc
1608 for %i in ($(SRC05)) do copy /Y %i tsrc
1609 for %i in ($(SRC06)) do copy /Y %i tsrc
1610 for %i in ($(SRC07)) do copy /Y %i tsrc
1611 for %i in ($(SRC08)) do copy /Y %i tsrc
1612 for %i in ($(SRC09)) do copy /Y %i tsrc
1613 for %i in ($(SRC10)) do copy /Y %i tsrc
1614 for %i in ($(SRC11)) do copy /Y %i tsrc
mistachkin52b1dbb2016-07-28 14:37:04 +00001615 for %i in ($(SRC12)) do copy /Y %i tsrc
drh50065652015-10-08 19:29:18 +00001616 copy /Y fts5.c tsrc
1617 copy /Y fts5.h tsrc
mistachkin44723ce2015-03-21 02:22:37 +00001618 del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
drh2dc06482013-12-11 00:59:10 +00001619 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
shanehb2f20bf2011-06-17 07:07:24 +00001620 move vdbe.new tsrc\vdbe.c
1621 echo > .target_source
1622
mistachkin4ef916e2016-08-24 19:58:46 +00001623sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
1624 $(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
drhe191e2c2013-03-19 15:23:18 +00001625 copy tsrc\shell.c .
drhe191e2c2013-03-19 15:23:18 +00001626 copy $(TOP)\ext\session\sqlite3session.h .
shanehb2f20bf2011-06-17 07:07:24 +00001627
mistachkin48dd9de2012-12-06 04:33:13 +00001628sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1629 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
mistachkin3e786092016-01-23 07:53:04 +00001630# <</mark>>
mistachkin76510912013-10-11 23:01:18 +00001631
shanehb2f20bf2011-06-17 07:07:24 +00001632# Rule to build the amalgamation
1633#
mistachkin76510912013-10-11 23:01:18 +00001634sqlite3.lo: $(SQLITE3C)
mistachkin44723ce2015-03-21 02:22:37 +00001635 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +00001636
mistachkin3e786092016-01-23 07:53:04 +00001637# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001638# Rules to build the LEMON compiler generator
1639#
drh82415f22015-11-09 19:33:42 +00001640lempar.c: $(TOP)\tool\lempar.c
1641 copy $(TOP)\tool\lempar.c .
shanehb2f20bf2011-06-17 07:07:24 +00001642
1643lemon.exe: $(TOP)\tool\lemon.c lempar.c
mistachkin2318d332015-01-12 18:02:52 +00001644 $(BCC) $(NO_WARN) -Daccess=_access \
mistachkin460cd9c2015-10-14 22:46:37 +00001645 -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +00001646
1647# Rules to build individual *.lo files from generated *.c files. This
1648# applies to:
1649#
1650# parse.lo
1651# opcodes.lo
1652#
1653parse.lo: parse.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001654 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
shanehb2f20bf2011-06-17 07:07:24 +00001655
1656opcodes.lo: opcodes.c
mistachkin44723ce2015-03-21 02:22:37 +00001657 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
mistachkin3e786092016-01-23 07:53:04 +00001658# <</mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001659
mistachkin4d9d1f42012-09-03 10:32:32 +00001660# Rule to build the Win32 resources object file.
1661#
mistachkin08c1c312012-10-06 03:48:25 +00001662!IF $(USE_RC)!=0
mistachkin3e786092016-01-23 07:53:04 +00001663# <<block1>>
mistachkina8a18732016-01-22 22:16:50 +00001664$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H)
mistachkin4d9d1f42012-09-03 10:32:32 +00001665 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
mistachkin8ccc6d42012-09-27 21:03:53 +00001666 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
mistachkin4d9d1f42012-09-03 10:32:32 +00001667 echo #define SQLITE_RESOURCE_VERSION %%V \
mistachkin946ef602015-10-10 01:55:57 +00001668 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
mistachkin4d9d1f42012-09-03 10:32:32 +00001669 )
1670 echo #endif >> sqlite3rc.h
mistachkin08c1c312012-10-06 03:48:25 +00001671 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
mistachkin3e786092016-01-23 07:53:04 +00001672# <</block1>>
mistachkin08c1c312012-10-06 03:48:25 +00001673!ENDIF
mistachkin4d9d1f42012-09-03 10:32:32 +00001674
mistachkin3e786092016-01-23 07:53:04 +00001675# <<mark>>
shanehb2f20bf2011-06-17 07:07:24 +00001676# Rules to build individual *.lo files from files in the src directory.
1677#
1678alter.lo: $(TOP)\src\alter.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001679 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
shanehb2f20bf2011-06-17 07:07:24 +00001680
1681analyze.lo: $(TOP)\src\analyze.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001682 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
shanehb2f20bf2011-06-17 07:07:24 +00001683
1684attach.lo: $(TOP)\src\attach.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001685 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
shanehb2f20bf2011-06-17 07:07:24 +00001686
1687auth.lo: $(TOP)\src\auth.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001688 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
shanehb2f20bf2011-06-17 07:07:24 +00001689
1690backup.lo: $(TOP)\src\backup.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001691 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
shanehb2f20bf2011-06-17 07:07:24 +00001692
1693bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001694 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
shanehb2f20bf2011-06-17 07:07:24 +00001695
1696btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001697 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
shanehb2f20bf2011-06-17 07:07:24 +00001698
1699btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
mistachkin44723ce2015-03-21 02:22:37 +00001700 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
shanehb2f20bf2011-06-17 07:07:24 +00001701
1702build.lo: $(TOP)\src\build.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001703 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
shanehb2f20bf2011-06-17 07:07:24 +00001704
1705callback.lo: $(TOP)\src\callback.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001706 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
shanehb2f20bf2011-06-17 07:07:24 +00001707
1708complete.lo: $(TOP)\src\complete.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001709 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
shanehb2f20bf2011-06-17 07:07:24 +00001710
1711ctime.lo: $(TOP)\src\ctime.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001712 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
shanehb2f20bf2011-06-17 07:07:24 +00001713
1714date.lo: $(TOP)\src\date.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001715 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
shanehb2f20bf2011-06-17 07:07:24 +00001716
drh1a4a6802015-05-04 18:31:09 +00001717dbstat.lo: $(TOP)\src\date.c $(HDR)
1718 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
1719
shanehb2f20bf2011-06-17 07:07:24 +00001720delete.lo: $(TOP)\src\delete.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001721 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
shanehb2f20bf2011-06-17 07:07:24 +00001722
1723expr.lo: $(TOP)\src\expr.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001724 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
shanehb2f20bf2011-06-17 07:07:24 +00001725
1726fault.lo: $(TOP)\src\fault.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001727 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
shanehb2f20bf2011-06-17 07:07:24 +00001728
1729fkey.lo: $(TOP)\src\fkey.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001730 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
shanehb2f20bf2011-06-17 07:07:24 +00001731
1732func.lo: $(TOP)\src\func.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001733 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
shanehb2f20bf2011-06-17 07:07:24 +00001734
1735global.lo: $(TOP)\src\global.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001736 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
shanehb2f20bf2011-06-17 07:07:24 +00001737
1738hash.lo: $(TOP)\src\hash.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001739 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001740
1741insert.lo: $(TOP)\src\insert.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001742 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
shanehb2f20bf2011-06-17 07:07:24 +00001743
shanehb2f20bf2011-06-17 07:07:24 +00001744legacy.lo: $(TOP)\src\legacy.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001745 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
shanehb2f20bf2011-06-17 07:07:24 +00001746
1747loadext.lo: $(TOP)\src\loadext.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001748 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
shanehb2f20bf2011-06-17 07:07:24 +00001749
1750main.lo: $(TOP)\src\main.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001751 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
shanehb2f20bf2011-06-17 07:07:24 +00001752
1753malloc.lo: $(TOP)\src\malloc.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001754 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
shanehb2f20bf2011-06-17 07:07:24 +00001755
1756mem0.lo: $(TOP)\src\mem0.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001757 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
shanehb2f20bf2011-06-17 07:07:24 +00001758
1759mem1.lo: $(TOP)\src\mem1.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001760 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
shanehb2f20bf2011-06-17 07:07:24 +00001761
1762mem2.lo: $(TOP)\src\mem2.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001763 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
shanehb2f20bf2011-06-17 07:07:24 +00001764
1765mem3.lo: $(TOP)\src\mem3.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001766 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
shanehb2f20bf2011-06-17 07:07:24 +00001767
1768mem5.lo: $(TOP)\src\mem5.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001769 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
shanehb2f20bf2011-06-17 07:07:24 +00001770
1771memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001772 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
shanehb2f20bf2011-06-17 07:07:24 +00001773
1774mutex.lo: $(TOP)\src\mutex.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001775 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
shanehb2f20bf2011-06-17 07:07:24 +00001776
1777mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001778 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
shanehb2f20bf2011-06-17 07:07:24 +00001779
shanehb2f20bf2011-06-17 07:07:24 +00001780mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001781 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001782
1783mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001784 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
shanehb2f20bf2011-06-17 07:07:24 +00001785
1786notify.lo: $(TOP)\src\notify.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001787 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
shanehb2f20bf2011-06-17 07:07:24 +00001788
1789pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
mistachkin44723ce2015-03-21 02:22:37 +00001790 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
shanehb2f20bf2011-06-17 07:07:24 +00001791
1792pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
mistachkin44723ce2015-03-21 02:22:37 +00001793 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
shanehb2f20bf2011-06-17 07:07:24 +00001794
1795pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
mistachkin44723ce2015-03-21 02:22:37 +00001796 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
shanehb2f20bf2011-06-17 07:07:24 +00001797
1798os.lo: $(TOP)\src\os.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001799 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
shanehb2f20bf2011-06-17 07:07:24 +00001800
1801os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001802 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001803
1804os_win.lo: $(TOP)\src\os_win.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001805 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
shanehb2f20bf2011-06-17 07:07:24 +00001806
shanehb2f20bf2011-06-17 07:07:24 +00001807pragma.lo: $(TOP)\src\pragma.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001808 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
shanehb2f20bf2011-06-17 07:07:24 +00001809
1810prepare.lo: $(TOP)\src\prepare.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001811 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
shanehb2f20bf2011-06-17 07:07:24 +00001812
1813printf.lo: $(TOP)\src\printf.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001814 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
shanehb2f20bf2011-06-17 07:07:24 +00001815
1816random.lo: $(TOP)\src\random.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001817 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
shanehb2f20bf2011-06-17 07:07:24 +00001818
1819resolve.lo: $(TOP)\src\resolve.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001820 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
shanehb2f20bf2011-06-17 07:07:24 +00001821
1822rowset.lo: $(TOP)\src\rowset.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001823 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
shanehb2f20bf2011-06-17 07:07:24 +00001824
1825select.lo: $(TOP)\src\select.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001826 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
shanehb2f20bf2011-06-17 07:07:24 +00001827
1828status.lo: $(TOP)\src\status.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001829 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
shanehb2f20bf2011-06-17 07:07:24 +00001830
1831table.lo: $(TOP)\src\table.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001832 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
shanehb2f20bf2011-06-17 07:07:24 +00001833
drhf51446a2012-07-21 19:40:42 +00001834threads.lo: $(TOP)\src\threads.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001835 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
drhf51446a2012-07-21 19:40:42 +00001836
shanehb2f20bf2011-06-17 07:07:24 +00001837tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001838 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
shanehb2f20bf2011-06-17 07:07:24 +00001839
drh38b41492015-06-08 15:08:15 +00001840treeview.lo: $(TOP)\src\treeview.c $(HDR)
1841 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
1842
shanehb2f20bf2011-06-17 07:07:24 +00001843trigger.lo: $(TOP)\src\trigger.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001844 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
shanehb2f20bf2011-06-17 07:07:24 +00001845
1846update.lo: $(TOP)\src\update.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001847 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
shanehb2f20bf2011-06-17 07:07:24 +00001848
1849utf.lo: $(TOP)\src\utf.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001850 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
shanehb2f20bf2011-06-17 07:07:24 +00001851
1852util.lo: $(TOP)\src\util.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001853 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
shanehb2f20bf2011-06-17 07:07:24 +00001854
1855vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001856 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
shanehb2f20bf2011-06-17 07:07:24 +00001857
1858vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001859 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
shanehb2f20bf2011-06-17 07:07:24 +00001860
1861vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001862 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
shanehb2f20bf2011-06-17 07:07:24 +00001863
1864vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001865 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
shanehb2f20bf2011-06-17 07:07:24 +00001866
1867vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001868 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
shanehb2f20bf2011-06-17 07:07:24 +00001869
1870vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001871 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
shanehb2f20bf2011-06-17 07:07:24 +00001872
mistachkin81c428a2011-08-17 02:19:54 +00001873vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001874 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
mistachkin81c428a2011-08-17 02:19:54 +00001875
shanehb2f20bf2011-06-17 07:07:24 +00001876vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001877 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
shanehb2f20bf2011-06-17 07:07:24 +00001878
1879vtab.lo: $(TOP)\src\vtab.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001880 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
shanehb2f20bf2011-06-17 07:07:24 +00001881
1882wal.lo: $(TOP)\src\wal.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001883 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
shanehb2f20bf2011-06-17 07:07:24 +00001884
1885walker.lo: $(TOP)\src\walker.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001886 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
shanehb2f20bf2011-06-17 07:07:24 +00001887
1888where.lo: $(TOP)\src\where.c $(HDR)
mistachkin44723ce2015-03-21 02:22:37 +00001889 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
shanehb2f20bf2011-06-17 07:07:24 +00001890
drh6f82e852015-06-06 20:12:09 +00001891wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
1892 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
1893
drh6c1f4ef2015-06-08 14:23:15 +00001894whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
1895 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
1896
mistachkin4ef916e2016-08-24 19:58:46 +00001897tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
mistachkin44723ce2015-03-21 02:22:37 +00001898 $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
shanehb2f20bf2011-06-17 07:07:24 +00001899
mistachkin4ef916e2016-08-24 19:58:46 +00001900tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
mistachkin44723ce2015-03-21 02:22:37 +00001901 $(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
shanehb2f20bf2011-06-17 07:07:24 +00001902
mistachkin5d4d9412016-01-22 03:54:36 +00001903tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
mistachkin78e3f612015-10-14 20:01:12 +00001904 $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001905
1906# Rules to build opcodes.c and opcodes.h
1907#
drh7651e0a2015-10-07 12:11:36 +00001908opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl
1909 $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +00001910
drhb15393b2015-10-07 02:52:09 +00001911opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl
mistachkin946ef602015-10-10 01:55:57 +00001912 type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
shanehb2f20bf2011-06-17 07:07:24 +00001913
1914# Rules to build parse.c and parse.h - the outputs of lemon.
1915#
1916parse.h: parse.c
1917
drh60a15a42015-10-07 12:21:14 +00001918parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\tool\addopcodes.tcl
mistachkin44723ce2015-03-21 02:22:37 +00001919 del /Q parse.y parse.h parse.h.temp 2>NUL
shanehb2f20bf2011-06-17 07:07:24 +00001920 copy $(TOP)\src\parse.y .
mistachkinedcb4eb2016-01-22 01:25:15 +00001921 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
shanehb2f20bf2011-06-17 07:07:24 +00001922 move parse.h parse.h.temp
drh60a15a42015-10-07 12:21:14 +00001923 $(TCLSH_CMD) $(TOP)\tool\addopcodes.tcl parse.h.temp > parse.h
shanehb2f20bf2011-06-17 07:07:24 +00001924
mistachkin5d4d9412016-01-22 03:54:36 +00001925$(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
mistachkin4ef916e2016-08-24 19:58:46 +00001926 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
shanehb2f20bf2011-06-17 07:07:24 +00001927
mistachkin9b88ace2016-02-26 21:01:37 +00001928sqlite3ext.h: .target_source
mistachkin4ef916e2016-08-24 19:58:46 +00001929!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
mistachkinc0bebc12016-07-28 18:49:20 +00001930 type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
1931 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
mistachkine37f7392016-07-28 19:28:35 +00001932 copy /Y sqlite3ext.h tsrc\sqlite3ext.h
mistachkin4ef916e2016-08-24 19:58:46 +00001933!ELSE
1934 copy /Y tsrc\sqlite3ext.h sqlite3ext.h
1935!ENDIF
mistachkinc978f2d2015-09-21 23:49:35 +00001936
shanehb2f20bf2011-06-17 07:07:24 +00001937mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
mistachkinedcb4eb2016-01-22 01:25:15 +00001938 $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
mistachkin460cd9c2015-10-14 22:46:37 +00001939 $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +00001940
1941keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
mistachkin5b0b6fd2011-06-25 01:14:36 +00001942 .\mkkeywordhash.exe > keywordhash.h
shanehb2f20bf2011-06-17 07:07:24 +00001943
1944
1945
1946# Rules to build the extension objects.
1947#
1948icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001949 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
shanehb2f20bf2011-06-17 07:07:24 +00001950
1951fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001952 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
shanehb2f20bf2011-06-17 07:07:24 +00001953
1954fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001955 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001956
1957fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001958 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
shanehb2f20bf2011-06-17 07:07:24 +00001959
1960fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001961 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
shanehb2f20bf2011-06-17 07:07:24 +00001962
1963fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001964 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
shanehb2f20bf2011-06-17 07:07:24 +00001965
1966fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001967 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
shanehb2f20bf2011-06-17 07:07:24 +00001968
1969fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001970 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
shanehb2f20bf2011-06-17 07:07:24 +00001971
1972fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001973 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
shanehb2f20bf2011-06-17 07:07:24 +00001974
1975fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001976 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
shanehb2f20bf2011-06-17 07:07:24 +00001977
1978fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001979 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001980
1981fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001982 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
shanehb2f20bf2011-06-17 07:07:24 +00001983
1984fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001985 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
shanehb2f20bf2011-06-17 07:07:24 +00001986
1987fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001988 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
shanehb2f20bf2011-06-17 07:07:24 +00001989
1990fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001991 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
shanehb2f20bf2011-06-17 07:07:24 +00001992
1993fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001994 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
shanehb2f20bf2011-06-17 07:07:24 +00001995
drh4d648c72013-04-22 17:07:56 +00001996fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00001997 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
drh4d648c72013-04-22 17:07:56 +00001998
drh391d4ba2012-05-28 20:22:16 +00001999fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00002000 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
drh391d4ba2012-05-28 20:22:16 +00002001
2002fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00002003 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
drh391d4ba2012-05-28 20:22:16 +00002004
shanehb2f20bf2011-06-17 07:07:24 +00002005fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00002006 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
shanehb2f20bf2011-06-17 07:07:24 +00002007
2008rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
mistachkin44723ce2015-03-21 02:22:37 +00002009 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
shanehb2f20bf2011-06-17 07:07:24 +00002010
mistachkin4f2c8222016-04-11 22:23:04 +00002011sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
mistachkin05004782016-03-30 16:23:06 +00002012 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
drh498dcae2013-03-13 11:42:00 +00002013
mistachkined52f9f2015-06-26 04:34:36 +00002014# FTS5 things
2015#
2016FTS5_SRC = \
2017 $(TOP)\ext\fts5\fts5.h \
2018 $(TOP)\ext\fts5\fts5Int.h \
2019 $(TOP)\ext\fts5\fts5_aux.c \
2020 $(TOP)\ext\fts5\fts5_buffer.c \
2021 $(TOP)\ext\fts5\fts5_main.c \
2022 $(TOP)\ext\fts5\fts5_config.c \
2023 $(TOP)\ext\fts5\fts5_expr.c \
2024 $(TOP)\ext\fts5\fts5_hash.c \
2025 $(TOP)\ext\fts5\fts5_index.c \
2026 fts5parse.c fts5parse.h \
2027 $(TOP)\ext\fts5\fts5_storage.c \
2028 $(TOP)\ext\fts5\fts5_tokenize.c \
2029 $(TOP)\ext\fts5\fts5_unicode2.c \
2030 $(TOP)\ext\fts5\fts5_varint.c \
2031 $(TOP)\ext\fts5\fts5_vocab.c
2032
2033fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2034 copy $(TOP)\ext\fts5\fts5parse.y .
2035 del /Q fts5parse.h 2>NUL
mistachkinedcb4eb2016-01-22 01:25:15 +00002036 .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
mistachkined52f9f2015-06-26 04:34:36 +00002037
mistachkin9b88ace2016-02-26 21:01:37 +00002038fts5parse.h: fts5parse.c
mistachkined52f9f2015-06-26 04:34:36 +00002039
mistachkin9b88ace2016-02-26 21:01:37 +00002040fts5.c: $(FTS5_SRC)
mistachkined52f9f2015-06-26 04:34:36 +00002041 $(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
dana153bbc2015-07-02 20:12:34 +00002042 copy $(TOP)\ext\fts5\fts5.h .
mistachkined52f9f2015-06-26 04:34:36 +00002043
2044fts5.lo: fts5.c $(HDR) $(EXTHDR)
mistachkin95ae9582015-06-26 20:45:43 +00002045 $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
2046
2047fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
mistachkinae6ca8e2015-07-02 16:50:43 +00002048 $(LTCOMPILE) $(NO_WARN) -c fts5.c
shanehb2f20bf2011-06-17 07:07:24 +00002049
mistachkin95ae9582015-06-26 20:45:43 +00002050fts5.dll: fts5_ext.lo
2051 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
shanehb2f20bf2011-06-17 07:07:24 +00002052
mistachkin83a22532016-01-14 18:01:16 +00002053sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
2054 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
drh76473772016-01-14 13:22:24 +00002055
shanehb2f20bf2011-06-17 07:07:24 +00002056# Rules to build the 'testfixture' application.
2057#
2058# If using the amalgamation, use sqlite3.c directly to build the test
2059# fixture. Otherwise link against libsqlite3.lib. (This distinction is
2060# necessary because the test fixture requires non-API symbols which are
2061# hidden when the library is built via the amalgamation).
2062#
2063TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
mistachkin27b2f052015-01-12 19:49:46 +00002064TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
2065TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
drhdbc49162016-03-02 03:28:07 +00002066TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
drh9878fef2016-03-04 03:43:10 +00002067TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
mistachkin69def7f2016-07-28 04:14:37 +00002068TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
shanehb2f20bf2011-06-17 07:07:24 +00002069
mistachkinc04c54b2016-02-11 21:28:16 +00002070TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
mistachkin05004782016-03-30 16:23:06 +00002071TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +00002072!IF $(USE_AMALGAMATION)==0
2073TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
2074!ELSE
2075TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
2076!ENDIF
2077
mistachkin4ef916e2016-08-24 19:58:46 +00002078!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
mistachkin52b1dbb2016-07-28 14:37:04 +00002079sqlite_tclDecls.h:
mistachkin4ef916e2016-08-24 19:58:46 +00002080 echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
2081 echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
2082 echo #endif >> $(SQLITETCLDECLSH)
mistachkinf27a80c2016-07-28 16:09:52 +00002083 type "$(TCLINCDIR)\tclDecls.h" \
mistachkina121cc72016-07-28 18:06:52 +00002084 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
mistachkinf27a80c2016-07-28 16:09:52 +00002085 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
2086 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
mistachkin7c60b262016-07-28 18:18:53 +00002087 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
mistachkin4ef916e2016-08-24 19:58:46 +00002088 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
mistachkin52b1dbb2016-07-28 14:37:04 +00002089
mistachkin4ef916e2016-08-24 19:58:46 +00002090sqlite_tcl.h:
mistachkinf27a80c2016-07-28 16:09:52 +00002091 type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
2092 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
2093 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
2094 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
mistachkin4ef916e2016-08-24 19:58:46 +00002095 | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
2096!ENDIF
mistachkin52b1dbb2016-07-28 14:37:04 +00002097
mistachkin4ef916e2016-08-24 19:58:46 +00002098testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
shaneh6e7850c2011-06-17 15:57:07 +00002099 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
shanehb2f20bf2011-06-17 07:07:24 +00002100 -DBUILD_sqlite -I$(TCLINCDIR) \
shaneh2a0b9ef2011-06-20 20:52:32 +00002101 $(TESTFIXTURE_SRC) \
mistachkin78e3f612015-10-14 20:01:12 +00002102 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00002103
mistachkin9b88ace2016-02-26 21:01:37 +00002104extensiontest: testfixture.exe testloadext.dll
mistachkin88739962015-10-14 23:04:08 +00002105 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002106 .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
mistachkin1925a2e2014-02-24 21:20:25 +00002107
drhf4375442015-05-11 12:15:45 +00002108fulltest: $(TESTPROGS) fuzztest
mistachkin88739962015-10-14 23:04:08 +00002109 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002110 .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00002111
drhea93c702015-05-26 18:15:08 +00002112soaktest: $(TESTPROGS)
mistachkin88739962015-10-14 23:04:08 +00002113 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002114 .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00002115
drhf4375442015-05-11 12:15:45 +00002116fulltestonly: $(TESTPROGS) fuzztest
mistachkin88739962015-10-14 23:04:08 +00002117 @set PATH=$(LIBTCLPATH);$(PATH)
mistachkinc60941f2012-09-13 01:51:02 +00002118 .\testfixture.exe $(TOP)\test\full.test
2119
mistachkinedcb4eb2016-01-22 01:25:15 +00002120queryplantest: testfixture.exe shell
mistachkin88739962015-10-14 23:04:08 +00002121 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002122 .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
mistachkin036acf32013-07-20 00:34:31 +00002123
drhea93c702015-05-26 18:15:08 +00002124fuzztest: fuzzcheck.exe
2125 .\fuzzcheck.exe $(FUZZDATA)
drhf3320712015-04-25 13:39:29 +00002126
drha523e312015-07-24 17:26:13 +00002127fastfuzztest: fuzzcheck.exe
drh53e66c32015-07-24 15:49:23 +00002128 .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
shanehb2f20bf2011-06-17 07:07:24 +00002129
drh905da632015-06-10 18:53:09 +00002130# Minimal testing that runs in less than 3 minutes (on a fast machine)
2131#
drhfd0d93f2016-02-07 00:08:08 +00002132quicktest: testfixture.exe sourcetest
mistachkin88739962015-10-14 23:04:08 +00002133 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002134 .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
2135
2136# This is the common case. Run many tests that do not take too long,
2137# including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
2138#
drhfd0d93f2016-02-07 00:08:08 +00002139test: $(TESTPROGS) sourcetest fastfuzztest
mistachkin88739962015-10-14 23:04:08 +00002140 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002141 .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
shanehb2f20bf2011-06-17 07:07:24 +00002142
drhea93c702015-05-26 18:15:08 +00002143smoketest: $(TESTPROGS)
mistachkin88739962015-10-14 23:04:08 +00002144 @set PATH=$(LIBTCLPATH);$(PATH)
drh905da632015-06-10 18:53:09 +00002145 .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
mistachkin00eb70d2015-04-04 00:02:07 +00002146
mistachkin4ef916e2016-08-24 19:58:46 +00002147sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(SQLITE_TCL_DEP)
mistachkind4ab1032015-05-11 16:27:33 +00002148 echo #define TCLSH 2 > $@
2149 echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
2150 copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
mistachkin9a55e312011-09-22 00:06:44 +00002151 echo static const char *tclsh_main_loop(void){ >> $@
2152 echo static const char *zMainloop = >> $@
drh48cc9a32015-10-07 12:36:42 +00002153 $(TCLSH_CMD) $(TOP)\tool\tostr.tcl $(TOP)\tool\spaceanal.tcl >> $@
mistachkin9a55e312011-09-22 00:06:44 +00002154 echo ; return zMainloop; } >> $@
shanehb2f20bf2011-06-17 07:07:24 +00002155
mistachkin08c1c312012-10-06 03:48:25 +00002156sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
mistachkind4ab1032015-05-11 16:27:33 +00002157 $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
mistachkin78e3f612015-10-14 20:01:12 +00002158 /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00002159
mistachkin1925a2e2014-02-24 21:20:25 +00002160testloadext.lo: $(TOP)\src\test_loadext.c
mistachkin44723ce2015-03-21 02:22:37 +00002161 $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
mistachkin1925a2e2014-02-24 21:20:25 +00002162
mistachkin9b88ace2016-02-26 21:01:37 +00002163testloadext.dll: testloadext.lo
mistachkin1925a2e2014-02-24 21:20:25 +00002164 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
2165
mistachkin5d4d9412016-01-22 03:54:36 +00002166showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002167 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002168 $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh9ac3c1e2013-11-07 18:37:31 +00002169
mistachkin5d4d9412016-01-22 03:54:36 +00002170showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002171 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002172 $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00002173
mistachkin5d4d9412016-01-22 03:54:36 +00002174showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002175 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002176 $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00002177
mistachkin5d4d9412016-01-22 03:54:36 +00002178showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002179 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002180 $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00002181
drh9f674f22014-08-18 20:23:29 +00002182changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C)
mistachkin05004782016-03-30 16:23:06 +00002183 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
2184 $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh9f674f22014-08-18 20:23:29 +00002185
mistachkin5d4d9412016-01-22 03:54:36 +00002186fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002187 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002188 $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
mistachkinde545272014-07-07 17:57:50 +00002189
mistachkin5d4d9412016-01-22 03:54:36 +00002190rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002191 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002192 $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh4bb77ec2014-06-30 11:14:26 +00002193
mistachkin5d4d9412016-01-22 03:54:36 +00002194LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
mistachkin78e3f612015-10-14 20:01:12 +00002195 $(LTLINK) $(NO_WARN) -Fe$@ $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
drh267a13f2014-06-18 18:10:12 +00002196
mistachkin5d4d9412016-01-22 03:54:36 +00002197wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002198 $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002199 $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
drh9ac3c1e2013-11-07 18:37:31 +00002200
mistachkin5d4d9412016-01-22 03:54:36 +00002201speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
mistachkin44723ce2015-03-21 02:22:37 +00002202 $(LTLINK) $(NO_WARN) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
mistachkin78e3f612015-10-14 20:01:12 +00002203 $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
mistachkinb482a442012-02-11 22:19:26 +00002204
mistachkin9b88ace2016-02-26 21:01:37 +00002205rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
mistachkin5d4d9412016-01-22 03:54:36 +00002206 $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU -Fe$@ \
2207 $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
mistachkin9b88ace2016-02-26 21:01:37 +00002208
2209moreclean: clean
2210 del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
mistachkin3e786092016-01-23 07:53:04 +00002211# <</mark>>
drh76473772016-01-14 13:22:24 +00002212
shaneh6e7850c2011-06-17 15:57:07 +00002213clean:
mistachkin8dd3ff12015-05-16 03:41:41 +00002214 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
mistachkin56362a52016-02-19 19:03:04 +00002215 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
mistachkinfe41a982016-02-27 00:21:44 +00002216 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
mistachkin3e786092016-01-23 07:53:04 +00002217# <<mark>>
mistachkin9b88ace2016-02-26 21:01:37 +00002218 del /Q sqlite3.c sqlite3.h 2>NUL
2219 del /Q opcodes.c opcodes.h 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00002220 del /Q lemon.* lempar.c parse.* 2>NUL
2221 del /Q mkkeywordhash.* keywordhash.h 2>NUL
2222 del /Q notasharedlib.* 2>NUL
2223 -rmdir /Q/S .deps 2>NUL
2224 -rmdir /Q/S .libs 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00002225 -rmdir /Q/S tsrc 2>NUL
2226 del /Q .target_source 2>NUL
mistachkin4ef916e2016-08-24 19:58:46 +00002227 del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
mistachkin44723ce2015-03-21 02:22:37 +00002228 del /Q testloadext.dll 2>NUL
2229 del /Q testfixture.exe test.db 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00002230 del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL
drhedea9112015-03-24 19:02:13 +00002231 del /Q changeset.exe 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00002232 del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
mistachkin27b69972016-02-07 20:39:27 +00002233 del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00002234 del /Q sqlite3.c sqlite3-*.c 2>NUL
2235 del /Q sqlite3rc.h 2>NUL
mistachkin27799892016-03-31 22:53:37 +00002236 del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
mistachkin44723ce2015-03-21 02:22:37 +00002237 del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
mistachkin8d8738e2015-02-25 01:06:08 +00002238 del /Q sqlite-*-output.vsix 2>NUL
drh290fcaa2016-06-08 01:03:05 +00002239 del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
mistachkinbc50bb72015-07-14 21:56:53 +00002240 del /Q fts5.* fts5parse.* 2>NUL
mistachkin3e786092016-01-23 07:53:04 +00002241# <</mark>>