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.
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"
33 CFLAGS
= @CPPFLAGS@ @CFLAGS@
34 TCC
= $(CC
) $(CFLAGS
) -I.
-I
${TOP}/src
-I
${TOP}/ext
/rtree
-I
${TOP}/ext
/fts3
36 # Define this for the autoconf-based build, so that the code knows it can
37 # include the generated config.h
39 TCC
+= -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite
41 # 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.
47 # Compiler options needed for programs that use the TCL library.
49 TCC
+= @TCL_INCLUDE_SPEC@
51 # The library that programs using TCL must link against.
53 LIBTCL
= @TCL_LIB_SPEC@
55 # Compiler options needed for programs that use the readline() library.
57 READLINE_FLAGS
= -DHAVE_READLINE
=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
58 READLINE_FLAGS
+= -DHAVE_EDITLINE
=@TARGET_HAVE_EDITLINE@
60 # The library that programs using readline() must link against.
62 LIBREADLINE
= @TARGET_READLINE_LIBS@
64 # Should the database engine be compiled threadsafe
66 TCC
+= -DSQLITE_THREADSAFE
=@SQLITE_THREADSAFE@
68 # Any target libraries which libsqlite must be linked against
70 TLIBS
= @LIBS@
$(LIBS
)
72 # Flags controlling use of the in memory btree implementation
74 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
75 # default to file, 2 to default to memory, and 3 to force temporary
76 # tables to always be in memory.
78 TEMP_STORE
= -DSQLITE_TEMP_STORE
=@TEMP_STORE@
80 # Enable/disable loadable extensions, and other optional features
81 # 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.
84 OPT_FEATURE_FLAGS
= @OPT_FEATURE_FLAGS@
86 TCC
+= $(OPT_FEATURE_FLAGS
)
88 # Add in any optional parameters specified on the make commane line
89 # ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
92 # Version numbers and release number for the SQLite being compiled.
95 VERSION_NUMBER
= @VERSION_NUMBER@
100 BEXE
= @BUILD_EXEEXT@
101 TEXE
= @TARGET_EXEEXT@
103 # The following variable is "1" if the configure script was able to locate
104 # the tclConfig.sh file. It is an empty string otherwise. When this
105 # variable is "1", the TCL extension library (libtclsqlite3.so) is built
108 HAVE_TCL
= @HAVE_TCL@
110 # This is the command to use for tclsh - normally just "tclsh", but we may
111 # know the specific version we want to use
113 TCLSH_CMD
= @TCLSH_CMD@
115 # Where do we want to install the tcl plugin
117 TCLLIBDIR
= @TCLLIBDIR@
119 # The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
121 SHLIB_SUFFIX
= @TCL_SHLIB_SUFFIX@
123 # If gcov support was enabled by the configure script, add the appropriate
124 # flags here. It's not always as easy as just having the user add the right
125 # CFLAGS / LDFLAGS, because libtool wants to use CFLAGS when linking, which
126 # causes build errors with -fprofile-arcs -ftest-coverage with some GCCs.
127 # Supposedly GCC does the right thing if you use --coverage, but in
128 # practice it still fails. See:
130 # http://www.mail-archive.com/debian-gcc@lists.debian.org/msg26197.html
134 GCOV_CFLAGS1
= -DSQLITE_COVERAGE_TEST
=1 -fprofile-arcs
-ftest-coverage
135 GCOV_LDFLAGS1
= -lgcov
136 USE_GCOV
= @USE_GCOV@
137 LTCOMPILE_EXTRAS
+= $(GCOV_CFLAGS
$(USE_GCOV
))
138 LTLINK_EXTRAS
+= $(GCOV_LDFLAGS
$(USE_GCOV
))
145 crypto_libtomcrypt.lo \
149 $(TOP
)/src
/crypto.h \
150 $(TOP
)/src
/sqlcipher.h \
151 $(TOP
)/src
/crypto.c \
152 $(TOP
)/src
/crypto_impl.c \
153 $(TOP
)/src
/crypto_libtomcrypt.c \
154 $(TOP
)/src
/crypto_openssl.c \
155 $(TOP
)/src
/crypto_cc.c
159 # The directory into which to store package information for
161 # Some standard variables and programs
164 exec_prefix = @
exec_prefix@
166 pkgconfigdir
= $(libdir)/pkgconfig
168 includedir = @
includedir@
/sqlcipher
171 ALLOWRELEASE
= @ALLOWRELEASE@
173 # libtool compile/link/install
174 LTCOMPILE
= $(LIBTOOL
) --mode
=compile
--tag
=CC
$(TCC
) $(LTCOMPILE_EXTRAS
)
175 LTLINK
= $(LIBTOOL
) --mode
=link
$(TCC
) $(LTCOMPILE_EXTRAS
) @LDFLAGS@
$(LTLINK_EXTRAS
)
176 LTINSTALL
= $(LIBTOOL
) --mode
=install $(INSTALL
)
178 # You should not have to change anything below this line
179 ###############################################################################
181 USE_AMALGAMATION
= @USE_AMALGAMATION@
183 # Object files for the SQLite library (non-amalgamation).
185 LIBOBJS0
= alter.lo analyze.lo attach.lo auth.lo \
186 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
187 callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
188 expr.lo fault.lo fkey.lo \
189 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
190 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
191 fts3_tokenize_vtab.lo \
192 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
194 func.lo global.lo hash.lo \
195 icu.lo insert.lo journal.lo json1.lo legacy.lo loadext.lo \
196 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
198 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
199 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
200 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
201 random.lo resolve.lo rowset.lo rtree.lo select.lo sqlite3rbu.lo status.lo \
202 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
203 update.lo util.lo vacuum.lo \
204 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
205 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
206 utf.lo vtab.lo
$(CRYPTOLIBOBJ
)
208 # Object files for the amalgamation.
210 LIBOBJS1
= sqlite3.lo
212 # Determine the real value of LIBOBJ based on the 'configure' script
214 LIBOBJ
= $(LIBOBJS
$(USE_AMALGAMATION
))
217 # All of the source code files.
222 $(TOP
)/src
/analyze.c \
223 $(TOP
)/src
/attach.c \
225 $(TOP
)/src
/backup.c \
226 $(TOP
)/src
/bitvec.c \
227 $(TOP
)/src
/btmutex.c \
230 $(TOP
)/src
/btreeInt.h \
232 $(TOP
)/src
/callback.c \
233 $(TOP
)/src
/complete.c \
236 $(TOP
)/src
/dbstat.c \
237 $(TOP
)/src
/delete.c \
242 $(TOP
)/src
/global.c \
245 $(TOP
)/src
/hwtime.h \
246 $(TOP
)/src
/insert.c \
247 $(TOP
)/src
/journal.c \
248 $(TOP
)/src
/legacy.c \
249 $(TOP
)/src
/loadext.c \
251 $(TOP
)/src
/malloc.c \
257 $(TOP
)/src
/memjournal.c \
261 $(TOP
)/src
/mutex_noop.c \
262 $(TOP
)/src
/mutex_unix.c \
263 $(TOP
)/src
/mutex_w32.c \
264 $(TOP
)/src
/notify.c \
267 $(TOP
)/src
/os_common.h \
268 $(TOP
)/src
/os_setup.h \
269 $(TOP
)/src
/os_unix.c \
270 $(TOP
)/src
/os_win.c \
271 $(TOP
)/src
/os_win.h \
275 $(TOP
)/src
/pcache.c \
276 $(TOP
)/src
/pcache.h \
277 $(TOP
)/src
/pcache1.c \
278 $(TOP
)/src
/pragma.c \
279 $(TOP
)/src
/pragma.h \
280 $(TOP
)/src
/prepare.c \
281 $(TOP
)/src
/printf.c \
282 $(TOP
)/src
/random.c \
283 $(TOP
)/src
/resolve.c \
284 $(TOP
)/src
/rowset.c \
285 $(TOP
)/src
/select.c \
286 $(TOP
)/src
/status.c \
288 $(TOP
)/src
/sqlite.h.in \
289 $(TOP
)/src
/sqlite3ext.h \
290 $(TOP
)/src
/sqliteInt.h \
291 $(TOP
)/src
/sqliteLimit.h \
293 $(TOP
)/src
/tclsqlite.c \
294 $(TOP
)/src
/threads.c \
295 $(TOP
)/src
/tokenize.c \
296 $(TOP
)/src
/treeview.c \
297 $(TOP
)/src
/trigger.c \
299 $(TOP
)/src
/update.c \
301 $(TOP
)/src
/vacuum.c \
304 $(TOP
)/src
/vdbeapi.c \
305 $(TOP
)/src
/vdbeaux.c \
306 $(TOP
)/src
/vdbeblob.c \
307 $(TOP
)/src
/vdbemem.c \
308 $(TOP
)/src
/vdbesort.c \
309 $(TOP
)/src
/vdbetrace.c \
310 $(TOP
)/src
/vdbeInt.h \
312 $(TOP
)/src
/vxworks.h \
315 $(TOP
)/src
/walker.c \
317 $(TOP
)/src
/wherecode.c \
318 $(TOP
)/src
/whereexpr.c \
319 $(TOP
)/src
/whereInt.h
321 # Source code for extensions
324 $(TOP
)/ext
/fts1
/fts1.c \
325 $(TOP
)/ext
/fts1
/fts1.h \
326 $(TOP
)/ext
/fts1
/fts1_hash.c \
327 $(TOP
)/ext
/fts1
/fts1_hash.h \
328 $(TOP
)/ext
/fts1
/fts1_porter.c \
329 $(TOP
)/ext
/fts1
/fts1_tokenizer.h \
330 $(TOP
)/ext
/fts1
/fts1_tokenizer1.c
332 $(TOP
)/ext
/fts2
/fts2.c \
333 $(TOP
)/ext
/fts2
/fts2.h \
334 $(TOP
)/ext
/fts2
/fts2_hash.c \
335 $(TOP
)/ext
/fts2
/fts2_hash.h \
336 $(TOP
)/ext
/fts2
/fts2_icu.c \
337 $(TOP
)/ext
/fts2
/fts2_porter.c \
338 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
339 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
340 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
342 $(TOP
)/ext
/fts3
/fts3.c \
343 $(TOP
)/ext
/fts3
/fts3.h \
344 $(TOP
)/ext
/fts3
/fts3Int.h \
345 $(TOP
)/ext
/fts3
/fts3_aux.c \
346 $(TOP
)/ext
/fts3
/fts3_expr.c \
347 $(TOP
)/ext
/fts3
/fts3_hash.c \
348 $(TOP
)/ext
/fts3
/fts3_hash.h \
349 $(TOP
)/ext
/fts3
/fts3_icu.c \
350 $(TOP
)/ext
/fts3
/fts3_porter.c \
351 $(TOP
)/ext
/fts3
/fts3_snippet.c \
352 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
353 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
354 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
355 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
356 $(TOP
)/ext
/fts3
/fts3_unicode.c \
357 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
358 $(TOP
)/ext
/fts3
/fts3_write.c
360 $(TOP
)/ext
/icu
/sqliteicu.h \
363 $(TOP
)/ext
/rtree
/rtree.h \
364 $(TOP
)/ext
/rtree
/rtree.c
366 $(TOP
)/ext
/rbu
/sqlite3rbu.h \
367 $(TOP
)/ext
/rbu
/sqlite3rbu.c
369 $(TOP
)/ext
/misc
/json1.c
373 # Generated source code files
384 # Source code to the test files.
396 $(TOP
)/src
/test_autoext.c \
397 $(TOP
)/src
/test_async.c \
398 $(TOP
)/src
/test_backup.c \
399 $(TOP
)/src
/test_blob.c \
400 $(TOP
)/src
/test_btree.c \
401 $(TOP
)/src
/test_config.c \
402 $(TOP
)/src
/test_demovfs.c \
403 $(TOP
)/src
/test_devsym.c \
404 $(TOP
)/src
/test_fs.c \
405 $(TOP
)/src
/test_func.c \
406 $(TOP
)/src
/test_hexio.c \
407 $(TOP
)/src
/test_init.c \
408 $(TOP
)/src
/test_intarray.c \
409 $(TOP
)/src
/test_journal.c \
410 $(TOP
)/src
/test_malloc.c \
411 $(TOP
)/src
/test_multiplex.c \
412 $(TOP
)/src
/test_mutex.c \
413 $(TOP
)/src
/test_onefile.c \
414 $(TOP
)/src
/test_osinst.c \
415 $(TOP
)/src
/test_pcache.c \
416 $(TOP
)/src
/test_quota.c \
417 $(TOP
)/src
/test_rtree.c \
418 $(TOP
)/src
/test_schema.c \
419 $(TOP
)/src
/test_server.c \
420 $(TOP
)/src
/test_superlock.c \
421 $(TOP
)/src
/test_syscall.c \
422 $(TOP
)/src
/test_tclvar.c \
423 $(TOP
)/src
/test_thread.c \
424 $(TOP
)/src
/test_vfs.c \
425 $(TOP
)/src
/test_windirent.c \
426 $(TOP
)/src
/test_wsd.c \
427 $(TOP
)/ext
/fts3
/fts3_term.c \
428 $(TOP
)/ext
/fts3
/fts3_test.c \
429 $(TOP
)/ext
/rbu
/test_rbu.c
431 # Statically linked extensions
434 $(TOP
)/ext
/misc
/amatch.c \
435 $(TOP
)/ext
/misc
/closure.c \
436 $(TOP
)/ext
/misc
/eval.c \
437 $(TOP
)/ext
/misc
/fileio.c \
438 $(TOP
)/ext
/misc
/fuzzer.c \
439 $(TOP
)/ext
/fts5
/fts5_tcl.c \
440 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
441 $(TOP
)/ext
/fts5
/fts5_test_tok.c \
442 $(TOP
)/ext
/misc
/ieee754.c \
443 $(TOP
)/ext
/misc
/nextchar.c \
444 $(TOP
)/ext
/misc
/percentile.c \
445 $(TOP
)/ext
/misc
/regexp.c \
446 $(TOP
)/ext
/misc
/series.c \
447 $(TOP
)/ext
/misc
/spellfix.c \
448 $(TOP
)/ext
/misc
/totype.c \
449 $(TOP
)/ext
/misc
/wholenumber.c
451 # Source code to the library files needed by the test fixture
454 $(TOP
)/src
/attach.c \
455 $(TOP
)/src
/backup.c \
456 $(TOP
)/src
/bitvec.c \
461 $(TOP
)/src
/dbstat.c \
464 $(TOP
)/src
/insert.c \
469 $(TOP
)/src
/os_unix.c \
470 $(TOP
)/src
/os_win.c \
472 $(TOP
)/src
/pragma.c \
473 $(TOP
)/src
/prepare.c \
474 $(TOP
)/src
/printf.c \
475 $(TOP
)/src
/random.c \
476 $(TOP
)/src
/pcache.c \
477 $(TOP
)/src
/pcache1.c \
478 $(TOP
)/src
/select.c \
479 $(TOP
)/src
/tokenize.c \
482 $(TOP
)/src
/vdbeapi.c \
483 $(TOP
)/src
/vdbeaux.c \
485 $(TOP
)/src
/vdbemem.c \
486 $(TOP
)/src
/vdbetrace.c \
488 $(TOP
)/src
/wherecode.c \
489 $(TOP
)/src
/whereexpr.c \
491 $(TOP
)/ext
/fts3
/fts3.c \
492 $(TOP
)/ext
/fts3
/fts3_aux.c \
493 $(TOP
)/ext
/fts3
/fts3_expr.c \
494 $(TOP
)/ext
/fts3
/fts3_term.c \
495 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
496 $(TOP
)/ext
/fts3
/fts3_write.c \
497 $(TOP
)/ext
/async
/sqlite3async.c
499 # Header files used by all library source files.
503 $(TOP
)/src
/btreeInt.h \
505 $(TOP
)/src
/hwtime.h \
511 $(TOP
)/src
/os_common.h \
512 $(TOP
)/src
/os_setup.h \
513 $(TOP
)/src
/os_win.h \
515 $(TOP
)/src
/pcache.h \
517 $(TOP
)/src
/pragma.h \
519 $(TOP
)/src
/sqlite3ext.h \
520 $(TOP
)/src
/sqliteInt.h \
521 $(TOP
)/src
/sqliteLimit.h \
523 $(TOP
)/src
/vdbeInt.h \
524 $(TOP
)/src
/vxworks.h \
525 $(TOP
)/src
/whereInt.h \
528 # Header files used by extensions
531 $(TOP
)/ext
/fts1
/fts1.h \
532 $(TOP
)/ext
/fts1
/fts1_hash.h \
533 $(TOP
)/ext
/fts1
/fts1_tokenizer.h
535 $(TOP
)/ext
/fts2
/fts2.h \
536 $(TOP
)/ext
/fts2
/fts2_hash.h \
537 $(TOP
)/ext
/fts2
/fts2_tokenizer.h
539 $(TOP
)/ext
/fts3
/fts3.h \
540 $(TOP
)/ext
/fts3
/fts3Int.h \
541 $(TOP
)/ext
/fts3
/fts3_hash.h \
542 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
544 $(TOP
)/ext
/rtree
/rtree.h
546 $(TOP
)/ext
/icu
/sqliteicu.h
548 $(TOP
)/ext
/rtree
/sqlite3rtree.h
550 # executables needed for testing
555 sqlite3_analyzer
$(TEXE
) \
558 # Databases containing fuzzer test cases
561 $(TOP
)/test/fuzzdata1.db \
562 $(TOP
)/test/fuzzdata2.db \
563 $(TOP
)/test/fuzzdata3.db \
564 $(TOP
)/test/fuzzdata4.db
566 # Standard options to testfixture
568 TESTOPTS
= --verbose
=file
--output
=test-out.txt
570 # Extra compiler options for various shell tools
572 SHELL_OPT
= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_FTS4
573 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
574 FUZZERSHELL_OPT
= -DSQLITE_ENABLE_JSON1
575 FUZZCHECK_OPT
= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_MEMSYS5
577 # This is the default Makefile target. The objects listed here
578 # are what get build when you type just "make" with no arguments.
580 all: sqlite3.h libsqlcipher.la sqlcipher
$(TEXE
) $(HAVE_TCL
:1=libtclsqlite3.la
)
582 Makefile
: $(TOP
)/Makefile.in
585 sqlcipher.
pc: $(TOP
)/sqlcipher.
pc.in
588 libsqlcipher.la
: $(LIBOBJ
)
589 $(LTLINK
) -o
$@
$(LIBOBJ
) $(TLIBS
) \
590 ${ALLOWRELEASE} -rpath
"$(libdir)" -version-info
"8:6:8"
592 libtclsqlite3.la
: tclsqlite.lo libsqlcipher.la
593 $(LTLINK
) -o
$@ tclsqlite.lo \
594 libsqlcipher.la @TCL_STUB_LIB_SPEC@
$(TLIBS
) \
595 -rpath
"$(TCLLIBDIR)" \
596 -version-info
"8:6:8" \
599 sqlcipher
$(TEXE
): $(TOP
)/src
/shell.c libsqlcipher.la sqlite3.h
600 $(LTLINK
) $(READLINE_FLAGS
) $(SHELL_OPT
) \
601 -o
$@
$(TOP
)/src
/shell.c libsqlcipher.la \
602 $(LIBREADLINE
) $(TLIBS
) -rpath
"$(libdir)"
604 sqldiff
$(TEXE
): $(TOP
)/tool
/sqldiff.c sqlite3.c sqlite3.h
605 $(LTLINK
) -o
$@
$(TOP
)/tool
/sqldiff.c sqlite3.c
$(TLIBS
)
607 srcck1
$(BEXE
): $(TOP
)/tool
/srcck1.c
608 $(BCC
) -o srcck1
$(BEXE
) $(TOP
)/tool
/srcck1.c
610 sourcetest
: srcck1
$(BEXE
) sqlite3.c
613 fuzzershell
$(TEXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
614 $(LTLINK
) -o
$@
$(FUZZERSHELL_OPT
) \
615 $(TOP
)/tool
/fuzzershell.c sqlite3.c
$(TLIBS
)
617 fuzzcheck
$(TEXE
): $(TOP
)/test/fuzzcheck.c sqlite3.c sqlite3.h
618 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(TOP
)/test/fuzzcheck.c sqlite3.c
$(TLIBS
)
620 mptester
$(TEXE
): sqlite3.c
$(TOP
)/mptest
/mptest.c
621 $(LTLINK
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.c \
622 $(TLIBS
) -rpath
"$(libdir)"
624 MPTEST1
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/crash01.
test --repeat
20
625 MPTEST2
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
626 mptest
: mptester
$(TEXE
)
628 $(MPTEST1
) --journalmode DELETE
629 $(MPTEST2
) --journalmode WAL
630 $(MPTEST1
) --journalmode WAL
631 $(MPTEST2
) --journalmode PERSIST
632 $(MPTEST1
) --journalmode PERSIST
633 $(MPTEST2
) --journalmode TRUNCATE
634 $(MPTEST1
) --journalmode TRUNCATE
635 $(MPTEST2
) --journalmode DELETE
638 # This target creates a directory named "tsrc" and fills it with
639 # copies of all of the C source code and header files needed to
640 # build on the target system. Some of the C source code and header
641 # files are automatically generated. This target takes care of
642 # all that automatic generation.
644 .target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
648 rm tsrc
/sqlite.h.in tsrc
/parse.y
649 $(TCLSH_CMD
) $(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
650 mv vdbe.new tsrc
/vdbe.c
651 cp fts5.c fts5.h tsrc
654 sqlite3.c
: .target_source
$(TOP
)/tool
/mksqlite3c.tcl
655 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3c.tcl
656 cp tsrc
/shell.c tsrc
/sqlite3ext.h .
658 sqlite3ext.h
: .target_source
659 cp tsrc
/sqlite3ext.h .
661 tclsqlite3.c
: sqlite3.c
662 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
663 cat sqlite3.c
>>tclsqlite3.c
664 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
665 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
667 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
668 $(TCLSH_CMD
) $(TOP
)/tool
/split-sqlite3c.tcl
670 # Rule to build the amalgamation
672 sqlite3.lo
: sqlite3.c
673 $(LTCOMPILE
) $(TEMP_STORE
) -c sqlite3.c
675 # Rules to build the LEMON compiler generator
677 lemon
$(BEXE
): $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
678 $(BCC
) -o
$@
$(TOP
)/tool
/lemon.c
679 cp
$(TOP
)/tool
/lempar.c .
681 # Rules to build individual *.o files from generated *.c files. This
687 parse.lo
: parse.c
$(HDR
)
688 $(LTCOMPILE
) $(TEMP_STORE
) -c parse.c
690 opcodes.lo
: opcodes.c
691 $(LTCOMPILE
) $(TEMP_STORE
) -c opcodes.c
694 crypto.lo
: $(TOP
)/src
/crypto.c
$(HDR
)
695 $(LTCOMPILE
) -c
$(TOP
)/src
/crypto.c
696 crypto_impl.lo
: $(TOP
)/src
/crypto_impl.c
$(HDR
)
697 $(LTCOMPILE
) -c
$(TOP
)/src
/crypto_impl.c
698 crypto_openssl.lo
: $(TOP
)/src
/crypto_openssl.c
$(HDR
)
699 $(LTCOMPILE
) -c
$(TOP
)/src
/crypto_openssl.c
700 crypto_libtomcrypt.lo
: $(TOP
)/src
/crypto_libtomcrypt.c
$(HDR
)
701 $(LTCOMPILE
) -c
$(TOP
)/src
/crypto_libtomcrypt.c
702 crypto_cc.lo
: $(TOP
)/src
/crypto_cc.c
$(HDR
)
703 $(LTCOMPILE
) -c
$(TOP
)/src
/crypto_cc.c
706 # Rules to build individual *.o files from files in the src directory.
708 alter.lo
: $(TOP
)/src
/alter.c
$(HDR
)
709 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/alter.c
711 analyze.lo
: $(TOP
)/src
/analyze.c
$(HDR
)
712 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/analyze.c
714 attach.lo
: $(TOP
)/src
/attach.c
$(HDR
)
715 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/attach.c
717 auth.lo
: $(TOP
)/src
/auth.c
$(HDR
)
718 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/auth.c
720 backup.lo
: $(TOP
)/src
/backup.c
$(HDR
)
721 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/backup.c
723 bitvec.lo
: $(TOP
)/src
/bitvec.c
$(HDR
)
724 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/bitvec.c
726 btmutex.lo
: $(TOP
)/src
/btmutex.c
$(HDR
)
727 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btmutex.c
729 btree.lo
: $(TOP
)/src
/btree.c
$(HDR
) $(TOP
)/src
/pager.h
730 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btree.c
732 build.lo
: $(TOP
)/src
/build.c
$(HDR
)
733 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/build.c
735 callback.lo
: $(TOP
)/src
/callback.c
$(HDR
)
736 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/callback.c
738 complete.lo
: $(TOP
)/src
/complete.c
$(HDR
)
739 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/complete.c
741 ctime.lo
: $(TOP
)/src
/ctime.c
$(HDR
)
742 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/ctime.c
744 date.lo
: $(TOP
)/src
/date.c
$(HDR
)
745 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/date.c
747 dbstat.lo
: $(TOP
)/src
/dbstat.c
$(HDR
)
748 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/dbstat.c
750 delete.lo
: $(TOP
)/src
/delete.c
$(HDR
)
751 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/delete.c
753 expr.lo
: $(TOP
)/src
/expr.c
$(HDR
)
754 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/expr.c
756 fault.lo
: $(TOP
)/src
/fault.c
$(HDR
)
757 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fault.c
759 fkey.lo
: $(TOP
)/src
/fkey.c
$(HDR
)
760 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fkey.c
762 func.lo
: $(TOP
)/src
/func.c
$(HDR
)
763 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/func.c
765 global.lo
: $(TOP
)/src
/global.c
$(HDR
)
766 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/global.c
768 hash.lo
: $(TOP
)/src
/hash.c
$(HDR
)
769 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/hash.c
771 insert.lo
: $(TOP
)/src
/insert.c
$(HDR
)
772 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/insert.c
774 journal.lo
: $(TOP
)/src
/journal.c
$(HDR
)
775 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/journal.c
777 legacy.lo
: $(TOP
)/src
/legacy.c
$(HDR
)
778 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/legacy.c
780 loadext.lo
: $(TOP
)/src
/loadext.c
$(HDR
)
781 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/loadext.c
783 main.lo
: $(TOP
)/src
/main.c
$(HDR
)
784 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/main.c
786 malloc.lo
: $(TOP
)/src
/malloc.c
$(HDR
)
787 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/malloc.c
789 mem0.lo
: $(TOP
)/src
/mem0.c
$(HDR
)
790 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem0.c
792 mem1.lo
: $(TOP
)/src
/mem1.c
$(HDR
)
793 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem1.c
795 mem2.lo
: $(TOP
)/src
/mem2.c
$(HDR
)
796 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem2.c
798 mem3.lo
: $(TOP
)/src
/mem3.c
$(HDR
)
799 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem3.c
801 mem5.lo
: $(TOP
)/src
/mem5.c
$(HDR
)
802 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem5.c
804 memjournal.lo
: $(TOP
)/src
/memjournal.c
$(HDR
)
805 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/memjournal.c
807 mutex.lo
: $(TOP
)/src
/mutex.c
$(HDR
)
808 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex.c
810 mutex_noop.lo
: $(TOP
)/src
/mutex_noop.c
$(HDR
)
811 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_noop.c
813 mutex_unix.lo
: $(TOP
)/src
/mutex_unix.c
$(HDR
)
814 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_unix.c
816 mutex_w32.lo
: $(TOP
)/src
/mutex_w32.c
$(HDR
)
817 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_w32.c
819 notify.lo
: $(TOP
)/src
/notify.c
$(HDR
)
820 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/notify.c
822 pager.lo
: $(TOP
)/src
/pager.c
$(HDR
) $(TOP
)/src
/pager.h
823 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pager.c
825 pcache.lo
: $(TOP
)/src
/pcache.c
$(HDR
) $(TOP
)/src
/pcache.h
826 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache.c
828 pcache1.lo
: $(TOP
)/src
/pcache1.c
$(HDR
) $(TOP
)/src
/pcache.h
829 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache1.c
831 os.lo
: $(TOP
)/src
/os.c
$(HDR
)
832 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os.c
834 os_unix.lo
: $(TOP
)/src
/os_unix.c
$(HDR
)
835 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_unix.c
837 os_win.lo
: $(TOP
)/src
/os_win.c
$(HDR
)
838 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_win.c
840 pragma.lo
: $(TOP
)/src
/pragma.c
$(HDR
)
841 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pragma.c
843 prepare.lo
: $(TOP
)/src
/prepare.c
$(HDR
)
844 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/prepare.c
846 printf.lo
: $(TOP
)/src
/printf.c
$(HDR
)
847 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/printf.c
849 random.lo
: $(TOP
)/src
/random.c
$(HDR
)
850 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/random.c
852 resolve.lo
: $(TOP
)/src
/resolve.c
$(HDR
)
853 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/resolve.c
855 rowset.lo
: $(TOP
)/src
/rowset.c
$(HDR
)
856 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/rowset.c
858 select.lo
: $(TOP
)/src
/select.c
$(HDR
)
859 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/select.c
861 status.lo
: $(TOP
)/src
/status.c
$(HDR
)
862 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/status.c
864 table.lo
: $(TOP
)/src
/table.c
$(HDR
)
865 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/table.c
867 threads.lo
: $(TOP
)/src
/threads.c
$(HDR
)
868 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/threads.c
870 tokenize.lo
: $(TOP
)/src
/tokenize.c keywordhash.h
$(HDR
)
871 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/tokenize.c
873 treeview.lo
: $(TOP
)/src
/treeview.c
$(HDR
)
874 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/treeview.c
876 trigger.lo
: $(TOP
)/src
/trigger.c
$(HDR
)
877 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/trigger.c
879 update.lo
: $(TOP
)/src
/update.c
$(HDR
)
880 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/update.c
882 utf.lo
: $(TOP
)/src
/utf.c
$(HDR
)
883 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/utf.c
885 util.lo
: $(TOP
)/src
/util.c
$(HDR
)
886 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/util.c
888 vacuum.lo
: $(TOP
)/src
/vacuum.c
$(HDR
)
889 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vacuum.c
891 vdbe.lo
: $(TOP
)/src
/vdbe.c
$(HDR
)
892 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbe.c
894 vdbeapi.lo
: $(TOP
)/src
/vdbeapi.c
$(HDR
)
895 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeapi.c
897 vdbeaux.lo
: $(TOP
)/src
/vdbeaux.c
$(HDR
)
898 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeaux.c
900 vdbeblob.lo
: $(TOP
)/src
/vdbeblob.c
$(HDR
)
901 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeblob.c
903 vdbemem.lo
: $(TOP
)/src
/vdbemem.c
$(HDR
)
904 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbemem.c
906 vdbesort.lo
: $(TOP
)/src
/vdbesort.c
$(HDR
)
907 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbesort.c
909 vdbetrace.lo
: $(TOP
)/src
/vdbetrace.c
$(HDR
)
910 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbetrace.c
912 vtab.lo
: $(TOP
)/src
/vtab.c
$(HDR
)
913 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vtab.c
915 wal.lo
: $(TOP
)/src
/wal.c
$(HDR
)
916 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wal.c
918 walker.lo
: $(TOP
)/src
/walker.c
$(HDR
)
919 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/walker.c
921 where.lo
: $(TOP
)/src
/where.c
$(HDR
)
922 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/where.c
924 wherecode.lo
: $(TOP
)/src
/wherecode.c
$(HDR
)
925 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wherecode.c
927 whereexpr.lo
: $(TOP
)/src
/whereexpr.c
$(HDR
)
928 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/whereexpr.c
930 tclsqlite.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
931 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -c
$(TOP
)/src
/tclsqlite.c
933 tclsqlite-shell.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
934 $(LTCOMPILE
) -DTCLSH
=1 -o
$@
-c
$(TOP
)/src
/tclsqlite.c
936 tclsqlite-stubs.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
937 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -o
$@
-c
$(TOP
)/src
/tclsqlite.c
939 tclsqlcipher
$(TEXE
): tclsqlite-shell.lo libsqlcipher.la
940 $(LTLINK
) -o
$@ tclsqlite-shell.lo \
941 libsqlcipher.la
$(LIBTCL
)
943 # Rules to build opcodes.c and opcodes.h
945 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
946 $(TCLSH_CMD
) $(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
948 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
949 cat parse.h
$(TOP
)/src
/vdbe.c |
$(TCLSH_CMD
) $(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
951 # Rules to build parse.c and parse.h - the outputs of lemon.
955 parse.c
: $(TOP
)/src
/parse.y lemon
$(BEXE
) $(TOP
)/tool
/addopcodes.tcl
956 cp
$(TOP
)/src
/parse.y .
958 .
/lemon
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) parse.y
959 mv parse.h parse.h.temp
960 $(TCLSH_CMD
) $(TOP
)/tool
/addopcodes.tcl parse.h.temp
>parse.h
962 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest.uuid
$(TOP
)/VERSION
963 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
965 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
966 $(BCC
) -o mkkeywordhash
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
967 .
/mkkeywordhash
$(BEXE
) >keywordhash.h
971 # Rules to build the extension objects.
973 icu.lo
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
974 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
976 fts2.lo
: $(TOP
)/ext
/fts2
/fts2.c
$(HDR
) $(EXTHDR
)
977 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2.c
979 fts2_hash.lo
: $(TOP
)/ext
/fts2
/fts2_hash.c
$(HDR
) $(EXTHDR
)
980 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_hash.c
982 fts2_icu.lo
: $(TOP
)/ext
/fts2
/fts2_icu.c
$(HDR
) $(EXTHDR
)
983 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_icu.c
985 fts2_porter.lo
: $(TOP
)/ext
/fts2
/fts2_porter.c
$(HDR
) $(EXTHDR
)
986 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_porter.c
988 fts2_tokenizer.lo
: $(TOP
)/ext
/fts2
/fts2_tokenizer.c
$(HDR
) $(EXTHDR
)
989 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer.c
991 fts2_tokenizer1.lo
: $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
$(HDR
) $(EXTHDR
)
992 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer1.c
994 fts3.lo
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
995 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
997 fts3_aux.lo
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
998 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
1000 fts3_expr.lo
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
1001 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
1003 fts3_hash.lo
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
1004 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
1006 fts3_icu.lo
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
1007 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
1009 fts3_porter.lo
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
1010 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
1012 fts3_snippet.lo
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
1013 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
1015 fts3_tokenizer.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
1016 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
1018 fts3_tokenizer1.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
1019 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
1021 fts3_tokenize_vtab.lo
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
1022 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
1024 fts3_unicode.lo
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
1025 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
1027 fts3_unicode2.lo
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
1028 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
1030 fts3_write.lo
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
1031 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
1033 rtree.lo
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
1034 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
1036 json1.lo
: $(TOP
)/ext
/misc
/json1.c
1037 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/json1.c
1042 $(TOP
)/ext
/fts5
/fts5.h \
1043 $(TOP
)/ext
/fts5
/fts5Int.h \
1044 $(TOP
)/ext
/fts5
/fts5_aux.c \
1045 $(TOP
)/ext
/fts5
/fts5_buffer.c \
1046 $(TOP
)/ext
/fts5
/fts5_main.c \
1047 $(TOP
)/ext
/fts5
/fts5_config.c \
1048 $(TOP
)/ext
/fts5
/fts5_expr.c \
1049 $(TOP
)/ext
/fts5
/fts5_hash.c \
1050 $(TOP
)/ext
/fts5
/fts5_index.c \
1051 fts5parse.c fts5parse.h \
1052 $(TOP
)/ext
/fts5
/fts5_storage.c \
1053 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
1054 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
1055 $(TOP
)/ext
/fts5
/fts5_varint.c \
1056 $(TOP
)/ext
/fts5
/fts5_vocab.c \
1058 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
1059 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
1061 .
/lemon
$(OPTS
) fts5parse.y
1063 fts5parse.h
: fts5parse.c
1066 $(TCLSH_CMD
) $(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
1067 cp
$(TOP
)/ext
/fts5
/fts5.h .
1069 fts5.lo
: fts5.c
$(HDR
) $(EXTHDR
)
1070 $(LTCOMPILE
) -DSQLITE_CORE
-c fts5.c
1072 sqlite3rbu.lo
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
1073 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
1076 # Rules to build the 'testfixture' application.
1078 # If using the amalgamation, use sqlite3.c directly to build the test
1079 # fixture. Otherwise link against libsqlcipher.la. (This distinction is
1080 # necessary because the test fixture requires non-API symbols which are
1081 # hidden when the library is built via the amalgamation).
1083 TESTFIXTURE_FLAGS
= -DTCLSH
=1 -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
1084 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
1085 TESTFIXTURE_FLAGS
+= -DBUILD_sqlite
1087 TESTFIXTURE_SRC0
= $(TESTSRC2
) libsqlcipher.la
1088 TESTFIXTURE_SRC1
= sqlite3.c
1089 TESTFIXTURE_SRC
= $(TESTSRC
) $(TOP
)/src
/tclsqlite.c
1090 TESTFIXTURE_SRC
+= $(TESTFIXTURE_SRC
$(USE_AMALGAMATION
))
1092 testfixture
$(TEXE
): $(TESTFIXTURE_SRC
)
1093 $(LTLINK
) -DSQLITE_NO_SYNC
=1 $(TEMP_STORE
) $(TESTFIXTURE_FLAGS
) \
1094 -o
$@
$(TESTFIXTURE_SRC
) $(LIBTCL
) $(TLIBS
)
1096 # A very detailed test running most or all test cases
1097 fulltest
: $(TESTPROGS
) fuzztest
1098 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
1100 # Really really long testing
1101 soaktest
: $(TESTPROGS
)
1102 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
1104 # Do extra testing but not everything.
1105 fulltestonly
: $(TESTPROGS
) fuzztest
1106 .
/testfixture
$(TEXE
) $(TOP
)/test/full.
test
1109 fuzztest
: fuzzcheck
$(TEXE
) $(FUZZDATA
)
1110 .
/fuzzcheck
$(TEXE
) $(FUZZDATA
)
1112 fastfuzztest
: fuzzcheck
$(TEXE
) $(FUZZDATA
)
1113 .
/fuzzcheck
$(TEXE
) --limit-mem
100M
$(FUZZDATA
)
1115 valgrindfuzz
: fuzzcheck
$(TEXT
) $(FUZZDATA
)
1116 valgrind .
/fuzzcheck
$(TEXE
) --cell-size-check
--limit-mem
10M
--timeout
600 $(FUZZDATA
)
1118 # Minimal testing that runs in less than 3 minutes
1120 quicktest
: .
/testfixture
$(TEXE
)
1121 .
/testfixture
$(TEXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
1123 # This is the common case. Run many tests that do not take too long,
1124 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1126 test: $(TESTPROGS
) sourcetest fastfuzztest
1127 .
/testfixture
$(TEXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
1129 # Run a test using valgrind. This can take a really long time
1130 # because valgrind is so much slower than a native machine.
1132 valgrindtest
: $(TESTPROGS
) valgrindfuzz
1133 OMIT_MISUSE
=1 valgrind
-v .
/testfixture
$(TEXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
1135 # A very fast test that checks basic sanity. The name comes from
1136 # the 60s-era electronics testing: "Turn it on and see if smoke
1139 smoketest
: $(TESTPROGS
) fuzzcheck
$(TEXE
)
1140 .
/testfixture
$(TEXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
1142 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
1143 echo
"#define TCLSH 2" > $@
1144 echo
"#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
1145 cat sqlite3.c
$(TOP
)/src
/tclsqlite.c
>> $@
1146 echo
"static const char *tclsh_main_loop(void){" >> $@
1147 echo
"static const char *zMainloop = " >> $@
1148 $(TCLSH_CMD
) $(TOP
)/tool
/tostr.tcl
$(TOP
)/tool
/spaceanal.tcl
>> $@
1149 echo
"; return zMainloop; }" >> $@
1151 sqlite3_analyzer
$(TEXE
): sqlite3_analyzer.c
1152 $(LTLINK
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1154 showdb
$(TEXE
): $(TOP
)/tool
/showdb.c sqlite3.lo
1155 $(LTLINK
) -o
$@
$(TOP
)/tool
/showdb.c sqlite3.lo
$(TLIBS
)
1157 showstat4
$(TEXE
): $(TOP
)/tool
/showstat4.c sqlite3.lo
1158 $(LTLINK
) -o
$@
$(TOP
)/tool
/showstat4.c sqlite3.lo
$(TLIBS
)
1160 showjournal
$(TEXE
): $(TOP
)/tool
/showjournal.c sqlite3.lo
1161 $(LTLINK
) -o
$@
$(TOP
)/tool
/showjournal.c sqlite3.lo
$(TLIBS
)
1163 showwal
$(TEXE
): $(TOP
)/tool
/showwal.c sqlite3.lo
1164 $(LTLINK
) -o
$@
$(TOP
)/tool
/showwal.c sqlite3.lo
$(TLIBS
)
1166 rollback-test
$(TEXE
): $(TOP
)/tool
/rollback-test.c sqlite3.lo
1167 $(LTLINK
) -o
$@
$(TOP
)/tool
/rollback-test.c sqlite3.lo
$(TLIBS
)
1169 LogEst
$(TEXE
): $(TOP
)/tool
/logest.c sqlite3.h
1170 $(LTLINK
) -I.
-o
$@
$(TOP
)/tool
/logest.c
1172 wordcount
$(TEXE
): $(TOP
)/test/wordcount.c sqlite3.c
1173 $(LTLINK
) -o
$@
$(TOP
)/test/wordcount.c sqlite3.c
$(TLIBS
)
1175 speedtest1
$(TEXE
): $(TOP
)/test/speedtest1.c sqlite3.lo
1176 $(LTLINK
) -o
$@
$(TOP
)/test/speedtest1.c sqlite3.lo
$(TLIBS
)
1178 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.lo
1179 $(LTLINK
) -I.
-o
$@
$(TOP
)/ext
/rbu
/rbu.c sqlite3.lo
$(TLIBS
)
1181 loadfts
$(EXE
): $(TOP
)/tool
/loadfts.c libsqlite3.la
1182 $(LTLINK
) $(TOP
)/tool
/loadfts.c libsqlite3.la
-o
$@
$(TLIBS
)
1184 # This target will fail if the SQLite amalgamation contains any exported
1185 # symbols that do not begin with "sqlite3_". It is run as part of the
1186 # releasetest.tcl script.
1188 checksymbols
: sqlite3.lo
1189 nm
-g
--defined-only sqlite3.o | grep
-v
" sqlite3_" ; test $$?
-ne
0
1190 echo
'0 errors out of 1 tests'
1192 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1193 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1194 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1196 amalgamation-tarball
: sqlite3.c
1197 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1199 snapshot-tarball
: sqlite3.c
1200 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1202 # The next two rules are used to support the "threadtest" target. Building
1203 # threadtest runs a few thread-safety tests that are implemented in C. This
1204 # target is invoked by the releasetest.tcl script.
1206 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
1207 $(TOP
)/test/tt3_checkpoint.c \
1208 $(TOP
)/test/tt3_index.c \
1209 $(TOP
)/test/tt3_vacuum.c \
1210 $(TOP
)/test/tt3_stress.c \
1211 $(TOP
)/test/tt3_lookaside1.c
1213 threadtest3
$(TEXE
): sqlite3.lo
$(THREADTEST3_SRC
)
1214 $(LTLINK
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.lo
-o
$@
$(TLIBS
)
1216 threadtest
: threadtest3
$(TEXE
)
1217 .
/threadtest3
$(TEXE
)
1220 $(TCLSH_CMD
) $(TOP
)/test/releasetest.tcl
1222 # Standard install and cleanup targets
1224 lib_install
: libsqlcipher.la
1225 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
1226 $(LTINSTALL
) libsqlcipher.la
$(DESTDIR
)$(libdir)
1228 install: sqlcipher
$(TEXE
) lib_install sqlite3.h sqlcipher.
pc ${HAVE_TCL
:1=tcl_install
}
1229 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
1230 $(LTINSTALL
) sqlcipher
$(TEXE
) $(DESTDIR
)$(bindir)
1231 $(INSTALL
) -d
$(DESTDIR
)$(includedir)
1232 $(INSTALL
) -m
0644 sqlite3.h
$(DESTDIR
)$(includedir)
1233 $(INSTALL
) -m
0644 $(TOP
)/src
/sqlite3ext.h
$(DESTDIR
)$(includedir)
1234 $(INSTALL
) -d
$(DESTDIR
)$(pkgconfigdir
)
1235 $(INSTALL
) -m
0644 sqlcipher.
pc $(DESTDIR
)$(pkgconfigdir
)
1238 echo
'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3$(SHLIB_SUFFIX) sqlite3]' > $@
1239 tcl_install
: lib_install libtclsqlite3.la pkgIndex.tcl
1240 $(INSTALL
) -d
$(DESTDIR
)$(TCLLIBDIR
)
1241 $(LTINSTALL
) libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)
1242 rm -f
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.a
1243 $(INSTALL
) -m
0644 pkgIndex.tcl
$(DESTDIR
)$(TCLLIBDIR
)
1246 rm -f
*.lo
*.la
*.o sqlcipher
$(TEXE
) libsqlcipher.la
1247 rm -f sqlite3.h opcodes.
*
1249 rm -f lemon
$(BEXE
) lempar.c parse.
* sqlite
*.
tar.gz
1250 rm -f mkkeywordhash
$(BEXE
) keywordhash.h
1251 rm -f
*.da
*.bb
*.bbg gmon.out
1252 rm -rf quota2a quota2b quota2c
1253 rm -rf tsrc .target_source
1254 rm -f tclsqlcipher
$(TEXE
)
1255 rm -f testfixture
$(TEXE
) test.db
1256 rm -f LogEst
$(TEXE
) fts3view
$(TEXE
) rollback-test
$(TEXE
) showdb
$(TEXE
)
1257 rm -f showjournal
$(TEXE
) showstat4
$(TEXE
) showwal
$(TEXE
) speedtest1
$(TEXE
)
1258 rm -f wordcount
$(TEXE
)
1259 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1262 rm -f
shell.c sqlite3ext.h
1263 rm -f sqlite3_analyzer
$(TEXE
) sqlite3_analyzer.c
1264 rm -f sqlite-
*-output.vsix
1265 rm -f mptester mptester.exe
1267 rm -f srcck1 srcck1.exe
1268 rm -f fuzzershell fuzzershell.exe
1269 rm -f fuzzcheck fuzzcheck.exe
1270 rm -f sqldiff sqldiff.exe
1271 rm -f fts5.
* fts5parse.
*
1274 rm -f config.h config.log config.status libtool Makefile sqlcipher.
pc
1281 REAL_LIBOBJ
= $(LIBOBJ
:%.lo
=.libs
/%.o
)
1283 $(REAL_LIBOBJ
): $(LIBOBJ
)
1285 sqlite3.def
: $(REAL_LIBOBJ
)
1286 echo
'EXPORTS' >sqlite3.def
1287 nm
$(REAL_LIBOBJ
) | grep
' T ' | grep
' _sqlite3_' \
1288 | sed
's/^.* _//' >>sqlite3.def
1290 sqlite3.dll
: $(REAL_LIBOBJ
) sqlite3.def
1291 $(TCC
) -shared
-o
$@ sqlite3.def \
1292 -Wl
,"--strip-all" $(REAL_LIBOBJ
)