xref: /sqlite-3.40.0/Makefile.msc (revision b43be55e)
1#
2# nmake Makefile for SQLite
3#
4###############################################################################
5############################## START OF OPTIONS ###############################
6###############################################################################
7
8# The toplevel directory of the source tree.  This is the directory
9# that contains this "Makefile.msc".
10#
11TOP = .
12
13# Set this non-0 to create and use the SQLite amalgamation file.
14#
15!IFNDEF USE_AMALGAMATION
16USE_AMALGAMATION = 1
17!ENDIF
18
19# Set this non-0 to enable full warnings (-W4, etc) when compiling.
20#
21!IFNDEF USE_FULLWARN
22USE_FULLWARN = 0
23!ENDIF
24
25# If necessary, create a list of harmless compiler warnings to disable when
26# compiling the build tools.  For the SQLite source code itself, warnings,
27# if any, will be disabled from within it.
28#
29!IFNDEF NO_WARN
30!IF $(USE_FULLWARN)!=0
31NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4152 -wd4189 -wd4206 -wd4210
32NO_WARN = $(NO_WARN) -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
33!ENDIF
34!ENDIF
35
36# Set this non-0 to use the library paths and other options necessary for
37# Windows Phone 8.1.
38#
39!IFNDEF USE_WP81_OPTS
40USE_WP81_OPTS = 0
41!ENDIF
42
43# Set this non-0 to split the SQLite amalgamation file into chunks to
44# be used for debugging with Visual Studio.
45#
46!IFNDEF SPLIT_AMALGAMATION
47SPLIT_AMALGAMATION = 0
48!ENDIF
49
50# Set this non-0 to use the International Components for Unicode (ICU).
51#
52!IFNDEF USE_ICU
53USE_ICU = 0
54!ENDIF
55
56# Set this non-0 to dynamically link to the MSVC runtime library.
57#
58!IFNDEF USE_CRT_DLL
59USE_CRT_DLL = 0
60!ENDIF
61
62# Set this non-0 to generate assembly code listings for the source code
63# files.
64#
65!IFNDEF USE_LISTINGS
66USE_LISTINGS = 0
67!ENDIF
68
69# Set this non-0 to attempt setting the native compiler automatically
70# for cross-compiling the command line tools needed during the compilation
71# process.
72#
73!IFNDEF XCOMPILE
74XCOMPILE = 0
75!ENDIF
76
77# Set this non-0 to use the native libraries paths for cross-compiling
78# the command line tools needed during the compilation process.
79#
80!IFNDEF USE_NATIVE_LIBPATHS
81USE_NATIVE_LIBPATHS = 0
82!ENDIF
83
84# Set this 0 to skip the compiling and embedding of version resources.
85#
86!IFNDEF USE_RC
87USE_RC = 1
88!ENDIF
89
90# Set this non-0 to compile binaries suitable for the WinRT environment.
91# This setting does not apply to any binaries that require Tcl to operate
92# properly (i.e. the text fixture, etc).
93#
94!IFNDEF FOR_WINRT
95FOR_WINRT = 0
96!ENDIF
97
98# Set this non-0 to skip attempting to look for and/or link with the Tcl
99# runtime library.
100#
101!IFNDEF NO_TCL
102NO_TCL = 0
103!ENDIF
104
105# Set this to non-0 to create and use PDBs.
106#
107!IFNDEF SYMBOLS
108SYMBOLS = 1
109!ENDIF
110
111# Set this to non-0 to use the SQLite debugging heap subsystem.
112#
113!IFNDEF MEMDEBUG
114MEMDEBUG = 0
115!ENDIF
116
117# Set this to non-0 to use the Win32 native heap subsystem.
118#
119!IFNDEF WIN32HEAP
120WIN32HEAP = 0
121!ENDIF
122
123# Set this to one of the following values to enable various debugging
124# features.  Each level includes the debugging options from the previous
125# levels.  Currently, the recognized values for DEBUG are:
126#
127# 0 == NDEBUG: Disables assert() and other runtime diagnostics.
128# 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
129# 2 == Disables NDEBUG and all optimizations and then enables PDBs.
130# 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
131# 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
132# 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
133# 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
134#
135!IFNDEF DEBUG
136DEBUG = 0
137!ENDIF
138
139# Enable use of available compiler optimizations?  Normally, this should be
140# non-zero.  Setting this to zero, thus disabling all compiler optimizations,
141# can be useful for testing.
142#
143!IFNDEF OPTIMIZATIONS
144OPTIMIZATIONS = 2
145!ENDIF
146
147# These are the "standard" SQLite compilation options used when compiling for
148# the Windows platform.
149#
150!IFNDEF OPT_FEATURE_FLAGS
151OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
152OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
153OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
154!ENDIF
155
156###############################################################################
157############################### END OF OPTIONS ################################
158###############################################################################
159
160# This assumes that MSVC is always installed in 32-bit Program Files directory
161# and sets the variable for use in locating other 32-bit installs accordingly.
162#
163PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
164PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
165
166# Check for the predefined command macro CC.  This should point to the compiler
167# binary for the target platform.  If it is not defined, simply define it to
168# the legacy default value 'cl.exe'.
169#
170!IFNDEF CC
171CC = cl.exe
172!ENDIF
173
174# Check for the command macro LD.  This should point to the linker binary for
175# the target platform.  If it is not defined, simply define it to the legacy
176# default value 'link.exe'.
177#
178!IFNDEF LD
179LD = link.exe
180!ENDIF
181
182# Check for the predefined command macro RC.  This should point to the resource
183# compiler binary for the target platform.  If it is not defined, simply define
184# it to the legacy default value 'rc.exe'.
185#
186!IFNDEF RC
187RC = rc.exe
188!ENDIF
189
190# Check for the MSVC runtime library path macro.  Othertise, this value will
191# default to the 'lib' directory underneath the MSVC installation directory.
192#
193!IFNDEF CRTLIBPATH
194CRTLIBPATH = $(VCINSTALLDIR)\lib
195!ENDIF
196
197CRTLIBPATH = $(CRTLIBPATH:\\=\)
198
199# Check for the command macro NCC.  This should point to the compiler binary
200# for the platform the compilation process is taking place on.  If it is not
201# defined, simply define it to have the same value as the CC macro.  When
202# cross-compiling, it is suggested that this macro be modified via the command
203# line (since nmake itself does not provide a built-in method to guess it).
204# For example, to use the x86 compiler when cross-compiling for x64, a command
205# line similar to the following could be used (all on one line):
206#
207#     nmake /f Makefile.msc sqlite3.dll
208#           XCOMPILE=1 USE_NATIVE_LIBPATHS=1
209#
210# Alternatively, the full path and file name to the compiler binary for the
211# platform the compilation process is taking place may be specified (all on
212# one line):
213#
214#     nmake /f Makefile.msc sqlite3.dll
215#           "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
216#           USE_NATIVE_LIBPATHS=1
217#
218!IFDEF NCC
219NCC = $(NCC:\\=\)
220!ELSEIF $(XCOMPILE)!=0
221NCC = "$(VCINSTALLDIR)\bin\$(CC)"
222NCC = $(NCC:\\=\)
223!ELSE
224NCC = $(CC)
225!ENDIF
226
227# Check for the MSVC native runtime library path macro.  Othertise,
228# this value will default to the 'lib' directory underneath the MSVC
229# installation directory.
230#
231!IFNDEF NCRTLIBPATH
232NCRTLIBPATH = $(VCINSTALLDIR)\lib
233!ENDIF
234
235NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
236
237# Check for the Platform SDK library path macro.  Othertise, this
238# value will default to the 'lib' directory underneath the Windows
239# SDK installation directory (the environment variable used appears
240# to be available when using Visual C++ 2008 or later via the
241# command line).
242#
243!IFNDEF NSDKLIBPATH
244NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
245!ENDIF
246
247NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
248
249# C compiler and options for use in building executables that
250# will run on the platform that is doing the build.
251#
252!IF $(USE_FULLWARN)!=0
253BCC = $(NCC) -W4
254!ELSE
255BCC = $(NCC) -W3
256!ENDIF
257
258# Check if assembly code listings should be generated for the source
259# code files to be compiled.
260#
261!IF $(USE_LISTINGS)!=0
262BCC = $(BCC) -FAcs
263!ENDIF
264
265# Check if the native library paths should be used when compiling
266# the command line tools used during the compilation process.  If
267# so, set the necessary macro now.
268#
269!IF $(USE_NATIVE_LIBPATHS)!=0
270NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
271!ENDIF
272
273# C compiler and options for use in building executables that
274# will run on the target platform.  (BCC and TCC are usually the
275# same unless your are cross-compiling.)
276#
277!IF $(USE_FULLWARN)!=0
278TCC = $(CC) -W4 -DINCLUDE_MSVC_H=1
279!ELSE
280TCC = $(CC) -W3
281!ENDIF
282
283TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
284RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src
285
286# Check if assembly code listings should be generated for the source
287# code files to be compiled.
288#
289!IF $(USE_LISTINGS)!=0
290TCC = $(TCC) -FAcs
291!ENDIF
292
293# When compiling the library for use in the WinRT environment,
294# the following compile-time options must be used as well to
295# disable use of Win32 APIs that are not available and to enable
296# use of Win32 APIs that are specific to Windows 8 and/or WinRT.
297#
298!IF $(FOR_WINRT)!=0
299TCC = $(TCC) -DSQLITE_OS_WINRT=1
300RCC = $(RCC) -DSQLITE_OS_WINRT=1
301TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
302RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
303!ENDIF
304
305# Also, we need to dynamically link to the correct MSVC runtime
306# when compiling for WinRT (e.g. debug or release) OR if the
307# USE_CRT_DLL option is set to force dynamically linking to the
308# MSVC runtime library.
309#
310!IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
311!IF $(DEBUG)>1
312TCC = $(TCC) -MDd
313BCC = $(BCC) -MDd
314!ELSE
315TCC = $(TCC) -MD
316BCC = $(BCC) -MD
317!ENDIF
318!ELSE
319!IF $(DEBUG)>1
320TCC = $(TCC) -MTd
321BCC = $(BCC) -MTd
322!ELSE
323TCC = $(TCC) -MT
324BCC = $(BCC) -MT
325!ENDIF
326!ENDIF
327
328# The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
329# any extension header files by default.  For non-amalgamation
330# builds, we need to make sure the compiler can find these.
331#
332!IF $(USE_AMALGAMATION)==0
333TCC = $(TCC) -I$(TOP)\ext\fts3
334RCC = $(RCC) -I$(TOP)\ext\fts3
335TCC = $(TCC) -I$(TOP)\ext\rtree
336RCC = $(RCC) -I$(TOP)\ext\rtree
337!ENDIF
338
339# The mksqlite3c.tcl script accepts some options on the command
340# line.  When compiling with debugging enabled, some of these
341# options are necessary in order to allow debugging symbols to
342# work correctly with Visual Studio when using the amalgamation.
343#
344!IF $(DEBUG)>1
345MKSQLITE3C_ARGS = --linemacros
346!ELSE
347MKSQLITE3C_ARGS =
348!ENDIF
349
350# Define -DNDEBUG to compile without debugging (i.e., for production usage)
351# Omitting the define will cause extra debugging code to be inserted and
352# includes extra comments when "EXPLAIN stmt" is used.
353#
354!IF $(DEBUG)==0
355TCC = $(TCC) -DNDEBUG
356BCC = $(BCC) -DNDEBUG
357RCC = $(RCC) -DNDEBUG
358!ENDIF
359
360!IF $(DEBUG)>0
361TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR
362RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR
363!ENDIF
364
365!IF $(DEBUG)>2
366TCC = $(TCC) -DSQLITE_DEBUG
367RCC = $(RCC) -DSQLITE_DEBUG
368!ENDIF
369
370!IF $(DEBUG)>4
371TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1
372RCC = $(RCC) -DSQLITE_DEBUG_OS_TRACE=1
373!ENDIF
374
375!IF $(DEBUG)>5
376TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
377RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE
378!ENDIF
379
380# Prevent warnings about "insecure" MSVC runtime library functions
381# being used.
382#
383TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
384BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
385RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
386
387# Prevent warnings about "deprecated" POSIX functions being used.
388#
389TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
390BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
391RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
392
393# Use the SQLite debugging heap subsystem?
394#
395!IF $(MEMDEBUG)!=0
396TCC = $(TCC) -DSQLITE_MEMDEBUG=1
397RCC = $(RCC) -DSQLITE_MEMDEBUG=1
398
399# Use native Win32 heap subsystem instead of malloc/free?
400#
401!ELSEIF $(WIN32HEAP)!=0
402TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
403RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
404
405# Validate the heap on every call into the native Win32 heap subsystem?
406#
407!IF $(DEBUG)>3
408TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
409RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
410!ENDIF
411!ENDIF
412
413# The locations of the Tcl header and library files.  Also, the library that
414# non-stubs enabled programs using Tcl must link against.  These variables
415# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
416# prior to running nmake in order to match the actual installed location and
417# version on this machine.
418#
419!IFNDEF TCLINCDIR
420TCLINCDIR = c:\tcl\include
421!ENDIF
422
423!IFNDEF TCLLIBDIR
424TCLLIBDIR = c:\tcl\lib
425!ENDIF
426
427!IFNDEF LIBTCL
428LIBTCL = tcl85.lib
429!ENDIF
430
431# The locations of the ICU header and library files.  These variables
432# (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
433# prior to running nmake in order to match the actual installed location on
434# this machine.
435#
436!IFNDEF ICUINCDIR
437ICUINCDIR = c:\icu\include
438!ENDIF
439
440!IFNDEF ICULIBDIR
441ICULIBDIR = c:\icu\lib
442!ENDIF
443
444!IFNDEF LIBICU
445LIBICU = icuuc.lib icuin.lib
446!ENDIF
447
448# This is the command to use for tclsh - normally just "tclsh", but we may
449# know the specific version we want to use.  This variable (TCLSH_CMD) may be
450# overridden via the environment prior to running nmake in order to select a
451# specific Tcl shell to use.
452#
453!IFNDEF TCLSH_CMD
454TCLSH_CMD = tclsh85
455!ENDIF
456
457# Compiler options needed for programs that use the readline() library.
458#
459!IFNDEF READLINE_FLAGS
460READLINE_FLAGS = -DHAVE_READLINE=0
461!ENDIF
462
463# The library that programs using readline() must link against.
464#
465!IFNDEF LIBREADLINE
466LIBREADLINE =
467!ENDIF
468
469# Should the database engine be compiled threadsafe
470#
471TCC = $(TCC) -DSQLITE_THREADSAFE=1
472RCC = $(RCC) -DSQLITE_THREADSAFE=1
473
474# Do threads override each others locks by default (1), or do we test (-1)
475#
476TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
477RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
478
479# Any target libraries which libsqlite must be linked against
480#
481!IFNDEF TLIBS
482TLIBS =
483!ENDIF
484
485# Flags controlling use of the in memory btree implementation
486#
487# SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
488# default to file, 2 to default to memory, and 3 to force temporary
489# tables to always be in memory.
490#
491TCC = $(TCC) -DSQLITE_TEMP_STORE=1
492RCC = $(RCC) -DSQLITE_TEMP_STORE=1
493
494# Enable/disable loadable extensions, and other optional features
495# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
496# The same set of OMIT and ENABLE flags should be passed to the
497# LEMON parser generator and the mkkeywordhash tool as well.
498
499# These are the required SQLite compilation options used when compiling for
500# the Windows platform.
501#
502REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
503
504# Add the required and optional SQLite compilation options into the command
505# lines used to invoke the MSVC code and resource compilers.
506#
507TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
508RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS)
509
510# Add in any optional parameters specified on the commane line, e.g.
511# nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
512#
513TCC = $(TCC) $(OPTS)
514RCC = $(RCC) $(OPTS)
515
516# If compiling for debugging, add some defines.
517#
518!IF $(DEBUG)>1
519TCC = $(TCC) -D_DEBUG
520BCC = $(BCC) -D_DEBUG
521RCC = $(RCC) -D_DEBUG
522!ENDIF
523
524# If optimizations are enabled or disabled (either implicitly or
525# explicitly), add the necessary flags.
526#
527!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
528TCC = $(TCC) -Od
529BCC = $(BCC) -Od
530!ELSEIF $(OPTIMIZATIONS)>=3
531TCC = $(TCC) -Ox
532BCC = $(BCC) -Ox
533!ELSEIF $(OPTIMIZATIONS)==2
534TCC = $(TCC) -O2
535BCC = $(BCC) -O2
536!ELSEIF $(OPTIMIZATIONS)==1
537TCC = $(TCC) -O1
538BCC = $(BCC) -O1
539!ENDIF
540
541# If symbols are enabled (or compiling for debugging), enable PDBs.
542#
543!IF $(DEBUG)>1 || $(SYMBOLS)!=0
544TCC = $(TCC) -Zi
545BCC = $(BCC) -Zi
546!ENDIF
547
548# If ICU support is enabled, add the compiler options for it.
549#
550!IF $(USE_ICU)!=0
551TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
552RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
553TCC = $(TCC) -I$(TOP)\ext\icu
554RCC = $(RCC) -I$(TOP)\ext\icu
555TCC = $(TCC) -I$(ICUINCDIR)
556RCC = $(RCC) -I$(ICUINCDIR)
557!ENDIF
558
559# Command line prefixes for compiling code, compiling resources,
560# linking, etc.
561#
562LTCOMPILE = $(TCC) -Fo$@
563LTRCOMPILE = $(RCC) -r
564LTLIB = lib.exe
565LTLINK = $(TCC) -Fe$@
566
567# If a platform was set, force the linker to target that.
568# Note that the vcvars*.bat family of batch files typically
569# set this for you.  Otherwise, the linker will attempt
570# to deduce the binary type based on the object files.
571!IFDEF PLATFORM
572LTLINKOPTS = /MACHINE:$(PLATFORM)
573LTLIBOPTS = /MACHINE:$(PLATFORM)
574!ENDIF
575
576# When compiling for use in the WinRT environment, the following
577# linker option must be used to mark the executable as runnable
578# only in the context of an application container.
579#
580!IF $(FOR_WINRT)!=0
581LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
582!IF "$(VISUALSTUDIOVERSION)"=="12.0"
583!IFNDEF STORELIBPATH
584!IF "$(PLATFORM)"=="x86"
585STORELIBPATH = $(CRTLIBPATH)\store
586!ELSEIF "$(PLATFORM)"=="x64"
587STORELIBPATH = $(CRTLIBPATH)\store\amd64
588!ELSEIF "$(PLATFORM)"=="ARM"
589STORELIBPATH = $(CRTLIBPATH)\store\arm
590!ELSE
591STORELIBPATH = $(CRTLIBPATH)\store
592!ENDIF
593!ENDIF
594STORELIBPATH = $(STORELIBPATH:\\=\)
595LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
596!ENDIF
597!ENDIF
598
599# When compiling for Windows Phone 8.1, an extra library path is
600# required.
601#
602!IF $(USE_WP81_OPTS)!=0
603!IFNDEF WP81LIBPATH
604!IF "$(PLATFORM)"=="x86"
605WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
606!ELSEIF "$(PLATFORM)"=="ARM"
607WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
608!ELSE
609WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
610!ENDIF
611!ENDIF
612!ENDIF
613
614# When compiling for Windows Phone 8.1, some extra linker options
615# are also required.
616#
617!IF $(USE_WP81_OPTS)!=0
618!IFDEF WP81LIBPATH
619LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
620!ENDIF
621LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
622LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
623LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
624!ENDIF
625
626# If either debugging or symbols are enabled, enable PDBs.
627#
628!IF $(DEBUG)>1 || $(SYMBOLS)!=0
629LDFLAGS = /DEBUG
630!ENDIF
631
632# Start with the Tcl related linker options.
633#
634!IF $(NO_TCL)==0
635LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
636LTLIBS = $(LIBTCL)
637!ENDIF
638
639# If ICU support is enabled, add the linker options for it.
640#
641!IF $(USE_ICU)!=0
642LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
643LTLIBS = $(LTLIBS) $(LIBICU)
644!ENDIF
645
646# nawk compatible awk.
647#
648!IFNDEF NAWK
649NAWK = gawk.exe
650!ENDIF
651
652# You should not have to change anything below this line
653###############################################################################
654
655# Object files for the SQLite library (non-amalgamation).
656#
657LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
658         backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
659         callback.lo complete.lo ctime.lo date.lo delete.lo \
660         expr.lo fault.lo fkey.lo \
661         fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
662         fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
663         fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
664         func.lo global.lo hash.lo \
665         icu.lo insert.lo journal.lo legacy.lo loadext.lo \
666         main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
667         memjournal.lo \
668         mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
669         notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
670         pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
671         random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
672         table.lo threads.lo tokenize.lo trigger.lo \
673         update.lo util.lo vacuum.lo \
674         vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
675         vdbetrace.lo wal.lo walker.lo where.lo utf.lo vtab.lo
676
677# Object files for the amalgamation.
678#
679LIBOBJS1 = sqlite3.lo
680
681# Determine the real value of LIBOBJ based on the 'configure' script
682#
683!IF $(USE_AMALGAMATION)==0
684LIBOBJ = $(LIBOBJS0)
685!ELSE
686LIBOBJ = $(LIBOBJS1)
687!ENDIF
688
689# Determine if embedded resource compilation and usage are enabled.
690#
691!IF $(USE_RC)!=0
692LIBRESOBJS = sqlite3res.lo
693!ELSE
694LIBRESOBJS =
695!ENDIF
696
697# All of the source code files.
698#
699SRC = \
700  $(TOP)\src\alter.c \
701  $(TOP)\src\analyze.c \
702  $(TOP)\src\attach.c \
703  $(TOP)\src\auth.c \
704  $(TOP)\src\backup.c \
705  $(TOP)\src\bitvec.c \
706  $(TOP)\src\btmutex.c \
707  $(TOP)\src\btree.c \
708  $(TOP)\src\btree.h \
709  $(TOP)\src\btreeInt.h \
710  $(TOP)\src\build.c \
711  $(TOP)\src\callback.c \
712  $(TOP)\src\complete.c \
713  $(TOP)\src\ctime.c \
714  $(TOP)\src\date.c \
715  $(TOP)\src\delete.c \
716  $(TOP)\src\expr.c \
717  $(TOP)\src\fault.c \
718  $(TOP)\src\fkey.c \
719  $(TOP)\src\func.c \
720  $(TOP)\src\global.c \
721  $(TOP)\src\hash.c \
722  $(TOP)\src\hash.h \
723  $(TOP)\src\hwtime.h \
724  $(TOP)\src\insert.c \
725  $(TOP)\src\journal.c \
726  $(TOP)\src\legacy.c \
727  $(TOP)\src\loadext.c \
728  $(TOP)\src\main.c \
729  $(TOP)\src\malloc.c \
730  $(TOP)\src\mem0.c \
731  $(TOP)\src\mem1.c \
732  $(TOP)\src\mem2.c \
733  $(TOP)\src\mem3.c \
734  $(TOP)\src\mem5.c \
735  $(TOP)\src\memjournal.c \
736  $(TOP)\src\msvc.h \
737  $(TOP)\src\mutex.c \
738  $(TOP)\src\mutex.h \
739  $(TOP)\src\mutex_noop.c \
740  $(TOP)\src\mutex_unix.c \
741  $(TOP)\src\mutex_w32.c \
742  $(TOP)\src\notify.c \
743  $(TOP)\src\os.c \
744  $(TOP)\src\os.h \
745  $(TOP)\src\os_common.h \
746  $(TOP)\src\os_setup.h \
747  $(TOP)\src\os_unix.c \
748  $(TOP)\src\os_win.c \
749  $(TOP)\src\os_win.h \
750  $(TOP)\src\pager.c \
751  $(TOP)\src\pager.h \
752  $(TOP)\src\parse.y \
753  $(TOP)\src\pcache.c \
754  $(TOP)\src\pcache.h \
755  $(TOP)\src\pcache1.c \
756  $(TOP)\src\pragma.c \
757  $(TOP)\src\prepare.c \
758  $(TOP)\src\printf.c \
759  $(TOP)\src\random.c \
760  $(TOP)\src\resolve.c \
761  $(TOP)\src\rowset.c \
762  $(TOP)\src\select.c \
763  $(TOP)\src\status.c \
764  $(TOP)\src\shell.c \
765  $(TOP)\src\sqlite.h.in \
766  $(TOP)\src\sqlite3ext.h \
767  $(TOP)\src\sqliteInt.h \
768  $(TOP)\src\sqliteLimit.h \
769  $(TOP)\src\table.c \
770  $(TOP)\src\threads.c \
771  $(TOP)\src\tclsqlite.c \
772  $(TOP)\src\tokenize.c \
773  $(TOP)\src\trigger.c \
774  $(TOP)\src\utf.c \
775  $(TOP)\src\update.c \
776  $(TOP)\src\util.c \
777  $(TOP)\src\vacuum.c \
778  $(TOP)\src\vdbe.c \
779  $(TOP)\src\vdbe.h \
780  $(TOP)\src\vdbeapi.c \
781  $(TOP)\src\vdbeaux.c \
782  $(TOP)\src\vdbeblob.c \
783  $(TOP)\src\vdbemem.c \
784  $(TOP)\src\vdbesort.c \
785  $(TOP)\src\vdbetrace.c \
786  $(TOP)\src\vdbeInt.h \
787  $(TOP)\src\vtab.c \
788  $(TOP)\src\wal.c \
789  $(TOP)\src\wal.h \
790  $(TOP)\src\walker.c \
791  $(TOP)\src\where.c \
792  $(TOP)\src\whereInt.h
793
794# Source code for extensions
795#
796SRC = $(SRC) \
797  $(TOP)\ext\fts1\fts1.c \
798  $(TOP)\ext\fts1\fts1.h \
799  $(TOP)\ext\fts1\fts1_hash.c \
800  $(TOP)\ext\fts1\fts1_hash.h \
801  $(TOP)\ext\fts1\fts1_porter.c \
802  $(TOP)\ext\fts1\fts1_tokenizer.h \
803  $(TOP)\ext\fts1\fts1_tokenizer1.c
804SRC = $(SRC) \
805  $(TOP)\ext\fts2\fts2.c \
806  $(TOP)\ext\fts2\fts2.h \
807  $(TOP)\ext\fts2\fts2_hash.c \
808  $(TOP)\ext\fts2\fts2_hash.h \
809  $(TOP)\ext\fts2\fts2_icu.c \
810  $(TOP)\ext\fts2\fts2_porter.c \
811  $(TOP)\ext\fts2\fts2_tokenizer.h \
812  $(TOP)\ext\fts2\fts2_tokenizer.c \
813  $(TOP)\ext\fts2\fts2_tokenizer1.c
814SRC = $(SRC) \
815  $(TOP)\ext\fts3\fts3.c \
816  $(TOP)\ext\fts3\fts3.h \
817  $(TOP)\ext\fts3\fts3Int.h \
818  $(TOP)\ext\fts3\fts3_aux.c \
819  $(TOP)\ext\fts3\fts3_expr.c \
820  $(TOP)\ext\fts3\fts3_hash.c \
821  $(TOP)\ext\fts3\fts3_hash.h \
822  $(TOP)\ext\fts3\fts3_icu.c \
823  $(TOP)\ext\fts3\fts3_porter.c \
824  $(TOP)\ext\fts3\fts3_snippet.c \
825  $(TOP)\ext\fts3\fts3_tokenizer.h \
826  $(TOP)\ext\fts3\fts3_tokenizer.c \
827  $(TOP)\ext\fts3\fts3_tokenizer1.c \
828  $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
829  $(TOP)\ext\fts3\fts3_unicode.c \
830  $(TOP)\ext\fts3\fts3_unicode2.c \
831  $(TOP)\ext\fts3\fts3_write.c
832SRC = $(SRC) \
833  $(TOP)\ext\icu\sqliteicu.h \
834  $(TOP)\ext\icu\icu.c
835SRC = $(SRC) \
836  $(TOP)\ext\rtree\rtree.h \
837  $(TOP)\ext\rtree\rtree.c
838
839
840# Generated source code files
841#
842SRC = $(SRC) \
843  keywordhash.h \
844  opcodes.c \
845  opcodes.h \
846  parse.c \
847  parse.h \
848  sqlite3.h
849
850# Source code to the test files.
851#
852TESTSRC = \
853  $(TOP)\src\test1.c \
854  $(TOP)\src\test2.c \
855  $(TOP)\src\test3.c \
856  $(TOP)\src\test4.c \
857  $(TOP)\src\test5.c \
858  $(TOP)\src\test6.c \
859  $(TOP)\src\test7.c \
860  $(TOP)\src\test8.c \
861  $(TOP)\src\test9.c \
862  $(TOP)\src\test_autoext.c \
863  $(TOP)\src\test_async.c \
864  $(TOP)\src\test_backup.c \
865  $(TOP)\src\test_blob.c \
866  $(TOP)\src\test_btree.c \
867  $(TOP)\src\test_config.c \
868  $(TOP)\src\test_demovfs.c \
869  $(TOP)\src\test_devsym.c \
870  $(TOP)\src\test_fs.c \
871  $(TOP)\src\test_func.c \
872  $(TOP)\src\test_hexio.c \
873  $(TOP)\src\test_init.c \
874  $(TOP)\src\test_intarray.c \
875  $(TOP)\src\test_journal.c \
876  $(TOP)\src\test_malloc.c \
877  $(TOP)\src\test_multiplex.c \
878  $(TOP)\src\test_mutex.c \
879  $(TOP)\src\test_onefile.c \
880  $(TOP)\src\test_osinst.c \
881  $(TOP)\src\test_pcache.c \
882  $(TOP)\src\test_quota.c \
883  $(TOP)\src\test_rtree.c \
884  $(TOP)\src\test_schema.c \
885  $(TOP)\src\test_server.c \
886  $(TOP)\src\test_superlock.c \
887  $(TOP)\src\test_syscall.c \
888  $(TOP)\src\test_stat.c \
889  $(TOP)\src\test_tclvar.c \
890  $(TOP)\src\test_thread.c \
891  $(TOP)\src\test_vfs.c \
892  $(TOP)\src\test_wsd.c \
893  $(TOP)\ext\fts3\fts3_term.c \
894  $(TOP)\ext\fts3\fts3_test.c
895
896# Statically linked extensions
897#
898TESTEXT = \
899  $(TOP)\ext\misc\amatch.c \
900  $(TOP)\ext\misc\closure.c \
901  $(TOP)\ext\misc\eval.c \
902  $(TOP)\ext\misc\fileio.c \
903  $(TOP)\ext\misc\fuzzer.c \
904  $(TOP)\ext\misc\ieee754.c \
905  $(TOP)\ext\misc\nextchar.c \
906  $(TOP)\ext\misc\percentile.c \
907  $(TOP)\ext\misc\regexp.c \
908  $(TOP)\ext\misc\spellfix.c \
909  $(TOP)\ext\misc\totype.c \
910  $(TOP)\ext\misc\wholenumber.c
911
912
913# Source code to the library files needed by the test fixture
914#
915TESTSRC2 = \
916  $(TOP)\src\attach.c \
917  $(TOP)\src\backup.c \
918  $(TOP)\src\bitvec.c \
919  $(TOP)\src\btree.c \
920  $(TOP)\src\build.c \
921  $(TOP)\src\ctime.c \
922  $(TOP)\src\date.c \
923  $(TOP)\src\expr.c \
924  $(TOP)\src\func.c \
925  $(TOP)\src\insert.c \
926  $(TOP)\src\wal.c \
927  $(TOP)\src\main.c \
928  $(TOP)\src\mem5.c \
929  $(TOP)\src\os.c \
930  $(TOP)\src\os_unix.c \
931  $(TOP)\src\os_win.c \
932  $(TOP)\src\pager.c \
933  $(TOP)\src\pragma.c \
934  $(TOP)\src\prepare.c \
935  $(TOP)\src\printf.c \
936  $(TOP)\src\random.c \
937  $(TOP)\src\pcache.c \
938  $(TOP)\src\pcache1.c \
939  $(TOP)\src\select.c \
940  $(TOP)\src\tokenize.c \
941  $(TOP)\src\utf.c \
942  $(TOP)\src\util.c \
943  $(TOP)\src\vdbeapi.c \
944  $(TOP)\src\vdbeaux.c \
945  $(TOP)\src\vdbe.c \
946  $(TOP)\src\vdbemem.c \
947  $(TOP)\src\vdbesort.c \
948  $(TOP)\src\vdbetrace.c \
949  $(TOP)\src\where.c \
950  parse.c \
951  $(TOP)\ext\fts3\fts3.c \
952  $(TOP)\ext\fts3\fts3_aux.c \
953  $(TOP)\ext\fts3\fts3_expr.c \
954  $(TOP)\ext\fts3\fts3_tokenizer.c \
955  $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
956  $(TOP)\ext\fts3\fts3_unicode.c \
957  $(TOP)\ext\fts3\fts3_unicode2.c \
958  $(TOP)\ext\fts3\fts3_write.c \
959  $(TOP)\ext\async\sqlite3async.c
960
961# Header files used by all library source files.
962#
963HDR = \
964   $(TOP)\src\btree.h \
965   $(TOP)\src\btreeInt.h \
966   $(TOP)\src\hash.h \
967   $(TOP)\src\hwtime.h \
968   keywordhash.h \
969   $(TOP)\src\msvc.h \
970   $(TOP)\src\mutex.h \
971   opcodes.h \
972   $(TOP)\src\os.h \
973   $(TOP)\src\os_common.h \
974   $(TOP)\src\os_setup.h \
975   $(TOP)\src\os_win.h \
976   $(TOP)\src\pager.h \
977   $(TOP)\src\pcache.h \
978   parse.h \
979   sqlite3.h \
980   $(TOP)\src\sqlite3ext.h \
981   $(TOP)\src\sqliteInt.h \
982   $(TOP)\src\sqliteLimit.h \
983   $(TOP)\src\vdbe.h \
984   $(TOP)\src\vdbeInt.h \
985   $(TOP)\src\whereInt.h
986
987# Header files used by extensions
988#
989EXTHDR = $(EXTHDR) \
990  $(TOP)\ext\fts1\fts1.h \
991  $(TOP)\ext\fts1\fts1_hash.h \
992  $(TOP)\ext\fts1\fts1_tokenizer.h
993EXTHDR = $(EXTHDR) \
994  $(TOP)\ext\fts2\fts2.h \
995  $(TOP)\ext\fts2\fts2_hash.h \
996  $(TOP)\ext\fts2\fts2_tokenizer.h
997EXTHDR = $(EXTHDR) \
998  $(TOP)\ext\fts3\fts3.h \
999  $(TOP)\ext\fts3\fts3Int.h \
1000  $(TOP)\ext\fts3\fts3_hash.h \
1001  $(TOP)\ext\fts3\fts3_tokenizer.h
1002EXTHDR = $(EXTHDR) \
1003  $(TOP)\ext\rtree\rtree.h
1004EXTHDR = $(EXTHDR) \
1005  $(TOP)\ext\icu\sqliteicu.h
1006EXTHDR = $(EXTHDR) \
1007  $(TOP)\ext\rtree\sqlite3rtree.h
1008
1009# This is the default Makefile target.  The objects listed here
1010# are what get build when you type just "make" with no arguments.
1011#
1012all:	dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
1013
1014libsqlite3.lib:	$(LIBOBJ)
1015	$(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
1016
1017libtclsqlite3.lib:	tclsqlite.lo libsqlite3.lib
1018	$(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
1019
1020sqlite3.exe:	$(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
1021	$(LTLINK) $(READLINE_FLAGS) $(TOP)\src\shell.c \
1022		/link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1023
1024mptester.exe:	$(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
1025	$(LTLINK) $(TOP)\mptest\mptest.c \
1026		/link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
1027
1028# This target creates a directory named "tsrc" and fills it with
1029# copies of all of the C source code and header files needed to
1030# build on the target system.  Some of the C source code and header
1031# files are automatically generated.  This target takes care of
1032# all that automatic generation.
1033#
1034.target_source:	$(SRC) $(TOP)\tool\vdbe-compress.tcl
1035	-rmdir /S/Q tsrc
1036	-mkdir tsrc
1037	for %i in ($(SRC)) do copy /Y %i tsrc
1038	del /Q tsrc\sqlite.h.in tsrc\parse.y
1039	$(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
1040	move vdbe.new tsrc\vdbe.c
1041	echo > .target_source
1042
1043sqlite3.c:	.target_source $(TOP)\tool\mksqlite3c.tcl
1044	$(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS)
1045	copy tsrc\shell.c .
1046	copy tsrc\sqlite3ext.h .
1047
1048sqlite3-all.c:	sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
1049	$(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
1050
1051# Set the source code file to be used by executables and libraries when
1052# they need the amalgamation.
1053#
1054!IF $(SPLIT_AMALGAMATION)!=0
1055SQLITE3C = sqlite3-all.c
1056!ELSE
1057SQLITE3C = sqlite3.c
1058!ENDIF
1059
1060# Rule to build the amalgamation
1061#
1062sqlite3.lo:	$(SQLITE3C)
1063	$(LTCOMPILE) -c $(SQLITE3C)
1064
1065# Rules to build the LEMON compiler generator
1066#
1067lempar.c:	$(TOP)\src\lempar.c
1068	copy $(TOP)\src\lempar.c .
1069
1070lemon.exe:	$(TOP)\tool\lemon.c lempar.c
1071	$(BCC) $(NO_WARN) -Daccess=_access \
1072		-Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
1073
1074# Rules to build individual *.lo files from generated *.c files. This
1075# applies to:
1076#
1077#     parse.lo
1078#     opcodes.lo
1079#
1080parse.lo:	parse.c $(HDR)
1081	$(LTCOMPILE) -c parse.c
1082
1083opcodes.lo:	opcodes.c
1084	$(LTCOMPILE) -c opcodes.c
1085
1086# Rule to build the Win32 resources object file.
1087#
1088!IF $(USE_RC)!=0
1089$(LIBRESOBJS):	$(TOP)\src\sqlite3.rc $(HDR)
1090	echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
1091	for /F %%V in ('type "$(TOP)\VERSION"') do ( \
1092		echo #define SQLITE_RESOURCE_VERSION %%V \
1093			| $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
1094	)
1095	echo #endif >> sqlite3rc.h
1096	$(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
1097!ENDIF
1098
1099# Rules to build individual *.lo files from files in the src directory.
1100#
1101alter.lo:	$(TOP)\src\alter.c $(HDR)
1102	$(LTCOMPILE) -c $(TOP)\src\alter.c
1103
1104analyze.lo:	$(TOP)\src\analyze.c $(HDR)
1105	$(LTCOMPILE) -c $(TOP)\src\analyze.c
1106
1107attach.lo:	$(TOP)\src\attach.c $(HDR)
1108	$(LTCOMPILE) -c $(TOP)\src\attach.c
1109
1110auth.lo:	$(TOP)\src\auth.c $(HDR)
1111	$(LTCOMPILE) -c $(TOP)\src\auth.c
1112
1113backup.lo:	$(TOP)\src\backup.c $(HDR)
1114	$(LTCOMPILE) -c $(TOP)\src\backup.c
1115
1116bitvec.lo:	$(TOP)\src\bitvec.c $(HDR)
1117	$(LTCOMPILE) -c $(TOP)\src\bitvec.c
1118
1119btmutex.lo:	$(TOP)\src\btmutex.c $(HDR)
1120	$(LTCOMPILE) -c $(TOP)\src\btmutex.c
1121
1122btree.lo:	$(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
1123	$(LTCOMPILE) -c $(TOP)\src\btree.c
1124
1125build.lo:	$(TOP)\src\build.c $(HDR)
1126	$(LTCOMPILE) -c $(TOP)\src\build.c
1127
1128callback.lo:	$(TOP)\src\callback.c $(HDR)
1129	$(LTCOMPILE) -c $(TOP)\src\callback.c
1130
1131complete.lo:	$(TOP)\src\complete.c $(HDR)
1132	$(LTCOMPILE) -c $(TOP)\src\complete.c
1133
1134ctime.lo:	$(TOP)\src\ctime.c $(HDR)
1135	$(LTCOMPILE) -c $(TOP)\src\ctime.c
1136
1137date.lo:	$(TOP)\src\date.c $(HDR)
1138	$(LTCOMPILE) -c $(TOP)\src\date.c
1139
1140delete.lo:	$(TOP)\src\delete.c $(HDR)
1141	$(LTCOMPILE) -c $(TOP)\src\delete.c
1142
1143expr.lo:	$(TOP)\src\expr.c $(HDR)
1144	$(LTCOMPILE) -c $(TOP)\src\expr.c
1145
1146fault.lo:	$(TOP)\src\fault.c $(HDR)
1147	$(LTCOMPILE) -c $(TOP)\src\fault.c
1148
1149fkey.lo:	$(TOP)\src\fkey.c $(HDR)
1150	$(LTCOMPILE) -c $(TOP)\src\fkey.c
1151
1152func.lo:	$(TOP)\src\func.c $(HDR)
1153	$(LTCOMPILE) -c $(TOP)\src\func.c
1154
1155global.lo:	$(TOP)\src\global.c $(HDR)
1156	$(LTCOMPILE) -c $(TOP)\src\global.c
1157
1158hash.lo:	$(TOP)\src\hash.c $(HDR)
1159	$(LTCOMPILE) -c $(TOP)\src\hash.c
1160
1161insert.lo:	$(TOP)\src\insert.c $(HDR)
1162	$(LTCOMPILE) -c $(TOP)\src\insert.c
1163
1164journal.lo:	$(TOP)\src\journal.c $(HDR)
1165	$(LTCOMPILE) -c $(TOP)\src\journal.c
1166
1167legacy.lo:	$(TOP)\src\legacy.c $(HDR)
1168	$(LTCOMPILE) -c $(TOP)\src\legacy.c
1169
1170loadext.lo:	$(TOP)\src\loadext.c $(HDR)
1171	$(LTCOMPILE) -c $(TOP)\src\loadext.c
1172
1173main.lo:	$(TOP)\src\main.c $(HDR)
1174	$(LTCOMPILE) -c $(TOP)\src\main.c
1175
1176malloc.lo:	$(TOP)\src\malloc.c $(HDR)
1177	$(LTCOMPILE) -c $(TOP)\src\malloc.c
1178
1179mem0.lo:	$(TOP)\src\mem0.c $(HDR)
1180	$(LTCOMPILE) -c $(TOP)\src\mem0.c
1181
1182mem1.lo:	$(TOP)\src\mem1.c $(HDR)
1183	$(LTCOMPILE) -c $(TOP)\src\mem1.c
1184
1185mem2.lo:	$(TOP)\src\mem2.c $(HDR)
1186	$(LTCOMPILE) -c $(TOP)\src\mem2.c
1187
1188mem3.lo:	$(TOP)\src\mem3.c $(HDR)
1189	$(LTCOMPILE) -c $(TOP)\src\mem3.c
1190
1191mem5.lo:	$(TOP)\src\mem5.c $(HDR)
1192	$(LTCOMPILE) -c $(TOP)\src\mem5.c
1193
1194memjournal.lo:	$(TOP)\src\memjournal.c $(HDR)
1195	$(LTCOMPILE) -c $(TOP)\src\memjournal.c
1196
1197mutex.lo:	$(TOP)\src\mutex.c $(HDR)
1198	$(LTCOMPILE) -c $(TOP)\src\mutex.c
1199
1200mutex_noop.lo:	$(TOP)\src\mutex_noop.c $(HDR)
1201	$(LTCOMPILE) -c $(TOP)\src\mutex_noop.c
1202
1203mutex_unix.lo:	$(TOP)\src\mutex_unix.c $(HDR)
1204	$(LTCOMPILE) -c $(TOP)\src\mutex_unix.c
1205
1206mutex_w32.lo:	$(TOP)\src\mutex_w32.c $(HDR)
1207	$(LTCOMPILE) -c $(TOP)\src\mutex_w32.c
1208
1209notify.lo:	$(TOP)\src\notify.c $(HDR)
1210	$(LTCOMPILE) -c $(TOP)\src\notify.c
1211
1212pager.lo:	$(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
1213	$(LTCOMPILE) -c $(TOP)\src\pager.c
1214
1215pcache.lo:	$(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
1216	$(LTCOMPILE) -c $(TOP)\src\pcache.c
1217
1218pcache1.lo:	$(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
1219	$(LTCOMPILE) -c $(TOP)\src\pcache1.c
1220
1221os.lo:	$(TOP)\src\os.c $(HDR)
1222	$(LTCOMPILE) -c $(TOP)\src\os.c
1223
1224os_unix.lo:	$(TOP)\src\os_unix.c $(HDR)
1225	$(LTCOMPILE) -c $(TOP)\src\os_unix.c
1226
1227os_win.lo:	$(TOP)\src\os_win.c $(HDR)
1228	$(LTCOMPILE) -c $(TOP)\src\os_win.c
1229
1230pragma.lo:	$(TOP)\src\pragma.c $(HDR)
1231	$(LTCOMPILE) -c $(TOP)\src\pragma.c
1232
1233prepare.lo:	$(TOP)\src\prepare.c $(HDR)
1234	$(LTCOMPILE) -c $(TOP)\src\prepare.c
1235
1236printf.lo:	$(TOP)\src\printf.c $(HDR)
1237	$(LTCOMPILE) -c $(TOP)\src\printf.c
1238
1239random.lo:	$(TOP)\src\random.c $(HDR)
1240	$(LTCOMPILE) -c $(TOP)\src\random.c
1241
1242resolve.lo:	$(TOP)\src\resolve.c $(HDR)
1243	$(LTCOMPILE) -c $(TOP)\src\resolve.c
1244
1245rowset.lo:	$(TOP)\src\rowset.c $(HDR)
1246	$(LTCOMPILE) -c $(TOP)\src\rowset.c
1247
1248select.lo:	$(TOP)\src\select.c $(HDR)
1249	$(LTCOMPILE) -c $(TOP)\src\select.c
1250
1251status.lo:	$(TOP)\src\status.c $(HDR)
1252	$(LTCOMPILE) -c $(TOP)\src\status.c
1253
1254table.lo:	$(TOP)\src\table.c $(HDR)
1255	$(LTCOMPILE) -c $(TOP)\src\table.c
1256
1257threads.lo:	$(TOP)\src\threads.c $(HDR)
1258	$(LTCOMPILE) -c $(TOP)\src\threads.c
1259
1260tokenize.lo:	$(TOP)\src\tokenize.c keywordhash.h $(HDR)
1261	$(LTCOMPILE) -c $(TOP)\src\tokenize.c
1262
1263trigger.lo:	$(TOP)\src\trigger.c $(HDR)
1264	$(LTCOMPILE) -c $(TOP)\src\trigger.c
1265
1266update.lo:	$(TOP)\src\update.c $(HDR)
1267	$(LTCOMPILE) -c $(TOP)\src\update.c
1268
1269utf.lo:	$(TOP)\src\utf.c $(HDR)
1270	$(LTCOMPILE) -c $(TOP)\src\utf.c
1271
1272util.lo:	$(TOP)\src\util.c $(HDR)
1273	$(LTCOMPILE) -c $(TOP)\src\util.c
1274
1275vacuum.lo:	$(TOP)\src\vacuum.c $(HDR)
1276	$(LTCOMPILE) -c $(TOP)\src\vacuum.c
1277
1278vdbe.lo:	$(TOP)\src\vdbe.c $(HDR)
1279	$(LTCOMPILE) -c $(TOP)\src\vdbe.c
1280
1281vdbeapi.lo:	$(TOP)\src\vdbeapi.c $(HDR)
1282	$(LTCOMPILE) -c $(TOP)\src\vdbeapi.c
1283
1284vdbeaux.lo:	$(TOP)\src\vdbeaux.c $(HDR)
1285	$(LTCOMPILE) -c $(TOP)\src\vdbeaux.c
1286
1287vdbeblob.lo:	$(TOP)\src\vdbeblob.c $(HDR)
1288	$(LTCOMPILE) -c $(TOP)\src\vdbeblob.c
1289
1290vdbemem.lo:	$(TOP)\src\vdbemem.c $(HDR)
1291	$(LTCOMPILE) -c $(TOP)\src\vdbemem.c
1292
1293vdbesort.lo:	$(TOP)\src\vdbesort.c $(HDR)
1294	$(LTCOMPILE) -c $(TOP)\src\vdbesort.c
1295
1296vdbetrace.lo:	$(TOP)\src\vdbetrace.c $(HDR)
1297	$(LTCOMPILE) -c $(TOP)\src\vdbetrace.c
1298
1299vtab.lo:	$(TOP)\src\vtab.c $(HDR)
1300	$(LTCOMPILE) -c $(TOP)\src\vtab.c
1301
1302wal.lo:	$(TOP)\src\wal.c $(HDR)
1303	$(LTCOMPILE) -c $(TOP)\src\wal.c
1304
1305walker.lo:	$(TOP)\src\walker.c $(HDR)
1306	$(LTCOMPILE) -c $(TOP)\src\walker.c
1307
1308where.lo:	$(TOP)\src\where.c $(HDR)
1309	$(LTCOMPILE) -c $(TOP)\src\where.c
1310
1311tclsqlite.lo:	$(TOP)\src\tclsqlite.c $(HDR)
1312	$(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1313
1314tclsqlite-shell.lo:	$(TOP)\src\tclsqlite.c $(HDR)
1315	$(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
1316
1317tclsqlite3.exe:	tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS)
1318	$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1319
1320# Rules to build opcodes.c and opcodes.h
1321#
1322opcodes.c:	opcodes.h $(TOP)\mkopcodec.awk
1323	$(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c
1324
1325opcodes.h:	parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk
1326	type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h
1327
1328# Rules to build parse.c and parse.h - the outputs of lemon.
1329#
1330parse.h:	parse.c
1331
1332parse.c:	$(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
1333	del /Q parse.y parse.h parse.h.temp
1334	copy $(TOP)\src\parse.y .
1335	.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
1336	move parse.h parse.h.temp
1337	$(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
1338
1339sqlite3.h:	$(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
1340	$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h
1341
1342mkkeywordhash.exe:	$(TOP)\tool\mkkeywordhash.c
1343	$(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \
1344		$(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS)
1345
1346keywordhash.h:	$(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
1347	.\mkkeywordhash.exe > keywordhash.h
1348
1349
1350
1351# Rules to build the extension objects.
1352#
1353icu.lo:	$(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
1354	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
1355
1356fts2.lo:	$(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
1357	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
1358
1359fts2_hash.lo:	$(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
1360	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
1361
1362fts2_icu.lo:	$(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
1363	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
1364
1365fts2_porter.lo:	$(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
1366	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
1367
1368fts2_tokenizer.lo:	$(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
1369	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
1370
1371fts2_tokenizer1.lo:	$(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
1372	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
1373
1374fts3.lo:	$(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
1375	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
1376
1377fts3_aux.lo:	$(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
1378	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
1379
1380fts3_expr.lo:	$(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
1381	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
1382
1383fts3_hash.lo:	$(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
1384	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
1385
1386fts3_icu.lo:	$(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
1387	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
1388
1389fts3_snippet.lo:	$(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
1390	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
1391
1392fts3_porter.lo:	$(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
1393	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
1394
1395fts3_tokenizer.lo:	$(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
1396	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
1397
1398fts3_tokenizer1.lo:	$(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
1399	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
1400
1401fts3_tokenize_vtab.lo:	$(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1402	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
1403
1404fts3_unicode.lo:	$(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
1405	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
1406
1407fts3_unicode2.lo:	$(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
1408	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
1409
1410fts3_write.lo:	$(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
1411	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
1412
1413rtree.lo:	$(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
1414	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
1415
1416
1417# Rules to build the 'testfixture' application.
1418#
1419# If using the amalgamation, use sqlite3.c directly to build the test
1420# fixture.  Otherwise link against libsqlite3.lib.  (This distinction is
1421# necessary because the test fixture requires non-API symbols which are
1422# hidden when the library is built via the amalgamation).
1423#
1424TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
1425TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
1426TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
1427
1428TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib
1429TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
1430!IF $(USE_AMALGAMATION)==0
1431TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
1432!ELSE
1433TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
1434!ENDIF
1435
1436testfixture.exe:	$(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
1437	$(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
1438		-DBUILD_sqlite -I$(TCLINCDIR) \
1439		$(TESTFIXTURE_SRC) \
1440		/link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1441
1442extensiontest: testfixture.exe testloadext.dll
1443	.\testfixture.exe $(TOP)\test\loadext.test
1444
1445fulltest:	testfixture.exe sqlite3.exe
1446	.\testfixture.exe $(TOP)\test\all.test
1447
1448soaktest:	testfixture.exe sqlite3.exe
1449	.\testfixture.exe $(TOP)\test\all.test -soak=1
1450
1451fulltestonly:	testfixture.exe sqlite3.exe
1452	.\testfixture.exe $(TOP)\test\full.test
1453
1454queryplantest:	testfixture.exe sqlite3.exe
1455	.\testfixture.exe $(TOP)\test\permutations.test queryplanner
1456
1457test:	testfixture.exe sqlite3.exe
1458	.\testfixture.exe $(TOP)\test\veryquick.test
1459
1460sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
1461	copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@
1462	echo static const char *tclsh_main_loop(void){ >> $@
1463	echo static const char *zMainloop = >> $@
1464	$(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
1465	echo ; return zMainloop; } >> $@
1466
1467sqlite3_analyzer.exe:	sqlite3_analyzer.c $(LIBRESOBJS)
1468	$(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
1469		/link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1470
1471testloadext.lo:	$(TOP)\src\test_loadext.c
1472	$(LTCOMPILE) -c $(TOP)\src\test_loadext.c
1473
1474testloadext.dll: testloadext.lo
1475	$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
1476
1477showdb.exe:	$(TOP)\tool\showdb.c $(SQLITE3C)
1478	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1479		$(TOP)\tool\showdb.c $(SQLITE3C)
1480
1481showstat4.exe:	$(TOP)\tool\showstat4.c $(SQLITE3C)
1482	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1483		$(TOP)\tool\showstat4.c $(SQLITE3C)
1484
1485showjournal.exe:	$(TOP)\tool\showjournal.c $(SQLITE3C)
1486	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1487		$(TOP)\tool\showjournal.c $(SQLITE3C)
1488
1489showwal.exe:	$(TOP)\tool\showwal.c $(SQLITE3C)
1490	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1491		$(TOP)\tool\showwal.c $(SQLITE3C)
1492
1493fts3view.exe:	$(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C)
1494	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1495		$(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C)
1496
1497rollback-test.exe:	$(TOP)\tool\rollback-test.c $(SQLITE3C)
1498	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1499		$(TOP)\tool\rollback-test.c $(SQLITE3C)
1500
1501LogEst.exe:	$(TOP)\tool\logest.c sqlite3.h
1502	$(LTLINK) -Fe$@ $(TOP)\tool\LogEst.c
1503
1504wordcount.exe:	$(TOP)\test\wordcount.c $(SQLITE3C)
1505	$(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1506		$(TOP)\test\wordcount.c $(SQLITE3C)
1507
1508speedtest1.exe:	$(TOP)\test\speedtest1.c $(SQLITE3C)
1509	$(LTLINK) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \
1510		$(TOP)\test\speedtest1.c $(SQLITE3C)
1511
1512clean:
1513	del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
1514	del /Q *.cod *.da *.bb *.bbg gmon.out
1515	del /Q sqlite3.h opcodes.c opcodes.h
1516	del /Q lemon.* lempar.c parse.*
1517	del /Q mkkeywordhash.* keywordhash.h
1518	del /Q notasharedlib.*
1519	-rmdir /Q/S .deps
1520	-rmdir /Q/S .libs
1521	-rmdir /Q/S quota2a
1522	-rmdir /Q/S quota2b
1523	-rmdir /Q/S quota2c
1524	-rmdir /Q/S tsrc
1525	del /Q .target_source
1526	del /Q tclsqlite3.exe tclsqlite3.exp
1527	del /Q testloadext.dll testloadext.exp
1528	del /Q testfixture.exe testfixture.exp test.db
1529	del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe
1530	del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe
1531	del /Q wordcount.exe
1532	del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1533	del /Q sqlite3.c sqlite3-*.c
1534	del /Q sqlite3rc.h
1535	del /Q shell.c sqlite3ext.h
1536	del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c
1537	del /Q sqlite-*-output.vsix
1538	del /Q mptester.exe
1539
1540# Dynamic link library section.
1541#
1542dll: sqlite3.dll
1543
1544sqlite3.def: libsqlite3.lib
1545	echo EXPORTS > sqlite3.def
1546	dumpbin /all libsqlite3.lib \
1547		| $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
1548		| sort >> sqlite3.def
1549
1550sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def
1551	$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
1552