blob: 2606b5a654fb01f93b27a40148edacb8b597a3f6 [file] [log] [blame]
drh376deb12004-06-30 11:41:55 +00001#!/usr/make
2#
3# Makefile for SQLITE
4#
5# This makefile is suppose to be configured automatically using the
6# autoconf. But if that does not work for you, you can configure
7# the makefile manually. Just set the parameters below to values that
8# work well for your system.
9#
10# If the configure script does not work out-of-the-box, you might
11# be able to get it to work by giving it some hints. See the comment
12# at the beginning of configure.in for additional information.
13#
14
15# The toplevel directory of the source tree. This is the directory
16# that contains this "Makefile.in" and the "configure.in" script.
17#
drhb43be552015-01-15 15:47:06 +000018TOP = @abs_srcdir@
drh376deb12004-06-30 11:41:55 +000019
20# C Compiler and options for use in building executables that
21# will run on the platform that is doing the build.
22#
23BCC = @BUILD_CC@ @BUILD_CFLAGS@
24
drh149735d2015-01-01 19:53:10 +000025# TCC is the C Compile and options for use in building executables that
drh376deb12004-06-30 11:41:55 +000026# will run on the target platform. (BCC and TCC are usually the
drh149735d2015-01-01 19:53:10 +000027# same unless your are cross-compiling.) Separate CC and CFLAGS macros
28# are provide so that these aspects of the build process can be changed
29# on the "make" command-line. Ex: "make CC=clang CFLAGS=-fsanitize=undefined"
drh376deb12004-06-30 11:41:55 +000030#
drh149735d2015-01-01 19:53:10 +000031CC = @CC@
32CFLAGS = @CPPFLAGS@ @CFLAGS@
drhf7af7a12015-01-08 20:06:06 +000033TCC = ${CC} ${CFLAGS} -I. -I${TOP}/src -I${TOP}/ext/rtree -I${TOP}/ext/icu
drh498dcae2013-03-13 11:42:00 +000034TCC += -I${TOP}/ext/fts3 -I${TOP}/ext/async -I${TOP}/ext/session
tpoindex9d9f76c2005-01-03 21:28:56 +000035
mlcreech1e12d432008-05-07 02:42:01 +000036# Define this for the autoconf-based build, so that the code knows it can
37# include the generated config.h
38#
mistachkin1b904bf2012-01-14 03:34:24 +000039TCC += -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite
mlcreech1e12d432008-05-07 02:42:01 +000040
tpoindex9d9f76c2005-01-03 21:28:56 +000041# Define -DNDEBUG to compile without debugging (i.e., for production usage)
42# Omitting the define will cause extra debugging code to be inserted and
43# includes extra comments when "EXPLAIN stmt" is used.
44#
drh05c7e0b2015-01-10 14:27:17 +000045TCC += @TARGET_DEBUG@
drh376deb12004-06-30 11:41:55 +000046
drh376deb12004-06-30 11:41:55 +000047# Compiler options needed for programs that use the TCL library.
48#
drh93468362004-12-10 03:08:12 +000049TCC += @TCL_INCLUDE_SPEC@
drh376deb12004-06-30 11:41:55 +000050
51# The library that programs using TCL must link against.
52#
mistachkinf344a5e2012-12-06 00:16:51 +000053LIBTCL = @TCL_LIB_SPEC@
drh376deb12004-06-30 11:41:55 +000054
55# Compiler options needed for programs that use the readline() library.
56#
57READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
drhe44b8352015-10-30 14:25:57 +000058READLINE_FLAGS += -DHAVE_EDITLINE=@TARGET_HAVE_EDITLINE@
drh376deb12004-06-30 11:41:55 +000059
60# The library that programs using readline() must link against.
61#
62LIBREADLINE = @TARGET_READLINE_LIBS@
63
64# Should the database engine be compiled threadsafe
65#
drh5a3032b2007-09-03 16:12:09 +000066TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@
drh376deb12004-06-30 11:41:55 +000067
mlcreechc658b0f2008-03-09 02:20:11 +000068# Any target libraries which libsqlite must be linked against
69#
drh45fac882015-10-09 01:42:49 +000070TLIBS = @LIBS@ $(LIBS)
drhf1878b42006-01-23 18:06:52 +000071
drh376deb12004-06-30 11:41:55 +000072# Flags controlling use of the in memory btree implementation
73#
danielk1977b06a0b62008-06-26 10:54:12 +000074# SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
drh376deb12004-06-30 11:41:55 +000075# default to file, 2 to default to memory, and 3 to force temporary
76# tables to always be in memory.
77#
danielk1977b06a0b62008-06-26 10:54:12 +000078TEMP_STORE = -DSQLITE_TEMP_STORE=@TEMP_STORE@
drh376deb12004-06-30 11:41:55 +000079
shanefbedede2008-07-22 05:05:01 +000080# Enable/disable loadable extensions, and other optional features
shaneb1cd7302008-10-22 18:27:31 +000081# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
82# The same set of OMIT and ENABLE flags should be passed to the
83# LEMON parser generator and the mkkeywordhash tool as well.
shanefbedede2008-07-22 05:05:01 +000084OPT_FEATURE_FLAGS = @OPT_FEATURE_FLAGS@
drh498dcae2013-03-13 11:42:00 +000085OPT_FEATURE_FLAGS += -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK
shanefbedede2008-07-22 05:05:01 +000086
87TCC += $(OPT_FEATURE_FLAGS)
mlcreecha4edab02008-03-06 04:14:17 +000088
shaneb1cd7302008-10-22 18:27:31 +000089# Add in any optional parameters specified on the make commane line
90# ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
91TCC += $(OPTS)
92
drh4b2266a2004-11-27 15:52:16 +000093# Version numbers and release number for the SQLite being compiled.
94#
95VERSION = @VERSION@
danielk197799ba19e2005-02-05 07:33:34 +000096VERSION_NUMBER = @VERSION_NUMBER@
drh4b2266a2004-11-27 15:52:16 +000097RELEASE = @RELEASE@
98
drh7b5717e2004-11-25 13:50:01 +000099# Filename extensions
100#
101BEXE = @BUILD_EXEEXT@
102TEXE = @TARGET_EXEEXT@
103
drh4b2266a2004-11-27 15:52:16 +0000104# The following variable is "1" if the configure script was able to locate
105# the tclConfig.sh file. It is an empty string otherwise. When this
106# variable is "1", the TCL extension library (libtclsqlite3.so) is built
107# and installed.
drh7b5717e2004-11-25 13:50:01 +0000108#
109HAVE_TCL = @HAVE_TCL@
110
mlcreechab1c47b2008-03-09 02:51:10 +0000111# This is the command to use for tclsh - normally just "tclsh", but we may
112# know the specific version we want to use
113#
114TCLSH_CMD = @TCLSH_CMD@
115
vapier6d120f32009-01-28 04:46:14 +0000116# Where do we want to install the tcl plugin
117#
118TCLLIBDIR = @TCLLIBDIR@
119
drh4b2266a2004-11-27 15:52:16 +0000120# The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
121#
122SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
123
mlcreechaac7b932008-04-01 02:45:22 +0000124# If gcov support was enabled by the configure script, add the appropriate
125# flags here. It's not always as easy as just having the user add the right
126# CFLAGS / LDFLAGS, because libtool wants to use CFLAGS when linking, which
127# causes build errors with -fprofile-arcs -ftest-coverage with some GCCs.
128# Supposedly GCC does the right thing if you use --coverage, but in
129# practice it still fails. See:
130#
131# http://www.mail-archive.com/debian-gcc@lists.debian.org/msg26197.html
132#
133# for more info.
134#
shaneb1cd7302008-10-22 18:27:31 +0000135GCOV_CFLAGS1 = -DSQLITE_COVERAGE_TEST=1 -fprofile-arcs -ftest-coverage
mlcreechaac7b932008-04-01 02:45:22 +0000136GCOV_LDFLAGS1 = -lgcov
137USE_GCOV = @USE_GCOV@
138LTCOMPILE_EXTRAS += $(GCOV_CFLAGS$(USE_GCOV))
139LTLINK_EXTRAS += $(GCOV_LDFLAGS$(USE_GCOV))
140
141
drh4b2266a2004-11-27 15:52:16 +0000142# The directory into which to store package information for
143
144# Some standard variables and programs
145#
mlcreech3c080bc2008-03-07 02:20:56 +0000146prefix = @prefix@
147exec_prefix = @exec_prefix@
drh4b2266a2004-11-27 15:52:16 +0000148libdir = @libdir@
danielk197794bdf892008-08-04 04:28:18 +0000149pkgconfigdir = $(libdir)/pkgconfig
mlcreechc55771f2008-03-06 08:09:12 +0000150bindir = @bindir@
151includedir = @includedir@
drh4b2266a2004-11-27 15:52:16 +0000152INSTALL = @INSTALL@
153LIBTOOL = ./libtool
154ALLOWRELEASE = @ALLOWRELEASE@
155
156# libtool compile/link/install
mlcreechaac7b932008-04-01 02:45:22 +0000157LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC) $(LTCOMPILE_EXTRAS)
shaneb0650c22008-10-12 01:49:41 +0000158LTLINK = $(LIBTOOL) --mode=link $(TCC) $(LTCOMPILE_EXTRAS) @LDFLAGS@ $(LTLINK_EXTRAS)
drh4b2266a2004-11-27 15:52:16 +0000159LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
160
drh376deb12004-06-30 11:41:55 +0000161# You should not have to change anything below this line
162###############################################################################
drh4b2266a2004-11-27 15:52:16 +0000163
shaneh18607052010-07-06 20:37:09 +0000164USE_AMALGAMATION = @USE_AMALGAMATION@
165
mlcreech94984912008-03-04 19:03:08 +0000166# Object files for the SQLite library (non-amalgamation).
drh376deb12004-06-30 11:41:55 +0000167#
shaneh18607052010-07-06 20:37:09 +0000168LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
169 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
drh1a4a6802015-05-04 18:31:09 +0000170 callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
drh3edd8a52010-10-21 12:34:29 +0000171 expr.lo fault.lo fkey.lo \
drhd97f3d72012-05-28 15:32:09 +0000172 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
173 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
dand7a959c2013-04-22 15:30:37 +0000174 fts3_tokenize_vtab.lo \
drhd97f3d72012-05-28 15:32:09 +0000175 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
dan3e65f892015-06-25 20:36:36 +0000176 fts5.lo \
shaneh18607052010-07-06 20:37:09 +0000177 func.lo global.lo hash.lo \
drhc2f18ad2016-03-05 15:35:09 +0000178 icu.lo insert.lo json1.lo legacy.lo loadext.lo \
shaneh18607052010-07-06 20:37:09 +0000179 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
180 memjournal.lo \
drh83905c92012-06-21 13:00:37 +0000181 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
182 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
shaneh18607052010-07-06 20:37:09 +0000183 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
drh498dcae2013-03-13 11:42:00 +0000184 random.lo resolve.lo rowset.lo rtree.lo \
drhcb75bff2016-01-14 14:48:17 +0000185 sqlite3session.lo select.lo sqlite3rbu.lo status.lo \
drh38b41492015-06-08 15:08:15 +0000186 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
shaneh18607052010-07-06 20:37:09 +0000187 update.lo util.lo vacuum.lo \
dana9f39fd2011-08-12 16:34:42 +0000188 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
drh6c1f4ef2015-06-08 14:23:15 +0000189 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
190 utf.lo vtab.lo
mlcreech94984912008-03-04 19:03:08 +0000191
192# Object files for the amalgamation.
193#
shaneh18607052010-07-06 20:37:09 +0000194LIBOBJS1 = sqlite3.lo
mlcreech94984912008-03-04 19:03:08 +0000195
196# Determine the real value of LIBOBJ based on the 'configure' script
197#
shaneh18607052010-07-06 20:37:09 +0000198LIBOBJ = $(LIBOBJS$(USE_AMALGAMATION))
mlcreech94984912008-03-04 19:03:08 +0000199
drh376deb12004-06-30 11:41:55 +0000200
201# All of the source code files.
202#
203SRC = \
drhd0e4a6c2005-02-15 20:47:57 +0000204 $(TOP)/src/alter.c \
drh9f18e8a2005-07-08 12:13:04 +0000205 $(TOP)/src/analyze.c \
drh376deb12004-06-30 11:41:55 +0000206 $(TOP)/src/attach.c \
207 $(TOP)/src/auth.c \
danielk197704103022009-02-03 16:51:24 +0000208 $(TOP)/src/backup.c \
mlcreeche0414bb2008-02-26 03:45:59 +0000209 $(TOP)/src/bitvec.c \
drh900b31e2007-08-28 02:27:51 +0000210 $(TOP)/src/btmutex.c \
drh376deb12004-06-30 11:41:55 +0000211 $(TOP)/src/btree.c \
212 $(TOP)/src/btree.h \
mlcreecheb6dc142008-03-13 18:28:03 +0000213 $(TOP)/src/btreeInt.h \
drh376deb12004-06-30 11:41:55 +0000214 $(TOP)/src/build.c \
danielk1977fd9a0a42005-05-24 12:01:00 +0000215 $(TOP)/src/callback.c \
drha2b902d2005-08-14 17:53:20 +0000216 $(TOP)/src/complete.c \
shanehdc97a8c2010-02-23 20:08:35 +0000217 $(TOP)/src/ctime.c \
drh376deb12004-06-30 11:41:55 +0000218 $(TOP)/src/date.c \
drh1a4a6802015-05-04 18:31:09 +0000219 $(TOP)/src/dbstat.c \
drh376deb12004-06-30 11:41:55 +0000220 $(TOP)/src/delete.c \
drh376deb12004-06-30 11:41:55 +0000221 $(TOP)/src/expr.c \
drh643167f2008-01-22 21:30:53 +0000222 $(TOP)/src/fault.c \
dan3be7d6e2009-09-19 17:59:59 +0000223 $(TOP)/src/fkey.c \
drh70a8ca32008-08-21 18:49:27 +0000224 $(TOP)/src/func.c \
drh40257ff2008-06-13 18:24:27 +0000225 $(TOP)/src/global.c \
drh376deb12004-06-30 11:41:55 +0000226 $(TOP)/src/hash.c \
227 $(TOP)/src/hash.h \
shane9bcbdad2008-05-29 20:22:37 +0000228 $(TOP)/src/hwtime.h \
drh376deb12004-06-30 11:41:55 +0000229 $(TOP)/src/insert.c \
230 $(TOP)/src/legacy.c \
drh1e397f82006-06-08 15:28:43 +0000231 $(TOP)/src/loadext.c \
drh376deb12004-06-30 11:41:55 +0000232 $(TOP)/src/main.c \
drh9e91c752007-05-07 13:11:10 +0000233 $(TOP)/src/malloc.c \
drhd1370b62008-10-28 18:58:20 +0000234 $(TOP)/src/mem0.c \
drh4bfc8a92007-08-27 23:38:43 +0000235 $(TOP)/src/mem1.c \
236 $(TOP)/src/mem2.c \
drh9c7a60d2007-10-19 17:47:24 +0000237 $(TOP)/src/mem3.c \
mlcreechfcfe27d2008-03-02 05:34:10 +0000238 $(TOP)/src/mem5.c \
danielk19776553c5c2008-10-21 04:30:31 +0000239 $(TOP)/src/memjournal.c \
mistachkin2318d332015-01-12 18:02:52 +0000240 $(TOP)/src/msvc.h \
drh4bfc8a92007-08-27 23:38:43 +0000241 $(TOP)/src/mutex.c \
mlcreecheb6dc142008-03-13 18:28:03 +0000242 $(TOP)/src/mutex.h \
drh18472fa2008-10-07 15:25:48 +0000243 $(TOP)/src/mutex_noop.c \
drh437b9012007-08-28 16:34:42 +0000244 $(TOP)/src/mutex_unix.c \
245 $(TOP)/src/mutex_w32.c \
danielk1977d52acb32009-03-16 14:48:18 +0000246 $(TOP)/src/notify.c \
drh054889e2005-11-30 03:20:31 +0000247 $(TOP)/src/os.c \
mlcreecheb6dc142008-03-13 18:28:03 +0000248 $(TOP)/src/os.h \
249 $(TOP)/src/os_common.h \
mistachkinf74b9e02013-11-26 01:00:31 +0000250 $(TOP)/src/os_setup.h \
drh376deb12004-06-30 11:41:55 +0000251 $(TOP)/src/os_unix.c \
252 $(TOP)/src/os_win.c \
mistachkin8bc52622013-11-25 09:36:07 +0000253 $(TOP)/src/os_win.h \
drh376deb12004-06-30 11:41:55 +0000254 $(TOP)/src/pager.c \
255 $(TOP)/src/pager.h \
256 $(TOP)/src/parse.y \
danielk19778c0a7912008-08-20 14:49:23 +0000257 $(TOP)/src/pcache.c \
258 $(TOP)/src/pcache.h \
danielk1977bc2ca9e2008-11-13 14:28:28 +0000259 $(TOP)/src/pcache1.c \
drh376deb12004-06-30 11:41:55 +0000260 $(TOP)/src/pragma.c \
drh67e65e52015-02-02 21:34:54 +0000261 $(TOP)/src/pragma.h \
danielk1977fa256a32005-05-25 04:11:56 +0000262 $(TOP)/src/prepare.c \
drh376deb12004-06-30 11:41:55 +0000263 $(TOP)/src/printf.c \
264 $(TOP)/src/random.c \
drh7d10d5a2008-08-20 16:35:10 +0000265 $(TOP)/src/resolve.c \
drh3d4501e2008-12-04 20:40:10 +0000266 $(TOP)/src/rowset.c \
drh376deb12004-06-30 11:41:55 +0000267 $(TOP)/src/select.c \
drhf7141992008-06-19 00:16:08 +0000268 $(TOP)/src/status.c \
drh376deb12004-06-30 11:41:55 +0000269 $(TOP)/src/shell.c \
270 $(TOP)/src/sqlite.h.in \
mlcreecheb6dc142008-03-13 18:28:03 +0000271 $(TOP)/src/sqlite3ext.h \
drh376deb12004-06-30 11:41:55 +0000272 $(TOP)/src/sqliteInt.h \
mlcreecheb6dc142008-03-13 18:28:03 +0000273 $(TOP)/src/sqliteLimit.h \
drh376deb12004-06-30 11:41:55 +0000274 $(TOP)/src/table.c \
275 $(TOP)/src/tclsqlite.c \
drh45fac882015-10-09 01:42:49 +0000276 $(TOP)/src/threads.c \
drh376deb12004-06-30 11:41:55 +0000277 $(TOP)/src/tokenize.c \
drh38b41492015-06-08 15:08:15 +0000278 $(TOP)/src/treeview.c \
drh376deb12004-06-30 11:41:55 +0000279 $(TOP)/src/trigger.c \
280 $(TOP)/src/utf.c \
281 $(TOP)/src/update.c \
282 $(TOP)/src/util.c \
283 $(TOP)/src/vacuum.c \
284 $(TOP)/src/vdbe.c \
285 $(TOP)/src/vdbe.h \
286 $(TOP)/src/vdbeapi.c \
287 $(TOP)/src/vdbeaux.c \
danielk19776338c762007-05-17 16:38:30 +0000288 $(TOP)/src/vdbeblob.c \
drh376deb12004-06-30 11:41:55 +0000289 $(TOP)/src/vdbemem.c \
dana9f39fd2011-08-12 16:34:42 +0000290 $(TOP)/src/vdbesort.c \
drhc7bc4fd2009-11-25 18:03:42 +0000291 $(TOP)/src/vdbetrace.c \
drh376deb12004-06-30 11:41:55 +0000292 $(TOP)/src/vdbeInt.h \
drhb9bb7c12006-06-11 23:41:55 +0000293 $(TOP)/src/vtab.c \
drh8cd5b252015-03-02 22:06:43 +0000294 $(TOP)/src/vxworks.h \
drhc438efd2010-04-26 00:19:45 +0000295 $(TOP)/src/wal.c \
296 $(TOP)/src/wal.h \
drh7d10d5a2008-08-20 16:35:10 +0000297 $(TOP)/src/walker.c \
drhe54df422013-11-12 18:37:25 +0000298 $(TOP)/src/where.c \
drh6f82e852015-06-06 20:12:09 +0000299 $(TOP)/src/wherecode.c \
drh6c1f4ef2015-06-08 14:23:15 +0000300 $(TOP)/src/whereexpr.c \
drhe54df422013-11-12 18:37:25 +0000301 $(TOP)/src/whereInt.h
drh376deb12004-06-30 11:41:55 +0000302
drh0c979402006-10-03 19:12:32 +0000303# Source code for extensions
304#
305SRC += \
306 $(TOP)/ext/fts1/fts1.c \
307 $(TOP)/ext/fts1/fts1.h \
308 $(TOP)/ext/fts1/fts1_hash.c \
309 $(TOP)/ext/fts1/fts1_hash.h \
310 $(TOP)/ext/fts1/fts1_porter.c \
311 $(TOP)/ext/fts1/fts1_tokenizer.h \
312 $(TOP)/ext/fts1/fts1_tokenizer1.c
mlcreech47524b82008-03-02 05:40:05 +0000313SRC += \
314 $(TOP)/ext/fts2/fts2.c \
315 $(TOP)/ext/fts2/fts2.h \
316 $(TOP)/ext/fts2/fts2_hash.c \
317 $(TOP)/ext/fts2/fts2_hash.h \
318 $(TOP)/ext/fts2/fts2_icu.c \
319 $(TOP)/ext/fts2/fts2_porter.c \
320 $(TOP)/ext/fts2/fts2_tokenizer.h \
321 $(TOP)/ext/fts2/fts2_tokenizer.c \
322 $(TOP)/ext/fts2/fts2_tokenizer1.c
323SRC += \
324 $(TOP)/ext/fts3/fts3.c \
325 $(TOP)/ext/fts3/fts3.h \
dan16708c42009-11-19 15:25:25 +0000326 $(TOP)/ext/fts3/fts3Int.h \
shanehd01f9cb2011-02-09 15:25:17 +0000327 $(TOP)/ext/fts3/fts3_aux.c \
shane5df7c0f2009-01-02 15:47:01 +0000328 $(TOP)/ext/fts3/fts3_expr.c \
mlcreech47524b82008-03-02 05:40:05 +0000329 $(TOP)/ext/fts3/fts3_hash.c \
330 $(TOP)/ext/fts3/fts3_hash.h \
331 $(TOP)/ext/fts3/fts3_icu.c \
332 $(TOP)/ext/fts3/fts3_porter.c \
dan16708c42009-11-19 15:25:25 +0000333 $(TOP)/ext/fts3/fts3_snippet.c \
mlcreech47524b82008-03-02 05:40:05 +0000334 $(TOP)/ext/fts3/fts3_tokenizer.h \
335 $(TOP)/ext/fts3/fts3_tokenizer.c \
dan16708c42009-11-19 15:25:25 +0000336 $(TOP)/ext/fts3/fts3_tokenizer1.c \
dand7a959c2013-04-22 15:30:37 +0000337 $(TOP)/ext/fts3/fts3_tokenize_vtab.c \
drhd97f3d72012-05-28 15:32:09 +0000338 $(TOP)/ext/fts3/fts3_unicode.c \
339 $(TOP)/ext/fts3/fts3_unicode2.c \
dan16708c42009-11-19 15:25:25 +0000340 $(TOP)/ext/fts3/fts3_write.c
mlcreech47524b82008-03-02 05:40:05 +0000341SRC += \
danielk19771c826652008-09-08 08:08:09 +0000342 $(TOP)/ext/icu/sqliteicu.h \
mlcreech47524b82008-03-02 05:40:05 +0000343 $(TOP)/ext/icu/icu.c
shaneca57b872008-05-28 17:31:17 +0000344SRC += \
345 $(TOP)/ext/rtree/rtree.h \
346 $(TOP)/ext/rtree/rtree.c
drh498dcae2013-03-13 11:42:00 +0000347SRC += \
348 $(TOP)/ext/session/sqlite3session.c \
349 $(TOP)/ext/session/sqlite3session.h
drhadf3bf52015-05-19 22:42:23 +0000350SRC += \
drhcfb8f8d2015-07-23 20:44:49 +0000351 $(TOP)/ext/rbu/sqlite3rbu.h \
352 $(TOP)/ext/rbu/sqlite3rbu.c
drh50065652015-10-08 19:29:18 +0000353SRC += \
354 $(TOP)/ext/misc/json1.c
mlcreech969b2cd2008-03-14 04:11:03 +0000355
shaneh18607052010-07-06 20:37:09 +0000356# Generated source code files
357#
358SRC += \
359 keywordhash.h \
360 opcodes.c \
361 opcodes.h \
362 parse.c \
363 parse.h \
364 config.h \
365 sqlite3.h
366
367# Source code to the test files.
mlcreech969b2cd2008-03-14 04:11:03 +0000368#
369TESTSRC = \
drh376deb12004-06-30 11:41:55 +0000370 $(TOP)/src/test1.c \
371 $(TOP)/src/test2.c \
372 $(TOP)/src/test3.c \
373 $(TOP)/src/test4.c \
374 $(TOP)/src/test5.c \
drh9c06c952005-11-26 00:25:00 +0000375 $(TOP)/src/test6.c \
drh7910e762006-01-09 23:50:11 +0000376 $(TOP)/src/test7.c \
drhb9bb7c12006-06-11 23:41:55 +0000377 $(TOP)/src/test8.c \
danielk1977a713f2c2007-03-29 12:19:11 +0000378 $(TOP)/src/test9.c \
drh1409be62006-08-23 20:07:20 +0000379 $(TOP)/src/test_autoext.c \
drh7910e762006-01-09 23:50:11 +0000380 $(TOP)/src/test_async.c \
danielk197704103022009-02-03 16:51:24 +0000381 $(TOP)/src/test_backup.c \
drhddebf162016-03-04 02:59:35 +0000382 $(TOP)/src/test_bestindex.c \
drh5de7d962014-12-05 00:17:39 +0000383 $(TOP)/src/test_blob.c \
drh16a9b832007-05-05 18:39:25 +0000384 $(TOP)/src/test_btree.c \
drhc797d4d2007-05-08 01:08:49 +0000385 $(TOP)/src/test_config.c \
shaneh84aab392010-05-06 15:35:59 +0000386 $(TOP)/src/test_demovfs.c \
danielk1977bf260972008-01-22 11:50:13 +0000387 $(TOP)/src/test_devsym.c \
drh70156982013-03-03 20:26:46 +0000388 $(TOP)/src/test_fs.c \
drh984bfaa2008-03-19 16:08:53 +0000389 $(TOP)/src/test_func.c \
drh15926592007-04-06 15:02:13 +0000390 $(TOP)/src/test_hexio.c \
shane8e283792009-08-21 02:07:09 +0000391 $(TOP)/src/test_init.c \
drh522efc62009-11-10 17:24:37 +0000392 $(TOP)/src/test_intarray.c \
danielk1977f3107512008-12-22 10:58:46 +0000393 $(TOP)/src/test_journal.c \
drh4bfc8a92007-08-27 23:38:43 +0000394 $(TOP)/src/test_malloc.c \
drh5af3ebd2010-11-05 00:00:42 +0000395 $(TOP)/src/test_multiplex.c \
shanec6f66c52008-07-08 22:15:49 +0000396 $(TOP)/src/test_mutex.c \
danielk197720e987a2007-10-05 15:04:12 +0000397 $(TOP)/src/test_onefile.c \
mlcreechede26272008-04-13 23:13:39 +0000398 $(TOP)/src/test_osinst.c \
drhb232c232008-11-19 01:20:26 +0000399 $(TOP)/src/test_pcache.c \
drh51e79a72010-10-06 20:25:00 +0000400 $(TOP)/src/test_quota.c \
dan9508daa2010-08-28 18:58:00 +0000401 $(TOP)/src/test_rtree.c \
danielk1977954ce992006-06-15 15:59:19 +0000402 $(TOP)/src/test_schema.c \
drh2d02a672006-01-25 15:55:37 +0000403 $(TOP)/src/test_server.c \
drh01a109e2010-11-24 13:04:22 +0000404 $(TOP)/src/test_superlock.c \
drh8689bc32011-04-01 20:54:38 +0000405 $(TOP)/src/test_syscall.c \
drh4be8b512006-06-13 23:51:34 +0000406 $(TOP)/src/test_tclvar.c \
shane8e283792009-08-21 02:07:09 +0000407 $(TOP)/src/test_thread.c \
shaneh84aab392010-05-06 15:35:59 +0000408 $(TOP)/src/test_vfs.c \
mistachkin92af1eb2015-11-30 23:29:07 +0000409 $(TOP)/src/test_windirent.c \
dan807d0fc2011-05-17 14:41:36 +0000410 $(TOP)/src/test_wsd.c \
dan99ebad92011-06-13 09:11:01 +0000411 $(TOP)/ext/fts3/fts3_term.c \
drh498dcae2013-03-13 11:42:00 +0000412 $(TOP)/ext/fts3/fts3_test.c \
drhadf3bf52015-05-19 22:42:23 +0000413 $(TOP)/ext/session/test_session.c \
drhcfb8f8d2015-07-23 20:44:49 +0000414 $(TOP)/ext/rbu/test_rbu.c
drh376deb12004-06-30 11:41:55 +0000415
drhe50db1c2013-04-25 14:31:46 +0000416# Statically linked extensions
417#
418TESTSRC += \
drh8416fc72013-04-25 16:42:55 +0000419 $(TOP)/ext/misc/amatch.c \
420 $(TOP)/ext/misc/closure.c \
drh1728bcb2014-11-10 16:49:56 +0000421 $(TOP)/ext/misc/eval.c \
drh51ed2982014-06-16 12:44:32 +0000422 $(TOP)/ext/misc/fileio.c \
drhe50db1c2013-04-25 14:31:46 +0000423 $(TOP)/ext/misc/fuzzer.c \
dan3e65f892015-06-25 20:36:36 +0000424 $(TOP)/ext/fts5/fts5_tcl.c \
dand3789c02015-08-04 20:29:00 +0000425 $(TOP)/ext/fts5/fts5_test_mi.c \
dan2cfe0492016-01-14 20:05:59 +0000426 $(TOP)/ext/fts5/fts5_test_tok.c \
drh8416fc72013-04-25 16:42:55 +0000427 $(TOP)/ext/misc/ieee754.c \
drhea41dc42013-04-25 19:31:33 +0000428 $(TOP)/ext/misc/nextchar.c \
drhdef33672013-05-28 20:25:54 +0000429 $(TOP)/ext/misc/percentile.c \
drhe50db1c2013-04-25 14:31:46 +0000430 $(TOP)/ext/misc/regexp.c \
drh398f8722015-08-19 13:54:20 +0000431 $(TOP)/ext/misc/series.c \
drhb7045ab2013-04-25 14:59:01 +0000432 $(TOP)/ext/misc/spellfix.c \
drh5f8cdac2013-10-14 21:14:42 +0000433 $(TOP)/ext/misc/totype.c \
drhe50db1c2013-04-25 14:31:46 +0000434 $(TOP)/ext/misc/wholenumber.c
435
shaneh18607052010-07-06 20:37:09 +0000436# Source code to the library files needed by the test fixture
437#
438TESTSRC2 = \
439 $(TOP)/src/attach.c \
440 $(TOP)/src/backup.c \
441 $(TOP)/src/bitvec.c \
442 $(TOP)/src/btree.c \
443 $(TOP)/src/build.c \
444 $(TOP)/src/ctime.c \
445 $(TOP)/src/date.c \
drh1a4a6802015-05-04 18:31:09 +0000446 $(TOP)/src/dbstat.c \
shaneh18607052010-07-06 20:37:09 +0000447 $(TOP)/src/expr.c \
448 $(TOP)/src/func.c \
449 $(TOP)/src/insert.c \
450 $(TOP)/src/wal.c \
mistachkin06006632013-05-15 20:35:13 +0000451 $(TOP)/src/main.c \
shaneh18607052010-07-06 20:37:09 +0000452 $(TOP)/src/mem5.c \
453 $(TOP)/src/os.c \
shaneh18607052010-07-06 20:37:09 +0000454 $(TOP)/src/os_unix.c \
455 $(TOP)/src/os_win.c \
456 $(TOP)/src/pager.c \
457 $(TOP)/src/pragma.c \
458 $(TOP)/src/prepare.c \
459 $(TOP)/src/printf.c \
460 $(TOP)/src/random.c \
461 $(TOP)/src/pcache.c \
462 $(TOP)/src/pcache1.c \
463 $(TOP)/src/select.c \
464 $(TOP)/src/tokenize.c \
465 $(TOP)/src/utf.c \
466 $(TOP)/src/util.c \
467 $(TOP)/src/vdbeapi.c \
468 $(TOP)/src/vdbeaux.c \
469 $(TOP)/src/vdbe.c \
470 $(TOP)/src/vdbemem.c \
471 $(TOP)/src/vdbetrace.c \
472 $(TOP)/src/where.c \
drh6f82e852015-06-06 20:12:09 +0000473 $(TOP)/src/wherecode.c \
drh6c1f4ef2015-06-08 14:23:15 +0000474 $(TOP)/src/whereexpr.c \
shaneh18607052010-07-06 20:37:09 +0000475 parse.c \
476 $(TOP)/ext/fts3/fts3.c \
shanehd01f9cb2011-02-09 15:25:17 +0000477 $(TOP)/ext/fts3/fts3_aux.c \
shaneh18607052010-07-06 20:37:09 +0000478 $(TOP)/ext/fts3/fts3_expr.c \
shaneh671b5222011-05-12 21:01:12 +0000479 $(TOP)/ext/fts3/fts3_term.c \
shaneh18607052010-07-06 20:37:09 +0000480 $(TOP)/ext/fts3/fts3_tokenizer.c \
481 $(TOP)/ext/fts3/fts3_write.c \
drh498dcae2013-03-13 11:42:00 +0000482 $(TOP)/ext/async/sqlite3async.c \
483 $(TOP)/ext/session/sqlite3session.c
shaneh18607052010-07-06 20:37:09 +0000484
drh376deb12004-06-30 11:41:55 +0000485# Header files used by all library source files.
486#
487HDR = \
drh376deb12004-06-30 11:41:55 +0000488 $(TOP)/src/btree.h \
drha3152892007-05-05 11:48:52 +0000489 $(TOP)/src/btreeInt.h \
drh376deb12004-06-30 11:41:55 +0000490 $(TOP)/src/hash.h \
shane9bcbdad2008-05-29 20:22:37 +0000491 $(TOP)/src/hwtime.h \
shaneh18607052010-07-06 20:37:09 +0000492 keywordhash.h \
mistachkin2318d332015-01-12 18:02:52 +0000493 $(TOP)/src/msvc.h \
drh437b9012007-08-28 16:34:42 +0000494 $(TOP)/src/mutex.h \
drh376deb12004-06-30 11:41:55 +0000495 opcodes.h \
496 $(TOP)/src/os.h \
497 $(TOP)/src/os_common.h \
mistachkinf74b9e02013-11-26 01:00:31 +0000498 $(TOP)/src/os_setup.h \
mistachkin8bc52622013-11-25 09:36:07 +0000499 $(TOP)/src/os_win.h \
shaneh18607052010-07-06 20:37:09 +0000500 $(TOP)/src/pager.h \
501 $(TOP)/src/pcache.h \
502 parse.h \
drh67e65e52015-02-02 21:34:54 +0000503 $(TOP)/src/pragma.h \
shaneh18607052010-07-06 20:37:09 +0000504 sqlite3.h \
drh1e397f82006-06-08 15:28:43 +0000505 $(TOP)/src/sqlite3ext.h \
drh376deb12004-06-30 11:41:55 +0000506 $(TOP)/src/sqliteInt.h \
shaneh18607052010-07-06 20:37:09 +0000507 $(TOP)/src/sqliteLimit.h \
drh376deb12004-06-30 11:41:55 +0000508 $(TOP)/src/vdbe.h \
mlcreecheb6dc142008-03-13 18:28:03 +0000509 $(TOP)/src/vdbeInt.h \
drh8cd5b252015-03-02 22:06:43 +0000510 $(TOP)/src/vxworks.h \
drhe54df422013-11-12 18:37:25 +0000511 $(TOP)/src/whereInt.h \
mlcreech23797062008-03-20 02:25:35 +0000512 config.h
drh376deb12004-06-30 11:41:55 +0000513
drh0c979402006-10-03 19:12:32 +0000514# Header files used by extensions
515#
shaneh18607052010-07-06 20:37:09 +0000516EXTHDR += \
drh0c979402006-10-03 19:12:32 +0000517 $(TOP)/ext/fts1/fts1.h \
518 $(TOP)/ext/fts1/fts1_hash.h \
519 $(TOP)/ext/fts1/fts1_tokenizer.h
shaneh18607052010-07-06 20:37:09 +0000520EXTHDR += \
mlcreech47524b82008-03-02 05:40:05 +0000521 $(TOP)/ext/fts2/fts2.h \
522 $(TOP)/ext/fts2/fts2_hash.h \
523 $(TOP)/ext/fts2/fts2_tokenizer.h
shaneh18607052010-07-06 20:37:09 +0000524EXTHDR += \
mlcreech47524b82008-03-02 05:40:05 +0000525 $(TOP)/ext/fts3/fts3.h \
dan16708c42009-11-19 15:25:25 +0000526 $(TOP)/ext/fts3/fts3Int.h \
mlcreech47524b82008-03-02 05:40:05 +0000527 $(TOP)/ext/fts3/fts3_hash.h \
528 $(TOP)/ext/fts3/fts3_tokenizer.h
shaneh18607052010-07-06 20:37:09 +0000529EXTHDR += \
shaneca57b872008-05-28 17:31:17 +0000530 $(TOP)/ext/rtree/rtree.h
shaneh18607052010-07-06 20:37:09 +0000531EXTHDR += \
danielk19771c826652008-09-08 08:08:09 +0000532 $(TOP)/ext/icu/sqliteicu.h
dan9508daa2010-08-28 18:58:00 +0000533EXTHDR += \
534 $(TOP)/ext/rtree/sqlite3rtree.h
drh0c979402006-10-03 19:12:32 +0000535
mistachkind4ab1032015-05-11 16:27:33 +0000536# executables needed for testing
drhf4375442015-05-11 12:15:45 +0000537#
538TESTPROGS = \
539 testfixture$(TEXE) \
540 sqlite3$(TEXE) \
541 sqlite3_analyzer$(TEXE) \
542 sqldiff$(TEXE)
543
drhea93c702015-05-26 18:15:08 +0000544# Databases containing fuzzer test cases
545#
546FUZZDATA = \
547 $(TOP)/test/fuzzdata1.db \
548 $(TOP)/test/fuzzdata2.db \
drh64ff56f2015-09-23 11:59:50 +0000549 $(TOP)/test/fuzzdata3.db \
550 $(TOP)/test/fuzzdata4.db
drhf4375442015-05-11 12:15:45 +0000551
drh905da632015-06-10 18:53:09 +0000552# Standard options to testfixture
553#
554TESTOPTS = --verbose=file --output=test-out.txt
555
drh50065652015-10-08 19:29:18 +0000556# Extra compiler options for various shell tools
557#
drh74cf74a2016-02-09 17:12:22 +0000558SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
559SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
drh50065652015-10-08 19:29:18 +0000560FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
drh9d4c9822016-01-05 03:39:52 +0000561FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
drh50065652015-10-08 19:29:18 +0000562
drh376deb12004-06-30 11:41:55 +0000563# This is the default Makefile target. The objects listed here
564# are what get build when you type just "make" with no arguments.
565#
drh7b5717e2004-11-25 13:50:01 +0000566all: sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
drh376deb12004-06-30 11:41:55 +0000567
568Makefile: $(TOP)/Makefile.in
569 ./config.status
570
vapier2574da52009-01-26 20:59:02 +0000571sqlite3.pc: $(TOP)/sqlite3.pc.in
572 ./config.status
573
drh376deb12004-06-30 11:41:55 +0000574libsqlite3.la: $(LIBOBJ)
mistachkin691d4c92013-10-11 22:19:55 +0000575 $(LTLINK) -no-undefined -o $@ $(LIBOBJ) $(TLIBS) \
mlcreech289234c2008-03-13 19:55:20 +0000576 ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
drh376deb12004-06-30 11:41:55 +0000577
578libtclsqlite3.la: tclsqlite.lo libsqlite3.la
mistachkin691d4c92013-10-11 22:19:55 +0000579 $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
drh0fcf2372008-07-25 12:49:44 +0000580 libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
vapier6d120f32009-01-28 04:46:14 +0000581 -rpath "$(TCLLIBDIR)" \
582 -version-info "8:6:8" \
583 -avoid-version
drh376deb12004-06-30 11:41:55 +0000584
drh74cf74a2016-02-09 17:12:22 +0000585sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
drh50065652015-10-08 19:29:18 +0000586 $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
drh74cf74a2016-02-09 17:12:22 +0000587 $(TOP)/src/shell.c sqlite3.c \
mlcreech289234c2008-03-13 19:55:20 +0000588 $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
drhc9a67a82007-12-13 18:20:46 +0000589
drhb6750b12015-05-05 01:09:06 +0000590sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
mistachkin7a94e6b2015-05-26 03:24:33 +0000591 $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS)
drhd62c0f42015-04-09 13:34:29 +0000592
drhcc5f8a42016-02-06 22:32:06 +0000593srcck1$(BEXE): $(TOP)/tool/srcck1.c
594 $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
595
596sourcetest: srcck1$(BEXE) sqlite3.c
597 ./srcck1 sqlite3.c
598
drh50065652015-10-08 19:29:18 +0000599fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h
600 $(LTLINK) -o $@ $(FUZZERSHELL_OPT) \
601 $(TOP)/tool/fuzzershell.c sqlite3.c $(TLIBS)
drh268e72f2015-04-17 14:30:49 +0000602
drh50065652015-10-08 19:29:18 +0000603fuzzcheck$(TEXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h
604 $(LTLINK) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS)
drhbc94dbb2013-04-08 14:28:33 +0000605
drhb6750b12015-05-05 01:09:06 +0000606mptester$(TEXE): sqlite3.c $(TOP)/mptest/mptest.c
drhbc94dbb2013-04-08 14:28:33 +0000607 $(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \
608 $(TLIBS) -rpath "$(libdir)"
609
drhb6750b12015-05-05 01:09:06 +0000610MPTEST1=./mptester$(TEXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20
611MPTEST2=./mptester$(TEXE) mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20
612mptest: mptester$(TEXE)
drhcc285c52015-03-11 14:34:38 +0000613 rm -f mptest.db
614 $(MPTEST1) --journalmode DELETE
615 $(MPTEST2) --journalmode WAL
616 $(MPTEST1) --journalmode WAL
617 $(MPTEST2) --journalmode PERSIST
618 $(MPTEST1) --journalmode PERSIST
619 $(MPTEST2) --journalmode TRUNCATE
620 $(MPTEST1) --journalmode TRUNCATE
621 $(MPTEST2) --journalmode DELETE
622
drhbc94dbb2013-04-08 14:28:33 +0000623
drh376deb12004-06-30 11:41:55 +0000624# This target creates a directory named "tsrc" and fills it with
625# copies of all of the C source code and header files needed to
626# build on the target system. Some of the C source code and header
627# files are automatically generated. This target takes care of
628# all that automatic generation.
629#
drh50065652015-10-08 19:29:18 +0000630.target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c
drh376deb12004-06-30 11:41:55 +0000631 rm -rf tsrc
shaneh18607052010-07-06 20:37:09 +0000632 mkdir tsrc
633 cp -f $(SRC) tsrc
drh376deb12004-06-30 11:41:55 +0000634 rm tsrc/sqlite.h.in tsrc/parse.y
drh2dc06482013-12-11 00:59:10 +0000635 $(TCLSH_CMD) $(TOP)/tool/vdbe-compress.tcl $(OPTS) <tsrc/vdbe.c >vdbe.new
drh856c1032009-06-02 15:21:42 +0000636 mv vdbe.new tsrc/vdbe.c
drh50065652015-10-08 19:29:18 +0000637 cp fts5.c fts5.h tsrc
mlcreech94984912008-03-04 19:03:08 +0000638 touch .target_source
drh376deb12004-06-30 11:41:55 +0000639
mlcreech94984912008-03-04 19:03:08 +0000640sqlite3.c: .target_source $(TOP)/tool/mksqlite3c.tcl
mlcreechab1c47b2008-03-09 02:51:10 +0000641 $(TCLSH_CMD) $(TOP)/tool/mksqlite3c.tcl
drhe191e2c2013-03-19 15:23:18 +0000642 cp tsrc/shell.c tsrc/sqlite3ext.h .
643 cp $(TOP)/ext/session/sqlite3session.h .
drh93d57532007-04-05 18:34:58 +0000644
drh2f20e132015-09-26 17:44:59 +0000645sqlite3ext.h: .target_source
646 cp tsrc/sqlite3ext.h .
647
drhf4fd9ed2011-11-07 16:46:43 +0000648tclsqlite3.c: sqlite3.c
649 echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
650 cat sqlite3.c >>tclsqlite3.c
651 echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
652 cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
653
drh07516dd2011-07-22 11:16:39 +0000654sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl
655 $(TCLSH_CMD) $(TOP)/tool/split-sqlite3c.tcl
656
shaneh18607052010-07-06 20:37:09 +0000657# Rule to build the amalgamation
658#
659sqlite3.lo: sqlite3.c
660 $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
661
drh376deb12004-06-30 11:41:55 +0000662# Rules to build the LEMON compiler generator
663#
drh82415f22015-11-09 19:33:42 +0000664lemon$(BEXE): $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
mlcreech1428b372008-03-13 23:28:22 +0000665 $(BCC) -o $@ $(TOP)/tool/lemon.c
drh82415f22015-11-09 19:33:42 +0000666 cp $(TOP)/tool/lempar.c .
drh376deb12004-06-30 11:41:55 +0000667
shaneh18607052010-07-06 20:37:09 +0000668# Rules to build individual *.o files from generated *.c files. This
669# applies to:
mlcreech94984912008-03-04 19:03:08 +0000670#
shaneh18607052010-07-06 20:37:09 +0000671# parse.o
672# opcodes.o
673#
674parse.lo: parse.c $(HDR)
675 $(LTCOMPILE) $(TEMP_STORE) -c parse.c
mlcreech94984912008-03-04 19:03:08 +0000676
shaneh18607052010-07-06 20:37:09 +0000677opcodes.lo: opcodes.c
678 $(LTCOMPILE) $(TEMP_STORE) -c opcodes.c
679
680# Rules to build individual *.o files from files in the src directory.
drh376deb12004-06-30 11:41:55 +0000681#
drhd0e4a6c2005-02-15 20:47:57 +0000682alter.lo: $(TOP)/src/alter.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000683 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/alter.c
drhd0e4a6c2005-02-15 20:47:57 +0000684
drh9f18e8a2005-07-08 12:13:04 +0000685analyze.lo: $(TOP)/src/analyze.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000686 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/analyze.c
drh9f18e8a2005-07-08 12:13:04 +0000687
drh376deb12004-06-30 11:41:55 +0000688attach.lo: $(TOP)/src/attach.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000689 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/attach.c
drh376deb12004-06-30 11:41:55 +0000690
691auth.lo: $(TOP)/src/auth.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000692 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/auth.c
drh376deb12004-06-30 11:41:55 +0000693
rse973402e2009-02-20 22:27:41 +0000694backup.lo: $(TOP)/src/backup.c $(HDR)
695 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/backup.c
696
mlcreech5b9d8672008-02-27 03:22:49 +0000697bitvec.lo: $(TOP)/src/bitvec.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000698 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/bitvec.c
mlcreech5b9d8672008-02-27 03:22:49 +0000699
drh900b31e2007-08-28 02:27:51 +0000700btmutex.lo: $(TOP)/src/btmutex.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000701 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/btmutex.c
drh900b31e2007-08-28 02:27:51 +0000702
drh376deb12004-06-30 11:41:55 +0000703btree.lo: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
drh8b727472009-01-19 18:18:40 +0000704 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/btree.c
drh376deb12004-06-30 11:41:55 +0000705
706build.lo: $(TOP)/src/build.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000707 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/build.c
drh376deb12004-06-30 11:41:55 +0000708
danielk1977fd9a0a42005-05-24 12:01:00 +0000709callback.lo: $(TOP)/src/callback.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000710 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/callback.c
danielk1977fd9a0a42005-05-24 12:01:00 +0000711
drha2b902d2005-08-14 17:53:20 +0000712complete.lo: $(TOP)/src/complete.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000713 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/complete.c
drha2b902d2005-08-14 17:53:20 +0000714
shanehdc97a8c2010-02-23 20:08:35 +0000715ctime.lo: $(TOP)/src/ctime.c $(HDR)
716 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/ctime.c
717
drh376deb12004-06-30 11:41:55 +0000718date.lo: $(TOP)/src/date.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000719 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/date.c
drh376deb12004-06-30 11:41:55 +0000720
drh1a4a6802015-05-04 18:31:09 +0000721dbstat.lo: $(TOP)/src/dbstat.c $(HDR)
722 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/dbstat.c
723
drh376deb12004-06-30 11:41:55 +0000724delete.lo: $(TOP)/src/delete.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000725 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/delete.c
drh376deb12004-06-30 11:41:55 +0000726
drh376deb12004-06-30 11:41:55 +0000727expr.lo: $(TOP)/src/expr.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000728 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/expr.c
drh376deb12004-06-30 11:41:55 +0000729
drh643167f2008-01-22 21:30:53 +0000730fault.lo: $(TOP)/src/fault.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000731 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/fault.c
drh643167f2008-01-22 21:30:53 +0000732
dan3be7d6e2009-09-19 17:59:59 +0000733fkey.lo: $(TOP)/src/fkey.c $(HDR)
734 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/fkey.c
735
drh70a8ca32008-08-21 18:49:27 +0000736func.lo: $(TOP)/src/func.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000737 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/func.c
drh376deb12004-06-30 11:41:55 +0000738
drh40257ff2008-06-13 18:24:27 +0000739global.lo: $(TOP)/src/global.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000740 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/global.c
drh40257ff2008-06-13 18:24:27 +0000741
drh376deb12004-06-30 11:41:55 +0000742hash.lo: $(TOP)/src/hash.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000743 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/hash.c
drh376deb12004-06-30 11:41:55 +0000744
745insert.lo: $(TOP)/src/insert.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000746 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/insert.c
drh376deb12004-06-30 11:41:55 +0000747
748legacy.lo: $(TOP)/src/legacy.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000749 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/legacy.c
drh376deb12004-06-30 11:41:55 +0000750
drh1e397f82006-06-08 15:28:43 +0000751loadext.lo: $(TOP)/src/loadext.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000752 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/loadext.c
drh1e397f82006-06-08 15:28:43 +0000753
drh376deb12004-06-30 11:41:55 +0000754main.lo: $(TOP)/src/main.c $(HDR)
755 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/main.c
756
drha3152892007-05-05 11:48:52 +0000757malloc.lo: $(TOP)/src/malloc.c $(HDR)
758 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/malloc.c
759
drhd1370b62008-10-28 18:58:20 +0000760mem0.lo: $(TOP)/src/mem0.c $(HDR)
761 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem0.c
762
drh4bfc8a92007-08-27 23:38:43 +0000763mem1.lo: $(TOP)/src/mem1.c $(HDR)
764 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem1.c
765
766mem2.lo: $(TOP)/src/mem2.c $(HDR)
767 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem2.c
768
drh9c7a60d2007-10-19 17:47:24 +0000769mem3.lo: $(TOP)/src/mem3.c $(HDR)
770 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem3.c
771
mlcreechfcfe27d2008-03-02 05:34:10 +0000772mem5.lo: $(TOP)/src/mem5.c $(HDR)
773 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem5.c
774
danielk19776553c5c2008-10-21 04:30:31 +0000775memjournal.lo: $(TOP)/src/memjournal.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000776 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/memjournal.c
danielk19776553c5c2008-10-21 04:30:31 +0000777
drh4bfc8a92007-08-27 23:38:43 +0000778mutex.lo: $(TOP)/src/mutex.c $(HDR)
779 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex.c
780
drh18472fa2008-10-07 15:25:48 +0000781mutex_noop.lo: $(TOP)/src/mutex_noop.c $(HDR)
782 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_noop.c
783
drh437b9012007-08-28 16:34:42 +0000784mutex_unix.lo: $(TOP)/src/mutex_unix.c $(HDR)
785 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_unix.c
786
787mutex_w32.lo: $(TOP)/src/mutex_w32.c $(HDR)
788 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_w32.c
789
danielk1977d52acb32009-03-16 14:48:18 +0000790notify.lo: $(TOP)/src/notify.c $(HDR)
791 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/notify.c
792
drh376deb12004-06-30 11:41:55 +0000793pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
drh8b727472009-01-19 18:18:40 +0000794 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pager.c
drh376deb12004-06-30 11:41:55 +0000795
danielk19778c0a7912008-08-20 14:49:23 +0000796pcache.lo: $(TOP)/src/pcache.c $(HDR) $(TOP)/src/pcache.h
drh8b727472009-01-19 18:18:40 +0000797 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pcache.c
danielk19778c0a7912008-08-20 14:49:23 +0000798
danielk1977bc2ca9e2008-11-13 14:28:28 +0000799pcache1.lo: $(TOP)/src/pcache1.c $(HDR) $(TOP)/src/pcache.h
drh8b727472009-01-19 18:18:40 +0000800 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pcache1.c
danielk1977bc2ca9e2008-11-13 14:28:28 +0000801
drh054889e2005-11-30 03:20:31 +0000802os.lo: $(TOP)/src/os.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000803 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os.c
drh054889e2005-11-30 03:20:31 +0000804
drh376deb12004-06-30 11:41:55 +0000805os_unix.lo: $(TOP)/src/os_unix.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000806 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os_unix.c
drh376deb12004-06-30 11:41:55 +0000807
808os_win.lo: $(TOP)/src/os_win.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000809 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os_win.c
drh376deb12004-06-30 11:41:55 +0000810
drh376deb12004-06-30 11:41:55 +0000811pragma.lo: $(TOP)/src/pragma.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000812 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pragma.c
drh376deb12004-06-30 11:41:55 +0000813
danielk1977fa256a32005-05-25 04:11:56 +0000814prepare.lo: $(TOP)/src/prepare.c $(HDR)
815 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/prepare.c
816
drh376deb12004-06-30 11:41:55 +0000817printf.lo: $(TOP)/src/printf.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000818 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/printf.c
drh376deb12004-06-30 11:41:55 +0000819
820random.lo: $(TOP)/src/random.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000821 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/random.c
drh376deb12004-06-30 11:41:55 +0000822
drh7d10d5a2008-08-20 16:35:10 +0000823resolve.lo: $(TOP)/src/resolve.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000824 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/resolve.c
drh7d10d5a2008-08-20 16:35:10 +0000825
drh3d4501e2008-12-04 20:40:10 +0000826rowset.lo: $(TOP)/src/rowset.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000827 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/rowset.c
drh3d4501e2008-12-04 20:40:10 +0000828
drh376deb12004-06-30 11:41:55 +0000829select.lo: $(TOP)/src/select.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000830 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/select.c
drh376deb12004-06-30 11:41:55 +0000831
drhf7141992008-06-19 00:16:08 +0000832status.lo: $(TOP)/src/status.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000833 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/status.c
drhf7141992008-06-19 00:16:08 +0000834
drh376deb12004-06-30 11:41:55 +0000835table.lo: $(TOP)/src/table.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000836 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/table.c
drh376deb12004-06-30 11:41:55 +0000837
drhf51446a2012-07-21 19:40:42 +0000838threads.lo: $(TOP)/src/threads.c $(HDR)
839 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/threads.c
840
drh73b211a2005-01-18 04:00:42 +0000841tokenize.lo: $(TOP)/src/tokenize.c keywordhash.h $(HDR)
drh8b727472009-01-19 18:18:40 +0000842 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/tokenize.c
drh376deb12004-06-30 11:41:55 +0000843
drh38b41492015-06-08 15:08:15 +0000844treeview.lo: $(TOP)/src/treeview.c $(HDR)
845 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/treeview.c
846
drh376deb12004-06-30 11:41:55 +0000847trigger.lo: $(TOP)/src/trigger.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000848 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/trigger.c
drh376deb12004-06-30 11:41:55 +0000849
850update.lo: $(TOP)/src/update.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000851 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/update.c
drh376deb12004-06-30 11:41:55 +0000852
853utf.lo: $(TOP)/src/utf.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000854 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/utf.c
drh376deb12004-06-30 11:41:55 +0000855
856util.lo: $(TOP)/src/util.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000857 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/util.c
drh376deb12004-06-30 11:41:55 +0000858
859vacuum.lo: $(TOP)/src/vacuum.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000860 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vacuum.c
drh376deb12004-06-30 11:41:55 +0000861
mlcreecheb6dc142008-03-13 18:28:03 +0000862vdbe.lo: $(TOP)/src/vdbe.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000863 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbe.c
drh376deb12004-06-30 11:41:55 +0000864
mlcreecheb6dc142008-03-13 18:28:03 +0000865vdbeapi.lo: $(TOP)/src/vdbeapi.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000866 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbeapi.c
drh376deb12004-06-30 11:41:55 +0000867
mlcreecheb6dc142008-03-13 18:28:03 +0000868vdbeaux.lo: $(TOP)/src/vdbeaux.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000869 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbeaux.c
drh376deb12004-06-30 11:41:55 +0000870
mlcreecheb6dc142008-03-13 18:28:03 +0000871vdbeblob.lo: $(TOP)/src/vdbeblob.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000872 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbeblob.c
danielk19776338c762007-05-17 16:38:30 +0000873
mlcreecheb6dc142008-03-13 18:28:03 +0000874vdbemem.lo: $(TOP)/src/vdbemem.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000875 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbemem.c
drh376deb12004-06-30 11:41:55 +0000876
dana9f39fd2011-08-12 16:34:42 +0000877vdbesort.lo: $(TOP)/src/vdbesort.c $(HDR)
878 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbesort.c
879
drhc7bc4fd2009-11-25 18:03:42 +0000880vdbetrace.lo: $(TOP)/src/vdbetrace.c $(HDR)
881 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbetrace.c
882
mlcreecheb6dc142008-03-13 18:28:03 +0000883vtab.lo: $(TOP)/src/vtab.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000884 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vtab.c
drhb9bb7c12006-06-11 23:41:55 +0000885
drhc438efd2010-04-26 00:19:45 +0000886wal.lo: $(TOP)/src/wal.c $(HDR)
887 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/wal.c
888
drh7d10d5a2008-08-20 16:35:10 +0000889walker.lo: $(TOP)/src/walker.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000890 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/walker.c
drh7d10d5a2008-08-20 16:35:10 +0000891
drh376deb12004-06-30 11:41:55 +0000892where.lo: $(TOP)/src/where.c $(HDR)
drh8b727472009-01-19 18:18:40 +0000893 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/where.c
drh376deb12004-06-30 11:41:55 +0000894
drh6f82e852015-06-06 20:12:09 +0000895wherecode.lo: $(TOP)/src/wherecode.c $(HDR)
896 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/wherecode.c
897
drh6c1f4ef2015-06-08 14:23:15 +0000898whereexpr.lo: $(TOP)/src/whereexpr.c $(HDR)
899 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/whereexpr.c
900
shaneh18607052010-07-06 20:37:09 +0000901tclsqlite.lo: $(TOP)/src/tclsqlite.c $(HDR)
902 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -c $(TOP)/src/tclsqlite.c
903
drh7b5717e2004-11-25 13:50:01 +0000904tclsqlite-shell.lo: $(TOP)/src/tclsqlite.c $(HDR)
905 $(LTCOMPILE) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c
drh376deb12004-06-30 11:41:55 +0000906
drh7b5717e2004-11-25 13:50:01 +0000907tclsqlite-stubs.lo: $(TOP)/src/tclsqlite.c $(HDR)
shaneh8128bb22010-08-19 14:41:58 +0000908 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -o $@ -c $(TOP)/src/tclsqlite.c
drh7b5717e2004-11-25 13:50:01 +0000909
mlcreech1428b372008-03-13 23:28:22 +0000910tclsqlite3$(TEXE): tclsqlite-shell.lo libsqlite3.la
911 $(LTLINK) -o $@ tclsqlite-shell.lo \
drh376deb12004-06-30 11:41:55 +0000912 libsqlite3.la $(LIBTCL)
913
shaneh18607052010-07-06 20:37:09 +0000914# Rules to build opcodes.c and opcodes.h
915#
drh7651e0a2015-10-07 12:11:36 +0000916opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl
917 $(TCLSH_CMD) $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c
shaneh18607052010-07-06 20:37:09 +0000918
drhb15393b2015-10-07 02:52:09 +0000919opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl
920 cat parse.h $(TOP)/src/vdbe.c | $(TCLSH_CMD) $(TOP)/tool/mkopcodeh.tcl >opcodes.h
shaneh18607052010-07-06 20:37:09 +0000921
922# Rules to build parse.c and parse.h - the outputs of lemon.
923#
924parse.h: parse.c
925
drh60a15a42015-10-07 12:21:14 +0000926parse.c: $(TOP)/src/parse.y lemon$(BEXE) $(TOP)/tool/addopcodes.tcl
shaneh18607052010-07-06 20:37:09 +0000927 cp $(TOP)/src/parse.y .
928 rm -f parse.h
929 ./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
930 mv parse.h parse.h.temp
drh60a15a42015-10-07 12:21:14 +0000931 $(TCLSH_CMD) $(TOP)/tool/addopcodes.tcl parse.h.temp >parse.h
shaneh18607052010-07-06 20:37:09 +0000932
933sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
drh16b92ee2011-07-22 10:33:04 +0000934 $(TCLSH_CMD) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
shaneh18607052010-07-06 20:37:09 +0000935
936keywordhash.h: $(TOP)/tool/mkkeywordhash.c
937 $(BCC) -o mkkeywordhash$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)/tool/mkkeywordhash.c
938 ./mkkeywordhash$(BEXE) >keywordhash.h
939
940
941
942# Rules to build the extension objects.
943#
944icu.lo: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
945 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
946
947fts2.lo: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
948 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
949
950fts2_hash.lo: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
951 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
952
953fts2_icu.lo: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
954 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
955
956fts2_porter.lo: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
957 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
958
959fts2_tokenizer.lo: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
960 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
961
962fts2_tokenizer1.lo: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
963 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
964
965fts3.lo: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
966 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
967
shanehd01f9cb2011-02-09 15:25:17 +0000968fts3_aux.lo: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR)
969 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c
970
shaneh18607052010-07-06 20:37:09 +0000971fts3_expr.lo: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
972 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
973
974fts3_hash.lo: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
975 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
976
977fts3_icu.lo: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
978 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
979
shaneh671b5222011-05-12 21:01:12 +0000980fts3_porter.lo: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
981 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
982
shaneh18607052010-07-06 20:37:09 +0000983fts3_snippet.lo: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
984 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
985
shaneh18607052010-07-06 20:37:09 +0000986fts3_tokenizer.lo: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
987 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
988
989fts3_tokenizer1.lo: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
990 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
991
dancf5db442013-05-16 18:33:06 +0000992fts3_tokenize_vtab.lo: $(TOP)/ext/fts3/fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
993 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenize_vtab.c
dand7a959c2013-04-22 15:30:37 +0000994
dan4b8213d2012-06-09 18:52:29 +0000995fts3_unicode.lo: $(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR)
996 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c
997
998fts3_unicode2.lo: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR)
999 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode2.c
1000
shaneh18607052010-07-06 20:37:09 +00001001fts3_write.lo: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
1002 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
1003
1004rtree.lo: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
1005 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
1006
drh498dcae2013-03-13 11:42:00 +00001007sqlite3session.lo: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR)
1008 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/session/sqlite3session.c
1009
drhc306e082015-10-08 23:37:00 +00001010json1.lo: $(TOP)/ext/misc/json1.c
1011 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c
1012
dan3e65f892015-06-25 20:36:36 +00001013# FTS5 things
1014#
1015FTS5_SRC = \
1016 $(TOP)/ext/fts5/fts5.h \
1017 $(TOP)/ext/fts5/fts5Int.h \
1018 $(TOP)/ext/fts5/fts5_aux.c \
1019 $(TOP)/ext/fts5/fts5_buffer.c \
1020 $(TOP)/ext/fts5/fts5_main.c \
1021 $(TOP)/ext/fts5/fts5_config.c \
1022 $(TOP)/ext/fts5/fts5_expr.c \
1023 $(TOP)/ext/fts5/fts5_hash.c \
1024 $(TOP)/ext/fts5/fts5_index.c \
1025 fts5parse.c fts5parse.h \
1026 $(TOP)/ext/fts5/fts5_storage.c \
1027 $(TOP)/ext/fts5/fts5_tokenize.c \
1028 $(TOP)/ext/fts5/fts5_unicode2.c \
1029 $(TOP)/ext/fts5/fts5_varint.c \
1030 $(TOP)/ext/fts5/fts5_vocab.c \
1031
dan08e71992015-05-19 11:38:32 +00001032fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon
1033 cp $(TOP)/ext/fts5/fts5parse.y .
1034 rm -f fts5parse.h
1035 ./lemon $(OPTS) fts5parse.y
dan08e71992015-05-19 11:38:32 +00001036
1037fts5parse.h: fts5parse.c
1038
dan3e65f892015-06-25 20:36:36 +00001039fts5.c: $(FTS5_SRC)
1040 $(TCLSH_CMD) $(TOP)/ext/fts5/tool/mkfts5c.tcl
dana153bbc2015-07-02 20:12:34 +00001041 cp $(TOP)/ext/fts5/fts5.h .
dan3e65f892015-06-25 20:36:36 +00001042
1043fts5.lo: fts5.c $(HDR) $(EXTHDR)
1044 $(LTCOMPILE) -DSQLITE_CORE -c fts5.c
1045
drh76473772016-01-14 13:22:24 +00001046sqlite3rbu.lo: $(TOP)/ext/rbu/sqlite3rbu.c $(HDR) $(EXTHDR)
1047 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rbu/sqlite3rbu.c
1048
shaneh18607052010-07-06 20:37:09 +00001049
1050# Rules to build the 'testfixture' application.
1051#
1052# If using the amalgamation, use sqlite3.c directly to build the test
1053# fixture. Otherwise link against libsqlite3.la. (This distinction is
1054# necessary because the test fixture requires non-API symbols which are
1055# hidden when the library is built via the amalgamation).
1056#
1057TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
1058TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
drh0bab6c32011-09-23 16:34:49 +00001059TESTFIXTURE_FLAGS += -DBUILD_sqlite
drhdbc49162016-03-02 03:28:07 +00001060TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
drh9878fef2016-03-04 03:43:10 +00001061TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
shaneh18607052010-07-06 20:37:09 +00001062
1063TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
1064TESTFIXTURE_SRC1 = sqlite3.c
drhe191e2c2013-03-19 15:23:18 +00001065TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c
1066TESTFIXTURE_SRC += $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
shaneh18607052010-07-06 20:37:09 +00001067
mlcreech969b2cd2008-03-14 04:11:03 +00001068testfixture$(TEXE): $(TESTFIXTURE_SRC)
shaneh18607052010-07-06 20:37:09 +00001069 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TEMP_STORE) $(TESTFIXTURE_FLAGS) \
drh866108f2008-05-13 00:57:21 +00001070 -o $@ $(TESTFIXTURE_SRC) $(LIBTCL) $(TLIBS)
drh376deb12004-06-30 11:41:55 +00001071
drh5bfff9d2015-01-08 01:05:42 +00001072# A very detailed test running most or all test cases
drhf4375442015-05-11 12:15:45 +00001073fulltest: $(TESTPROGS) fuzztest
drh905da632015-06-10 18:53:09 +00001074 ./testfixture$(TEXE) $(TOP)/test/all.test $(TESTOPTS)
drh376deb12004-06-30 11:41:55 +00001075
drh5bfff9d2015-01-08 01:05:42 +00001076# Really really long testing
drhea93c702015-05-26 18:15:08 +00001077soaktest: $(TESTPROGS)
drh905da632015-06-10 18:53:09 +00001078 ./testfixture$(TEXE) $(TOP)/test/all.test -soak=1 $(TESTOPTS)
shaneh18607052010-07-06 20:37:09 +00001079
mistachkind4ab1032015-05-11 16:27:33 +00001080# Do extra testing but not everything.
drha523e312015-07-24 17:26:13 +00001081fulltestonly: $(TESTPROGS) fuzztest
mistachkinc60941f2012-09-13 01:51:02 +00001082 ./testfixture$(TEXE) $(TOP)/test/full.test
1083
drhe1a71a52015-04-24 16:09:12 +00001084# Fuzz testing
drhd1f2f9b2015-06-08 19:15:50 +00001085fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
drhea93c702015-05-26 18:15:08 +00001086 ./fuzzcheck$(TEXE) $(FUZZDATA)
drhf3320712015-04-25 13:39:29 +00001087
drha523e312015-07-24 17:26:13 +00001088fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
drh53e66c32015-07-24 15:49:23 +00001089 ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
drh5bfff9d2015-01-08 01:05:42 +00001090
drhd1f2f9b2015-06-08 19:15:50 +00001091valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
drh25b0c402015-11-03 23:39:47 +00001092 valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
drhd1f2f9b2015-06-08 19:15:50 +00001093
drh905da632015-06-10 18:53:09 +00001094# Minimal testing that runs in less than 3 minutes
1095#
1096quicktest: ./testfixture$(TEXE)
1097 ./testfixture$(TEXE) $(TOP)/test/extraquick.test $(TESTOPTS)
1098
1099# This is the common case. Run many tests that do not take too long,
1100# including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
drh376deb12004-06-30 11:41:55 +00001101#
drhcc5f8a42016-02-06 22:32:06 +00001102test: $(TESTPROGS) sourcetest fastfuzztest
drh905da632015-06-10 18:53:09 +00001103 ./testfixture$(TEXE) $(TOP)/test/veryquick.test $(TESTOPTS)
drh376deb12004-06-30 11:41:55 +00001104
drh5bfff9d2015-01-08 01:05:42 +00001105# Run a test using valgrind. This can take a really long time
1106# because valgrind is so much slower than a native machine.
1107#
drhd1f2f9b2015-06-08 19:15:50 +00001108valgrindtest: $(TESTPROGS) valgrindfuzz
drh905da632015-06-10 18:53:09 +00001109 OMIT_MISUSE=1 valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind $(TESTOPTS)
drh8a2a0f52015-01-07 14:09:41 +00001110
drh5bfff9d2015-01-08 01:05:42 +00001111# A very fast test that checks basic sanity. The name comes from
1112# the 60s-era electronics testing: "Turn it on and see if smoke
1113# comes out."
1114#
drhea93c702015-05-26 18:15:08 +00001115smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
drh905da632015-06-10 18:53:09 +00001116 ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
drh5bfff9d2015-01-08 01:05:42 +00001117
drh1a4a6802015-05-04 18:31:09 +00001118sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
drhc42cdce2011-09-21 17:04:21 +00001119 echo "#define TCLSH 2" > $@
drh3e0327d2015-05-11 11:59:15 +00001120 echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
drh84ab9532015-05-04 17:06:39 +00001121 cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
drhc42cdce2011-09-21 17:04:21 +00001122 echo "static const char *tclsh_main_loop(void){" >> $@
1123 echo "static const char *zMainloop = " >> $@
drh48cc9a32015-10-07 12:36:42 +00001124 $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
drhc42cdce2011-09-21 17:04:21 +00001125 echo "; return zMainloop; }" >> $@
drh376deb12004-06-30 11:41:55 +00001126
drh8d43aa12011-09-21 18:29:49 +00001127sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
drhc42cdce2011-09-21 17:04:21 +00001128 $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
drh376deb12004-06-30 11:41:55 +00001129
drh4bb77ec2014-06-30 11:14:26 +00001130showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
1131 $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
1132
1133showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
1134 $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
1135
1136showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
1137 $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
1138
1139showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
1140 $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
1141
drh9f674f22014-08-18 20:23:29 +00001142changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
1143 $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
1144
drh4bb77ec2014-06-30 11:14:26 +00001145rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
1146 $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
drh9ac3c1e2013-11-07 18:37:31 +00001147
drh267a13f2014-06-18 18:10:12 +00001148LogEst$(TEXE): $(TOP)/tool/logest.c sqlite3.h
1149 $(LTLINK) -I. -o $@ $(TOP)/tool/logest.c
drh9ac3c1e2013-11-07 18:37:31 +00001150
1151wordcount$(TEXE): $(TOP)/test/wordcount.c sqlite3.c
1152 $(LTLINK) -o $@ $(TOP)/test/wordcount.c sqlite3.c $(TLIBS)
1153
drh1dae26b2015-02-03 19:20:03 +00001154speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
drhad1ca9a2013-11-23 04:16:58 +00001155 $(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
1156
drh76473772016-01-14 13:22:24 +00001157rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
1158 $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
1159
1160loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
1161 $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
1162
drh00fa3342014-12-23 19:52:26 +00001163# This target will fail if the SQLite amalgamation contains any exported
1164# symbols that do not begin with "sqlite3_". It is run as part of the
1165# releasetest.tcl script.
1166#
mistachkin4d03a382014-12-23 21:03:09 +00001167checksymbols: sqlite3.lo
drhadf3bf52015-05-19 22:42:23 +00001168 nm -g --defined-only sqlite3.o | egrep -v ' sqlite3(changeset|session)?_' ; test $$? -ne 0
drh277b4e42014-12-29 02:55:58 +00001169 echo '0 errors out of 1 tests'
drh00fa3342014-12-23 19:52:26 +00001170
drh07f76562016-02-09 22:39:39 +00001171# Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1172# a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1173# The snapshot-tarball target builds a tarball named by the SHA1 hash
drhb43be552015-01-15 15:47:06 +00001174#
1175amalgamation-tarball: sqlite3.c
drh07f76562016-02-09 22:39:39 +00001176 TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal
1177
1178snapshot-tarball: sqlite3.c
1179 TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot
drhb43be552015-01-15 15:47:06 +00001180
drh069b8f22014-12-23 20:31:43 +00001181# The next two rules are used to support the "threadtest" target. Building
1182# threadtest runs a few thread-safety tests that are implemented in C. This
1183# target is invoked by the releasetest.tcl script.
1184#
1185THREADTEST3_SRC = $(TOP)/test/threadtest3.c \
1186 $(TOP)/test/tt3_checkpoint.c \
1187 $(TOP)/test/tt3_index.c \
1188 $(TOP)/test/tt3_vacuum.c \
1189 $(TOP)/test/tt3_stress.c \
1190 $(TOP)/test/tt3_lookaside1.c
1191
mistachkin4d03a382014-12-23 21:03:09 +00001192threadtest3$(TEXE): sqlite3.lo $(THREADTEST3_SRC)
dan5fcc1ba2015-12-03 12:01:54 +00001193 $(LTLINK) $(TOP)/test/threadtest3.c $(TOP)/src/test_multiplex.c sqlite3.lo -o $@ $(TLIBS)
drh069b8f22014-12-23 20:31:43 +00001194
1195threadtest: threadtest3$(TEXE)
1196 ./threadtest3$(TEXE)
1197
drha7c432c2014-12-23 21:17:58 +00001198releasetest:
1199 $(TCLSH_CMD) $(TOP)/test/releasetest.tcl
1200
shaneh18607052010-07-06 20:37:09 +00001201# Standard install and cleanup targets
1202#
vapierafea9742009-02-18 04:33:59 +00001203lib_install: libsqlite3.la
drh8d45ec02004-09-17 21:07:34 +00001204 $(INSTALL) -d $(DESTDIR)$(libdir)
1205 $(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
vapierafea9742009-02-18 04:33:59 +00001206
mistachkin153d3e92016-01-21 18:56:10 +00001207install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_install}
mlcreechc55771f2008-03-06 08:09:12 +00001208 $(INSTALL) -d $(DESTDIR)$(bindir)
mistachkin153d3e92016-01-21 18:56:10 +00001209 $(LTINSTALL) sqlite3$(TEXE) $(DESTDIR)$(bindir)
mlcreechc55771f2008-03-06 08:09:12 +00001210 $(INSTALL) -d $(DESTDIR)$(includedir)
1211 $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir)
1212 $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir)
danielk197794bdf892008-08-04 04:28:18 +00001213 $(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
1214 $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
drh376deb12004-06-30 11:41:55 +00001215
vapier6d120f32009-01-28 04:46:14 +00001216pkgIndex.tcl:
drhd881ce82015-03-31 17:01:52 +00001217 echo 'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3$(SHLIB_SUFFIX) sqlite3]' > $@
vapierafea9742009-02-18 04:33:59 +00001218tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
vapier6d120f32009-01-28 04:46:14 +00001219 $(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
1220 $(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
1221 rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
1222 $(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)
drh4b2266a2004-11-27 15:52:16 +00001223
drh376deb12004-06-30 11:41:55 +00001224clean:
drh7b5717e2004-11-25 13:50:01 +00001225 rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la
drh376deb12004-06-30 11:41:55 +00001226 rm -f sqlite3.h opcodes.*
shaneh18607052010-07-06 20:37:09 +00001227 rm -rf .libs .deps
drh52fb6d72004-11-03 03:59:57 +00001228 rm -f lemon$(BEXE) lempar.c parse.* sqlite*.tar.gz
drh73b211a2005-01-18 04:00:42 +00001229 rm -f mkkeywordhash$(BEXE) keywordhash.h
drh376deb12004-06-30 11:41:55 +00001230 rm -f *.da *.bb *.bbg gmon.out
shaneh18607052010-07-06 20:37:09 +00001231 rm -rf tsrc .target_source
mistachkin9a55e312011-09-22 00:06:44 +00001232 rm -f tclsqlite3$(TEXE)
drh7b5717e2004-11-25 13:50:01 +00001233 rm -f testfixture$(TEXE) test.db
mistachkin3a046c62014-07-18 21:02:54 +00001234 rm -f LogEst$(TEXE) fts3view$(TEXE) rollback-test$(TEXE) showdb$(TEXE)
1235 rm -f showjournal$(TEXE) showstat4$(TEXE) showwal$(TEXE) speedtest1$(TEXE)
drh9f674f22014-08-18 20:23:29 +00001236 rm -f wordcount$(TEXE) changeset$(TEXE)
mistachkin9a55e312011-09-22 00:06:44 +00001237 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
shaneh18607052010-07-06 20:37:09 +00001238 rm -f sqlite3.c
mistachkinfde3b1c72013-03-29 19:52:04 +00001239 rm -f sqlite3rc.h
1240 rm -f shell.c sqlite3ext.h
mistachkin9a55e312011-09-22 00:06:44 +00001241 rm -f sqlite3_analyzer$(TEXE) sqlite3_analyzer.c
mistachkin29b75bd2012-10-20 09:35:57 +00001242 rm -f sqlite-*-output.vsix
mistachkin21c9b6b2013-04-10 03:06:43 +00001243 rm -f mptester mptester.exe
mistachkinb5a5a232016-01-20 18:47:59 +00001244 rm -f rbu rbu.exe
mistachkin27b69972016-02-07 20:39:27 +00001245 rm -f srcck1 srcck1.exe
mistachkind4ab1032015-05-11 16:27:33 +00001246 rm -f fuzzershell fuzzershell.exe
mistachkin7a94e6b2015-05-26 03:24:33 +00001247 rm -f fuzzcheck fuzzcheck.exe
mistachkind4ab1032015-05-11 16:27:33 +00001248 rm -f sqldiff sqldiff.exe
mistachkinbc50bb72015-07-14 21:56:53 +00001249 rm -f fts5.* fts5parse.*
drh376deb12004-06-30 11:41:55 +00001250
drh376deb12004-06-30 11:41:55 +00001251distclean: clean
mistachkin9edb5ce2015-07-19 19:53:23 +00001252 rm -f config.h config.log config.status libtool Makefile sqlite3.pc
drh79dc6692006-09-02 22:14:11 +00001253
1254#
1255# Windows section
1256#
1257dll: sqlite3.dll
1258
1259REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
1260
1261$(REAL_LIBOBJ): $(LIBOBJ)
1262
1263sqlite3.def: $(REAL_LIBOBJ)
1264 echo 'EXPORTS' >sqlite3.def
1265 nm $(REAL_LIBOBJ) | grep ' T ' | grep ' _sqlite3_' \
1266 | sed 's/^.* _//' >>sqlite3.def
1267
1268sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
mlcreech1428b372008-03-13 23:28:22 +00001269 $(TCC) -shared -o $@ sqlite3.def \
drh79dc6692006-09-02 22:14:11 +00001270 -Wl,"--strip-all" $(REAL_LIBOBJ)