cleanup temporary migration file on cipher_migrate error
[sqlcipher.git] / Makefile.in
blob77c190a9a1c0018a734f44bc10e0f6a85faf271c
1 #!/usr/make
3 # Makefile for SQLITE
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.
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.
15 # The toplevel directory of the source tree. This is the directory
16 # that contains this "Makefile.in" and the "configure.in" script.
18 TOP = @abs_srcdir@
21 # C Compiler and options for use in building executables that
22 # will run on the platform that is doing the build.
24 BCC = @BUILD_CC@ @BUILD_CFLAGS@
26 # TCC is the C Compile and options for use in building executables that
27 # will run on the target platform. (BCC and TCC are usually the
28 # same unless your are cross-compiling.) Separate CC and CFLAGS macros
29 # are provide so that these aspects of the build process can be changed
30 # on the "make" command-line. Ex: "make CC=clang CFLAGS=-fsanitize=undefined"
32 CC = @CC@
33 CFLAGS = @CPPFLAGS@ @CFLAGS@
34 TCC = ${CC} ${CFLAGS} -I. -I${TOP}/src -I${TOP}/ext/rtree -I${TOP}/ext/icu
35 TCC += -I${TOP}/ext/fts3 -I${TOP}/ext/async -I${TOP}/ext/session
36 TCC += -I${TOP}/ext/userauth
38 # Define this for the autoconf-based build, so that the code knows it can
39 # include the generated config.h
41 TCC += -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite
43 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
44 # Omitting the define will cause extra debugging code to be inserted and
45 # includes extra comments when "EXPLAIN stmt" is used.
47 TCC += @TARGET_DEBUG@
49 # Compiler options needed for programs that use the TCL library.
51 TCC += @TCL_INCLUDE_SPEC@
53 # The library that programs using TCL must link against.
55 LIBTCL = @TCL_LIB_SPEC@
57 # Compiler options needed for programs that use the readline() library.
59 READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
60 READLINE_FLAGS += -DHAVE_EDITLINE=@TARGET_HAVE_EDITLINE@
62 # The library that programs using readline() must link against.
64 LIBREADLINE = @TARGET_READLINE_LIBS@
66 # Should the database engine be compiled threadsafe
68 TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@
70 # Any target libraries which libsqlite must be linked against
72 TLIBS = @LIBS@ $(LIBS)
74 # Flags controlling use of the in memory btree implementation
76 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
77 # default to file, 2 to default to memory, and 3 to force temporary
78 # tables to always be in memory.
80 TEMP_STORE = -DSQLITE_TEMP_STORE=@TEMP_STORE@
82 # Enable/disable loadable extensions, and other optional features
83 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
84 # The same set of OMIT and ENABLE flags should be passed to the
85 # LEMON parser generator and the mkkeywordhash tool as well.
86 OPT_FEATURE_FLAGS = @OPT_FEATURE_FLAGS@
88 TCC += $(OPT_FEATURE_FLAGS)
90 # Add in any optional parameters specified on the make commane line
91 # ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
92 TCC += $(OPTS)
94 # Add in compile-time options for some libraries used by extensions
95 TCC += @HAVE_ZLIB@
97 # Version numbers and release number for the SQLite being compiled.
99 VERSION = @VERSION@
100 VERSION_NUMBER = @VERSION_NUMBER@
101 RELEASE = @RELEASE@
103 # Filename extensions
105 BEXE = @BUILD_EXEEXT@
106 TEXE = @TARGET_EXEEXT@
108 # The following variable is "1" if the configure script was able to locate
109 # the tclConfig.sh file. It is an empty string otherwise. When this
110 # variable is "1", the TCL extension library (libtclsqlite3.so) is built
111 # and installed.
113 HAVE_TCL = @HAVE_TCL@
115 # This is the command to use for tclsh - normally just "tclsh", but we may
116 # know the specific version we want to use
118 TCLSH_CMD = @TCLSH_CMD@
120 # Where do we want to install the tcl plugin
122 TCLLIBDIR = @TCLLIBDIR@
124 # The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
126 SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
128 # If gcov support was enabled by the configure script, add the appropriate
129 # flags here. It's not always as easy as just having the user add the right
130 # CFLAGS / LDFLAGS, because libtool wants to use CFLAGS when linking, which
131 # causes build errors with -fprofile-arcs -ftest-coverage with some GCCs.
132 # Supposedly GCC does the right thing if you use --coverage, but in
133 # practice it still fails. See:
135 # http://www.mail-archive.com/debian-gcc@lists.debian.org/msg26197.html
137 # for more info.
139 GCOV_CFLAGS1 = -DSQLITE_COVERAGE_TEST=1 -fprofile-arcs -ftest-coverage
140 GCOV_LDFLAGS1 = -lgcov
141 USE_GCOV = @USE_GCOV@
142 LTCOMPILE_EXTRAS += $(GCOV_CFLAGS$(USE_GCOV))
143 LTLINK_EXTRAS += $(GCOV_LDFLAGS$(USE_GCOV))
145 # BEGIN CRYPTO
146 CRYPTOLIBOBJ = \
147 crypto.lo \
148 crypto_impl.lo \
149 crypto_openssl.lo \
150 crypto_libtomcrypt.lo \
151 crypto_nss.lo \
152 crypto_cc.lo
154 CRYPTOSRC = \
155 $(TOP)/src/crypto.h \
156 $(TOP)/src/sqlcipher.h \
157 $(TOP)/src/crypto.c \
158 $(TOP)/src/crypto_impl.c \
159 $(TOP)/src/crypto_libtomcrypt.c \
160 $(TOP)/src/crypto_nss.c \
161 $(TOP)/src/crypto_openssl.c \
162 $(TOP)/src/crypto_cc.c
164 # END CRYPTO
166 # The directory into which to store package information for
168 # Some standard variables and programs
170 prefix = @prefix@
171 exec_prefix = @exec_prefix@
172 libdir = @libdir@
173 pkgconfigdir = $(libdir)/pkgconfig
174 bindir = @bindir@
175 includedir = @includedir@/sqlcipher
176 INSTALL = @INSTALL@
177 LIBTOOL = ./libtool
178 ALLOWRELEASE = @ALLOWRELEASE@
180 # libtool compile/link/install
181 LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC) $(LTCOMPILE_EXTRAS)
182 LTLINK = $(LIBTOOL) --mode=link $(TCC) $(LTCOMPILE_EXTRAS) @LDFLAGS@ $(LTLINK_EXTRAS)
183 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
185 # You should not have to change anything below this line
186 ###############################################################################
188 USE_AMALGAMATION = @USE_AMALGAMATION@
190 # Object files for the SQLite library (non-amalgamation).
192 LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
193 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
194 callback.lo complete.lo ctime.lo \
195 date.lo dbpage.lo dbstat.lo delete.lo \
196 expr.lo fault.lo fkey.lo \
197 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
198 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
199 fts3_tokenize_vtab.lo \
200 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
201 fts5.lo \
202 func.lo global.lo hash.lo \
203 icu.lo insert.lo json1.lo legacy.lo loadext.lo \
204 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
205 memdb.lo memjournal.lo \
206 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
207 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
208 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
209 random.lo resolve.lo rowset.lo rtree.lo \
210 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
211 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
212 update.lo userauth.lo upsert.lo util.lo vacuum.lo \
213 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
214 vdbetrace.lo vdbevtab.lo \
215 wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
216 window.lo utf.lo vtab.lo $(CRYPTOLIBOBJ)
218 # Object files for the amalgamation.
220 LIBOBJS1 = sqlite3.lo
222 # Determine the real value of LIBOBJ based on the 'configure' script
224 LIBOBJ = $(LIBOBJS$(USE_AMALGAMATION))
227 # All of the source code files.
229 SRC = \
230 $(CRYPTOSRC) \
231 $(TOP)/src/alter.c \
232 $(TOP)/src/analyze.c \
233 $(TOP)/src/attach.c \
234 $(TOP)/src/auth.c \
235 $(TOP)/src/backup.c \
236 $(TOP)/src/bitvec.c \
237 $(TOP)/src/btmutex.c \
238 $(TOP)/src/btree.c \
239 $(TOP)/src/btree.h \
240 $(TOP)/src/btreeInt.h \
241 $(TOP)/src/build.c \
242 $(TOP)/src/callback.c \
243 $(TOP)/src/complete.c \
244 $(TOP)/src/ctime.c \
245 $(TOP)/src/date.c \
246 $(TOP)/src/dbpage.c \
247 $(TOP)/src/dbstat.c \
248 $(TOP)/src/delete.c \
249 $(TOP)/src/expr.c \
250 $(TOP)/src/fault.c \
251 $(TOP)/src/fkey.c \
252 $(TOP)/src/func.c \
253 $(TOP)/src/global.c \
254 $(TOP)/src/hash.c \
255 $(TOP)/src/hash.h \
256 $(TOP)/src/hwtime.h \
257 $(TOP)/src/insert.c \
258 $(TOP)/src/legacy.c \
259 $(TOP)/src/loadext.c \
260 $(TOP)/src/main.c \
261 $(TOP)/src/malloc.c \
262 $(TOP)/src/mem0.c \
263 $(TOP)/src/mem1.c \
264 $(TOP)/src/mem2.c \
265 $(TOP)/src/mem3.c \
266 $(TOP)/src/mem5.c \
267 $(TOP)/src/memdb.c \
268 $(TOP)/src/memjournal.c \
269 $(TOP)/src/msvc.h \
270 $(TOP)/src/mutex.c \
271 $(TOP)/src/mutex.h \
272 $(TOP)/src/mutex_noop.c \
273 $(TOP)/src/mutex_unix.c \
274 $(TOP)/src/mutex_w32.c \
275 $(TOP)/src/notify.c \
276 $(TOP)/src/os.c \
277 $(TOP)/src/os.h \
278 $(TOP)/src/os_common.h \
279 $(TOP)/src/os_setup.h \
280 $(TOP)/src/os_unix.c \
281 $(TOP)/src/os_win.c \
282 $(TOP)/src/os_win.h \
283 $(TOP)/src/pager.c \
284 $(TOP)/src/pager.h \
285 $(TOP)/src/parse.y \
286 $(TOP)/src/pcache.c \
287 $(TOP)/src/pcache.h \
288 $(TOP)/src/pcache1.c \
289 $(TOP)/src/pragma.c \
290 $(TOP)/src/pragma.h \
291 $(TOP)/src/prepare.c \
292 $(TOP)/src/printf.c \
293 $(TOP)/src/random.c \
294 $(TOP)/src/resolve.c \
295 $(TOP)/src/rowset.c \
296 $(TOP)/src/select.c \
297 $(TOP)/src/status.c \
298 $(TOP)/src/shell.c.in \
299 $(TOP)/src/sqlite.h.in \
300 $(TOP)/src/sqlite3ext.h \
301 $(TOP)/src/sqliteInt.h \
302 $(TOP)/src/sqliteLimit.h \
303 $(TOP)/src/table.c \
304 $(TOP)/src/tclsqlite.c \
305 $(TOP)/src/threads.c \
306 $(TOP)/src/tokenize.c \
307 $(TOP)/src/treeview.c \
308 $(TOP)/src/trigger.c \
309 $(TOP)/src/utf.c \
310 $(TOP)/src/update.c \
311 $(TOP)/src/upsert.c \
312 $(TOP)/src/util.c \
313 $(TOP)/src/vacuum.c \
314 $(TOP)/src/vdbe.c \
315 $(TOP)/src/vdbe.h \
316 $(TOP)/src/vdbeapi.c \
317 $(TOP)/src/vdbeaux.c \
318 $(TOP)/src/vdbeblob.c \
319 $(TOP)/src/vdbemem.c \
320 $(TOP)/src/vdbesort.c \
321 $(TOP)/src/vdbetrace.c \
322 $(TOP)/src/vdbevtab.c \
323 $(TOP)/src/vdbeInt.h \
324 $(TOP)/src/vtab.c \
325 $(TOP)/src/vxworks.h \
326 $(TOP)/src/wal.c \
327 $(TOP)/src/wal.h \
328 $(TOP)/src/walker.c \
329 $(TOP)/src/where.c \
330 $(TOP)/src/wherecode.c \
331 $(TOP)/src/whereexpr.c \
332 $(TOP)/src/whereInt.h \
333 $(TOP)/src/window.c
335 # Source code for extensions
337 SRC += \
338 $(TOP)/ext/fts1/fts1.c \
339 $(TOP)/ext/fts1/fts1.h \
340 $(TOP)/ext/fts1/fts1_hash.c \
341 $(TOP)/ext/fts1/fts1_hash.h \
342 $(TOP)/ext/fts1/fts1_porter.c \
343 $(TOP)/ext/fts1/fts1_tokenizer.h \
344 $(TOP)/ext/fts1/fts1_tokenizer1.c
345 SRC += \
346 $(TOP)/ext/fts2/fts2.c \
347 $(TOP)/ext/fts2/fts2.h \
348 $(TOP)/ext/fts2/fts2_hash.c \
349 $(TOP)/ext/fts2/fts2_hash.h \
350 $(TOP)/ext/fts2/fts2_icu.c \
351 $(TOP)/ext/fts2/fts2_porter.c \
352 $(TOP)/ext/fts2/fts2_tokenizer.h \
353 $(TOP)/ext/fts2/fts2_tokenizer.c \
354 $(TOP)/ext/fts2/fts2_tokenizer1.c
355 SRC += \
356 $(TOP)/ext/fts3/fts3.c \
357 $(TOP)/ext/fts3/fts3.h \
358 $(TOP)/ext/fts3/fts3Int.h \
359 $(TOP)/ext/fts3/fts3_aux.c \
360 $(TOP)/ext/fts3/fts3_expr.c \
361 $(TOP)/ext/fts3/fts3_hash.c \
362 $(TOP)/ext/fts3/fts3_hash.h \
363 $(TOP)/ext/fts3/fts3_icu.c \
364 $(TOP)/ext/fts3/fts3_porter.c \
365 $(TOP)/ext/fts3/fts3_snippet.c \
366 $(TOP)/ext/fts3/fts3_tokenizer.h \
367 $(TOP)/ext/fts3/fts3_tokenizer.c \
368 $(TOP)/ext/fts3/fts3_tokenizer1.c \
369 $(TOP)/ext/fts3/fts3_tokenize_vtab.c \
370 $(TOP)/ext/fts3/fts3_unicode.c \
371 $(TOP)/ext/fts3/fts3_unicode2.c \
372 $(TOP)/ext/fts3/fts3_write.c
373 SRC += \
374 $(TOP)/ext/icu/sqliteicu.h \
375 $(TOP)/ext/icu/icu.c
376 SRC += \
377 $(TOP)/ext/rtree/rtree.h \
378 $(TOP)/ext/rtree/rtree.c \
379 $(TOP)/ext/rtree/geopoly.c
380 SRC += \
381 $(TOP)/ext/session/sqlite3session.c \
382 $(TOP)/ext/session/sqlite3session.h
383 SRC += \
384 $(TOP)/ext/userauth/userauth.c \
385 $(TOP)/ext/userauth/sqlite3userauth.h
386 SRC += \
387 $(TOP)/ext/rbu/sqlite3rbu.h \
388 $(TOP)/ext/rbu/sqlite3rbu.c
389 SRC += \
390 $(TOP)/ext/misc/json1.c \
391 $(TOP)/ext/misc/stmt.c
393 # Generated source code files
395 SRC += \
396 keywordhash.h \
397 opcodes.c \
398 opcodes.h \
399 parse.c \
400 parse.h \
401 config.h \
402 shell.c \
403 sqlite3.h
405 # Source code to the test files.
407 TESTSRC = \
408 $(TOP)/src/test1.c \
409 $(TOP)/src/test2.c \
410 $(TOP)/src/test3.c \
411 $(TOP)/src/test4.c \
412 $(TOP)/src/test5.c \
413 $(TOP)/src/test6.c \
414 $(TOP)/src/test7.c \
415 $(TOP)/src/test8.c \
416 $(TOP)/src/test9.c \
417 $(TOP)/src/test_autoext.c \
418 $(TOP)/src/test_async.c \
419 $(TOP)/src/test_backup.c \
420 $(TOP)/src/test_bestindex.c \
421 $(TOP)/src/test_blob.c \
422 $(TOP)/src/test_btree.c \
423 $(TOP)/src/test_config.c \
424 $(TOP)/src/test_delete.c \
425 $(TOP)/src/test_demovfs.c \
426 $(TOP)/src/test_devsym.c \
427 $(TOP)/src/test_fs.c \
428 $(TOP)/src/test_func.c \
429 $(TOP)/src/test_hexio.c \
430 $(TOP)/src/test_init.c \
431 $(TOP)/src/test_intarray.c \
432 $(TOP)/src/test_journal.c \
433 $(TOP)/src/test_malloc.c \
434 $(TOP)/src/test_md5.c \
435 $(TOP)/src/test_multiplex.c \
436 $(TOP)/src/test_mutex.c \
437 $(TOP)/src/test_onefile.c \
438 $(TOP)/src/test_osinst.c \
439 $(TOP)/src/test_pcache.c \
440 $(TOP)/src/test_quota.c \
441 $(TOP)/src/test_rtree.c \
442 $(TOP)/src/test_schema.c \
443 $(TOP)/src/test_server.c \
444 $(TOP)/src/test_superlock.c \
445 $(TOP)/src/test_syscall.c \
446 $(TOP)/src/test_tclsh.c \
447 $(TOP)/src/test_tclvar.c \
448 $(TOP)/src/test_thread.c \
449 $(TOP)/src/test_vdbecov.c \
450 $(TOP)/src/test_vfs.c \
451 $(TOP)/src/test_windirent.c \
452 $(TOP)/src/test_window.c \
453 $(TOP)/src/test_wsd.c \
454 $(TOP)/ext/fts3/fts3_term.c \
455 $(TOP)/ext/fts3/fts3_test.c \
456 $(TOP)/ext/session/test_session.c \
457 $(TOP)/ext/rbu/test_rbu.c
459 # Statically linked extensions
461 TESTSRC += \
462 $(TOP)/ext/expert/sqlite3expert.c \
463 $(TOP)/ext/expert/test_expert.c \
464 $(TOP)/ext/misc/amatch.c \
465 $(TOP)/ext/misc/appendvfs.c \
466 $(TOP)/ext/misc/carray.c \
467 $(TOP)/ext/misc/cksumvfs.c \
468 $(TOP)/ext/misc/closure.c \
469 $(TOP)/ext/misc/csv.c \
470 $(TOP)/ext/misc/decimal.c \
471 $(TOP)/ext/misc/eval.c \
472 $(TOP)/ext/misc/explain.c \
473 $(TOP)/ext/misc/fileio.c \
474 $(TOP)/ext/misc/fuzzer.c \
475 $(TOP)/ext/fts5/fts5_tcl.c \
476 $(TOP)/ext/fts5/fts5_test_mi.c \
477 $(TOP)/ext/fts5/fts5_test_tok.c \
478 $(TOP)/ext/misc/ieee754.c \
479 $(TOP)/ext/misc/mmapwarm.c \
480 $(TOP)/ext/misc/nextchar.c \
481 $(TOP)/ext/misc/normalize.c \
482 $(TOP)/ext/misc/percentile.c \
483 $(TOP)/ext/misc/prefixes.c \
484 $(TOP)/ext/misc/regexp.c \
485 $(TOP)/ext/misc/remember.c \
486 $(TOP)/ext/misc/series.c \
487 $(TOP)/ext/misc/spellfix.c \
488 $(TOP)/ext/misc/totype.c \
489 $(TOP)/ext/misc/unionvtab.c \
490 $(TOP)/ext/misc/wholenumber.c \
491 $(TOP)/ext/misc/zipfile.c \
492 $(TOP)/ext/userauth/userauth.c
494 # Source code to the library files needed by the test fixture
496 TESTSRC2 = \
497 $(TOP)/src/attach.c \
498 $(TOP)/src/backup.c \
499 $(TOP)/src/bitvec.c \
500 $(TOP)/src/btree.c \
501 $(TOP)/src/build.c \
502 $(TOP)/src/ctime.c \
503 $(TOP)/src/date.c \
504 $(TOP)/src/dbpage.c \
505 $(TOP)/src/dbstat.c \
506 $(TOP)/src/expr.c \
507 $(TOP)/src/func.c \
508 $(TOP)/src/global.c \
509 $(TOP)/src/insert.c \
510 $(TOP)/src/wal.c \
511 $(TOP)/src/main.c \
512 $(TOP)/src/mem5.c \
513 $(TOP)/src/os.c \
514 $(TOP)/src/os_unix.c \
515 $(TOP)/src/os_win.c \
516 $(TOP)/src/pager.c \
517 $(TOP)/src/pragma.c \
518 $(TOP)/src/prepare.c \
519 $(TOP)/src/printf.c \
520 $(TOP)/src/random.c \
521 $(TOP)/src/pcache.c \
522 $(TOP)/src/pcache1.c \
523 $(TOP)/src/select.c \
524 $(TOP)/src/tokenize.c \
525 $(TOP)/src/utf.c \
526 $(TOP)/src/util.c \
527 $(TOP)/src/vdbeapi.c \
528 $(TOP)/src/vdbeaux.c \
529 $(TOP)/src/vdbe.c \
530 $(TOP)/src/vdbemem.c \
531 $(TOP)/src/vdbetrace.c \
532 $(TOP)/src/vdbevtab.c \
533 $(TOP)/src/where.c \
534 $(TOP)/src/wherecode.c \
535 $(TOP)/src/whereexpr.c \
536 $(TOP)/src/window.c \
537 parse.c \
538 $(TOP)/ext/fts3/fts3.c \
539 $(TOP)/ext/fts3/fts3_aux.c \
540 $(TOP)/ext/fts3/fts3_expr.c \
541 $(TOP)/ext/fts3/fts3_term.c \
542 $(TOP)/ext/fts3/fts3_tokenizer.c \
543 $(TOP)/ext/fts3/fts3_write.c \
544 $(TOP)/ext/async/sqlite3async.c \
545 $(TOP)/ext/session/sqlite3session.c \
546 $(TOP)/ext/misc/stmt.c \
547 fts5.c
549 # Header files used by all library source files.
551 HDR = \
552 $(TOP)/src/btree.h \
553 $(TOP)/src/btreeInt.h \
554 $(TOP)/src/hash.h \
555 $(TOP)/src/hwtime.h \
556 keywordhash.h \
557 $(TOP)/src/msvc.h \
558 $(TOP)/src/mutex.h \
559 opcodes.h \
560 $(TOP)/src/os.h \
561 $(TOP)/src/os_common.h \
562 $(TOP)/src/os_setup.h \
563 $(TOP)/src/os_win.h \
564 $(TOP)/src/pager.h \
565 $(TOP)/src/pcache.h \
566 parse.h \
567 $(TOP)/src/pragma.h \
568 sqlite3.h \
569 $(TOP)/src/sqlite3ext.h \
570 $(TOP)/src/sqliteInt.h \
571 $(TOP)/src/sqliteLimit.h \
572 $(TOP)/src/vdbe.h \
573 $(TOP)/src/vdbeInt.h \
574 $(TOP)/src/vxworks.h \
575 $(TOP)/src/whereInt.h \
576 config.h
578 # Header files used by extensions
580 EXTHDR += \
581 $(TOP)/ext/fts1/fts1.h \
582 $(TOP)/ext/fts1/fts1_hash.h \
583 $(TOP)/ext/fts1/fts1_tokenizer.h
584 EXTHDR += \
585 $(TOP)/ext/fts2/fts2.h \
586 $(TOP)/ext/fts2/fts2_hash.h \
587 $(TOP)/ext/fts2/fts2_tokenizer.h
588 EXTHDR += \
589 $(TOP)/ext/fts3/fts3.h \
590 $(TOP)/ext/fts3/fts3Int.h \
591 $(TOP)/ext/fts3/fts3_hash.h \
592 $(TOP)/ext/fts3/fts3_tokenizer.h
593 EXTHDR += \
594 $(TOP)/ext/rtree/rtree.h \
595 $(TOP)/ext/rtree/geopoly.c
596 EXTHDR += \
597 $(TOP)/ext/icu/sqliteicu.h
598 EXTHDR += \
599 $(TOP)/ext/rtree/sqlite3rtree.h
600 EXTHDR += \
601 $(TOP)/ext/userauth/sqlite3userauth.h
603 # executables needed for testing
605 TESTPROGS = \
606 testfixture$(TEXE) \
607 sqlite3$(TEXE) \
608 sqlite3_analyzer$(TEXE) \
609 sqldiff$(TEXE) \
610 dbhash$(TEXE) \
611 sqltclsh$(TEXE)
613 # Databases containing fuzzer test cases
615 FUZZDATA = \
616 $(TOP)/test/fuzzdata1.db \
617 $(TOP)/test/fuzzdata2.db \
618 $(TOP)/test/fuzzdata3.db \
619 $(TOP)/test/fuzzdata4.db \
620 $(TOP)/test/fuzzdata5.db \
621 $(TOP)/test/fuzzdata6.db \
622 $(TOP)/test/fuzzdata7.db \
623 $(TOP)/test/fuzzdata8.db
625 # Standard options to testfixture
627 TESTOPTS = --verbose=file --output=test-out.txt
629 # Extra compiler options for various shell tools
631 SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
632 #SHELL_OPT += -DSQLITE_ENABLE_FTS5
633 SHELL_OPT += -DSQLITE_ENABLE_RTREE
634 SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
635 SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
636 SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
637 SHELL_OPT += -DSQLITE_ENABLE_DBPAGE_VTAB
638 SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
639 SHELL_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB
640 SHELL_OPT += -DSQLITE_ENABLE_OFFSET_SQL_FUNC
641 FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
642 FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 -DSQLITE_OSS_FUZZ
643 FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000
644 FUZZCHECK_OPT += -DSQLITE_PRINTF_PRECISION_LIMIT=1000
645 FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS4
646 FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS3_PARENTHESIS
647 #FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS5
648 FUZZCHECK_OPT += -DSQLITE_ENABLE_RTREE
649 FUZZCHECK_OPT += -DSQLITE_ENABLE_GEOPOLY
650 FUZZCHECK_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
651 FUZZCHECK_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB
652 FUZZCHECK_SRC = $(TOP)/test/fuzzcheck.c $(TOP)/test/ossfuzz.c
653 DBFUZZ_OPT =
655 # This is the default Makefile target. The objects listed here
656 # are what get build when you type just "make" with no arguments.
658 all: sqlite3.h libsqlcipher.la sqlcipher$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
660 Makefile: $(TOP)/Makefile.in
661 ./config.status
663 sqlcipher.pc: $(TOP)/sqlcipher.pc.in
664 ./config.status
666 libsqlcipher.la: $(LIBOBJ)
667 $(LTLINK) -no-undefined -o $@ $(LIBOBJ) $(TLIBS) \
668 ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
670 libtclsqlite3.la: tclsqlite.lo libsqlcipher.la
671 $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
672 libsqlcipher.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
673 -rpath "$(TCLLIBDIR)" \
674 -version-info "8:6:8" \
675 -avoid-version
677 sqlcipher$(TEXE): shell.c sqlite3.c
678 $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
679 shell.c sqlite3.c \
680 $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
682 sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
683 $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
685 dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
686 $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
688 scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
689 $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
690 $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
692 srcck1$(BEXE): $(TOP)/tool/srcck1.c
693 $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
695 sourcetest: srcck1$(BEXE) sqlite3.c
696 ./srcck1 sqlite3.c
698 fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h
699 $(LTLINK) -o $@ $(FUZZERSHELL_OPT) \
700 $(TOP)/tool/fuzzershell.c sqlite3.c $(TLIBS)
702 fuzzcheck$(TEXE): $(FUZZCHECK_SRC) sqlite3.c sqlite3.h
703 $(LTLINK) -o $@ $(FUZZCHECK_OPT) $(FUZZCHECK_SRC) sqlite3.c $(TLIBS)
705 ossshell$(TEXE): $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c sqlite3.h
706 $(LTLINK) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/ossshell.c \
707 $(TOP)/test/ossfuzz.c sqlite3.c $(TLIBS)
709 sessionfuzz$(TEXE): $(TOP)/test/sessionfuzz.c sqlite3.c sqlite3.h
710 $(LTLINK) -o $@ $(TOP)/test/sessionfuzz.c $(TLIBS)
712 dbfuzz$(TEXE): $(TOP)/test/dbfuzz.c sqlite3.c sqlite3.h
713 $(LTLINK) -o $@ $(DBFUZZ_OPT) $(TOP)/test/dbfuzz.c sqlite3.c $(TLIBS)
715 DBFUZZ2_OPTS = \
716 -DSQLITE_THREADSAFE=0 \
717 -DSQLITE_OMIT_LOAD_EXTENSION \
718 -DSQLITE_DEBUG \
719 -DSQLITE_ENABLE_DBSTAT_VTAB \
720 -DSQLITE_ENABLE_BYTECODE_VTAB \
721 -DSQLITE_ENABLE_RTREE \
722 -DSQLITE_ENABLE_FTS4 \
723 -DSQLITE_ENABLE_FTS5
725 dbfuzz2$(TEXE): $(TOP)/test/dbfuzz2.c sqlite3.c sqlite3.h
726 $(CC) $(OPT_FEATURE_FLAGS) $(OPTS) -I. -g -O0 \
727 -DSTANDALONE -o dbfuzz2 \
728 $(DBFUZZ2_OPTS) $(TOP)/test/dbfuzz2.c sqlite3.c $(TLIBS)
729 mkdir -p dbfuzz2-dir
730 cp $(TOP)/test/dbfuzz2-seed* dbfuzz2-dir
732 dbfuzz2-asan: $(TOP)/test/dbfuzz2.c sqlite3.c sqlite3.h
733 clang-6.0 $(OPT_FEATURE_FLAGS) $(OPTS) -I. -g -O0 \
734 -fsanitize=fuzzer,undefined,address -o dbfuzz2-asan \
735 $(DBFUZZ2_OPTS) $(TOP)/test/dbfuzz2.c sqlite3.c $(TLIBS)
736 mkdir -p dbfuzz2-dir
737 cp $(TOP)/test/dbfuzz2-seed* dbfuzz2-dir
739 dbfuzz2-msan: $(TOP)/test/dbfuzz2.c sqlite3.c sqlite3.h
740 clang-6.0 $(OPT_FEATURE_FLAGS) $(OPTS) -I. -g -O0 \
741 -fsanitize=fuzzer,undefined,memory -o dbfuzz2-msan \
742 $(DBFUZZ2_OPTS) $(TOP)/test/dbfuzz2.c sqlite3.c $(TLIBS)
743 mkdir -p dbfuzz2-dir
744 cp $(TOP)/test/dbfuzz2-seed* dbfuzz2-dir
746 mptester$(TEXE): sqlite3.lo $(TOP)/mptest/mptest.c
747 $(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.lo \
748 $(TLIBS) -rpath "$(libdir)"
750 MPTEST1=./mptester$(TEXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20
751 MPTEST2=./mptester$(TEXE) mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20
752 mptest: mptester$(TEXE)
753 rm -f mptest.db
754 $(MPTEST1) --journalmode DELETE
755 $(MPTEST2) --journalmode WAL
756 $(MPTEST1) --journalmode WAL
757 $(MPTEST2) --journalmode PERSIST
758 $(MPTEST1) --journalmode PERSIST
759 $(MPTEST2) --journalmode TRUNCATE
760 $(MPTEST1) --journalmode TRUNCATE
761 $(MPTEST2) --journalmode DELETE
764 # This target creates a directory named "tsrc" and fills it with
765 # copies of all of the C source code and header files needed to
766 # build on the target system. Some of the C source code and header
767 # files are automatically generated. This target takes care of
768 # all that automatic generation.
770 .target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c
771 rm -rf tsrc
772 mkdir tsrc
773 cp -f $(SRC) tsrc
774 rm tsrc/sqlite.h.in tsrc/parse.y
775 $(TCLSH_CMD) $(TOP)/tool/vdbe-compress.tcl $(OPTS) <tsrc/vdbe.c >vdbe.new
776 mv vdbe.new tsrc/vdbe.c
777 cp fts5.c fts5.h tsrc
778 touch .target_source
780 sqlite3.c: .target_source $(TOP)/tool/mksqlite3c.tcl
781 $(TCLSH_CMD) $(TOP)/tool/mksqlite3c.tcl
782 cp tsrc/sqlite3ext.h .
783 cp $(TOP)/ext/session/sqlite3session.h .
785 sqlite3ext.h: .target_source
786 cp tsrc/sqlite3ext.h .
788 tclsqlite3.c: sqlite3.c
789 echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
790 cat sqlite3.c >>tclsqlite3.c
791 echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
792 cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
794 sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl
795 $(TCLSH_CMD) $(TOP)/tool/split-sqlite3c.tcl
797 # Rule to build the amalgamation
799 sqlite3.lo: sqlite3.c
800 $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
802 # Rules to build the LEMON compiler generator
804 lemon$(BEXE): $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
805 $(BCC) -o $@ $(TOP)/tool/lemon.c
806 cp $(TOP)/tool/lempar.c .
808 # Rules to build the program that generates the source-id
810 mksourceid$(BEXE): $(TOP)/tool/mksourceid.c
811 $(BCC) -o $@ $(TOP)/tool/mksourceid.c
813 # Rules to build individual *.o files from generated *.c files. This
814 # applies to:
816 # parse.o
817 # opcodes.o
819 parse.lo: parse.c $(HDR)
820 $(LTCOMPILE) $(TEMP_STORE) -c parse.c
822 opcodes.lo: opcodes.c
823 $(LTCOMPILE) $(TEMP_STORE) -c opcodes.c
825 # BEGIN CRYPTO
826 crypto.lo: $(TOP)/src/crypto.c $(HDR)
827 $(LTCOMPILE) -c $(TOP)/src/crypto.c
828 crypto_impl.lo: $(TOP)/src/crypto_impl.c $(HDR)
829 $(LTCOMPILE) -c $(TOP)/src/crypto_impl.c
830 crypto_openssl.lo: $(TOP)/src/crypto_openssl.c $(HDR)
831 $(LTCOMPILE) -c $(TOP)/src/crypto_openssl.c
832 crypto_nss.lo: $(TOP)/src/crypto_nss.c $(HDR)
833 $(LTCOMPILE) -c $(TOP)/src/crypto_nss.c
834 crypto_libtomcrypt.lo: $(TOP)/src/crypto_libtomcrypt.c $(HDR)
835 $(LTCOMPILE) -c $(TOP)/src/crypto_libtomcrypt.c
836 crypto_cc.lo: $(TOP)/src/crypto_cc.c $(HDR)
837 $(LTCOMPILE) -c $(TOP)/src/crypto_cc.c
838 # END CRYPTO
840 # Rules to build individual *.o files from files in the src directory.
842 alter.lo: $(TOP)/src/alter.c $(HDR)
843 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/alter.c
845 analyze.lo: $(TOP)/src/analyze.c $(HDR)
846 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/analyze.c
848 attach.lo: $(TOP)/src/attach.c $(HDR)
849 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/attach.c
851 auth.lo: $(TOP)/src/auth.c $(HDR)
852 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/auth.c
854 backup.lo: $(TOP)/src/backup.c $(HDR)
855 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/backup.c
857 bitvec.lo: $(TOP)/src/bitvec.c $(HDR)
858 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/bitvec.c
860 btmutex.lo: $(TOP)/src/btmutex.c $(HDR)
861 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/btmutex.c
863 btree.lo: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
864 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/btree.c
866 build.lo: $(TOP)/src/build.c $(HDR)
867 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/build.c
869 callback.lo: $(TOP)/src/callback.c $(HDR)
870 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/callback.c
872 complete.lo: $(TOP)/src/complete.c $(HDR)
873 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/complete.c
875 ctime.lo: $(TOP)/src/ctime.c $(HDR)
876 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/ctime.c
878 date.lo: $(TOP)/src/date.c $(HDR)
879 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/date.c
881 dbpage.lo: $(TOP)/src/dbpage.c $(HDR)
882 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/dbpage.c
884 dbstat.lo: $(TOP)/src/dbstat.c $(HDR)
885 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/dbstat.c
887 delete.lo: $(TOP)/src/delete.c $(HDR)
888 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/delete.c
890 expr.lo: $(TOP)/src/expr.c $(HDR)
891 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/expr.c
893 fault.lo: $(TOP)/src/fault.c $(HDR)
894 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/fault.c
896 fkey.lo: $(TOP)/src/fkey.c $(HDR)
897 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/fkey.c
899 func.lo: $(TOP)/src/func.c $(HDR)
900 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/func.c
902 global.lo: $(TOP)/src/global.c $(HDR)
903 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/global.c
905 hash.lo: $(TOP)/src/hash.c $(HDR)
906 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/hash.c
908 insert.lo: $(TOP)/src/insert.c $(HDR)
909 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/insert.c
911 legacy.lo: $(TOP)/src/legacy.c $(HDR)
912 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/legacy.c
914 loadext.lo: $(TOP)/src/loadext.c $(HDR)
915 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/loadext.c
917 main.lo: $(TOP)/src/main.c $(HDR)
918 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/main.c
920 malloc.lo: $(TOP)/src/malloc.c $(HDR)
921 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/malloc.c
923 mem0.lo: $(TOP)/src/mem0.c $(HDR)
924 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem0.c
926 mem1.lo: $(TOP)/src/mem1.c $(HDR)
927 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem1.c
929 mem2.lo: $(TOP)/src/mem2.c $(HDR)
930 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem2.c
932 mem3.lo: $(TOP)/src/mem3.c $(HDR)
933 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem3.c
935 mem5.lo: $(TOP)/src/mem5.c $(HDR)
936 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem5.c
938 memdb.lo: $(TOP)/src/memdb.c $(HDR)
939 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/memdb.c
941 memjournal.lo: $(TOP)/src/memjournal.c $(HDR)
942 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/memjournal.c
944 mutex.lo: $(TOP)/src/mutex.c $(HDR)
945 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex.c
947 mutex_noop.lo: $(TOP)/src/mutex_noop.c $(HDR)
948 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_noop.c
950 mutex_unix.lo: $(TOP)/src/mutex_unix.c $(HDR)
951 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_unix.c
953 mutex_w32.lo: $(TOP)/src/mutex_w32.c $(HDR)
954 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_w32.c
956 notify.lo: $(TOP)/src/notify.c $(HDR)
957 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/notify.c
959 pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
960 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pager.c
962 pcache.lo: $(TOP)/src/pcache.c $(HDR) $(TOP)/src/pcache.h
963 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pcache.c
965 pcache1.lo: $(TOP)/src/pcache1.c $(HDR) $(TOP)/src/pcache.h
966 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pcache1.c
968 os.lo: $(TOP)/src/os.c $(HDR)
969 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os.c
971 os_unix.lo: $(TOP)/src/os_unix.c $(HDR)
972 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os_unix.c
974 os_win.lo: $(TOP)/src/os_win.c $(HDR)
975 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/os_win.c
977 pragma.lo: $(TOP)/src/pragma.c $(HDR)
978 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pragma.c
980 prepare.lo: $(TOP)/src/prepare.c $(HDR)
981 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/prepare.c
983 printf.lo: $(TOP)/src/printf.c $(HDR)
984 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/printf.c
986 random.lo: $(TOP)/src/random.c $(HDR)
987 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/random.c
989 resolve.lo: $(TOP)/src/resolve.c $(HDR)
990 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/resolve.c
992 rowset.lo: $(TOP)/src/rowset.c $(HDR)
993 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/rowset.c
995 select.lo: $(TOP)/src/select.c $(HDR)
996 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/select.c
998 status.lo: $(TOP)/src/status.c $(HDR)
999 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/status.c
1001 table.lo: $(TOP)/src/table.c $(HDR)
1002 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/table.c
1004 threads.lo: $(TOP)/src/threads.c $(HDR)
1005 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/threads.c
1007 tokenize.lo: $(TOP)/src/tokenize.c keywordhash.h $(HDR)
1008 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/tokenize.c
1010 treeview.lo: $(TOP)/src/treeview.c $(HDR)
1011 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/treeview.c
1013 trigger.lo: $(TOP)/src/trigger.c $(HDR)
1014 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/trigger.c
1016 update.lo: $(TOP)/src/update.c $(HDR)
1017 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/update.c
1019 upsert.lo: $(TOP)/src/upsert.c $(HDR)
1020 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/upsert.c
1022 utf.lo: $(TOP)/src/utf.c $(HDR)
1023 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/utf.c
1025 util.lo: $(TOP)/src/util.c $(HDR)
1026 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/util.c
1028 vacuum.lo: $(TOP)/src/vacuum.c $(HDR)
1029 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vacuum.c
1031 vdbe.lo: $(TOP)/src/vdbe.c $(HDR)
1032 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbe.c
1034 vdbeapi.lo: $(TOP)/src/vdbeapi.c $(HDR)
1035 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbeapi.c
1037 vdbeaux.lo: $(TOP)/src/vdbeaux.c $(HDR)
1038 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbeaux.c
1040 vdbeblob.lo: $(TOP)/src/vdbeblob.c $(HDR)
1041 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbeblob.c
1043 vdbemem.lo: $(TOP)/src/vdbemem.c $(HDR)
1044 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbemem.c
1046 vdbesort.lo: $(TOP)/src/vdbesort.c $(HDR)
1047 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbesort.c
1049 vdbetrace.lo: $(TOP)/src/vdbetrace.c $(HDR)
1050 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbetrace.c
1052 vdbevtab.lo: $(TOP)/src/vdbevtab.c $(HDR)
1053 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vdbevtab.c
1055 vtab.lo: $(TOP)/src/vtab.c $(HDR)
1056 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/vtab.c
1058 wal.lo: $(TOP)/src/wal.c $(HDR)
1059 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/wal.c
1061 walker.lo: $(TOP)/src/walker.c $(HDR)
1062 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/walker.c
1064 where.lo: $(TOP)/src/where.c $(HDR)
1065 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/where.c
1067 wherecode.lo: $(TOP)/src/wherecode.c $(HDR)
1068 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/wherecode.c
1070 whereexpr.lo: $(TOP)/src/whereexpr.c $(HDR)
1071 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/whereexpr.c
1073 window.lo: $(TOP)/src/window.c $(HDR)
1074 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/window.c
1076 tclsqlite.lo: $(TOP)/src/tclsqlite.c $(HDR)
1077 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -c $(TOP)/src/tclsqlite.c
1079 tclsqlite-shell.lo: $(TOP)/src/tclsqlite.c $(HDR)
1080 $(LTCOMPILE) -DTCLSH -o $@ -c $(TOP)/src/tclsqlite.c
1082 tclsqlite-stubs.lo: $(TOP)/src/tclsqlite.c $(HDR)
1083 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -o $@ -c $(TOP)/src/tclsqlite.c
1085 tclsqlcipher$(TEXE): tclsqlite-shell.lo libsqlcipher.la
1086 $(LTLINK) -o $@ tclsqlite-shell.lo \
1087 libsqlcipher.la $(LIBTCL)
1089 # Rules to build opcodes.c and opcodes.h
1091 opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl
1092 $(TCLSH_CMD) $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c
1094 opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl
1095 cat parse.h $(TOP)/src/vdbe.c | $(TCLSH_CMD) $(TOP)/tool/mkopcodeh.tcl >opcodes.h
1097 # Rules to build parse.c and parse.h - the outputs of lemon.
1099 parse.h: parse.c
1101 parse.c: $(TOP)/src/parse.y lemon$(BEXE)
1102 cp $(TOP)/src/parse.y .
1103 ./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) -S parse.y
1105 sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid$(BEXE) $(TOP)/VERSION
1106 $(TCLSH_CMD) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
1108 sqlite3rc.h: $(TOP)/src/sqlite3.rc $(TOP)/VERSION
1109 echo '#ifndef SQLITE_RESOURCE_VERSION' >$@
1110 echo -n '#define SQLITE_RESOURCE_VERSION ' >>$@
1111 cat $(TOP)/VERSION | $(TCLSH_CMD) $(TOP)/tool/replace.tcl exact . , >>$@
1112 echo '#endif' >>sqlite3rc.h
1114 keywordhash.h: $(TOP)/tool/mkkeywordhash.c
1115 $(BCC) -o mkkeywordhash$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)/tool/mkkeywordhash.c
1116 ./mkkeywordhash$(BEXE) >keywordhash.h
1118 # Source files that go into making shell.c
1119 SHELL_SRC = \
1120 $(TOP)/src/shell.c.in \
1121 $(TOP)/ext/misc/appendvfs.c \
1122 $(TOP)/ext/misc/completion.c \
1123 $(TOP)/ext/misc/decimal.c \
1124 $(TOP)/ext/misc/fileio.c \
1125 $(TOP)/ext/misc/ieee754.c \
1126 $(TOP)/ext/misc/regexp.c \
1127 $(TOP)/ext/misc/series.c \
1128 $(TOP)/ext/misc/shathree.c \
1129 $(TOP)/ext/misc/sqlar.c \
1130 $(TOP)/ext/misc/uint.c \
1131 $(TOP)/ext/expert/sqlite3expert.c \
1132 $(TOP)/ext/expert/sqlite3expert.h \
1133 $(TOP)/ext/misc/zipfile.c \
1134 $(TOP)/ext/misc/memtrace.c \
1135 $(TOP)/src/test_windirent.c
1137 shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
1138 $(TCLSH_CMD) $(TOP)/tool/mkshellc.tcl >shell.c
1143 # Rules to build the extension objects.
1145 icu.lo: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
1146 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
1148 fts2.lo: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
1149 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
1151 fts2_hash.lo: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
1152 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
1154 fts2_icu.lo: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
1155 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
1157 fts2_porter.lo: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
1158 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
1160 fts2_tokenizer.lo: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
1161 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
1163 fts2_tokenizer1.lo: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
1164 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
1166 fts3.lo: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
1167 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
1169 fts3_aux.lo: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR)
1170 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c
1172 fts3_expr.lo: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
1173 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
1175 fts3_hash.lo: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
1176 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
1178 fts3_icu.lo: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
1179 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
1181 fts3_porter.lo: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
1182 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
1184 fts3_snippet.lo: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
1185 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
1187 fts3_tokenizer.lo: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
1188 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
1190 fts3_tokenizer1.lo: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
1191 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
1193 fts3_tokenize_vtab.lo: $(TOP)/ext/fts3/fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
1194 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenize_vtab.c
1196 fts3_unicode.lo: $(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR)
1197 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c
1199 fts3_unicode2.lo: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR)
1200 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode2.c
1202 fts3_write.lo: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
1203 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
1205 rtree.lo: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
1206 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
1208 userauth.lo: $(TOP)/ext/userauth/userauth.c $(HDR) $(EXTHDR)
1209 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/userauth/userauth.c
1211 sqlite3session.lo: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR)
1212 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/session/sqlite3session.c
1214 json1.lo: $(TOP)/ext/misc/json1.c
1215 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c
1217 stmt.lo: $(TOP)/ext/misc/stmt.c
1218 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/stmt.c
1220 # FTS5 things
1222 FTS5_SRC = \
1223 $(TOP)/ext/fts5/fts5.h \
1224 $(TOP)/ext/fts5/fts5Int.h \
1225 $(TOP)/ext/fts5/fts5_aux.c \
1226 $(TOP)/ext/fts5/fts5_buffer.c \
1227 $(TOP)/ext/fts5/fts5_main.c \
1228 $(TOP)/ext/fts5/fts5_config.c \
1229 $(TOP)/ext/fts5/fts5_expr.c \
1230 $(TOP)/ext/fts5/fts5_hash.c \
1231 $(TOP)/ext/fts5/fts5_index.c \
1232 fts5parse.c fts5parse.h \
1233 $(TOP)/ext/fts5/fts5_storage.c \
1234 $(TOP)/ext/fts5/fts5_tokenize.c \
1235 $(TOP)/ext/fts5/fts5_unicode2.c \
1236 $(TOP)/ext/fts5/fts5_varint.c \
1237 $(TOP)/ext/fts5/fts5_vocab.c \
1239 fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon$(BEXE)
1240 cp $(TOP)/ext/fts5/fts5parse.y .
1241 rm -f fts5parse.h
1242 ./lemon$(BEXE) $(OPTS) -S fts5parse.y
1244 fts5parse.h: fts5parse.c
1246 fts5.c: $(FTS5_SRC)
1247 $(TCLSH_CMD) $(TOP)/ext/fts5/tool/mkfts5c.tcl
1248 cp $(TOP)/ext/fts5/fts5.h .
1250 fts5.lo: fts5.c $(HDR) $(EXTHDR)
1251 $(LTCOMPILE) -DSQLITE_CORE -c fts5.c
1253 sqlite3rbu.lo: $(TOP)/ext/rbu/sqlite3rbu.c $(HDR) $(EXTHDR)
1254 $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rbu/sqlite3rbu.c
1257 # Rules to build the 'testfixture' application.
1259 # If using the amalgamation, use sqlite3.c directly to build the test
1260 # fixture. Otherwise link against libsqlcipher.la. (This distinction is
1261 # necessary because the test fixture requires non-API symbols which are
1262 # hidden when the library is built via the amalgamation).
1264 TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
1265 TESTFIXTURE_FLAGS += -DTCLSH_INIT_PROC=sqlite3TestInit
1266 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
1267 TESTFIXTURE_FLAGS += -DBUILD_sqlite
1268 TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
1269 TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
1270 TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTVTAB
1271 TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_DBPAGE_VTAB
1272 TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_BYTECODE_VTAB
1273 TESTFIXTURE_FLAGS += -DSQLITE_CKSUMVFS_STATIC
1275 TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlcipher.la
1276 TESTFIXTURE_SRC1 = sqlite3.c
1277 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c
1278 TESTFIXTURE_SRC += $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
1280 testfixture$(TEXE): $(TESTFIXTURE_SRC)
1281 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TEMP_STORE) $(TESTFIXTURE_FLAGS) \
1282 -o $@ $(TESTFIXTURE_SRC) $(LIBTCL) $(TLIBS)
1284 coretestprogs: $(TESTPROGS)
1286 testprogs: coretestprogs srcck1$(BEXE) fuzzcheck$(TEXE) sessionfuzz$(TEXE)
1288 # A very detailed test running most or all test cases
1289 fulltest: $(TESTPROGS) fuzztest
1290 ./testfixture$(TEXE) $(TOP)/test/all.test $(TESTOPTS)
1292 # Really really long testing
1293 soaktest: $(TESTPROGS)
1294 ./testfixture$(TEXE) $(TOP)/test/all.test -soak=1 $(TESTOPTS)
1296 # Do extra testing but not everything.
1297 fulltestonly: $(TESTPROGS) fuzztest
1298 ./testfixture$(TEXE) $(TOP)/test/full.test
1300 # Fuzz testing
1301 fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
1302 ./fuzzcheck$(TEXE) $(FUZZDATA)
1303 ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
1305 valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
1306 valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M $(FUZZDATA)
1307 valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
1309 # The veryquick.test TCL tests.
1311 tcltest: ./testfixture$(TEXE)
1312 ./testfixture$(TEXE) $(TOP)/test/veryquick.test $(TESTOPTS)
1314 # Minimal testing that runs in less than 3 minutes
1316 quicktest: ./testfixture$(TEXE)
1317 ./testfixture$(TEXE) $(TOP)/test/extraquick.test $(TESTOPTS)
1319 # This is the common case. Run many tests that do not take too long,
1320 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1322 test: fuzztest sourcetest $(TESTPROGS) tcltest
1324 # Run a test using valgrind. This can take a really long time
1325 # because valgrind is so much slower than a native machine.
1327 valgrindtest: $(TESTPROGS) valgrindfuzz
1328 OMIT_MISUSE=1 valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind $(TESTOPTS)
1330 # A very fast test that checks basic sanity. The name comes from
1331 # the 60s-era electronics testing: "Turn it on and see if smoke
1332 # comes out."
1334 smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
1335 ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
1337 shelltest: $(TESTPROGS)
1338 ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
1340 sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
1341 $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
1343 sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
1344 $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
1346 sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
1347 $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
1349 sqltclsh$(TEXE): sqltclsh.c
1350 $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
1352 sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
1353 $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
1355 CHECKER_DEPS =\
1356 $(TOP)/tool/mkccode.tcl \
1357 sqlite3.c \
1358 $(TOP)/src/tclsqlite.c \
1359 $(TOP)/ext/repair/sqlite3_checker.tcl \
1360 $(TOP)/ext/repair/checkindex.c \
1361 $(TOP)/ext/repair/checkfreelist.c \
1362 $(TOP)/ext/misc/btreeinfo.c \
1363 $(TOP)/ext/repair/sqlite3_checker.c.in
1365 sqlite3_checker.c: $(CHECKER_DEPS)
1366 $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
1368 sqlite3_checker$(TEXE): sqlite3_checker.c
1369 $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
1371 dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
1372 $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
1373 $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
1375 dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
1376 $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
1378 showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
1379 $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
1381 showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
1382 $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
1384 showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
1385 $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
1387 showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
1388 $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
1390 showshm$(TEXE): $(TOP)/tool/showshm.c
1391 $(LTLINK) -o $@ $(TOP)/tool/showshm.c
1393 index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
1394 $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
1396 changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
1397 $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
1399 changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
1400 $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
1402 rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
1403 $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
1405 atrc$(TEXX): $(TOP)/test/atrc.c sqlite3.lo
1406 $(LTLINK) -o $@ $(TOP)/test/atrc.c sqlite3.lo $(TLIBS)
1408 LogEst$(TEXE): $(TOP)/tool/logest.c sqlite3.h
1409 $(LTLINK) -I. -o $@ $(TOP)/tool/logest.c
1411 wordcount$(TEXE): $(TOP)/test/wordcount.c sqlite3.lo
1412 $(LTLINK) -o $@ $(TOP)/test/wordcount.c sqlite3.lo $(TLIBS)
1414 speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.c
1415 $(LTLINK) $(ST_OPT) -o $@ $(TOP)/test/speedtest1.c sqlite3.c $(TLIBS)
1417 startup$(TEXE): $(TOP)/test/startup.c sqlite3.c
1418 $(CC) -Os -g -DSQLITE_THREADSAFE=0 -o $@ $(TOP)/test/startup.c sqlite3.c $(TLIBS)
1420 KV_OPT += -DSQLITE_DIRECT_OVERFLOW_READ
1422 kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
1423 $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
1425 rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
1426 $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
1428 loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
1429 $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
1431 # This target will fail if the SQLite amalgamation contains any exported
1432 # symbols that do not begin with "sqlite3_". It is run as part of the
1433 # releasetest.tcl script.
1435 VALIDIDS=' sqlite3(changeset|changegroup|session)?_'
1436 checksymbols: sqlite3.o
1437 nm -g --defined-only sqlite3.o
1438 nm -g --defined-only sqlite3.o | egrep -v $(VALIDIDS); test $$? -ne 0
1439 echo '0 errors out of 1 tests'
1441 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1442 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1443 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1445 amalgamation-tarball: sqlite3.c sqlite3rc.h
1446 TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal
1448 snapshot-tarball: sqlite3.c sqlite3rc.h
1449 TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot
1451 # The next two rules are used to support the "threadtest" target. Building
1452 # threadtest runs a few thread-safety tests that are implemented in C. This
1453 # target is invoked by the releasetest.tcl script.
1455 THREADTEST3_SRC = $(TOP)/test/threadtest3.c \
1456 $(TOP)/test/tt3_checkpoint.c \
1457 $(TOP)/test/tt3_index.c \
1458 $(TOP)/test/tt3_vacuum.c \
1459 $(TOP)/test/tt3_stress.c \
1460 $(TOP)/test/tt3_lookaside1.c
1462 threadtest3$(TEXE): sqlite3.lo $(THREADTEST3_SRC)
1463 $(LTLINK) $(TOP)/test/threadtest3.c $(TOP)/src/test_multiplex.c sqlite3.lo -o $@ $(TLIBS)
1465 threadtest: threadtest3$(TEXE)
1466 ./threadtest3$(TEXE)
1468 threadtest5: sqlite3.c $(TOP)/test/threadtest5.c
1469 $(LTLINK) $(TOP)/test/threadtest5.c sqlite3.c -o $@ $(TLIBS)
1471 releasetest:
1472 $(TCLSH_CMD) $(TOP)/test/releasetest.tcl
1474 # Standard install and cleanup targets
1476 lib_install: libsqlcipher.la
1477 $(INSTALL) -d $(DESTDIR)$(libdir)
1478 $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir)
1480 install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install}
1481 $(INSTALL) -d $(DESTDIR)$(bindir)
1482 $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir)
1483 $(INSTALL) -d $(DESTDIR)$(includedir)
1484 $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir)
1485 $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir)
1486 $(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
1487 $(INSTALL) -m 0644 sqlcipher.pc $(DESTDIR)$(pkgconfigdir)
1489 pkgIndex.tcl:
1490 echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
1491 tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
1492 $(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
1493 $(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
1494 rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
1495 $(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)
1497 clean:
1498 rm -f *.lo *.la *.o sqlcipher$(TEXE) libsqlcipher.la
1499 rm -f sqlite3.h opcodes.*
1500 rm -rf .libs .deps
1501 rm -f lemon$(BEXE) lempar.c parse.* sqlite*.tar.gz
1502 rm -f mkkeywordhash$(BEXE) keywordhash.h
1503 rm -f *.da *.bb *.bbg gmon.out
1504 rm -rf tsrc .target_source
1505 rm -f tclsqlcipher$(TEXE)
1506 rm -f testfixture$(TEXE) test.db
1507 rm -f LogEst$(TEXE) fts3view$(TEXE) rollback-test$(TEXE) showdb$(TEXE)
1508 rm -f showjournal$(TEXE) showstat4$(TEXE) showwal$(TEXE) speedtest1$(TEXE)
1509 rm -f wordcount$(TEXE) changeset$(TEXE)
1510 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1511 rm -f sqlite3.c
1512 rm -f sqlite3rc.h
1513 rm -f shell.c sqlite3ext.h
1514 rm -f sqlite3_analyzer$(TEXE) sqlite3_analyzer.c
1515 rm -f sqlite-*-output.vsix
1516 rm -f mptester mptester.exe
1517 rm -f rbu rbu.exe
1518 rm -f srcck1 srcck1.exe
1519 rm -f fuzzershell fuzzershell.exe
1520 rm -f fuzzcheck fuzzcheck.exe
1521 rm -f sqldiff sqldiff.exe
1522 rm -f dbhash dbhash.exe
1523 rm -f fts5.* fts5parse.*
1524 rm -f threadtest5
1526 distclean: clean
1527 rm -f config.h config.log config.status libtool Makefile sqlcipher.pc
1530 # Windows section
1532 dll: sqlite3.dll
1534 REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
1536 $(REAL_LIBOBJ): $(LIBOBJ)
1538 sqlite3.def: $(REAL_LIBOBJ)
1539 echo 'EXPORTS' >sqlite3.def
1540 nm $(REAL_LIBOBJ) | grep ' T ' | grep ' _sqlite3_' \
1541 | sed 's/^.* _//' >>sqlite3.def
1543 sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
1544 $(TCC) -shared -o $@ sqlite3.def \
1545 -Wl,"--strip-all" $(REAL_LIBOBJ)