blob: 94cd38d0ae9d16f13153d20b9152ae810639b51a [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#
4
5# The toplevel directory of the source tree. This is the directory
6# that contains this "Makefile.msc".
7#
8TOP = .
9
shaneh6e7850c2011-06-17 15:57:07 +000010# Set this non-0 to create and use the SQLite amalgamation file.
11#
mistachkin0ec07442012-10-12 18:06:07 +000012!IFNDEF USE_AMALGAMATION
shaneh6e7850c2011-06-17 15:57:07 +000013USE_AMALGAMATION = 1
mistachkin0ec07442012-10-12 18:06:07 +000014!ENDIF
shaneh6e7850c2011-06-17 15:57:07 +000015
mistachkin76510912013-10-11 23:01:18 +000016# Set this non-0 to split the SQLite amalgamation file into chunks to
17# be used for debugging with Visual Studio.
18#
19!IFNDEF SPLIT_AMALGAMATION
mistachkin0aedc6b2013-10-11 23:02:13 +000020SPLIT_AMALGAMATION = 0
mistachkin76510912013-10-11 23:01:18 +000021!ENDIF
22
mistachkinc756ded2011-10-02 05:23:16 +000023# Set this non-0 to use the International Components for Unicode (ICU).
24#
mistachkin0ec07442012-10-12 18:06:07 +000025!IFNDEF USE_ICU
mistachkinc756ded2011-10-02 05:23:16 +000026USE_ICU = 0
mistachkin0ec07442012-10-12 18:06:07 +000027!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +000028
mistachkin8d967a92012-06-21 04:21:35 +000029# Set this non-0 to dynamically link to the MSVC runtime library.
30#
mistachkin0ec07442012-10-12 18:06:07 +000031!IFNDEF USE_CRT_DLL
mistachkin8d967a92012-06-21 04:21:35 +000032USE_CRT_DLL = 0
mistachkin0ec07442012-10-12 18:06:07 +000033!ENDIF
mistachkin8d967a92012-06-21 04:21:35 +000034
mistachkin0157e012013-09-06 21:41:11 +000035# Set this non-0 to generate assembly code listings for the source code
36# files.
37#
38!IFNDEF USE_LISTINGS
39USE_LISTINGS = 0
40!ENDIF
41
mistachkin52fd8e12012-08-28 01:44:13 +000042# Set this non-0 to attempt setting the native compiler automatically
43# for cross-compiling the command line tools needed during the compilation
44# process.
45#
mistachkin0ec07442012-10-12 18:06:07 +000046!IFNDEF XCOMPILE
mistachkin52fd8e12012-08-28 01:44:13 +000047XCOMPILE = 0
mistachkin0ec07442012-10-12 18:06:07 +000048!ENDIF
mistachkin52fd8e12012-08-28 01:44:13 +000049
mistachkinbd58d5f2012-06-30 22:22:34 +000050# Set this non-0 to use the native libraries paths for cross-compiling
51# the command line tools needed during the compilation process.
52#
mistachkin0ec07442012-10-12 18:06:07 +000053!IFNDEF USE_NATIVE_LIBPATHS
mistachkinbd58d5f2012-06-30 22:22:34 +000054USE_NATIVE_LIBPATHS = 0
mistachkin0ec07442012-10-12 18:06:07 +000055!ENDIF
mistachkinbd58d5f2012-06-30 22:22:34 +000056
mistachkin08c1c312012-10-06 03:48:25 +000057# Set this 0 to skip the compiling and embedding of version resources.
58#
mistachkin0ec07442012-10-12 18:06:07 +000059!IFNDEF USE_RC
mistachkin08c1c312012-10-06 03:48:25 +000060USE_RC = 1
mistachkin0ec07442012-10-12 18:06:07 +000061!ENDIF
mistachkin08c1c312012-10-06 03:48:25 +000062
mistachkin46b721a2012-03-23 12:28:21 +000063# Set this non-0 to compile binaries suitable for the WinRT environment.
64# This setting does not apply to any binaries that require Tcl to operate
65# properly (i.e. the text fixture, etc).
66#
mistachkin0ec07442012-10-12 18:06:07 +000067!IFNDEF FOR_WINRT
mistachkin46b721a2012-03-23 12:28:21 +000068FOR_WINRT = 0
mistachkin0ec07442012-10-12 18:06:07 +000069!ENDIF
mistachkin46b721a2012-03-23 12:28:21 +000070
mistachkin31856a32012-07-27 07:13:25 +000071# Set this non-0 to skip attempting to look for and/or link with the Tcl
72# runtime library.
73#
mistachkin0ec07442012-10-12 18:06:07 +000074!IFNDEF NO_TCL
mistachkin31856a32012-07-27 07:13:25 +000075NO_TCL = 0
mistachkin0ec07442012-10-12 18:06:07 +000076!ENDIF
mistachkin31856a32012-07-27 07:13:25 +000077
mistachkin4d60be52011-08-26 05:40:31 +000078# Set this to non-0 to create and use PDBs.
79#
mistachkin0ec07442012-10-12 18:06:07 +000080!IFNDEF SYMBOLS
mistachkin4d60be52011-08-26 05:40:31 +000081SYMBOLS = 1
mistachkin0ec07442012-10-12 18:06:07 +000082!ENDIF
mistachkin4d60be52011-08-26 05:40:31 +000083
mistachkin2f7d5d82012-08-22 00:39:34 +000084# Set this to non-0 to use the SQLite debugging heap subsystem.
85#
mistachkin0ec07442012-10-12 18:06:07 +000086!IFNDEF MEMDEBUG
mistachkin2f7d5d82012-08-22 00:39:34 +000087MEMDEBUG = 0
mistachkin0ec07442012-10-12 18:06:07 +000088!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +000089
90# Set this to non-0 to use the Win32 native heap subsystem.
91#
mistachkin0ec07442012-10-12 18:06:07 +000092!IFNDEF WIN32HEAP
mistachkin2f7d5d82012-08-22 00:39:34 +000093WIN32HEAP = 0
mistachkin0ec07442012-10-12 18:06:07 +000094!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +000095
mistachkinf2d25f22011-08-25 04:09:12 +000096# Set this to one of the following values to enable various debugging
97# features. Each level includes the debugging options from the previous
98# levels. Currently, the recognized values for DEBUG are:
99#
100# 0 == NDEBUG: Disables assert() and other runtime diagnostics.
101# 1 == Disables NDEBUG and all optimizations and then enables PDBs.
102# 2 == SQLITE_DEBUG: Enables various diagnostics messages and code.
103# 3 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
104# 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
105# 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
106#
mistachkin0ec07442012-10-12 18:06:07 +0000107!IFNDEF DEBUG
mistachkinf2d25f22011-08-25 04:09:12 +0000108DEBUG = 0
mistachkin0ec07442012-10-12 18:06:07 +0000109!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000110
mistachkin8bcd3fa2013-08-29 01:03:38 +0000111# Enable use of available compiler optimizations? Normally, this should be
112# non-zero. Setting this to zero, thus disabling all compiler optimizations,
113# can be useful for testing.
114#
115!IFNDEF OPTIMIZATIONS
116OPTIMIZATIONS = 2
117!ENDIF
118
mistachkine37f99c2012-06-30 16:22:05 +0000119# Check for the predefined command macro CC. This should point to the compiler
mistachkinbd58d5f2012-06-30 22:22:34 +0000120# binary for the target platform. If it is not defined, simply define it to
mistachkine37f99c2012-06-30 16:22:05 +0000121# the legacy default value 'cl.exe'.
122#
123!IFNDEF CC
124CC = cl.exe
125!ENDIF
126
mistachkin228aeff2012-06-30 19:24:09 +0000127# Check for the command macro LD. This should point to the linker binary for
mistachkinbd58d5f2012-06-30 22:22:34 +0000128# the target platform. If it is not defined, simply define it to the legacy
mistachkin228aeff2012-06-30 19:24:09 +0000129# default value 'link.exe'.
130#
131!IFNDEF LD
132LD = link.exe
133!ENDIF
134
mistachkin4d9d1f42012-09-03 10:32:32 +0000135# Check for the predefined command macro RC. This should point to the resource
136# compiler binary for the target platform. If it is not defined, simply define
137# it to the legacy default value 'rc.exe'.
138#
139!IFNDEF RC
140RC = rc.exe
141!ENDIF
142
mistachkine37f99c2012-06-30 16:22:05 +0000143# Check for the command macro NCC. This should point to the compiler binary
mistachkinbd58d5f2012-06-30 22:22:34 +0000144# for the platform the compilation process is taking place on. If it is not
145# defined, simply define it to have the same value as the CC macro. When
mistachkine37f99c2012-06-30 16:22:05 +0000146# cross-compiling, it is suggested that this macro be modified via the command
147# line (since nmake itself does not provide a built-in method to guess it).
148# For example, to use the x86 compiler when cross-compiling for x64, a command
mistachkinbd58d5f2012-06-30 22:22:34 +0000149# line similar to the following could be used (all on one line):
mistachkine37f99c2012-06-30 16:22:05 +0000150#
mistachkin6f928332012-08-17 11:47:32 +0000151# nmake /f Makefile.msc sqlite3.dll
mistachkin52fd8e12012-08-28 01:44:13 +0000152# XCOMPILE=1 USE_NATIVE_LIBPATHS=1
153#
154# Alternatively, the full path and file name to the compiler binary for the
155# platform the compilation process is taking place may be specified (all on
156# one line):
157#
158# nmake /f Makefile.msc sqlite3.dll
mistachkinbd58d5f2012-06-30 22:22:34 +0000159# "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
160# USE_NATIVE_LIBPATHS=1
mistachkine37f99c2012-06-30 16:22:05 +0000161#
mistachkinfd0ba2a2012-07-27 08:21:45 +0000162!IFDEF NCC
163NCC = $(NCC:\\=\)
mistachkin52fd8e12012-08-28 01:44:13 +0000164!ELSEIF $(XCOMPILE)!=0
mistachkin5fac4202013-12-03 23:33:29 +0000165NCC = "$(VCINSTALLDIR)\bin\$(CC)"
mistachkin52fd8e12012-08-28 01:44:13 +0000166NCC = $(NCC:\\=\)
mistachkinfd0ba2a2012-07-27 08:21:45 +0000167!ELSE
mistachkine37f99c2012-06-30 16:22:05 +0000168NCC = $(CC)
169!ENDIF
170
mistachkinbd58d5f2012-06-30 22:22:34 +0000171# Check for the MSVC runtime library path macro. Othertise, this
172# value will default to the 'lib' directory underneath the MSVC
173# installation directory.
174#
175!IFNDEF NCRTLIBPATH
176NCRTLIBPATH = $(VCINSTALLDIR)\lib
177!ENDIF
178
mistachkin0b5ae722012-07-27 23:03:47 +0000179NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
180
mistachkinbd58d5f2012-06-30 22:22:34 +0000181# Check for the Platform SDK library path macro. Othertise, this
182# value will default to the 'lib' directory underneath the Windows
183# SDK installation directory (the environment variable used appears
184# to be available when using Visual C++ 2008 or later via the
185# command line).
186#
187!IFNDEF NSDKLIBPATH
188NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
189!ENDIF
190
mistachkin0b5ae722012-07-27 23:03:47 +0000191NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
192
mistachkinbd58d5f2012-06-30 22:22:34 +0000193# C compiler and options for use in building executables that
shanehb2f20bf2011-06-17 07:07:24 +0000194# will run on the platform that is doing the build.
195#
mistachkine37f99c2012-06-30 16:22:05 +0000196BCC = $(NCC) -W3
shanehb2f20bf2011-06-17 07:07:24 +0000197
mistachkin0157e012013-09-06 21:41:11 +0000198# Check if assembly code listings should be generated for the source
199# code files to be compiled.
200#
201!IF $(USE_LISTINGS)!=0
202BCC = $(BCC) -FAcs
203!ENDIF
204
mistachkinbd58d5f2012-06-30 22:22:34 +0000205# Check if the native library paths should be used when compiling
206# the command line tools used during the compilation process. If
207# so, set the necessary macro now.
208#
209!IF $(USE_NATIVE_LIBPATHS)!=0
210NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
211!ENDIF
212
213# C compiler and options for use in building executables that
shanehb2f20bf2011-06-17 07:07:24 +0000214# will run on the target platform. (BCC and TCC are usually the
215# same unless your are cross-compiling.)
216#
mistachkin8ccc6d42012-09-27 21:03:53 +0000217TCC = $(CC) -W3 -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src -fp:precise
218RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src
shaneh6e7850c2011-06-17 15:57:07 +0000219
mistachkin0157e012013-09-06 21:41:11 +0000220# Check if assembly code listings should be generated for the source
221# code files to be compiled.
222#
223!IF $(USE_LISTINGS)!=0
224TCC = $(TCC) -FAcs
225!ENDIF
226
mistachkinf39eaf22012-03-20 02:18:42 +0000227# When compiling the library for use in the WinRT environment,
mistachkin46b721a2012-03-23 12:28:21 +0000228# the following compile-time options must be used as well to
mistachkinf39eaf22012-03-20 02:18:42 +0000229# disable use of Win32 APIs that are not available and to enable
230# use of Win32 APIs that are specific to Windows 8 and/or WinRT.
231#
mistachkin46b721a2012-03-23 12:28:21 +0000232!IF $(FOR_WINRT)!=0
mistachkin8d967a92012-06-21 04:21:35 +0000233TCC = $(TCC) -DSQLITE_OS_WINRT=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000234RCC = $(RCC) -DSQLITE_OS_WINRT=1
mistachkin08c1c312012-10-06 03:48:25 +0000235TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
236RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
mistachkin8d967a92012-06-21 04:21:35 +0000237!ENDIF
238
239# Also, we need to dynamically link to the correct MSVC runtime
240# when compiling for WinRT (e.g. debug or release) OR if the
241# USE_CRT_DLL option is set to force dynamically linking to the
242# MSVC runtime library.
243#
244!IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
245!IF $(DEBUG)>0
246TCC = $(TCC) -MDd
mistachkin08c1c312012-10-06 03:48:25 +0000247BCC = $(BCC) -MDd
mistachkin8d967a92012-06-21 04:21:35 +0000248!ELSE
249TCC = $(TCC) -MD
mistachkin08c1c312012-10-06 03:48:25 +0000250BCC = $(BCC) -MD
mistachkin8d967a92012-06-21 04:21:35 +0000251!ENDIF
252!ELSE
253!IF $(DEBUG)>0
254TCC = $(TCC) -MTd
mistachkin08c1c312012-10-06 03:48:25 +0000255BCC = $(BCC) -MTd
mistachkin8d967a92012-06-21 04:21:35 +0000256!ELSE
257TCC = $(TCC) -MT
mistachkin08c1c312012-10-06 03:48:25 +0000258BCC = $(BCC) -MT
mistachkin8d967a92012-06-21 04:21:35 +0000259!ENDIF
mistachkin46b721a2012-03-23 12:28:21 +0000260!ENDIF
mistachkinf39eaf22012-03-20 02:18:42 +0000261
262# The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
shaneh6e7850c2011-06-17 15:57:07 +0000263# any extension header files by default. For non-amalgamation
264# builds, we need to make sure the compiler can find these.
265#
266!IF $(USE_AMALGAMATION)==0
267TCC = $(TCC) -I$(TOP)\ext\fts3
mistachkin4d9d1f42012-09-03 10:32:32 +0000268RCC = $(RCC) -I$(TOP)\ext\fts3
shaneh6e7850c2011-06-17 15:57:07 +0000269TCC = $(TCC) -I$(TOP)\ext\rtree
mistachkin4d9d1f42012-09-03 10:32:32 +0000270RCC = $(RCC) -I$(TOP)\ext\rtree
shaneh6e7850c2011-06-17 15:57:07 +0000271!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000272
273# Define -DNDEBUG to compile without debugging (i.e., for production usage)
274# Omitting the define will cause extra debugging code to be inserted and
275# includes extra comments when "EXPLAIN stmt" is used.
276#
mistachkin753c5442011-08-25 02:02:25 +0000277!IF $(DEBUG)==0
shanehb2f20bf2011-06-17 07:07:24 +0000278TCC = $(TCC) -DNDEBUG
mistachkinfec360a2012-04-18 10:29:21 +0000279BCC = $(BCC) -DNDEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000280RCC = $(RCC) -DNDEBUG
mistachkin753c5442011-08-25 02:02:25 +0000281!ENDIF
282
283!IF $(DEBUG)>1
284TCC = $(TCC) -DSQLITE_DEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000285RCC = $(RCC) -DSQLITE_DEBUG
mistachkin753c5442011-08-25 02:02:25 +0000286!ENDIF
287
288!IF $(DEBUG)>3
289TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000290RCC = $(RCC) -DSQLITE_DEBUG_OS_TRACE=1
mistachkin753c5442011-08-25 02:02:25 +0000291!ENDIF
292
293!IF $(DEBUG)>4
294TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
mistachkin4d9d1f42012-09-03 10:32:32 +0000295RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE
mistachkin753c5442011-08-25 02:02:25 +0000296!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000297
mistachkin176f1b42011-08-02 23:34:00 +0000298#
mistachkinbd58d5f2012-06-30 22:22:34 +0000299# Prevent warnings about "insecure" MSVC runtime library functions
300# being used.
mistachkin176f1b42011-08-02 23:34:00 +0000301#
302TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkinfec360a2012-04-18 10:29:21 +0000303BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkin4d9d1f42012-09-03 10:32:32 +0000304RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
mistachkin176f1b42011-08-02 23:34:00 +0000305
mistachkin1b186a92011-08-24 16:13:57 +0000306#
mistachkinbd58d5f2012-06-30 22:22:34 +0000307# Prevent warnings about "deprecated" POSIX functions being used.
308#
309TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
310BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
mistachkin4d9d1f42012-09-03 10:32:32 +0000311RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
mistachkinbd58d5f2012-06-30 22:22:34 +0000312
313#
mistachkin2f7d5d82012-08-22 00:39:34 +0000314# Use the SQLite debugging heap subsystem?
mistachkin1b186a92011-08-24 16:13:57 +0000315#
mistachkin2f7d5d82012-08-22 00:39:34 +0000316!IF $(MEMDEBUG)!=0
317TCC = $(TCC) -DSQLITE_MEMDEBUG=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000318RCC = $(RCC) -DSQLITE_MEMDEBUG=1
mistachkin2f7d5d82012-08-22 00:39:34 +0000319
320#
321# Use native Win32 heap subsystem instead of malloc/free?
322#
323!ELSEIF $(WIN32HEAP)!=0
324TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000325RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
mistachkin753c5442011-08-25 02:02:25 +0000326
327#
328# Validate the heap on every call into the native Win32 heap subsystem?
329#
330!IF $(DEBUG)>2
331TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000332RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
mistachkin753c5442011-08-25 02:02:25 +0000333!ENDIF
mistachkin2f7d5d82012-08-22 00:39:34 +0000334!ENDIF
mistachkin1b186a92011-08-24 16:13:57 +0000335
mistachkin5b0b6fd2011-06-25 01:14:36 +0000336# The locations of the Tcl header and library files. Also, the library that
337# non-stubs enabled programs using Tcl must link against. These variables
338# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
339# prior to running nmake in order to match the actual installed location and
340# version on this machine.
shanehb2f20bf2011-06-17 07:07:24 +0000341#
mistachkine37f99c2012-06-30 16:22:05 +0000342!IFNDEF TCLINCDIR
shanehb2f20bf2011-06-17 07:07:24 +0000343TCLINCDIR = c:\tcl\include
mistachkine37f99c2012-06-30 16:22:05 +0000344!ENDIF
mistachkin5b0b6fd2011-06-25 01:14:36 +0000345
mistachkine37f99c2012-06-30 16:22:05 +0000346!IFNDEF TCLLIBDIR
shanehb2f20bf2011-06-17 07:07:24 +0000347TCLLIBDIR = c:\tcl\lib
mistachkine37f99c2012-06-30 16:22:05 +0000348!ENDIF
mistachkin5b0b6fd2011-06-25 01:14:36 +0000349
mistachkine37f99c2012-06-30 16:22:05 +0000350!IFNDEF LIBTCL
mistachkin5b0b6fd2011-06-25 01:14:36 +0000351LIBTCL = tcl85.lib
mistachkine37f99c2012-06-30 16:22:05 +0000352!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000353
mistachkinc756ded2011-10-02 05:23:16 +0000354# The locations of the ICU header and library files. These variables
355# (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
356# prior to running nmake in order to match the actual installed location on
357# this machine.
358#
mistachkine37f99c2012-06-30 16:22:05 +0000359!IFNDEF ICUINCDIR
mistachkinc756ded2011-10-02 05:23:16 +0000360ICUINCDIR = c:\icu\include
mistachkine37f99c2012-06-30 16:22:05 +0000361!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000362
mistachkine37f99c2012-06-30 16:22:05 +0000363!IFNDEF ICULIBDIR
mistachkinc756ded2011-10-02 05:23:16 +0000364ICULIBDIR = c:\icu\lib
mistachkine37f99c2012-06-30 16:22:05 +0000365!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000366
mistachkine37f99c2012-06-30 16:22:05 +0000367!IFNDEF LIBICU
mistachkinc756ded2011-10-02 05:23:16 +0000368LIBICU = icuuc.lib icuin.lib
mistachkine37f99c2012-06-30 16:22:05 +0000369!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000370
shanehb2f20bf2011-06-17 07:07:24 +0000371# This is the command to use for tclsh - normally just "tclsh", but we may
mistachkin5b0b6fd2011-06-25 01:14:36 +0000372# know the specific version we want to use. This variable (TCLSH_CMD) may be
373# overridden via the environment prior to running nmake in order to select a
374# specific Tcl shell to use.
shanehb2f20bf2011-06-17 07:07:24 +0000375#
mistachkine37f99c2012-06-30 16:22:05 +0000376!IFNDEF TCLSH_CMD
shanehb2f20bf2011-06-17 07:07:24 +0000377TCLSH_CMD = tclsh85
mistachkine37f99c2012-06-30 16:22:05 +0000378!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000379
380# Compiler options needed for programs that use the readline() library.
381#
mistachkin8bcd3fa2013-08-29 01:03:38 +0000382!IFNDEF READLINE_FLAGS
shaneh6e7850c2011-06-17 15:57:07 +0000383READLINE_FLAGS = -DHAVE_READLINE=0
mistachkin8bcd3fa2013-08-29 01:03:38 +0000384!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000385
386# The library that programs using readline() must link against.
387#
mistachkin8bcd3fa2013-08-29 01:03:38 +0000388!IFNDEF LIBREADLINE
shaneh6e7850c2011-06-17 15:57:07 +0000389LIBREADLINE =
mistachkin8bcd3fa2013-08-29 01:03:38 +0000390!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000391
392# Should the database engine be compiled threadsafe
393#
394TCC = $(TCC) -DSQLITE_THREADSAFE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000395RCC = $(RCC) -DSQLITE_THREADSAFE=1
shanehb2f20bf2011-06-17 07:07:24 +0000396
397# Do threads override each others locks by default (1), or do we test (-1)
398#
399TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
mistachkin4d9d1f42012-09-03 10:32:32 +0000400RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
shanehb2f20bf2011-06-17 07:07:24 +0000401
402# Any target libraries which libsqlite must be linked against
shaneh6e7850c2011-06-17 15:57:07 +0000403#
mistachkine37f99c2012-06-30 16:22:05 +0000404!IFNDEF TLIBS
shaneh6e7850c2011-06-17 15:57:07 +0000405TLIBS =
mistachkine37f99c2012-06-30 16:22:05 +0000406!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000407
408# Flags controlling use of the in memory btree implementation
409#
410# SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
411# default to file, 2 to default to memory, and 3 to force temporary
412# tables to always be in memory.
413#
shaneh6e7850c2011-06-17 15:57:07 +0000414TCC = $(TCC) -DSQLITE_TEMP_STORE=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000415RCC = $(RCC) -DSQLITE_TEMP_STORE=1
shanehb2f20bf2011-06-17 07:07:24 +0000416
417# Enable/disable loadable extensions, and other optional features
shaneh6e7850c2011-06-17 15:57:07 +0000418# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
419# The same set of OMIT and ENABLE flags should be passed to the
shanehb2f20bf2011-06-17 07:07:24 +0000420# LEMON parser generator and the mkkeywordhash tool as well.
421
422# BEGIN standard options
423OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
424OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
425OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
426# END standard options
427
428# BEGIN required Windows option
429OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
430# END required Windows option
431
432TCC = $(TCC) $(OPT_FEATURE_FLAGS)
mistachkin4d9d1f42012-09-03 10:32:32 +0000433RCC = $(RCC) $(OPT_FEATURE_FLAGS)
shanehb2f20bf2011-06-17 07:07:24 +0000434
435# Add in any optional parameters specified on the make commane line
436# ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
437TCC = $(TCC) $(OPTS)
mistachkin4d9d1f42012-09-03 10:32:32 +0000438RCC = $(RCC) $(OPTS)
shanehb2f20bf2011-06-17 07:07:24 +0000439
mistachkin8bcd3fa2013-08-29 01:03:38 +0000440# If compiling for debugging, add some defines.
mistachkinf2d25f22011-08-25 04:09:12 +0000441!IF $(DEBUG)>0
mistachkin8bcd3fa2013-08-29 01:03:38 +0000442TCC = $(TCC) -D_DEBUG
443BCC = $(BCC) -D_DEBUG
mistachkin4d9d1f42012-09-03 10:32:32 +0000444RCC = $(RCC) -D_DEBUG
mistachkin4d60be52011-08-26 05:40:31 +0000445!ENDIF
446
mistachkin8bcd3fa2013-08-29 01:03:38 +0000447# If optimizations are enabled or disabled (either implicitly or
448# explicitly), add the necessary flags.
449!IF $(DEBUG)>0 || $(OPTIMIZATIONS)==0
450TCC = $(TCC) -Od
451BCC = $(BCC) -Od
452!ELSEIF $(OPTIMIZATIONS)>=3
453TCC = $(TCC) -Ox
454BCC = $(BCC) -Ox
455!ELSEIF $(OPTIMIZATIONS)==2
456TCC = $(TCC) -O2
457BCC = $(BCC) -O2
458!ELSEIF $(OPTIMIZATIONS)==1
459TCC = $(TCC) -O1
460BCC = $(BCC) -O1
461!ENDIF
462
463# If symbols are enabled (or compiling for debugging), enable PDBs.
mistachkin4d60be52011-08-26 05:40:31 +0000464!IF $(DEBUG)>0 || $(SYMBOLS)!=0
465TCC = $(TCC) -Zi
mistachkinfec360a2012-04-18 10:29:21 +0000466BCC = $(BCC) -Zi
mistachkin753c5442011-08-25 02:02:25 +0000467!ENDIF
468
mistachkinc756ded2011-10-02 05:23:16 +0000469# If ICU support is enabled, add the compiler options for it.
470!IF $(USE_ICU)!=0
471TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
mistachkin4d9d1f42012-09-03 10:32:32 +0000472RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
mistachkinc756ded2011-10-02 05:23:16 +0000473TCC = $(TCC) -I$(TOP)\ext\icu
mistachkin4d9d1f42012-09-03 10:32:32 +0000474RCC = $(RCC) -I$(TOP)\ext\icu
mistachkinc756ded2011-10-02 05:23:16 +0000475TCC = $(TCC) -I$(ICUINCDIR)
mistachkin4d9d1f42012-09-03 10:32:32 +0000476RCC = $(RCC) -I$(ICUINCDIR)
mistachkinc756ded2011-10-02 05:23:16 +0000477!ENDIF
478
mistachkin4d9d1f42012-09-03 10:32:32 +0000479# Command line prefixes for compiling code, compiling resources,
480# linking, etc.
shanehb2f20bf2011-06-17 07:07:24 +0000481LTCOMPILE = $(TCC) -Fo$@
mistachkin4d9d1f42012-09-03 10:32:32 +0000482LTRCOMPILE = $(RCC) -r
shanehb2f20bf2011-06-17 07:07:24 +0000483LTLIB = lib.exe
shaneh2a0b9ef2011-06-20 20:52:32 +0000484LTLINK = $(TCC) -Fe$@
485
486# If a platform was set, force the linker to target that.
487# Note that the vcvars*.bat family of batch files typically
488# set this for you. Otherwise, the linker will attempt
489# to deduce the binary type based on the object files.
mistachkine37f99c2012-06-30 16:22:05 +0000490!IFDEF PLATFORM
shaneh2a0b9ef2011-06-20 20:52:32 +0000491LTLINKOPTS = /MACHINE:$(PLATFORM)
shaneh29ebea82011-06-21 18:12:07 +0000492LTLIBOPTS = /MACHINE:$(PLATFORM)
shaneh2a0b9ef2011-06-20 20:52:32 +0000493!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000494
mistachkina6ff8572012-04-17 21:00:12 +0000495# When compiling for use in the WinRT environment, the following
496# linker option must be used to mark the executable as runnable
497# only in the context of an application container.
498#
499!IF $(FOR_WINRT)!=0
500LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
mistachkin60bdad72013-07-11 03:09:45 +0000501!IF "$(VISUALSTUDIOVERSION)"=="12.0"
mistachkinda5b1cd2013-07-10 19:39:02 +0000502!IF "$(PLATFORM)"=="x86"
mistachkin4eaa1292013-07-10 21:33:25 +0000503LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store"
mistachkinda5b1cd2013-07-10 19:39:02 +0000504!ELSEIF "$(PLATFORM)"=="x64"
mistachkin4eaa1292013-07-10 21:33:25 +0000505LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store\amd64"
506!ELSEIF "$(PLATFORM)"=="ARM"
507LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store\arm"
508!ELSE
509LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store"
mistachkinda5b1cd2013-07-10 19:39:02 +0000510!ENDIF
511!ENDIF
mistachkina6ff8572012-04-17 21:00:12 +0000512!ENDIF
513
mistachkinfec360a2012-04-18 10:29:21 +0000514# If either debugging or symbols are enabled, enable PDBs.
mistachkin4d60be52011-08-26 05:40:31 +0000515!IF $(DEBUG)>0 || $(SYMBOLS)!=0
mistachkin228aeff2012-06-30 19:24:09 +0000516LDFLAGS = /DEBUG
mistachkin753c5442011-08-25 02:02:25 +0000517!ENDIF
518
mistachkinc756ded2011-10-02 05:23:16 +0000519# Start with the Tcl related linker options.
mistachkin31856a32012-07-27 07:13:25 +0000520!IF $(NO_TCL)==0
mistachkinc756ded2011-10-02 05:23:16 +0000521LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
522LTLIBS = $(LIBTCL)
mistachkin31856a32012-07-27 07:13:25 +0000523!ENDIF
mistachkinc756ded2011-10-02 05:23:16 +0000524
525# If ICU support is enabled, add the linker options for it.
526!IF $(USE_ICU)!=0
527LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
528LTLIBS = $(LTLIBS) $(LIBICU)
529!ENDIF
530
shanehb2f20bf2011-06-17 07:07:24 +0000531# nawk compatible awk.
mistachkin8bcd3fa2013-08-29 01:03:38 +0000532!IFNDEF NAWK
mistachkin5b0b6fd2011-06-25 01:14:36 +0000533NAWK = gawk.exe
mistachkin8bcd3fa2013-08-29 01:03:38 +0000534!ENDIF
shanehb2f20bf2011-06-17 07:07:24 +0000535
536# You should not have to change anything below this line
537###############################################################################
538
shanehb2f20bf2011-06-17 07:07:24 +0000539# Object files for the SQLite library (non-amalgamation).
540#
mistachkinf67feef2013-07-29 19:03:20 +0000541LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000542 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
543 callback.lo complete.lo ctime.lo date.lo delete.lo \
544 expr.lo fault.lo fkey.lo \
drh391d4ba2012-05-28 20:22:16 +0000545 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
546 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
drh4d648c72013-04-22 17:07:56 +0000547 fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000548 func.lo global.lo hash.lo \
549 icu.lo insert.lo journal.lo legacy.lo loadext.lo \
550 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
551 memjournal.lo \
mistachkinf1c6bc52012-06-21 15:09:20 +0000552 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
553 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
mistachkinf67feef2013-07-29 19:03:20 +0000554 pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
shanehb2f20bf2011-06-17 07:07:24 +0000555 random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
556 table.lo tokenize.lo trigger.lo \
557 update.lo util.lo vacuum.lo \
mistachkinf67feef2013-07-29 19:03:20 +0000558 vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
mistachkin81c428a2011-08-17 02:19:54 +0000559 vdbetrace.lo wal.lo walker.lo where.lo utf.lo vtab.lo
shanehb2f20bf2011-06-17 07:07:24 +0000560
561# Object files for the amalgamation.
562#
563LIBOBJS1 = sqlite3.lo
564
565# Determine the real value of LIBOBJ based on the 'configure' script
566#
567!IF $(USE_AMALGAMATION)==0
568LIBOBJ = $(LIBOBJS0)
569!ELSE
570LIBOBJ = $(LIBOBJS1)
571!ENDIF
572
mistachkin08c1c312012-10-06 03:48:25 +0000573# Determine if embedded resource compilation and usage are enabled.
574#
575!IF $(USE_RC)!=0
576LIBRESOBJS = sqlite3res.lo
577!ELSE
578LIBRESOBJS =
579!ENDIF
580
shanehb2f20bf2011-06-17 07:07:24 +0000581# All of the source code files.
582#
583SRC = \
584 $(TOP)\src\alter.c \
585 $(TOP)\src\analyze.c \
586 $(TOP)\src\attach.c \
587 $(TOP)\src\auth.c \
588 $(TOP)\src\backup.c \
589 $(TOP)\src\bitvec.c \
590 $(TOP)\src\btmutex.c \
591 $(TOP)\src\btree.c \
592 $(TOP)\src\btree.h \
593 $(TOP)\src\btreeInt.h \
594 $(TOP)\src\build.c \
595 $(TOP)\src\callback.c \
596 $(TOP)\src\complete.c \
597 $(TOP)\src\ctime.c \
598 $(TOP)\src\date.c \
599 $(TOP)\src\delete.c \
600 $(TOP)\src\expr.c \
601 $(TOP)\src\fault.c \
602 $(TOP)\src\fkey.c \
603 $(TOP)\src\func.c \
604 $(TOP)\src\global.c \
605 $(TOP)\src\hash.c \
606 $(TOP)\src\hash.h \
607 $(TOP)\src\hwtime.h \
608 $(TOP)\src\insert.c \
609 $(TOP)\src\journal.c \
610 $(TOP)\src\legacy.c \
611 $(TOP)\src\loadext.c \
612 $(TOP)\src\main.c \
613 $(TOP)\src\malloc.c \
614 $(TOP)\src\mem0.c \
615 $(TOP)\src\mem1.c \
616 $(TOP)\src\mem2.c \
617 $(TOP)\src\mem3.c \
618 $(TOP)\src\mem5.c \
619 $(TOP)\src\memjournal.c \
620 $(TOP)\src\mutex.c \
621 $(TOP)\src\mutex.h \
622 $(TOP)\src\mutex_noop.c \
shanehb2f20bf2011-06-17 07:07:24 +0000623 $(TOP)\src\mutex_unix.c \
624 $(TOP)\src\mutex_w32.c \
625 $(TOP)\src\notify.c \
626 $(TOP)\src\os.c \
627 $(TOP)\src\os.h \
628 $(TOP)\src\os_common.h \
shanehb2f20bf2011-06-17 07:07:24 +0000629 $(TOP)\src\os_unix.c \
630 $(TOP)\src\os_win.c \
631 $(TOP)\src\pager.c \
632 $(TOP)\src\pager.h \
633 $(TOP)\src\parse.y \
634 $(TOP)\src\pcache.c \
635 $(TOP)\src\pcache.h \
636 $(TOP)\src\pcache1.c \
637 $(TOP)\src\pragma.c \
638 $(TOP)\src\prepare.c \
639 $(TOP)\src\printf.c \
640 $(TOP)\src\random.c \
641 $(TOP)\src\resolve.c \
642 $(TOP)\src\rowset.c \
643 $(TOP)\src\select.c \
644 $(TOP)\src\status.c \
645 $(TOP)\src\shell.c \
646 $(TOP)\src\sqlite.h.in \
647 $(TOP)\src\sqlite3ext.h \
648 $(TOP)\src\sqliteInt.h \
649 $(TOP)\src\sqliteLimit.h \
650 $(TOP)\src\table.c \
651 $(TOP)\src\tclsqlite.c \
652 $(TOP)\src\tokenize.c \
653 $(TOP)\src\trigger.c \
654 $(TOP)\src\utf.c \
655 $(TOP)\src\update.c \
656 $(TOP)\src\util.c \
657 $(TOP)\src\vacuum.c \
658 $(TOP)\src\vdbe.c \
659 $(TOP)\src\vdbe.h \
660 $(TOP)\src\vdbeapi.c \
661 $(TOP)\src\vdbeaux.c \
662 $(TOP)\src\vdbeblob.c \
663 $(TOP)\src\vdbemem.c \
mistachkin81c428a2011-08-17 02:19:54 +0000664 $(TOP)\src\vdbesort.c \
shanehb2f20bf2011-06-17 07:07:24 +0000665 $(TOP)\src\vdbetrace.c \
666 $(TOP)\src\vdbeInt.h \
667 $(TOP)\src\vtab.c \
668 $(TOP)\src\wal.c \
669 $(TOP)\src\wal.h \
670 $(TOP)\src\walker.c \
drhe54df422013-11-12 18:37:25 +0000671 $(TOP)\src\where.c \
672 $(TOP)\src\whereInt.h
shanehb2f20bf2011-06-17 07:07:24 +0000673
674# Source code for extensions
675#
676SRC = $(SRC) \
677 $(TOP)\ext\fts1\fts1.c \
678 $(TOP)\ext\fts1\fts1.h \
679 $(TOP)\ext\fts1\fts1_hash.c \
680 $(TOP)\ext\fts1\fts1_hash.h \
681 $(TOP)\ext\fts1\fts1_porter.c \
682 $(TOP)\ext\fts1\fts1_tokenizer.h \
683 $(TOP)\ext\fts1\fts1_tokenizer1.c
684SRC = $(SRC) \
685 $(TOP)\ext\fts2\fts2.c \
686 $(TOP)\ext\fts2\fts2.h \
687 $(TOP)\ext\fts2\fts2_hash.c \
688 $(TOP)\ext\fts2\fts2_hash.h \
689 $(TOP)\ext\fts2\fts2_icu.c \
690 $(TOP)\ext\fts2\fts2_porter.c \
691 $(TOP)\ext\fts2\fts2_tokenizer.h \
692 $(TOP)\ext\fts2\fts2_tokenizer.c \
693 $(TOP)\ext\fts2\fts2_tokenizer1.c
694SRC = $(SRC) \
695 $(TOP)\ext\fts3\fts3.c \
696 $(TOP)\ext\fts3\fts3.h \
697 $(TOP)\ext\fts3\fts3Int.h \
698 $(TOP)\ext\fts3\fts3_aux.c \
699 $(TOP)\ext\fts3\fts3_expr.c \
700 $(TOP)\ext\fts3\fts3_hash.c \
701 $(TOP)\ext\fts3\fts3_hash.h \
702 $(TOP)\ext\fts3\fts3_icu.c \
703 $(TOP)\ext\fts3\fts3_porter.c \
704 $(TOP)\ext\fts3\fts3_snippet.c \
705 $(TOP)\ext\fts3\fts3_tokenizer.h \
706 $(TOP)\ext\fts3\fts3_tokenizer.c \
707 $(TOP)\ext\fts3\fts3_tokenizer1.c \
drh4d648c72013-04-22 17:07:56 +0000708 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +0000709 $(TOP)\ext\fts3\fts3_unicode.c \
710 $(TOP)\ext\fts3\fts3_unicode2.c \
shanehb2f20bf2011-06-17 07:07:24 +0000711 $(TOP)\ext\fts3\fts3_write.c
712SRC = $(SRC) \
713 $(TOP)\ext\icu\sqliteicu.h \
714 $(TOP)\ext\icu\icu.c
715SRC = $(SRC) \
716 $(TOP)\ext\rtree\rtree.h \
717 $(TOP)\ext\rtree\rtree.c
718
719
720# Generated source code files
721#
722SRC = $(SRC) \
723 keywordhash.h \
724 opcodes.c \
725 opcodes.h \
726 parse.c \
727 parse.h \
728 sqlite3.h
729
730# Source code to the test files.
731#
732TESTSRC = \
733 $(TOP)\src\test1.c \
734 $(TOP)\src\test2.c \
735 $(TOP)\src\test3.c \
736 $(TOP)\src\test4.c \
737 $(TOP)\src\test5.c \
738 $(TOP)\src\test6.c \
739 $(TOP)\src\test7.c \
740 $(TOP)\src\test8.c \
741 $(TOP)\src\test9.c \
742 $(TOP)\src\test_autoext.c \
743 $(TOP)\src\test_async.c \
744 $(TOP)\src\test_backup.c \
745 $(TOP)\src\test_btree.c \
746 $(TOP)\src\test_config.c \
747 $(TOP)\src\test_demovfs.c \
748 $(TOP)\src\test_devsym.c \
mistachkin413c63b2013-01-17 03:18:14 +0000749 $(TOP)\src\test_fs.c \
shanehb2f20bf2011-06-17 07:07:24 +0000750 $(TOP)\src\test_func.c \
shanehb2f20bf2011-06-17 07:07:24 +0000751 $(TOP)\src\test_hexio.c \
752 $(TOP)\src\test_init.c \
753 $(TOP)\src\test_intarray.c \
754 $(TOP)\src\test_journal.c \
755 $(TOP)\src\test_malloc.c \
756 $(TOP)\src\test_multiplex.c \
757 $(TOP)\src\test_mutex.c \
758 $(TOP)\src\test_onefile.c \
759 $(TOP)\src\test_osinst.c \
760 $(TOP)\src\test_pcache.c \
761 $(TOP)\src\test_quota.c \
762 $(TOP)\src\test_rtree.c \
763 $(TOP)\src\test_schema.c \
764 $(TOP)\src\test_server.c \
765 $(TOP)\src\test_superlock.c \
766 $(TOP)\src\test_syscall.c \
767 $(TOP)\src\test_stat.c \
768 $(TOP)\src\test_tclvar.c \
769 $(TOP)\src\test_thread.c \
770 $(TOP)\src\test_vfs.c \
shanehb2f20bf2011-06-17 07:07:24 +0000771 $(TOP)\src\test_wsd.c \
772 $(TOP)\ext\fts3\fts3_term.c \
shaneh6e7850c2011-06-17 15:57:07 +0000773 $(TOP)\ext\fts3\fts3_test.c
shanehb2f20bf2011-06-17 07:07:24 +0000774
drhe50db1c2013-04-25 14:31:46 +0000775# Statically linked extensions
776#
drh1fb64af2013-04-25 14:36:28 +0000777TESTEXT = \
drh8416fc72013-04-25 16:42:55 +0000778 $(TOP)\ext\misc\amatch.c \
779 $(TOP)\ext\misc\closure.c \
drhe50db1c2013-04-25 14:31:46 +0000780 $(TOP)\ext\misc\fuzzer.c \
drh8416fc72013-04-25 16:42:55 +0000781 $(TOP)\ext\misc\ieee754.c \
drhea41dc42013-04-25 19:31:33 +0000782 $(TOP)\ext\misc\nextchar.c \
drhdef33672013-05-28 20:25:54 +0000783 $(TOP)\ext\misc\percentile.c \
drhe50db1c2013-04-25 14:31:46 +0000784 $(TOP)\ext\misc\regexp.c \
drhb7045ab2013-04-25 14:59:01 +0000785 $(TOP)\ext\misc\spellfix.c \
drh5f8cdac2013-10-14 21:14:42 +0000786 $(TOP)\ext\misc\totype.c \
drhe50db1c2013-04-25 14:31:46 +0000787 $(TOP)\ext\misc\wholenumber.c
788
789
shanehb2f20bf2011-06-17 07:07:24 +0000790# Source code to the library files needed by the test fixture
791#
792TESTSRC2 = \
793 $(TOP)\src\attach.c \
794 $(TOP)\src\backup.c \
795 $(TOP)\src\bitvec.c \
796 $(TOP)\src\btree.c \
797 $(TOP)\src\build.c \
798 $(TOP)\src\ctime.c \
799 $(TOP)\src\date.c \
800 $(TOP)\src\expr.c \
801 $(TOP)\src\func.c \
802 $(TOP)\src\insert.c \
803 $(TOP)\src\wal.c \
mistachkin06006632013-05-15 20:35:13 +0000804 $(TOP)\src\main.c \
shanehb2f20bf2011-06-17 07:07:24 +0000805 $(TOP)\src\mem5.c \
806 $(TOP)\src\os.c \
shanehb2f20bf2011-06-17 07:07:24 +0000807 $(TOP)\src\os_unix.c \
808 $(TOP)\src\os_win.c \
809 $(TOP)\src\pager.c \
810 $(TOP)\src\pragma.c \
811 $(TOP)\src\prepare.c \
812 $(TOP)\src\printf.c \
813 $(TOP)\src\random.c \
814 $(TOP)\src\pcache.c \
815 $(TOP)\src\pcache1.c \
816 $(TOP)\src\select.c \
817 $(TOP)\src\tokenize.c \
818 $(TOP)\src\utf.c \
819 $(TOP)\src\util.c \
820 $(TOP)\src\vdbeapi.c \
821 $(TOP)\src\vdbeaux.c \
822 $(TOP)\src\vdbe.c \
823 $(TOP)\src\vdbemem.c \
mistachkin81c428a2011-08-17 02:19:54 +0000824 $(TOP)\src\vdbesort.c \
shanehb2f20bf2011-06-17 07:07:24 +0000825 $(TOP)\src\vdbetrace.c \
826 $(TOP)\src\where.c \
827 parse.c \
828 $(TOP)\ext\fts3\fts3.c \
829 $(TOP)\ext\fts3\fts3_aux.c \
830 $(TOP)\ext\fts3\fts3_expr.c \
shanehb2f20bf2011-06-17 07:07:24 +0000831 $(TOP)\ext\fts3\fts3_tokenizer.c \
drh4d648c72013-04-22 17:07:56 +0000832 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +0000833 $(TOP)\ext\fts3\fts3_unicode.c \
834 $(TOP)\ext\fts3\fts3_unicode2.c \
shanehb2f20bf2011-06-17 07:07:24 +0000835 $(TOP)\ext\fts3\fts3_write.c \
836 $(TOP)\ext\async\sqlite3async.c
837
838# Header files used by all library source files.
839#
840HDR = \
841 $(TOP)\src\btree.h \
842 $(TOP)\src\btreeInt.h \
843 $(TOP)\src\hash.h \
844 $(TOP)\src\hwtime.h \
845 keywordhash.h \
846 $(TOP)\src\mutex.h \
847 opcodes.h \
848 $(TOP)\src\os.h \
849 $(TOP)\src\os_common.h \
850 $(TOP)\src\pager.h \
851 $(TOP)\src\pcache.h \
shaneh6e7850c2011-06-17 15:57:07 +0000852 parse.h \
853 sqlite3.h \
shanehb2f20bf2011-06-17 07:07:24 +0000854 $(TOP)\src\sqlite3ext.h \
shaneh6e7850c2011-06-17 15:57:07 +0000855 $(TOP)\src\sqliteInt.h \
shanehb2f20bf2011-06-17 07:07:24 +0000856 $(TOP)\src\sqliteLimit.h \
857 $(TOP)\src\vdbe.h \
drhe54df422013-11-12 18:37:25 +0000858 $(TOP)\src\vdbeInt.h \
859 $(TOP)\src\whereInt.h
shanehb2f20bf2011-06-17 07:07:24 +0000860
861# Header files used by extensions
862#
863EXTHDR = $(EXTHDR) \
864 $(TOP)\ext\fts1\fts1.h \
865 $(TOP)\ext\fts1\fts1_hash.h \
866 $(TOP)\ext\fts1\fts1_tokenizer.h
867EXTHDR = $(EXTHDR) \
868 $(TOP)\ext\fts2\fts2.h \
869 $(TOP)\ext\fts2\fts2_hash.h \
870 $(TOP)\ext\fts2\fts2_tokenizer.h
871EXTHDR = $(EXTHDR) \
872 $(TOP)\ext\fts3\fts3.h \
873 $(TOP)\ext\fts3\fts3Int.h \
874 $(TOP)\ext\fts3\fts3_hash.h \
875 $(TOP)\ext\fts3\fts3_tokenizer.h
876EXTHDR = $(EXTHDR) \
877 $(TOP)\ext\rtree\rtree.h
878EXTHDR = $(EXTHDR) \
879 $(TOP)\ext\icu\sqliteicu.h
880EXTHDR = $(EXTHDR) \
881 $(TOP)\ext\rtree\sqlite3rtree.h
882
883# This is the default Makefile target. The objects listed here
884# are what get build when you type just "make" with no arguments.
885#
mistachkin5b0b6fd2011-06-25 01:14:36 +0000886all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
shanehb2f20bf2011-06-17 07:07:24 +0000887
shanehb2f20bf2011-06-17 07:07:24 +0000888libsqlite3.lib: $(LIBOBJ)
shaneh29ebea82011-06-21 18:12:07 +0000889 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +0000890
891libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
mistachkinc756ded2011-10-02 05:23:16 +0000892 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +0000893
mistachkin08c1c312012-10-06 03:48:25 +0000894sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
shanehb2f20bf2011-06-17 07:07:24 +0000895 $(LTLINK) $(READLINE_FLAGS) \
shaneh2a0b9ef2011-06-20 20:52:32 +0000896 $(TOP)\src\shell.c \
mistachkin08c1c312012-10-06 03:48:25 +0000897 /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +0000898
drhbc94dbb2013-04-08 14:28:33 +0000899mptester.exe: $(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
900 $(LTLINK) $(TOP)\mptest\mptest.c \
901 /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
902
shanehb2f20bf2011-06-17 07:07:24 +0000903# This target creates a directory named "tsrc" and fills it with
904# copies of all of the C source code and header files needed to
905# build on the target system. Some of the C source code and header
906# files are automatically generated. This target takes care of
907# all that automatic generation.
908#
909.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl
910 -rmdir /S/Q tsrc
911 -mkdir tsrc
912 for %i in ($(SRC)) do copy /Y %i tsrc
913 del /Q tsrc\sqlite.h.in tsrc\parse.y
drh2dc06482013-12-11 00:59:10 +0000914 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
shanehb2f20bf2011-06-17 07:07:24 +0000915 move vdbe.new tsrc\vdbe.c
916 echo > .target_source
917
918sqlite3.c: .target_source $(TOP)\tool\mksqlite3c.tcl
919 $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl
drh339d6c62013-03-19 16:12:40 +0000920 copy tsrc\shell.c .
921 copy tsrc\sqlite3ext.h .
shanehb2f20bf2011-06-17 07:07:24 +0000922
mistachkin48dd9de2012-12-06 04:33:13 +0000923sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
924 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
drh75e7bc12011-07-22 11:23:49 +0000925
mistachkin76510912013-10-11 23:01:18 +0000926# Set the source code file to be used by executables and libraries when
927# they need the amalgamation.
928#
929!IF $(SPLIT_AMALGAMATION)!=0
930SQLITE3C = sqlite3-all.c
931!ELSE
932SQLITE3C = sqlite3.c
933!ENDIF
934
shanehb2f20bf2011-06-17 07:07:24 +0000935# Rule to build the amalgamation
936#
mistachkin76510912013-10-11 23:01:18 +0000937sqlite3.lo: $(SQLITE3C)
938 $(LTCOMPILE) -c $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +0000939
940# Rules to build the LEMON compiler generator
941#
942lempar.c: $(TOP)\src\lempar.c
943 copy $(TOP)\src\lempar.c .
944
945lemon.exe: $(TOP)\tool\lemon.c lempar.c
mistachkinbd58d5f2012-06-30 22:22:34 +0000946 $(BCC) -Daccess=_access -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +0000947
948# Rules to build individual *.lo files from generated *.c files. This
949# applies to:
950#
951# parse.lo
952# opcodes.lo
953#
954parse.lo: parse.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000955 $(LTCOMPILE) -c parse.c
shanehb2f20bf2011-06-17 07:07:24 +0000956
957opcodes.lo: opcodes.c
shaneh6e7850c2011-06-17 15:57:07 +0000958 $(LTCOMPILE) -c opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +0000959
mistachkin4d9d1f42012-09-03 10:32:32 +0000960# Rule to build the Win32 resources object file.
961#
mistachkin08c1c312012-10-06 03:48:25 +0000962!IF $(USE_RC)!=0
963$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR)
mistachkin4d9d1f42012-09-03 10:32:32 +0000964 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
mistachkin8ccc6d42012-09-27 21:03:53 +0000965 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
mistachkin4d9d1f42012-09-03 10:32:32 +0000966 echo #define SQLITE_RESOURCE_VERSION %%V \
mistachkin597a8c52012-09-03 11:14:53 +0000967 | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
mistachkin4d9d1f42012-09-03 10:32:32 +0000968 )
969 echo #endif >> sqlite3rc.h
mistachkin08c1c312012-10-06 03:48:25 +0000970 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
971!ENDIF
mistachkin4d9d1f42012-09-03 10:32:32 +0000972
shanehb2f20bf2011-06-17 07:07:24 +0000973# Rules to build individual *.lo files from files in the src directory.
974#
975alter.lo: $(TOP)\src\alter.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000976 $(LTCOMPILE) -c $(TOP)\src\alter.c
shanehb2f20bf2011-06-17 07:07:24 +0000977
978analyze.lo: $(TOP)\src\analyze.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000979 $(LTCOMPILE) -c $(TOP)\src\analyze.c
shanehb2f20bf2011-06-17 07:07:24 +0000980
981attach.lo: $(TOP)\src\attach.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000982 $(LTCOMPILE) -c $(TOP)\src\attach.c
shanehb2f20bf2011-06-17 07:07:24 +0000983
984auth.lo: $(TOP)\src\auth.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000985 $(LTCOMPILE) -c $(TOP)\src\auth.c
shanehb2f20bf2011-06-17 07:07:24 +0000986
987backup.lo: $(TOP)\src\backup.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000988 $(LTCOMPILE) -c $(TOP)\src\backup.c
shanehb2f20bf2011-06-17 07:07:24 +0000989
990bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000991 $(LTCOMPILE) -c $(TOP)\src\bitvec.c
shanehb2f20bf2011-06-17 07:07:24 +0000992
993btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000994 $(LTCOMPILE) -c $(TOP)\src\btmutex.c
shanehb2f20bf2011-06-17 07:07:24 +0000995
996btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
shaneh6e7850c2011-06-17 15:57:07 +0000997 $(LTCOMPILE) -c $(TOP)\src\btree.c
shanehb2f20bf2011-06-17 07:07:24 +0000998
999build.lo: $(TOP)\src\build.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001000 $(LTCOMPILE) -c $(TOP)\src\build.c
shanehb2f20bf2011-06-17 07:07:24 +00001001
1002callback.lo: $(TOP)\src\callback.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001003 $(LTCOMPILE) -c $(TOP)\src\callback.c
shanehb2f20bf2011-06-17 07:07:24 +00001004
1005complete.lo: $(TOP)\src\complete.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001006 $(LTCOMPILE) -c $(TOP)\src\complete.c
shanehb2f20bf2011-06-17 07:07:24 +00001007
1008ctime.lo: $(TOP)\src\ctime.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001009 $(LTCOMPILE) -c $(TOP)\src\ctime.c
shanehb2f20bf2011-06-17 07:07:24 +00001010
1011date.lo: $(TOP)\src\date.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001012 $(LTCOMPILE) -c $(TOP)\src\date.c
shanehb2f20bf2011-06-17 07:07:24 +00001013
1014delete.lo: $(TOP)\src\delete.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001015 $(LTCOMPILE) -c $(TOP)\src\delete.c
shanehb2f20bf2011-06-17 07:07:24 +00001016
1017expr.lo: $(TOP)\src\expr.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001018 $(LTCOMPILE) -c $(TOP)\src\expr.c
shanehb2f20bf2011-06-17 07:07:24 +00001019
1020fault.lo: $(TOP)\src\fault.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001021 $(LTCOMPILE) -c $(TOP)\src\fault.c
shanehb2f20bf2011-06-17 07:07:24 +00001022
1023fkey.lo: $(TOP)\src\fkey.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001024 $(LTCOMPILE) -c $(TOP)\src\fkey.c
shanehb2f20bf2011-06-17 07:07:24 +00001025
1026func.lo: $(TOP)\src\func.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001027 $(LTCOMPILE) -c $(TOP)\src\func.c
shanehb2f20bf2011-06-17 07:07:24 +00001028
1029global.lo: $(TOP)\src\global.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001030 $(LTCOMPILE) -c $(TOP)\src\global.c
shanehb2f20bf2011-06-17 07:07:24 +00001031
1032hash.lo: $(TOP)\src\hash.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001033 $(LTCOMPILE) -c $(TOP)\src\hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001034
1035insert.lo: $(TOP)\src\insert.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001036 $(LTCOMPILE) -c $(TOP)\src\insert.c
shanehb2f20bf2011-06-17 07:07:24 +00001037
1038journal.lo: $(TOP)\src\journal.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001039 $(LTCOMPILE) -c $(TOP)\src\journal.c
shanehb2f20bf2011-06-17 07:07:24 +00001040
1041legacy.lo: $(TOP)\src\legacy.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001042 $(LTCOMPILE) -c $(TOP)\src\legacy.c
shanehb2f20bf2011-06-17 07:07:24 +00001043
1044loadext.lo: $(TOP)\src\loadext.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001045 $(LTCOMPILE) -c $(TOP)\src\loadext.c
shanehb2f20bf2011-06-17 07:07:24 +00001046
1047main.lo: $(TOP)\src\main.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001048 $(LTCOMPILE) -c $(TOP)\src\main.c
shanehb2f20bf2011-06-17 07:07:24 +00001049
1050malloc.lo: $(TOP)\src\malloc.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001051 $(LTCOMPILE) -c $(TOP)\src\malloc.c
shanehb2f20bf2011-06-17 07:07:24 +00001052
1053mem0.lo: $(TOP)\src\mem0.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001054 $(LTCOMPILE) -c $(TOP)\src\mem0.c
shanehb2f20bf2011-06-17 07:07:24 +00001055
1056mem1.lo: $(TOP)\src\mem1.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001057 $(LTCOMPILE) -c $(TOP)\src\mem1.c
shanehb2f20bf2011-06-17 07:07:24 +00001058
1059mem2.lo: $(TOP)\src\mem2.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001060 $(LTCOMPILE) -c $(TOP)\src\mem2.c
shanehb2f20bf2011-06-17 07:07:24 +00001061
1062mem3.lo: $(TOP)\src\mem3.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001063 $(LTCOMPILE) -c $(TOP)\src\mem3.c
shanehb2f20bf2011-06-17 07:07:24 +00001064
1065mem5.lo: $(TOP)\src\mem5.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001066 $(LTCOMPILE) -c $(TOP)\src\mem5.c
shanehb2f20bf2011-06-17 07:07:24 +00001067
1068memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001069 $(LTCOMPILE) -c $(TOP)\src\memjournal.c
shanehb2f20bf2011-06-17 07:07:24 +00001070
1071mutex.lo: $(TOP)\src\mutex.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001072 $(LTCOMPILE) -c $(TOP)\src\mutex.c
shanehb2f20bf2011-06-17 07:07:24 +00001073
1074mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001075 $(LTCOMPILE) -c $(TOP)\src\mutex_noop.c
shanehb2f20bf2011-06-17 07:07:24 +00001076
shanehb2f20bf2011-06-17 07:07:24 +00001077mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001078 $(LTCOMPILE) -c $(TOP)\src\mutex_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001079
1080mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001081 $(LTCOMPILE) -c $(TOP)\src\mutex_w32.c
shanehb2f20bf2011-06-17 07:07:24 +00001082
1083notify.lo: $(TOP)\src\notify.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001084 $(LTCOMPILE) -c $(TOP)\src\notify.c
shanehb2f20bf2011-06-17 07:07:24 +00001085
1086pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
shaneh6e7850c2011-06-17 15:57:07 +00001087 $(LTCOMPILE) -c $(TOP)\src\pager.c
shanehb2f20bf2011-06-17 07:07:24 +00001088
1089pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
shaneh6e7850c2011-06-17 15:57:07 +00001090 $(LTCOMPILE) -c $(TOP)\src\pcache.c
shanehb2f20bf2011-06-17 07:07:24 +00001091
1092pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
shaneh6e7850c2011-06-17 15:57:07 +00001093 $(LTCOMPILE) -c $(TOP)\src\pcache1.c
shanehb2f20bf2011-06-17 07:07:24 +00001094
1095os.lo: $(TOP)\src\os.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001096 $(LTCOMPILE) -c $(TOP)\src\os.c
shanehb2f20bf2011-06-17 07:07:24 +00001097
1098os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001099 $(LTCOMPILE) -c $(TOP)\src\os_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001100
1101os_win.lo: $(TOP)\src\os_win.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001102 $(LTCOMPILE) -c $(TOP)\src\os_win.c
shanehb2f20bf2011-06-17 07:07:24 +00001103
shanehb2f20bf2011-06-17 07:07:24 +00001104pragma.lo: $(TOP)\src\pragma.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001105 $(LTCOMPILE) -c $(TOP)\src\pragma.c
shanehb2f20bf2011-06-17 07:07:24 +00001106
1107prepare.lo: $(TOP)\src\prepare.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001108 $(LTCOMPILE) -c $(TOP)\src\prepare.c
shanehb2f20bf2011-06-17 07:07:24 +00001109
1110printf.lo: $(TOP)\src\printf.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001111 $(LTCOMPILE) -c $(TOP)\src\printf.c
shanehb2f20bf2011-06-17 07:07:24 +00001112
1113random.lo: $(TOP)\src\random.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001114 $(LTCOMPILE) -c $(TOP)\src\random.c
shanehb2f20bf2011-06-17 07:07:24 +00001115
1116resolve.lo: $(TOP)\src\resolve.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001117 $(LTCOMPILE) -c $(TOP)\src\resolve.c
shanehb2f20bf2011-06-17 07:07:24 +00001118
1119rowset.lo: $(TOP)\src\rowset.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001120 $(LTCOMPILE) -c $(TOP)\src\rowset.c
shanehb2f20bf2011-06-17 07:07:24 +00001121
1122select.lo: $(TOP)\src\select.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001123 $(LTCOMPILE) -c $(TOP)\src\select.c
shanehb2f20bf2011-06-17 07:07:24 +00001124
1125status.lo: $(TOP)\src\status.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001126 $(LTCOMPILE) -c $(TOP)\src\status.c
shanehb2f20bf2011-06-17 07:07:24 +00001127
1128table.lo: $(TOP)\src\table.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001129 $(LTCOMPILE) -c $(TOP)\src\table.c
shanehb2f20bf2011-06-17 07:07:24 +00001130
1131tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001132 $(LTCOMPILE) -c $(TOP)\src\tokenize.c
shanehb2f20bf2011-06-17 07:07:24 +00001133
1134trigger.lo: $(TOP)\src\trigger.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001135 $(LTCOMPILE) -c $(TOP)\src\trigger.c
shanehb2f20bf2011-06-17 07:07:24 +00001136
1137update.lo: $(TOP)\src\update.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001138 $(LTCOMPILE) -c $(TOP)\src\update.c
shanehb2f20bf2011-06-17 07:07:24 +00001139
1140utf.lo: $(TOP)\src\utf.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001141 $(LTCOMPILE) -c $(TOP)\src\utf.c
shanehb2f20bf2011-06-17 07:07:24 +00001142
1143util.lo: $(TOP)\src\util.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001144 $(LTCOMPILE) -c $(TOP)\src\util.c
shanehb2f20bf2011-06-17 07:07:24 +00001145
1146vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001147 $(LTCOMPILE) -c $(TOP)\src\vacuum.c
shanehb2f20bf2011-06-17 07:07:24 +00001148
1149vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001150 $(LTCOMPILE) -c $(TOP)\src\vdbe.c
shanehb2f20bf2011-06-17 07:07:24 +00001151
1152vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001153 $(LTCOMPILE) -c $(TOP)\src\vdbeapi.c
shanehb2f20bf2011-06-17 07:07:24 +00001154
1155vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001156 $(LTCOMPILE) -c $(TOP)\src\vdbeaux.c
shanehb2f20bf2011-06-17 07:07:24 +00001157
1158vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001159 $(LTCOMPILE) -c $(TOP)\src\vdbeblob.c
shanehb2f20bf2011-06-17 07:07:24 +00001160
1161vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001162 $(LTCOMPILE) -c $(TOP)\src\vdbemem.c
shanehb2f20bf2011-06-17 07:07:24 +00001163
mistachkin81c428a2011-08-17 02:19:54 +00001164vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
1165 $(LTCOMPILE) -c $(TOP)\src\vdbesort.c
1166
shanehb2f20bf2011-06-17 07:07:24 +00001167vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001168 $(LTCOMPILE) -c $(TOP)\src\vdbetrace.c
shanehb2f20bf2011-06-17 07:07:24 +00001169
1170vtab.lo: $(TOP)\src\vtab.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001171 $(LTCOMPILE) -c $(TOP)\src\vtab.c
shanehb2f20bf2011-06-17 07:07:24 +00001172
1173wal.lo: $(TOP)\src\wal.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001174 $(LTCOMPILE) -c $(TOP)\src\wal.c
shanehb2f20bf2011-06-17 07:07:24 +00001175
1176walker.lo: $(TOP)\src\walker.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001177 $(LTCOMPILE) -c $(TOP)\src\walker.c
shanehb2f20bf2011-06-17 07:07:24 +00001178
1179where.lo: $(TOP)\src\where.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001180 $(LTCOMPILE) -c $(TOP)\src\where.c
shanehb2f20bf2011-06-17 07:07:24 +00001181
1182tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
1183 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1184
1185tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
1186 $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1187
mistachkin08c1c312012-10-06 03:48:25 +00001188tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS)
1189 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001190
1191# Rules to build opcodes.c and opcodes.h
1192#
1193opcodes.c: opcodes.h $(TOP)\mkopcodec.awk
drh307ff302011-08-30 01:29:04 +00001194 $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +00001195
1196opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk
mistachkin5b0b6fd2011-06-25 01:14:36 +00001197 type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h
shanehb2f20bf2011-06-17 07:07:24 +00001198
1199# Rules to build parse.c and parse.h - the outputs of lemon.
1200#
1201parse.h: parse.c
1202
1203parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
shaneh6e7850c2011-06-17 15:57:07 +00001204 del /Q parse.y parse.h parse.h.temp
shanehb2f20bf2011-06-17 07:07:24 +00001205 copy $(TOP)\src\parse.y .
shanehb2f20bf2011-06-17 07:07:24 +00001206 .\lemon.exe $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
1207 move parse.h parse.h.temp
mistachkin5b0b6fd2011-06-25 01:14:36 +00001208 $(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
shanehb2f20bf2011-06-17 07:07:24 +00001209
1210sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
mistachkin5b0b6fd2011-06-25 01:14:36 +00001211 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP) > sqlite3.h
shanehb2f20bf2011-06-17 07:07:24 +00001212
1213mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
mistachkinbd58d5f2012-06-30 22:22:34 +00001214 $(BCC) -Fe$@ $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +00001215
1216keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
mistachkin5b0b6fd2011-06-25 01:14:36 +00001217 .\mkkeywordhash.exe > keywordhash.h
shanehb2f20bf2011-06-17 07:07:24 +00001218
1219
1220
1221# Rules to build the extension objects.
1222#
1223icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1224 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1225
1226fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1227 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1228
1229fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
1230 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
1231
1232fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
1233 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
1234
1235fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
1236 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
1237
1238fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
1239 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
1240
1241fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
1242 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
1243
1244fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
1245 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
1246
1247fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
1248 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
1249
1250fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
1251 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
1252
1253fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
1254 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
1255
1256fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
1257 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
1258
1259fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
1260 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
1261
1262fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
1263 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
1264
1265fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
1266 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
1267
1268fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
1269 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
1270
drh4d648c72013-04-22 17:07:56 +00001271fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1272 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
1273
drh391d4ba2012-05-28 20:22:16 +00001274fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
1275 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
1276
1277fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
1278 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
1279
shanehb2f20bf2011-06-17 07:07:24 +00001280fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
1281 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
1282
1283rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
1284 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
1285
1286
1287# Rules to build the 'testfixture' application.
1288#
1289# If using the amalgamation, use sqlite3.c directly to build the test
1290# fixture. Otherwise link against libsqlite3.lib. (This distinction is
1291# necessary because the test fixture requires non-API symbols which are
1292# hidden when the library is built via the amalgamation).
1293#
1294TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
shaneh6e7850c2011-06-17 15:57:07 +00001295TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
shanehb2f20bf2011-06-17 07:07:24 +00001296
drh1fb64af2013-04-25 14:36:28 +00001297TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib
mistachkin76510912013-10-11 23:01:18 +00001298TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +00001299!IF $(USE_AMALGAMATION)==0
1300TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1301!ELSE
1302TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1303!ENDIF
1304
mistachkin08c1c312012-10-06 03:48:25 +00001305testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001306 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
shanehb2f20bf2011-06-17 07:07:24 +00001307 -DBUILD_sqlite -I$(TCLINCDIR) \
shaneh2a0b9ef2011-06-20 20:52:32 +00001308 $(TESTFIXTURE_SRC) \
mistachkin08c1c312012-10-06 03:48:25 +00001309 /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001310
1311fulltest: testfixture.exe sqlite3.exe
1312 .\testfixture.exe $(TOP)\test\all.test
1313
1314soaktest: testfixture.exe sqlite3.exe
1315 .\testfixture.exe $(TOP)\test\all.test -soak=1
1316
mistachkinc60941f2012-09-13 01:51:02 +00001317fulltestonly: testfixture.exe sqlite3.exe
1318 .\testfixture.exe $(TOP)\test\full.test
1319
mistachkin036acf32013-07-20 00:34:31 +00001320queryplantest: testfixture.exe sqlite3.exe
1321 .\testfixture.exe $(TOP)\test\permutations.test queryplanner
1322
shanehb2f20bf2011-06-17 07:07:24 +00001323test: testfixture.exe sqlite3.exe
1324 .\testfixture.exe $(TOP)\test\veryquick.test
1325
mistachkin76510912013-10-11 23:01:18 +00001326sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
1327 copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@
mistachkin9a55e312011-09-22 00:06:44 +00001328 echo static const char *tclsh_main_loop(void){ >> $@
1329 echo static const char *zMainloop = >> $@
1330 $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
1331 echo ; return zMainloop; } >> $@
shanehb2f20bf2011-06-17 07:07:24 +00001332
mistachkin08c1c312012-10-06 03:48:25 +00001333sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
mistachkin9a55e312011-09-22 00:06:44 +00001334 $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
mistachkin08c1c312012-10-06 03:48:25 +00001335 /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001336
mistachkin16175772013-11-23 04:22:19 +00001337showdb.exe: $(TOP)\tool\showdb.c sqlite3.c
drh9ac3c1e2013-11-07 18:37:31 +00001338 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o $@ \
mistachkin16175772013-11-23 04:22:19 +00001339 $(TOP)\tool\showdb.c sqlite3.c
drh9ac3c1e2013-11-07 18:37:31 +00001340
mistachkin16175772013-11-23 04:22:19 +00001341wordcount.exe: $(TOP)\test\wordcount.c sqlite3.c
drh9ac3c1e2013-11-07 18:37:31 +00001342 $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o $@ \
mistachkin16175772013-11-23 04:22:19 +00001343 $(TOP)\test\wordcount.c sqlite3.c
drh9ac3c1e2013-11-07 18:37:31 +00001344
mistachkin16175772013-11-23 04:22:19 +00001345speedtest1.exe: $(TOP)\test\speedtest1.c sqlite3.c
drhad1ca9a2013-11-23 04:16:58 +00001346 $(LTLINK) -DSQLITE_OMIT_LOAD_EXTENSION -o $@ \
mistachkin16175772013-11-23 04:22:19 +00001347 $(TOP)\test\speedtest1.c sqlite3.c
drhad1ca9a2013-11-23 04:16:58 +00001348
shaneh6e7850c2011-06-17 15:57:07 +00001349clean:
mistachkin649591a2011-09-11 10:14:37 +00001350 del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
mistachkin0157e012013-09-06 21:41:11 +00001351 del /Q *.cod *.da *.bb *.bbg gmon.out
shanehb2f20bf2011-06-17 07:07:24 +00001352 del /Q sqlite3.h opcodes.c opcodes.h
1353 del /Q lemon.exe lempar.c parse.*
1354 del /Q mkkeywordhash.exe keywordhash.h
mistachkinb482a442012-02-11 22:19:26 +00001355 -rmdir /Q/S .deps
1356 -rmdir /Q/S .libs
mistachkinf8a78462012-03-08 20:00:36 +00001357 -rmdir /Q/S quota2a
1358 -rmdir /Q/S quota2b
1359 -rmdir /Q/S quota2c
shanehb2f20bf2011-06-17 07:07:24 +00001360 -rmdir /Q/S tsrc
1361 del /Q .target_source
mistachkin0f104d52012-09-03 11:01:21 +00001362 del /Q tclsqlite3.exe tclsqlite3.exp
shaneh603e4262011-06-17 18:52:07 +00001363 del /Q testfixture.exe testfixture.exp test.db
shaneh6e7850c2011-06-17 15:57:07 +00001364 del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
mistachkin76510912013-10-11 23:01:18 +00001365 del /Q sqlite3.c sqlite3-*.c
mistachkin4d9d1f42012-09-03 10:32:32 +00001366 del /Q sqlite3rc.h
mistachkinfde3b1c72013-03-29 19:52:04 +00001367 del /Q shell.c sqlite3ext.h
mistachkin9a55e312011-09-22 00:06:44 +00001368 del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c
mistachkin29b75bd2012-10-20 09:35:57 +00001369 del /Q sqlite-*-output.vsix
drhbc94dbb2013-04-08 14:28:33 +00001370 del /Q mptester.exe
shanehb2f20bf2011-06-17 07:07:24 +00001371
mistachkin4d9d1f42012-09-03 10:32:32 +00001372# Dynamic link library section.
shanehb2f20bf2011-06-17 07:07:24 +00001373#
1374dll: sqlite3.dll
1375
shaneh6e7850c2011-06-17 15:57:07 +00001376sqlite3.def: libsqlite3.lib
mistachkin5b0b6fd2011-06-25 01:14:36 +00001377 echo EXPORTS > sqlite3.def
shaneh6e7850c2011-06-17 15:57:07 +00001378 dumpbin /all libsqlite3.lib \
mistachkin6a3eb4a2011-08-17 07:46:48 +00001379 | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
mistachkin5b0b6fd2011-06-25 01:14:36 +00001380 | sort >> sqlite3.def
shanehb2f20bf2011-06-17 07:07:24 +00001381
mistachkin08c1c312012-10-06 03:48:25 +00001382sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def
1383 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)