blob: b9aeea334b8b02f226a6ca33124e6cdac05f43dc [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
165NCC = "$(VCINSTALLDIR)\bin\cl.exe"
166NCC = $(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 \
671 $(TOP)\src\where.c
672
673# Source code for extensions
674#
675SRC = $(SRC) \
676 $(TOP)\ext\fts1\fts1.c \
677 $(TOP)\ext\fts1\fts1.h \
678 $(TOP)\ext\fts1\fts1_hash.c \
679 $(TOP)\ext\fts1\fts1_hash.h \
680 $(TOP)\ext\fts1\fts1_porter.c \
681 $(TOP)\ext\fts1\fts1_tokenizer.h \
682 $(TOP)\ext\fts1\fts1_tokenizer1.c
683SRC = $(SRC) \
684 $(TOP)\ext\fts2\fts2.c \
685 $(TOP)\ext\fts2\fts2.h \
686 $(TOP)\ext\fts2\fts2_hash.c \
687 $(TOP)\ext\fts2\fts2_hash.h \
688 $(TOP)\ext\fts2\fts2_icu.c \
689 $(TOP)\ext\fts2\fts2_porter.c \
690 $(TOP)\ext\fts2\fts2_tokenizer.h \
691 $(TOP)\ext\fts2\fts2_tokenizer.c \
692 $(TOP)\ext\fts2\fts2_tokenizer1.c
693SRC = $(SRC) \
694 $(TOP)\ext\fts3\fts3.c \
695 $(TOP)\ext\fts3\fts3.h \
696 $(TOP)\ext\fts3\fts3Int.h \
697 $(TOP)\ext\fts3\fts3_aux.c \
698 $(TOP)\ext\fts3\fts3_expr.c \
699 $(TOP)\ext\fts3\fts3_hash.c \
700 $(TOP)\ext\fts3\fts3_hash.h \
701 $(TOP)\ext\fts3\fts3_icu.c \
702 $(TOP)\ext\fts3\fts3_porter.c \
703 $(TOP)\ext\fts3\fts3_snippet.c \
704 $(TOP)\ext\fts3\fts3_tokenizer.h \
705 $(TOP)\ext\fts3\fts3_tokenizer.c \
706 $(TOP)\ext\fts3\fts3_tokenizer1.c \
drh4d648c72013-04-22 17:07:56 +0000707 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +0000708 $(TOP)\ext\fts3\fts3_unicode.c \
709 $(TOP)\ext\fts3\fts3_unicode2.c \
shanehb2f20bf2011-06-17 07:07:24 +0000710 $(TOP)\ext\fts3\fts3_write.c
711SRC = $(SRC) \
712 $(TOP)\ext\icu\sqliteicu.h \
713 $(TOP)\ext\icu\icu.c
714SRC = $(SRC) \
715 $(TOP)\ext\rtree\rtree.h \
716 $(TOP)\ext\rtree\rtree.c
717
718
719# Generated source code files
720#
721SRC = $(SRC) \
722 keywordhash.h \
723 opcodes.c \
724 opcodes.h \
725 parse.c \
726 parse.h \
727 sqlite3.h
728
729# Source code to the test files.
730#
731TESTSRC = \
732 $(TOP)\src\test1.c \
733 $(TOP)\src\test2.c \
734 $(TOP)\src\test3.c \
735 $(TOP)\src\test4.c \
736 $(TOP)\src\test5.c \
737 $(TOP)\src\test6.c \
738 $(TOP)\src\test7.c \
739 $(TOP)\src\test8.c \
740 $(TOP)\src\test9.c \
741 $(TOP)\src\test_autoext.c \
742 $(TOP)\src\test_async.c \
743 $(TOP)\src\test_backup.c \
744 $(TOP)\src\test_btree.c \
745 $(TOP)\src\test_config.c \
746 $(TOP)\src\test_demovfs.c \
747 $(TOP)\src\test_devsym.c \
mistachkin413c63b2013-01-17 03:18:14 +0000748 $(TOP)\src\test_fs.c \
shanehb2f20bf2011-06-17 07:07:24 +0000749 $(TOP)\src\test_func.c \
shanehb2f20bf2011-06-17 07:07:24 +0000750 $(TOP)\src\test_hexio.c \
751 $(TOP)\src\test_init.c \
752 $(TOP)\src\test_intarray.c \
753 $(TOP)\src\test_journal.c \
754 $(TOP)\src\test_malloc.c \
755 $(TOP)\src\test_multiplex.c \
756 $(TOP)\src\test_mutex.c \
757 $(TOP)\src\test_onefile.c \
758 $(TOP)\src\test_osinst.c \
759 $(TOP)\src\test_pcache.c \
760 $(TOP)\src\test_quota.c \
761 $(TOP)\src\test_rtree.c \
762 $(TOP)\src\test_schema.c \
763 $(TOP)\src\test_server.c \
764 $(TOP)\src\test_superlock.c \
765 $(TOP)\src\test_syscall.c \
766 $(TOP)\src\test_stat.c \
767 $(TOP)\src\test_tclvar.c \
768 $(TOP)\src\test_thread.c \
769 $(TOP)\src\test_vfs.c \
shanehb2f20bf2011-06-17 07:07:24 +0000770 $(TOP)\src\test_wsd.c \
771 $(TOP)\ext\fts3\fts3_term.c \
shaneh6e7850c2011-06-17 15:57:07 +0000772 $(TOP)\ext\fts3\fts3_test.c
shanehb2f20bf2011-06-17 07:07:24 +0000773
drhe50db1c2013-04-25 14:31:46 +0000774# Statically linked extensions
775#
drh1fb64af2013-04-25 14:36:28 +0000776TESTEXT = \
drh8416fc72013-04-25 16:42:55 +0000777 $(TOP)\ext\misc\amatch.c \
778 $(TOP)\ext\misc\closure.c \
drhe50db1c2013-04-25 14:31:46 +0000779 $(TOP)\ext\misc\fuzzer.c \
drh8416fc72013-04-25 16:42:55 +0000780 $(TOP)\ext\misc\ieee754.c \
drhea41dc42013-04-25 19:31:33 +0000781 $(TOP)\ext\misc\nextchar.c \
drhdef33672013-05-28 20:25:54 +0000782 $(TOP)\ext\misc\percentile.c \
drhe50db1c2013-04-25 14:31:46 +0000783 $(TOP)\ext\misc\regexp.c \
drhb7045ab2013-04-25 14:59:01 +0000784 $(TOP)\ext\misc\spellfix.c \
drh5f8cdac2013-10-14 21:14:42 +0000785 $(TOP)\ext\misc\totype.c \
drhe50db1c2013-04-25 14:31:46 +0000786 $(TOP)\ext\misc\wholenumber.c
787
788
shanehb2f20bf2011-06-17 07:07:24 +0000789# Source code to the library files needed by the test fixture
790#
791TESTSRC2 = \
792 $(TOP)\src\attach.c \
793 $(TOP)\src\backup.c \
794 $(TOP)\src\bitvec.c \
795 $(TOP)\src\btree.c \
796 $(TOP)\src\build.c \
797 $(TOP)\src\ctime.c \
798 $(TOP)\src\date.c \
799 $(TOP)\src\expr.c \
800 $(TOP)\src\func.c \
801 $(TOP)\src\insert.c \
802 $(TOP)\src\wal.c \
mistachkin06006632013-05-15 20:35:13 +0000803 $(TOP)\src\main.c \
shanehb2f20bf2011-06-17 07:07:24 +0000804 $(TOP)\src\mem5.c \
805 $(TOP)\src\os.c \
shanehb2f20bf2011-06-17 07:07:24 +0000806 $(TOP)\src\os_unix.c \
807 $(TOP)\src\os_win.c \
808 $(TOP)\src\pager.c \
809 $(TOP)\src\pragma.c \
810 $(TOP)\src\prepare.c \
811 $(TOP)\src\printf.c \
812 $(TOP)\src\random.c \
813 $(TOP)\src\pcache.c \
814 $(TOP)\src\pcache1.c \
815 $(TOP)\src\select.c \
816 $(TOP)\src\tokenize.c \
817 $(TOP)\src\utf.c \
818 $(TOP)\src\util.c \
819 $(TOP)\src\vdbeapi.c \
820 $(TOP)\src\vdbeaux.c \
821 $(TOP)\src\vdbe.c \
822 $(TOP)\src\vdbemem.c \
mistachkin81c428a2011-08-17 02:19:54 +0000823 $(TOP)\src\vdbesort.c \
shanehb2f20bf2011-06-17 07:07:24 +0000824 $(TOP)\src\vdbetrace.c \
825 $(TOP)\src\where.c \
826 parse.c \
827 $(TOP)\ext\fts3\fts3.c \
828 $(TOP)\ext\fts3\fts3_aux.c \
829 $(TOP)\ext\fts3\fts3_expr.c \
shanehb2f20bf2011-06-17 07:07:24 +0000830 $(TOP)\ext\fts3\fts3_tokenizer.c \
drh4d648c72013-04-22 17:07:56 +0000831 $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
drh391d4ba2012-05-28 20:22:16 +0000832 $(TOP)\ext\fts3\fts3_unicode.c \
833 $(TOP)\ext\fts3\fts3_unicode2.c \
shanehb2f20bf2011-06-17 07:07:24 +0000834 $(TOP)\ext\fts3\fts3_write.c \
835 $(TOP)\ext\async\sqlite3async.c
836
837# Header files used by all library source files.
838#
839HDR = \
840 $(TOP)\src\btree.h \
841 $(TOP)\src\btreeInt.h \
842 $(TOP)\src\hash.h \
843 $(TOP)\src\hwtime.h \
844 keywordhash.h \
845 $(TOP)\src\mutex.h \
846 opcodes.h \
847 $(TOP)\src\os.h \
848 $(TOP)\src\os_common.h \
849 $(TOP)\src\pager.h \
850 $(TOP)\src\pcache.h \
shaneh6e7850c2011-06-17 15:57:07 +0000851 parse.h \
852 sqlite3.h \
shanehb2f20bf2011-06-17 07:07:24 +0000853 $(TOP)\src\sqlite3ext.h \
shaneh6e7850c2011-06-17 15:57:07 +0000854 $(TOP)\src\sqliteInt.h \
shanehb2f20bf2011-06-17 07:07:24 +0000855 $(TOP)\src\sqliteLimit.h \
856 $(TOP)\src\vdbe.h \
857 $(TOP)\src\vdbeInt.h
858
859# Header files used by extensions
860#
861EXTHDR = $(EXTHDR) \
862 $(TOP)\ext\fts1\fts1.h \
863 $(TOP)\ext\fts1\fts1_hash.h \
864 $(TOP)\ext\fts1\fts1_tokenizer.h
865EXTHDR = $(EXTHDR) \
866 $(TOP)\ext\fts2\fts2.h \
867 $(TOP)\ext\fts2\fts2_hash.h \
868 $(TOP)\ext\fts2\fts2_tokenizer.h
869EXTHDR = $(EXTHDR) \
870 $(TOP)\ext\fts3\fts3.h \
871 $(TOP)\ext\fts3\fts3Int.h \
872 $(TOP)\ext\fts3\fts3_hash.h \
873 $(TOP)\ext\fts3\fts3_tokenizer.h
874EXTHDR = $(EXTHDR) \
875 $(TOP)\ext\rtree\rtree.h
876EXTHDR = $(EXTHDR) \
877 $(TOP)\ext\icu\sqliteicu.h
878EXTHDR = $(EXTHDR) \
879 $(TOP)\ext\rtree\sqlite3rtree.h
880
881# This is the default Makefile target. The objects listed here
882# are what get build when you type just "make" with no arguments.
883#
mistachkin5b0b6fd2011-06-25 01:14:36 +0000884all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
shanehb2f20bf2011-06-17 07:07:24 +0000885
shanehb2f20bf2011-06-17 07:07:24 +0000886libsqlite3.lib: $(LIBOBJ)
shaneh29ebea82011-06-21 18:12:07 +0000887 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +0000888
889libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
mistachkinc756ded2011-10-02 05:23:16 +0000890 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +0000891
mistachkin08c1c312012-10-06 03:48:25 +0000892sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
shanehb2f20bf2011-06-17 07:07:24 +0000893 $(LTLINK) $(READLINE_FLAGS) \
shaneh2a0b9ef2011-06-20 20:52:32 +0000894 $(TOP)\src\shell.c \
mistachkin08c1c312012-10-06 03:48:25 +0000895 /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +0000896
drhbc94dbb2013-04-08 14:28:33 +0000897mptester.exe: $(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
898 $(LTLINK) $(TOP)\mptest\mptest.c \
899 /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
900
shanehb2f20bf2011-06-17 07:07:24 +0000901# This target creates a directory named "tsrc" and fills it with
902# copies of all of the C source code and header files needed to
903# build on the target system. Some of the C source code and header
904# files are automatically generated. This target takes care of
905# all that automatic generation.
906#
907.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl
908 -rmdir /S/Q tsrc
909 -mkdir tsrc
910 for %i in ($(SRC)) do copy /Y %i tsrc
911 del /Q tsrc\sqlite.h.in tsrc\parse.y
mistachkin5b0b6fd2011-06-25 01:14:36 +0000912 $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl < tsrc\vdbe.c > vdbe.new
shanehb2f20bf2011-06-17 07:07:24 +0000913 move vdbe.new tsrc\vdbe.c
914 echo > .target_source
915
916sqlite3.c: .target_source $(TOP)\tool\mksqlite3c.tcl
917 $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl
drh339d6c62013-03-19 16:12:40 +0000918 copy tsrc\shell.c .
919 copy tsrc\sqlite3ext.h .
shanehb2f20bf2011-06-17 07:07:24 +0000920
mistachkin48dd9de2012-12-06 04:33:13 +0000921sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
922 $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
drh75e7bc12011-07-22 11:23:49 +0000923
mistachkin76510912013-10-11 23:01:18 +0000924# Set the source code file to be used by executables and libraries when
925# they need the amalgamation.
926#
927!IF $(SPLIT_AMALGAMATION)!=0
928SQLITE3C = sqlite3-all.c
929!ELSE
930SQLITE3C = sqlite3.c
931!ENDIF
932
shanehb2f20bf2011-06-17 07:07:24 +0000933# Rule to build the amalgamation
934#
mistachkin76510912013-10-11 23:01:18 +0000935sqlite3.lo: $(SQLITE3C)
936 $(LTCOMPILE) -c $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +0000937
938# Rules to build the LEMON compiler generator
939#
940lempar.c: $(TOP)\src\lempar.c
941 copy $(TOP)\src\lempar.c .
942
943lemon.exe: $(TOP)\tool\lemon.c lempar.c
mistachkinbd58d5f2012-06-30 22:22:34 +0000944 $(BCC) -Daccess=_access -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +0000945
946# Rules to build individual *.lo files from generated *.c files. This
947# applies to:
948#
949# parse.lo
950# opcodes.lo
951#
952parse.lo: parse.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000953 $(LTCOMPILE) -c parse.c
shanehb2f20bf2011-06-17 07:07:24 +0000954
955opcodes.lo: opcodes.c
shaneh6e7850c2011-06-17 15:57:07 +0000956 $(LTCOMPILE) -c opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +0000957
mistachkin4d9d1f42012-09-03 10:32:32 +0000958# Rule to build the Win32 resources object file.
959#
mistachkin08c1c312012-10-06 03:48:25 +0000960!IF $(USE_RC)!=0
961$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR)
mistachkin4d9d1f42012-09-03 10:32:32 +0000962 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
mistachkin8ccc6d42012-09-27 21:03:53 +0000963 for /F %%V in ('type "$(TOP)\VERSION"') do ( \
mistachkin4d9d1f42012-09-03 10:32:32 +0000964 echo #define SQLITE_RESOURCE_VERSION %%V \
mistachkin597a8c52012-09-03 11:14:53 +0000965 | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
mistachkin4d9d1f42012-09-03 10:32:32 +0000966 )
967 echo #endif >> sqlite3rc.h
mistachkin08c1c312012-10-06 03:48:25 +0000968 $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
969!ENDIF
mistachkin4d9d1f42012-09-03 10:32:32 +0000970
shanehb2f20bf2011-06-17 07:07:24 +0000971# Rules to build individual *.lo files from files in the src directory.
972#
973alter.lo: $(TOP)\src\alter.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000974 $(LTCOMPILE) -c $(TOP)\src\alter.c
shanehb2f20bf2011-06-17 07:07:24 +0000975
976analyze.lo: $(TOP)\src\analyze.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000977 $(LTCOMPILE) -c $(TOP)\src\analyze.c
shanehb2f20bf2011-06-17 07:07:24 +0000978
979attach.lo: $(TOP)\src\attach.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000980 $(LTCOMPILE) -c $(TOP)\src\attach.c
shanehb2f20bf2011-06-17 07:07:24 +0000981
982auth.lo: $(TOP)\src\auth.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000983 $(LTCOMPILE) -c $(TOP)\src\auth.c
shanehb2f20bf2011-06-17 07:07:24 +0000984
985backup.lo: $(TOP)\src\backup.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000986 $(LTCOMPILE) -c $(TOP)\src\backup.c
shanehb2f20bf2011-06-17 07:07:24 +0000987
988bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000989 $(LTCOMPILE) -c $(TOP)\src\bitvec.c
shanehb2f20bf2011-06-17 07:07:24 +0000990
991btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000992 $(LTCOMPILE) -c $(TOP)\src\btmutex.c
shanehb2f20bf2011-06-17 07:07:24 +0000993
994btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
shaneh6e7850c2011-06-17 15:57:07 +0000995 $(LTCOMPILE) -c $(TOP)\src\btree.c
shanehb2f20bf2011-06-17 07:07:24 +0000996
997build.lo: $(TOP)\src\build.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +0000998 $(LTCOMPILE) -c $(TOP)\src\build.c
shanehb2f20bf2011-06-17 07:07:24 +0000999
1000callback.lo: $(TOP)\src\callback.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001001 $(LTCOMPILE) -c $(TOP)\src\callback.c
shanehb2f20bf2011-06-17 07:07:24 +00001002
1003complete.lo: $(TOP)\src\complete.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001004 $(LTCOMPILE) -c $(TOP)\src\complete.c
shanehb2f20bf2011-06-17 07:07:24 +00001005
1006ctime.lo: $(TOP)\src\ctime.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001007 $(LTCOMPILE) -c $(TOP)\src\ctime.c
shanehb2f20bf2011-06-17 07:07:24 +00001008
1009date.lo: $(TOP)\src\date.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001010 $(LTCOMPILE) -c $(TOP)\src\date.c
shanehb2f20bf2011-06-17 07:07:24 +00001011
1012delete.lo: $(TOP)\src\delete.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001013 $(LTCOMPILE) -c $(TOP)\src\delete.c
shanehb2f20bf2011-06-17 07:07:24 +00001014
1015expr.lo: $(TOP)\src\expr.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001016 $(LTCOMPILE) -c $(TOP)\src\expr.c
shanehb2f20bf2011-06-17 07:07:24 +00001017
1018fault.lo: $(TOP)\src\fault.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001019 $(LTCOMPILE) -c $(TOP)\src\fault.c
shanehb2f20bf2011-06-17 07:07:24 +00001020
1021fkey.lo: $(TOP)\src\fkey.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001022 $(LTCOMPILE) -c $(TOP)\src\fkey.c
shanehb2f20bf2011-06-17 07:07:24 +00001023
1024func.lo: $(TOP)\src\func.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001025 $(LTCOMPILE) -c $(TOP)\src\func.c
shanehb2f20bf2011-06-17 07:07:24 +00001026
1027global.lo: $(TOP)\src\global.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001028 $(LTCOMPILE) -c $(TOP)\src\global.c
shanehb2f20bf2011-06-17 07:07:24 +00001029
1030hash.lo: $(TOP)\src\hash.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001031 $(LTCOMPILE) -c $(TOP)\src\hash.c
shanehb2f20bf2011-06-17 07:07:24 +00001032
1033insert.lo: $(TOP)\src\insert.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001034 $(LTCOMPILE) -c $(TOP)\src\insert.c
shanehb2f20bf2011-06-17 07:07:24 +00001035
1036journal.lo: $(TOP)\src\journal.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001037 $(LTCOMPILE) -c $(TOP)\src\journal.c
shanehb2f20bf2011-06-17 07:07:24 +00001038
1039legacy.lo: $(TOP)\src\legacy.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001040 $(LTCOMPILE) -c $(TOP)\src\legacy.c
shanehb2f20bf2011-06-17 07:07:24 +00001041
1042loadext.lo: $(TOP)\src\loadext.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001043 $(LTCOMPILE) -c $(TOP)\src\loadext.c
shanehb2f20bf2011-06-17 07:07:24 +00001044
1045main.lo: $(TOP)\src\main.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001046 $(LTCOMPILE) -c $(TOP)\src\main.c
shanehb2f20bf2011-06-17 07:07:24 +00001047
1048malloc.lo: $(TOP)\src\malloc.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001049 $(LTCOMPILE) -c $(TOP)\src\malloc.c
shanehb2f20bf2011-06-17 07:07:24 +00001050
1051mem0.lo: $(TOP)\src\mem0.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001052 $(LTCOMPILE) -c $(TOP)\src\mem0.c
shanehb2f20bf2011-06-17 07:07:24 +00001053
1054mem1.lo: $(TOP)\src\mem1.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001055 $(LTCOMPILE) -c $(TOP)\src\mem1.c
shanehb2f20bf2011-06-17 07:07:24 +00001056
1057mem2.lo: $(TOP)\src\mem2.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001058 $(LTCOMPILE) -c $(TOP)\src\mem2.c
shanehb2f20bf2011-06-17 07:07:24 +00001059
1060mem3.lo: $(TOP)\src\mem3.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001061 $(LTCOMPILE) -c $(TOP)\src\mem3.c
shanehb2f20bf2011-06-17 07:07:24 +00001062
1063mem5.lo: $(TOP)\src\mem5.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001064 $(LTCOMPILE) -c $(TOP)\src\mem5.c
shanehb2f20bf2011-06-17 07:07:24 +00001065
1066memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001067 $(LTCOMPILE) -c $(TOP)\src\memjournal.c
shanehb2f20bf2011-06-17 07:07:24 +00001068
1069mutex.lo: $(TOP)\src\mutex.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001070 $(LTCOMPILE) -c $(TOP)\src\mutex.c
shanehb2f20bf2011-06-17 07:07:24 +00001071
1072mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001073 $(LTCOMPILE) -c $(TOP)\src\mutex_noop.c
shanehb2f20bf2011-06-17 07:07:24 +00001074
shanehb2f20bf2011-06-17 07:07:24 +00001075mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001076 $(LTCOMPILE) -c $(TOP)\src\mutex_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001077
1078mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001079 $(LTCOMPILE) -c $(TOP)\src\mutex_w32.c
shanehb2f20bf2011-06-17 07:07:24 +00001080
1081notify.lo: $(TOP)\src\notify.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001082 $(LTCOMPILE) -c $(TOP)\src\notify.c
shanehb2f20bf2011-06-17 07:07:24 +00001083
1084pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
shaneh6e7850c2011-06-17 15:57:07 +00001085 $(LTCOMPILE) -c $(TOP)\src\pager.c
shanehb2f20bf2011-06-17 07:07:24 +00001086
1087pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
shaneh6e7850c2011-06-17 15:57:07 +00001088 $(LTCOMPILE) -c $(TOP)\src\pcache.c
shanehb2f20bf2011-06-17 07:07:24 +00001089
1090pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
shaneh6e7850c2011-06-17 15:57:07 +00001091 $(LTCOMPILE) -c $(TOP)\src\pcache1.c
shanehb2f20bf2011-06-17 07:07:24 +00001092
1093os.lo: $(TOP)\src\os.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001094 $(LTCOMPILE) -c $(TOP)\src\os.c
shanehb2f20bf2011-06-17 07:07:24 +00001095
1096os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001097 $(LTCOMPILE) -c $(TOP)\src\os_unix.c
shanehb2f20bf2011-06-17 07:07:24 +00001098
1099os_win.lo: $(TOP)\src\os_win.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001100 $(LTCOMPILE) -c $(TOP)\src\os_win.c
shanehb2f20bf2011-06-17 07:07:24 +00001101
shanehb2f20bf2011-06-17 07:07:24 +00001102pragma.lo: $(TOP)\src\pragma.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001103 $(LTCOMPILE) -c $(TOP)\src\pragma.c
shanehb2f20bf2011-06-17 07:07:24 +00001104
1105prepare.lo: $(TOP)\src\prepare.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001106 $(LTCOMPILE) -c $(TOP)\src\prepare.c
shanehb2f20bf2011-06-17 07:07:24 +00001107
1108printf.lo: $(TOP)\src\printf.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001109 $(LTCOMPILE) -c $(TOP)\src\printf.c
shanehb2f20bf2011-06-17 07:07:24 +00001110
1111random.lo: $(TOP)\src\random.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001112 $(LTCOMPILE) -c $(TOP)\src\random.c
shanehb2f20bf2011-06-17 07:07:24 +00001113
1114resolve.lo: $(TOP)\src\resolve.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001115 $(LTCOMPILE) -c $(TOP)\src\resolve.c
shanehb2f20bf2011-06-17 07:07:24 +00001116
1117rowset.lo: $(TOP)\src\rowset.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001118 $(LTCOMPILE) -c $(TOP)\src\rowset.c
shanehb2f20bf2011-06-17 07:07:24 +00001119
1120select.lo: $(TOP)\src\select.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001121 $(LTCOMPILE) -c $(TOP)\src\select.c
shanehb2f20bf2011-06-17 07:07:24 +00001122
1123status.lo: $(TOP)\src\status.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001124 $(LTCOMPILE) -c $(TOP)\src\status.c
shanehb2f20bf2011-06-17 07:07:24 +00001125
1126table.lo: $(TOP)\src\table.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001127 $(LTCOMPILE) -c $(TOP)\src\table.c
shanehb2f20bf2011-06-17 07:07:24 +00001128
1129tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001130 $(LTCOMPILE) -c $(TOP)\src\tokenize.c
shanehb2f20bf2011-06-17 07:07:24 +00001131
1132trigger.lo: $(TOP)\src\trigger.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001133 $(LTCOMPILE) -c $(TOP)\src\trigger.c
shanehb2f20bf2011-06-17 07:07:24 +00001134
1135update.lo: $(TOP)\src\update.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001136 $(LTCOMPILE) -c $(TOP)\src\update.c
shanehb2f20bf2011-06-17 07:07:24 +00001137
1138utf.lo: $(TOP)\src\utf.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001139 $(LTCOMPILE) -c $(TOP)\src\utf.c
shanehb2f20bf2011-06-17 07:07:24 +00001140
1141util.lo: $(TOP)\src\util.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001142 $(LTCOMPILE) -c $(TOP)\src\util.c
shanehb2f20bf2011-06-17 07:07:24 +00001143
1144vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001145 $(LTCOMPILE) -c $(TOP)\src\vacuum.c
shanehb2f20bf2011-06-17 07:07:24 +00001146
1147vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001148 $(LTCOMPILE) -c $(TOP)\src\vdbe.c
shanehb2f20bf2011-06-17 07:07:24 +00001149
1150vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001151 $(LTCOMPILE) -c $(TOP)\src\vdbeapi.c
shanehb2f20bf2011-06-17 07:07:24 +00001152
1153vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001154 $(LTCOMPILE) -c $(TOP)\src\vdbeaux.c
shanehb2f20bf2011-06-17 07:07:24 +00001155
1156vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001157 $(LTCOMPILE) -c $(TOP)\src\vdbeblob.c
shanehb2f20bf2011-06-17 07:07:24 +00001158
1159vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001160 $(LTCOMPILE) -c $(TOP)\src\vdbemem.c
shanehb2f20bf2011-06-17 07:07:24 +00001161
mistachkin81c428a2011-08-17 02:19:54 +00001162vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
1163 $(LTCOMPILE) -c $(TOP)\src\vdbesort.c
1164
shanehb2f20bf2011-06-17 07:07:24 +00001165vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001166 $(LTCOMPILE) -c $(TOP)\src\vdbetrace.c
shanehb2f20bf2011-06-17 07:07:24 +00001167
1168vtab.lo: $(TOP)\src\vtab.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001169 $(LTCOMPILE) -c $(TOP)\src\vtab.c
shanehb2f20bf2011-06-17 07:07:24 +00001170
1171wal.lo: $(TOP)\src\wal.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001172 $(LTCOMPILE) -c $(TOP)\src\wal.c
shanehb2f20bf2011-06-17 07:07:24 +00001173
1174walker.lo: $(TOP)\src\walker.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001175 $(LTCOMPILE) -c $(TOP)\src\walker.c
shanehb2f20bf2011-06-17 07:07:24 +00001176
1177where.lo: $(TOP)\src\where.c $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001178 $(LTCOMPILE) -c $(TOP)\src\where.c
shanehb2f20bf2011-06-17 07:07:24 +00001179
1180tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
1181 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1182
1183tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
1184 $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1185
mistachkin08c1c312012-10-06 03:48:25 +00001186tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS)
1187 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001188
1189# Rules to build opcodes.c and opcodes.h
1190#
1191opcodes.c: opcodes.h $(TOP)\mkopcodec.awk
drh307ff302011-08-30 01:29:04 +00001192 $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c
shanehb2f20bf2011-06-17 07:07:24 +00001193
1194opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk
mistachkin5b0b6fd2011-06-25 01:14:36 +00001195 type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h
shanehb2f20bf2011-06-17 07:07:24 +00001196
1197# Rules to build parse.c and parse.h - the outputs of lemon.
1198#
1199parse.h: parse.c
1200
1201parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
shaneh6e7850c2011-06-17 15:57:07 +00001202 del /Q parse.y parse.h parse.h.temp
shanehb2f20bf2011-06-17 07:07:24 +00001203 copy $(TOP)\src\parse.y .
shanehb2f20bf2011-06-17 07:07:24 +00001204 .\lemon.exe $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
1205 move parse.h parse.h.temp
mistachkin5b0b6fd2011-06-25 01:14:36 +00001206 $(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
shanehb2f20bf2011-06-17 07:07:24 +00001207
1208sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
mistachkin5b0b6fd2011-06-25 01:14:36 +00001209 $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP) > sqlite3.h
shanehb2f20bf2011-06-17 07:07:24 +00001210
1211mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
mistachkinbd58d5f2012-06-30 22:22:34 +00001212 $(BCC) -Fe$@ $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLIBPATHS)
shanehb2f20bf2011-06-17 07:07:24 +00001213
1214keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
mistachkin5b0b6fd2011-06-25 01:14:36 +00001215 .\mkkeywordhash.exe > keywordhash.h
shanehb2f20bf2011-06-17 07:07:24 +00001216
1217
1218
1219# Rules to build the extension objects.
1220#
1221icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1222 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1223
1224fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1225 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1226
1227fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
1228 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
1229
1230fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
1231 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
1232
1233fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
1234 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
1235
1236fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
1237 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
1238
1239fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
1240 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
1241
1242fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
1243 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
1244
1245fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
1246 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
1247
1248fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
1249 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
1250
1251fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
1252 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
1253
1254fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
1255 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
1256
1257fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
1258 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
1259
1260fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
1261 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
1262
1263fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
1264 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
1265
1266fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
1267 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
1268
drh4d648c72013-04-22 17:07:56 +00001269fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1270 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
1271
drh391d4ba2012-05-28 20:22:16 +00001272fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
1273 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
1274
1275fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
1276 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
1277
shanehb2f20bf2011-06-17 07:07:24 +00001278fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
1279 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
1280
1281rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
1282 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
1283
1284
1285# Rules to build the 'testfixture' application.
1286#
1287# If using the amalgamation, use sqlite3.c directly to build the test
1288# fixture. Otherwise link against libsqlite3.lib. (This distinction is
1289# necessary because the test fixture requires non-API symbols which are
1290# hidden when the library is built via the amalgamation).
1291#
1292TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
shaneh6e7850c2011-06-17 15:57:07 +00001293TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
shanehb2f20bf2011-06-17 07:07:24 +00001294
drh1fb64af2013-04-25 14:36:28 +00001295TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib
mistachkin76510912013-10-11 23:01:18 +00001296TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
shanehb2f20bf2011-06-17 07:07:24 +00001297!IF $(USE_AMALGAMATION)==0
1298TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1299!ELSE
1300TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1301!ENDIF
1302
mistachkin08c1c312012-10-06 03:48:25 +00001303testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
shaneh6e7850c2011-06-17 15:57:07 +00001304 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
shanehb2f20bf2011-06-17 07:07:24 +00001305 -DBUILD_sqlite -I$(TCLINCDIR) \
shaneh2a0b9ef2011-06-20 20:52:32 +00001306 $(TESTFIXTURE_SRC) \
mistachkin08c1c312012-10-06 03:48:25 +00001307 /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001308
1309fulltest: testfixture.exe sqlite3.exe
1310 .\testfixture.exe $(TOP)\test\all.test
1311
1312soaktest: testfixture.exe sqlite3.exe
1313 .\testfixture.exe $(TOP)\test\all.test -soak=1
1314
mistachkinc60941f2012-09-13 01:51:02 +00001315fulltestonly: testfixture.exe sqlite3.exe
1316 .\testfixture.exe $(TOP)\test\full.test
1317
mistachkin036acf32013-07-20 00:34:31 +00001318queryplantest: testfixture.exe sqlite3.exe
1319 .\testfixture.exe $(TOP)\test\permutations.test queryplanner
1320
shanehb2f20bf2011-06-17 07:07:24 +00001321test: testfixture.exe sqlite3.exe
1322 .\testfixture.exe $(TOP)\test\veryquick.test
1323
mistachkin76510912013-10-11 23:01:18 +00001324sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
1325 copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@
mistachkin9a55e312011-09-22 00:06:44 +00001326 echo static const char *tclsh_main_loop(void){ >> $@
1327 echo static const char *zMainloop = >> $@
1328 $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
1329 echo ; return zMainloop; } >> $@
shanehb2f20bf2011-06-17 07:07:24 +00001330
mistachkin08c1c312012-10-06 03:48:25 +00001331sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
mistachkin9a55e312011-09-22 00:06:44 +00001332 $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
mistachkin08c1c312012-10-06 03:48:25 +00001333 /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
shanehb2f20bf2011-06-17 07:07:24 +00001334
shaneh6e7850c2011-06-17 15:57:07 +00001335clean:
mistachkin649591a2011-09-11 10:14:37 +00001336 del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
mistachkin0157e012013-09-06 21:41:11 +00001337 del /Q *.cod *.da *.bb *.bbg gmon.out
shanehb2f20bf2011-06-17 07:07:24 +00001338 del /Q sqlite3.h opcodes.c opcodes.h
1339 del /Q lemon.exe lempar.c parse.*
1340 del /Q mkkeywordhash.exe keywordhash.h
mistachkinb482a442012-02-11 22:19:26 +00001341 -rmdir /Q/S .deps
1342 -rmdir /Q/S .libs
mistachkinf8a78462012-03-08 20:00:36 +00001343 -rmdir /Q/S quota2a
1344 -rmdir /Q/S quota2b
1345 -rmdir /Q/S quota2c
shanehb2f20bf2011-06-17 07:07:24 +00001346 -rmdir /Q/S tsrc
1347 del /Q .target_source
mistachkin0f104d52012-09-03 11:01:21 +00001348 del /Q tclsqlite3.exe tclsqlite3.exp
shaneh603e4262011-06-17 18:52:07 +00001349 del /Q testfixture.exe testfixture.exp test.db
shaneh6e7850c2011-06-17 15:57:07 +00001350 del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
mistachkin76510912013-10-11 23:01:18 +00001351 del /Q sqlite3.c sqlite3-*.c
mistachkin4d9d1f42012-09-03 10:32:32 +00001352 del /Q sqlite3rc.h
mistachkinfde3b1c72013-03-29 19:52:04 +00001353 del /Q shell.c sqlite3ext.h
mistachkin9a55e312011-09-22 00:06:44 +00001354 del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c
mistachkin29b75bd2012-10-20 09:35:57 +00001355 del /Q sqlite-*-output.vsix
drhbc94dbb2013-04-08 14:28:33 +00001356 del /Q mptester.exe
shanehb2f20bf2011-06-17 07:07:24 +00001357
mistachkin4d9d1f42012-09-03 10:32:32 +00001358# Dynamic link library section.
shanehb2f20bf2011-06-17 07:07:24 +00001359#
1360dll: sqlite3.dll
1361
shaneh6e7850c2011-06-17 15:57:07 +00001362sqlite3.def: libsqlite3.lib
mistachkin5b0b6fd2011-06-25 01:14:36 +00001363 echo EXPORTS > sqlite3.def
shaneh6e7850c2011-06-17 15:57:07 +00001364 dumpbin /all libsqlite3.lib \
mistachkin6a3eb4a2011-08-17 07:46:48 +00001365 | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
mistachkin5b0b6fd2011-06-25 01:14:36 +00001366 | sort >> sqlite3.def
shanehb2f20bf2011-06-17 07:07:24 +00001367
mistachkin08c1c312012-10-06 03:48:25 +00001368sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def
1369 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)