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.
20 # C Compiler and options for use in building executables that
21 # will run on the platform that is doing the build.
23 BCC
= @BUILD_CC@ @BUILD_CFLAGS@
25 # TCC is the C Compile and options for use in building executables that
26 # will run on the target platform. (BCC and TCC are usually the
27 # same unless your are cross-compiling.) Separate CC and CFLAGS macros
28 # are provide so that these aspects of the build process can be changed
29 # on the "make" command-line. Ex: "make CC=clang CFLAGS=-fsanitize=undefined"
32 CFLAGS
= @CPPFLAGS@ @CFLAGS@
33 TCC
= ${CC} ${CFLAGS} -I.
-I
${TOP}/src
-I
${TOP}/ext
/rtree
-I
${TOP}/ext
/icu
34 TCC
+= -I
${TOP}/ext
/fts3
-I
${TOP}/ext
/async
-I
${TOP}/ext
/session
35 TCC
+= -I
${TOP}/ext
/userauth
37 # Define this for the autoconf-based build, so that the code knows it can
38 # include the generated sqlite_cfg.h
40 TCC
+= -D_HAVE_SQLITE_CONFIG_H
-DBUILD_sqlite
42 # Define -DNDEBUG to compile without debugging (i.e., for production usage)
43 # Omitting the define will cause extra debugging code to be inserted and
44 # includes extra comments when "EXPLAIN stmt" is used.
48 # Compiler options needed for programs that use the TCL library.
50 TCC
+= @TCL_INCLUDE_SPEC@
52 # The library that programs using TCL must link against.
54 LIBTCL
= @TCL_LIB_SPEC@
56 # Compiler options needed for programs that use the readline() library.
58 READLINE_FLAGS
= -DHAVE_READLINE
=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
59 READLINE_FLAGS
+= -DHAVE_EDITLINE
=@TARGET_HAVE_EDITLINE@
60 READLINE_FLAGS
+= -DHAVE_LINENOISE
=@TARGET_HAVE_LINENOISE@
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".
94 # Add in compile-time options for some libraries used by extensions
97 # Version numbers and release number for the SQLite being compiled.
100 VERSION_NUMBER
= @VERSION_NUMBER@
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
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
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
))
146 # The directory into which to store package information for
148 # Some standard variables and programs
151 exec_prefix = @
exec_prefix@
153 pkgconfigdir
= $(libdir)/pkgconfig
155 includedir = @
includedir@
158 ALLOWRELEASE
= @ALLOWRELEASE@
160 # libtool compile/link/install
161 LTCOMPILE
= $(LIBTOOL
) --mode
=compile
--tag
=CC
$(TCC
) $(LTCOMPILE_EXTRAS
)
162 LTLINK
= $(LIBTOOL
) --mode
=link
$(TCC
) $(LTCOMPILE_EXTRAS
) @LDFLAGS@
$(LTLINK_EXTRAS
)
163 LTINSTALL
= $(LIBTOOL
) --mode
=install $(INSTALL
)
165 # You should not have to change anything below this line
166 ###############################################################################
168 USE_AMALGAMATION
= @USE_AMALGAMATION@
169 AMALGAMATION_LINE_MACROS
= @AMALGAMATION_LINE_MACROS@
171 # Object files for the SQLite library (non-amalgamation).
173 LIBOBJS0
= alter.lo analyze.lo attach.lo auth.lo \
174 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
175 callback.lo complete.lo ctime.lo \
176 date.lo dbpage.lo dbstat.lo delete.lo \
177 expr.lo fault.lo fkey.lo \
178 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
179 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
180 fts3_tokenize_vtab.lo \
181 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
183 func.lo global.lo hash.lo \
184 icu.lo insert.lo json.lo legacy.lo loadext.lo \
185 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
186 memdb.lo memjournal.lo \
187 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
188 notify.lo opcodes.lo os.lo os_kv.lo os_unix.lo os_win.lo \
189 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
190 random.lo resolve.lo rowset.lo rtree.lo \
191 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
192 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
193 update.lo userauth.lo upsert.lo util.lo vacuum.lo \
194 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
195 vdbetrace.lo vdbevtab.lo \
196 wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
197 window.lo utf.lo vtab.lo
199 # Object files for the amalgamation.
201 LIBOBJS1
= sqlite3.lo
203 # Determine the real value of LIBOBJ based on the 'configure' script
205 LIBOBJ
= $(LIBOBJS
$(USE_AMALGAMATION
))
208 # All of the source code files.
212 $(TOP
)/src
/analyze.c \
213 $(TOP
)/src
/attach.c \
215 $(TOP
)/src
/backup.c \
216 $(TOP
)/src
/bitvec.c \
217 $(TOP
)/src
/btmutex.c \
220 $(TOP
)/src
/btreeInt.h \
222 $(TOP
)/src
/callback.c \
223 $(TOP
)/src
/complete.c \
226 $(TOP
)/src
/dbpage.c \
227 $(TOP
)/src
/dbstat.c \
228 $(TOP
)/src
/delete.c \
233 $(TOP
)/src
/global.c \
236 $(TOP
)/src
/hwtime.h \
237 $(TOP
)/src
/insert.c \
239 $(TOP
)/src
/legacy.c \
240 $(TOP
)/src
/loadext.c \
242 $(TOP
)/src
/malloc.c \
249 $(TOP
)/src
/memjournal.c \
253 $(TOP
)/src
/mutex_noop.c \
254 $(TOP
)/src
/mutex_unix.c \
255 $(TOP
)/src
/mutex_w32.c \
256 $(TOP
)/src
/notify.c \
259 $(TOP
)/src
/os_common.h \
260 $(TOP
)/src
/os_setup.h \
262 $(TOP
)/src
/os_unix.c \
263 $(TOP
)/src
/os_win.c \
264 $(TOP
)/src
/os_win.h \
268 $(TOP
)/src
/pcache.c \
269 $(TOP
)/src
/pcache.h \
270 $(TOP
)/src
/pcache1.c \
271 $(TOP
)/src
/pragma.c \
272 $(TOP
)/src
/pragma.h \
273 $(TOP
)/src
/prepare.c \
274 $(TOP
)/src
/printf.c \
275 $(TOP
)/src
/random.c \
276 $(TOP
)/src
/resolve.c \
277 $(TOP
)/src
/rowset.c \
278 $(TOP
)/src
/select.c \
279 $(TOP
)/src
/status.c \
280 $(TOP
)/src
/shell.c.in \
281 $(TOP
)/src
/sqlite.h.in \
282 $(TOP
)/src
/sqlite3ext.h \
283 $(TOP
)/src
/sqliteInt.h \
284 $(TOP
)/src
/sqliteLimit.h \
286 $(TOP
)/src
/tclsqlite.c \
287 $(TOP
)/src
/threads.c \
288 $(TOP
)/src
/tokenize.c \
289 $(TOP
)/src
/treeview.c \
290 $(TOP
)/src
/trigger.c \
292 $(TOP
)/src
/update.c \
293 $(TOP
)/src
/upsert.c \
295 $(TOP
)/src
/vacuum.c \
298 $(TOP
)/src
/vdbeapi.c \
299 $(TOP
)/src
/vdbeaux.c \
300 $(TOP
)/src
/vdbeblob.c \
301 $(TOP
)/src
/vdbemem.c \
302 $(TOP
)/src
/vdbesort.c \
303 $(TOP
)/src
/vdbetrace.c \
304 $(TOP
)/src
/vdbevtab.c \
305 $(TOP
)/src
/vdbeInt.h \
307 $(TOP
)/src
/vxworks.h \
310 $(TOP
)/src
/walker.c \
312 $(TOP
)/src
/wherecode.c \
313 $(TOP
)/src
/whereexpr.c \
314 $(TOP
)/src
/whereInt.h \
317 # Source code for extensions
320 $(TOP
)/ext
/fts3
/fts3.c \
321 $(TOP
)/ext
/fts3
/fts3.h \
322 $(TOP
)/ext
/fts3
/fts3Int.h \
323 $(TOP
)/ext
/fts3
/fts3_aux.c \
324 $(TOP
)/ext
/fts3
/fts3_expr.c \
325 $(TOP
)/ext
/fts3
/fts3_hash.c \
326 $(TOP
)/ext
/fts3
/fts3_hash.h \
327 $(TOP
)/ext
/fts3
/fts3_icu.c \
328 $(TOP
)/ext
/fts3
/fts3_porter.c \
329 $(TOP
)/ext
/fts3
/fts3_snippet.c \
330 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
331 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
332 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
333 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
334 $(TOP
)/ext
/fts3
/fts3_unicode.c \
335 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
336 $(TOP
)/ext
/fts3
/fts3_write.c
338 $(TOP
)/ext
/icu
/sqliteicu.h \
341 $(TOP
)/ext
/rtree
/rtree.h \
342 $(TOP
)/ext
/rtree
/rtree.c \
343 $(TOP
)/ext
/rtree
/geopoly.c
345 $(TOP
)/ext
/session
/sqlite3session.c \
346 $(TOP
)/ext
/session
/sqlite3session.h
348 $(TOP
)/ext
/userauth
/userauth.c \
349 $(TOP
)/ext
/userauth
/sqlite3userauth.h
351 $(TOP
)/ext
/rbu
/sqlite3rbu.h \
352 $(TOP
)/ext
/rbu
/sqlite3rbu.c
354 $(TOP
)/ext
/misc
/stmt.c
356 # Generated source code files
368 # Source code to the test files.
379 $(TOP
)/src
/test_autoext.c \
380 $(TOP
)/src
/test_async.c \
381 $(TOP
)/src
/test_backup.c \
382 $(TOP
)/src
/test_bestindex.c \
383 $(TOP
)/src
/test_blob.c \
384 $(TOP
)/src
/test_btree.c \
385 $(TOP
)/src
/test_config.c \
386 $(TOP
)/src
/test_delete.c \
387 $(TOP
)/src
/test_demovfs.c \
388 $(TOP
)/src
/test_devsym.c \
389 $(TOP
)/src
/test_fs.c \
390 $(TOP
)/src
/test_func.c \
391 $(TOP
)/src
/test_hexio.c \
392 $(TOP
)/src
/test_init.c \
393 $(TOP
)/src
/test_intarray.c \
394 $(TOP
)/src
/test_journal.c \
395 $(TOP
)/src
/test_malloc.c \
396 $(TOP
)/src
/test_md5.c \
397 $(TOP
)/src
/test_multiplex.c \
398 $(TOP
)/src
/test_mutex.c \
399 $(TOP
)/src
/test_onefile.c \
400 $(TOP
)/src
/test_osinst.c \
401 $(TOP
)/src
/test_pcache.c \
402 $(TOP
)/src
/test_quota.c \
403 $(TOP
)/src
/test_rtree.c \
404 $(TOP
)/src
/test_schema.c \
405 $(TOP
)/src
/test_superlock.c \
406 $(TOP
)/src
/test_syscall.c \
407 $(TOP
)/src
/test_tclsh.c \
408 $(TOP
)/src
/test_tclvar.c \
409 $(TOP
)/src
/test_thread.c \
410 $(TOP
)/src
/test_vdbecov.c \
411 $(TOP
)/src
/test_vfs.c \
412 $(TOP
)/src
/test_windirent.c \
413 $(TOP
)/src
/test_window.c \
414 $(TOP
)/src
/test_wsd.c \
415 $(TOP
)/ext
/fts3
/fts3_term.c \
416 $(TOP
)/ext
/fts3
/fts3_test.c \
417 $(TOP
)/ext
/session
/test_session.c \
418 $(TOP
)/ext
/recover
/sqlite3recover.c \
419 $(TOP
)/ext
/recover
/dbdata.c \
420 $(TOP
)/ext
/recover
/test_recover.c \
421 $(TOP
)/ext
/intck
/test_intck.c \
422 $(TOP
)/ext
/intck
/sqlite3intck.c \
423 $(TOP
)/ext
/rbu
/test_rbu.c
425 # Statically linked extensions
428 $(TOP
)/ext
/expert
/sqlite3expert.c \
429 $(TOP
)/ext
/expert
/test_expert.c \
430 $(TOP
)/ext
/misc
/amatch.c \
431 $(TOP
)/ext
/misc
/appendvfs.c \
432 $(TOP
)/ext
/misc
/basexx.c \
433 $(TOP
)/ext
/misc
/carray.c \
434 $(TOP
)/ext
/misc
/cksumvfs.c \
435 $(TOP
)/ext
/misc
/closure.c \
436 $(TOP
)/ext
/misc
/csv.c \
437 $(TOP
)/ext
/misc
/decimal.c \
438 $(TOP
)/ext
/misc
/eval.c \
439 $(TOP
)/ext
/misc
/explain.c \
440 $(TOP
)/ext
/misc
/fileio.c \
441 $(TOP
)/ext
/misc
/fuzzer.c \
442 $(TOP
)/ext
/fts5
/fts5_tcl.c \
443 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
444 $(TOP
)/ext
/fts5
/fts5_test_tok.c \
445 $(TOP
)/ext
/misc
/ieee754.c \
446 $(TOP
)/ext
/misc
/mmapwarm.c \
447 $(TOP
)/ext
/misc
/nextchar.c \
448 $(TOP
)/ext
/misc
/normalize.c \
449 $(TOP
)/ext
/misc
/percentile.c \
450 $(TOP
)/ext
/misc
/prefixes.c \
451 $(TOP
)/ext
/misc
/qpvtab.c \
452 $(TOP
)/ext
/misc
/randomjson.c \
453 $(TOP
)/ext
/misc
/regexp.c \
454 $(TOP
)/ext
/misc
/remember.c \
455 $(TOP
)/ext
/misc
/series.c \
456 $(TOP
)/ext
/misc
/spellfix.c \
457 $(TOP
)/ext
/misc
/totype.c \
458 $(TOP
)/ext
/misc
/unionvtab.c \
459 $(TOP
)/ext
/misc
/wholenumber.c \
460 $(TOP
)/ext
/misc
/zipfile.c \
461 $(TOP
)/ext
/userauth
/userauth.c \
462 $(TOP
)/ext
/rtree
/test_rtreedoc.c
464 # Source code to the library files needed by the test fixture
467 $(TOP
)/src
/attach.c \
468 $(TOP
)/src
/backup.c \
469 $(TOP
)/src
/bitvec.c \
474 $(TOP
)/src
/dbpage.c \
475 $(TOP
)/src
/dbstat.c \
478 $(TOP
)/src
/global.c \
479 $(TOP
)/src
/insert.c \
485 $(TOP
)/src
/os_unix.c \
486 $(TOP
)/src
/os_win.c \
488 $(TOP
)/src
/pragma.c \
489 $(TOP
)/src
/prepare.c \
490 $(TOP
)/src
/printf.c \
491 $(TOP
)/src
/random.c \
492 $(TOP
)/src
/pcache.c \
493 $(TOP
)/src
/pcache1.c \
494 $(TOP
)/src
/select.c \
495 $(TOP
)/src
/tokenize.c \
496 $(TOP
)/src
/treeview.c \
499 $(TOP
)/src
/vdbeapi.c \
500 $(TOP
)/src
/vdbeaux.c \
502 $(TOP
)/src
/vdbemem.c \
503 $(TOP
)/src
/vdbetrace.c \
504 $(TOP
)/src
/vdbevtab.c \
506 $(TOP
)/src
/wherecode.c \
507 $(TOP
)/src
/whereexpr.c \
508 $(TOP
)/src
/window.c \
510 $(TOP
)/ext
/fts3
/fts3.c \
511 $(TOP
)/ext
/fts3
/fts3_aux.c \
512 $(TOP
)/ext
/fts3
/fts3_expr.c \
513 $(TOP
)/ext
/fts3
/fts3_term.c \
514 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
515 $(TOP
)/ext
/fts3
/fts3_write.c \
516 $(TOP
)/ext
/async
/sqlite3async.c \
517 $(TOP
)/ext
/session
/sqlite3session.c \
518 $(TOP
)/ext
/misc
/stmt.c \
521 # Header files used by all library source files.
525 $(TOP
)/src
/btreeInt.h \
527 $(TOP
)/src
/hwtime.h \
533 $(TOP
)/src
/os_common.h \
534 $(TOP
)/src
/os_setup.h \
535 $(TOP
)/src
/os_win.h \
537 $(TOP
)/src
/pcache.h \
539 $(TOP
)/src
/pragma.h \
541 $(TOP
)/src
/sqlite3ext.h \
542 $(TOP
)/src
/sqliteInt.h \
543 $(TOP
)/src
/sqliteLimit.h \
545 $(TOP
)/src
/vdbeInt.h \
546 $(TOP
)/src
/vxworks.h \
547 $(TOP
)/src
/whereInt.h \
550 # Header files used by extensions
553 $(TOP
)/ext
/fts3
/fts3.h \
554 $(TOP
)/ext
/fts3
/fts3Int.h \
555 $(TOP
)/ext
/fts3
/fts3_hash.h \
556 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
558 $(TOP
)/ext
/rtree
/rtree.h \
559 $(TOP
)/ext
/rtree
/geopoly.c
561 $(TOP
)/ext
/icu
/sqliteicu.h
563 $(TOP
)/ext
/rtree
/sqlite3rtree.h
565 $(TOP
)/ext
/userauth
/sqlite3userauth.h
567 # executables needed for testing
572 sqlite3_analyzer
$(TEXE
) \
577 # Databases containing fuzzer test cases
580 $(TOP
)/test/fuzzdata1.db \
581 $(TOP
)/test/fuzzdata2.db \
582 $(TOP
)/test/fuzzdata3.db \
583 $(TOP
)/test/fuzzdata4.db \
584 $(TOP
)/test/fuzzdata5.db \
585 $(TOP
)/test/fuzzdata6.db \
586 $(TOP
)/test/fuzzdata7.db \
587 $(TOP
)/test/fuzzdata8.db
589 # Standard options to testfixture
591 TESTOPTS
= --verbose
=file
--output
=test-out.txt
593 # Extra compiler options for various shell tools
595 SHELL_OPT
+= -DSQLITE_DQS
=0
596 SHELL_OPT
+= -DSQLITE_ENABLE_FTS4
597 #SHELL_OPT += -DSQLITE_ENABLE_FTS5
598 SHELL_OPT
+= -DSQLITE_ENABLE_RTREE
599 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
600 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
601 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
602 SHELL_OPT
+= -DSQLITE_ENABLE_DBPAGE_VTAB
603 SHELL_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
604 SHELL_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
605 SHELL_OPT
+= -DSQLITE_ENABLE_OFFSET_SQL_FUNC
606 SHELL_OPT
+= -DSQLITE_STRICT_SUBTYPE
=1
608 FUZZCHECK_OPT
+= -I
$(TOP
)/test
609 FUZZCHECK_OPT
+= -I
$(TOP
)/ext
/recover
612 -DSQLITE_ENABLE_BYTECODE_VTAB \
613 -DSQLITE_ENABLE_DBPAGE_VTAB \
614 -DSQLITE_ENABLE_DBSTAT_VTAB \
615 -DSQLITE_ENABLE_BYTECODE_VTAB \
616 -DSQLITE_ENABLE_DESERIALIZE \
617 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
618 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
619 -DSQLITE_ENABLE_FTS4 \
620 -DSQLITE_ENABLE_FTS5 \
621 -DSQLITE_ENABLE_GEOPOLY \
622 -DSQLITE_ENABLE_MATH_FUNCTIONS \
623 -DSQLITE_ENABLE_MEMSYS5 \
624 -DSQLITE_ENABLE_NORMALIZE \
625 -DSQLITE_ENABLE_OFFSET_SQL_FUNC \
626 -DSQLITE_ENABLE_PREUPDATE_HOOK \
627 -DSQLITE_ENABLE_RTREE \
628 -DSQLITE_ENABLE_SESSION \
629 -DSQLITE_ENABLE_STMTVTAB \
630 -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION \
631 -DSQLITE_ENABLE_STAT4 \
632 -DSQLITE_ENABLE_STMT_SCANSTATUS \
633 -DSQLITE_MAX_MEMORY
=50000000 \
634 -DSQLITE_MAX_MMAP_SIZE
=0 \
635 -DSQLITE_OMIT_LOAD_EXTENSION \
636 -DSQLITE_PRINTF_PRECISION_LIMIT
=1000 \
637 -DSQLITE_PRIVATE
="" \
638 -DSQLITE_STRICT_SUBTYPE
=1 \
639 -DSQLITE_STATIC_RANDOMJSON
641 FUZZCHECK_SRC
+= $(TOP
)/test/fuzzcheck.c
642 FUZZCHECK_SRC
+= $(TOP
)/test/ossfuzz.c
643 FUZZCHECK_SRC
+= $(TOP
)/test/fuzzinvariants.c
644 FUZZCHECK_SRC
+= $(TOP
)/ext
/recover
/dbdata.c
645 FUZZCHECK_SRC
+= $(TOP
)/ext
/recover
/sqlite3recover.c
646 FUZZCHECK_SRC
+= $(TOP
)/test/vt02.c
647 FUZZCHECK_SRC
+= $(TOP
)/ext
/misc
/randomjson.c
649 ST_OPT
= -DSQLITE_OS_KV_OPTIONAL
652 # In wasi-sdk builds, disable the CLI shell build in the "all" target.
653 SQLITE3_SHELL_TARGET_
= sqlite3
$(TEXE
)
654 SQLITE3_SHELL_TARGET_1
=
655 SQLITE3_SHELL_TARGET
= $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@
)
657 # This is the default Makefile target. The objects listed here
658 # are what get build when you type just "make" with no arguments.
660 all: sqlite3.h libsqlite3.la
$(SQLITE3_SHELL_TARGET
) \
661 $(HAVE_TCL
:1=libtclsqlite3.la
)
663 Makefile
: $(TOP
)/Makefile.in
666 sqlite3.
pc: $(TOP
)/sqlite3.
pc.in
669 libsqlite3.la
: $(LIBOBJ
)
670 $(LTLINK
) -no-undefined
-o
$@
$(LIBOBJ
) $(TLIBS
) \
671 ${ALLOWRELEASE} -rpath
"$(libdir)" -version-info
"8:6:8"
673 libtclsqlite3.la
: tclsqlite.lo libsqlite3.la
674 $(LTLINK
) -no-undefined
-o
$@ tclsqlite.lo \
675 libsqlite3.la @TCL_STUB_LIB_SPEC@
$(TLIBS
) \
676 -rpath
"$(TCLLIBDIR)" \
677 -version-info
"8:6:8" \
680 sqlite3
$(TEXE
): shell.c sqlite3.c
681 $(LTLINK
) $(READLINE_FLAGS
) $(SHELL_OPT
) -o
$@ \
683 $(LIBREADLINE
) $(TLIBS
) -rpath
"$(libdir)"
685 sqldiff
$(TEXE
): $(TOP
)/tool
/sqldiff.c sqlite3.lo sqlite3.h
686 $(LTLINK
) -o
$@
$(TOP
)/tool
/sqldiff.c sqlite3.lo
$(TLIBS
)
688 dbhash
$(TEXE
): $(TOP
)/tool
/dbhash.c sqlite3.lo sqlite3.h
689 $(LTLINK
) -o
$@
$(TOP
)/tool
/dbhash.c sqlite3.lo
$(TLIBS
)
691 scrub
$(TEXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.lo
692 $(LTLINK
) -o
$@
-I.
-DSCRUB_STANDALONE \
693 $(TOP
)/ext
/misc
/scrub.c sqlite3.lo
$(TLIBS
)
695 srcck1
$(BEXE
): $(TOP
)/tool
/srcck1.c
696 $(BCC
) -o srcck1
$(BEXE
) $(TOP
)/tool
/srcck1.c
698 sourcetest
: srcck1
$(BEXE
) sqlite3.c
701 src-verify
: $(TOP
)/tool
/src-verify.c
702 $(BCC
) -o src-verify
$(BEXE
) $(TOP
)/tool
/src-verify.c
704 verify-source
: .
/src-verify
707 fuzzershell
$(TEXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
708 $(LTLINK
) -o
$@
$(FUZZERSHELL_OPT
) \
709 $(TOP
)/tool
/fuzzershell.c sqlite3.c
$(TLIBS
)
711 fuzzcheck
$(TEXE
): $(FUZZCHECK_SRC
) sqlite3.c sqlite3.h
$(FUZZCHECK_DEP
)
712 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(FUZZCHECK_SRC
) sqlite3.c
$(TLIBS
)
714 fuzzcheck-asan
$(TEXE
): $(FUZZCHECK_SRC
) sqlite3.c sqlite3.h
$(FUZZCHECK_DEP
)
715 $(LTLINK
) -o
$@
-fsanitize
=address
$(FUZZCHECK_OPT
) $(FUZZCHECK_SRC
) sqlite3.c
$(TLIBS
)
717 fuzzcheck-ubsan
$(TEXE
): $(FUZZCHECK_SRC
) sqlite3.c sqlite3.h
$(FUZZCHECK_DEP
)
718 $(LTLINK
) -o
$@
-fsanitize
=undefined
$(FUZZCHECK_OPT
) $(FUZZCHECK_SRC
) sqlite3.c
$(TLIBS
)
720 # Usage: FUZZDB=filename make run-fuzzcheck
722 # Where filename is a fuzzcheck database, this target builds and runs
723 # fuzzcheck, fuzzcheck-asan, and fuzzcheck-ubsan on that database.
725 # FUZZDB can be a glob pattern of two or more databases. Example:
727 # FUZZDB=test/fuzzdata*.db make run-fuzzcheck
729 run-fuzzcheck
: fuzzcheck
$(TEXE
) fuzzcheck-asan
$(TEXE
) fuzzcheck-ubsan
$(TEXE
)
730 @if
test "$(FUZZDB)" = ""; then echo
'ERROR: No FUZZDB specified. Rerun with FUZZDB=filename'; exit
1; fi
731 .
/fuzzcheck
$(TEXE
) --spinner
$(FUZZDB
)
732 .
/fuzzcheck-asan
$(TEXE
) --spinner
$(FUZZDB
)
733 .
/fuzzcheck-ubsan
$(TEXE
) --spinner
$(FUZZDB
)
735 ossshell
$(TEXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
736 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(TOP
)/test/ossshell.c \
737 $(TOP
)/test/ossfuzz.c sqlite3.c
$(TLIBS
)
739 sessionfuzz
$(TEXE
): $(TOP
)/test/sessionfuzz.c sqlite3.c sqlite3.h
740 $(LTLINK
) -o
$@
$(TOP
)/test/sessionfuzz.c
$(TLIBS
)
742 dbfuzz
$(TEXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
743 $(LTLINK
) -o
$@
$(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c
$(TLIBS
)
746 -DSQLITE_THREADSAFE
=0 \
747 -DSQLITE_OMIT_LOAD_EXTENSION \
749 -DSQLITE_ENABLE_DBSTAT_VTAB \
750 -DSQLITE_ENABLE_BYTECODE_VTAB \
751 -DSQLITE_ENABLE_RTREE \
752 -DSQLITE_ENABLE_FTS4 \
755 dbfuzz2
$(TEXE
): $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
756 $(CC
) $(OPT_FEATURE_FLAGS
) $(OPTS
) -I.
-g
-O0 \
757 -DSTANDALONE
-o dbfuzz2 \
758 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
)
760 cp
$(TOP
)/test/dbfuzz2-seed
* dbfuzz2-dir
762 dbfuzz2-asan
: $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
763 clang-6.0
$(OPT_FEATURE_FLAGS
) $(OPTS
) -I.
-g
-O0 \
764 -fsanitize
=fuzzer
,undefined
,address
-o dbfuzz2-asan \
765 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
)
767 cp
$(TOP
)/test/dbfuzz2-seed
* dbfuzz2-dir
769 dbfuzz2-msan
: $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
770 clang-6.0
$(OPT_FEATURE_FLAGS
) $(OPTS
) -I.
-g
-O0 \
771 -fsanitize
=fuzzer
,undefined
,memory
-o dbfuzz2-msan \
772 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
)
774 cp
$(TOP
)/test/dbfuzz2-seed
* dbfuzz2-dir
776 mptester
$(TEXE
): sqlite3.lo
$(TOP
)/mptest
/mptest.c
777 $(LTLINK
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.lo \
778 $(TLIBS
) -rpath
"$(libdir)"
780 MPTEST1
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/crash01.
test --repeat
20
781 MPTEST2
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
782 mptest
: mptester
$(TEXE
)
784 $(MPTEST1
) --journalmode DELETE
785 $(MPTEST2
) --journalmode WAL
786 $(MPTEST1
) --journalmode WAL
787 $(MPTEST2
) --journalmode PERSIST
788 $(MPTEST1
) --journalmode PERSIST
789 $(MPTEST2
) --journalmode TRUNCATE
790 $(MPTEST1
) --journalmode TRUNCATE
791 $(MPTEST2
) --journalmode DELETE
795 sh
$(TOP
)/tool
/cktclsh.sh
8.4 $(TCLSH_CMD
)
799 sh
$(TOP
)/tool
/cktclsh.sh
8.5 $(TCLSH_CMD
)
803 # This target creates a directory named "tsrc" and fills it with
804 # copies of all of the C source code and header files needed to
805 # build on the target system. Some of the C source code and header
806 # files are automatically generated. This target takes care of
807 # all that automatic generation.
809 .target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl has_tclsh84 fts5.c
813 rm tsrc
/sqlite.h.in tsrc
/parse.y
814 $(TCLSH_CMD
) $(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
815 mv vdbe.new tsrc
/vdbe.c
816 cp fts5.c fts5.h tsrc
819 sqlite3.c
: .target_source
$(TOP
)/tool
/mksqlite3c.tcl src-verify has_tclsh84
820 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3c.tcl
$(AMALGAMATION_LINE_MACROS
) $(EXTRA_SRC
)
821 cp tsrc
/sqlite3ext.h .
822 cp
$(TOP
)/ext
/session
/sqlite3session.h .
824 sqlite3r.h
: sqlite3.h has_tclsh84
825 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) --enable-recover
>sqlite3r.h
827 sqlite3r.c
: sqlite3.c sqlite3r.h has_tclsh84
828 cp
$(TOP
)/ext
/recover
/sqlite3recover.c tsrc
/
829 cp
$(TOP
)/ext
/recover
/sqlite3recover.h tsrc
/
830 cp
$(TOP
)/ext
/recover
/dbdata.c tsrc
/
831 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3c.tcl
--enable-recover
$(AMALGAMATION_LINE_MACROS
) $(EXTRA_SRC
)
833 sqlite3ext.h
: .target_source
834 cp tsrc
/sqlite3ext.h .
836 tclsqlite3.c
: sqlite3.c
837 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
838 cat sqlite3.c
>>tclsqlite3.c
839 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
840 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
842 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl has_tclsh84
843 $(TCLSH_CMD
) $(TOP
)/tool
/split-sqlite3c.tcl
845 # Rule to build the amalgamation
847 sqlite3.lo
: sqlite3.c
848 $(LTCOMPILE
) $(TEMP_STORE
) -c sqlite3.c
850 # Rules to build the LEMON compiler generator
852 lemon
$(BEXE
): $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
853 $(BCC
) -o
$@
$(TOP
)/tool
/lemon.c
854 cp
$(TOP
)/tool
/lempar.c .
856 # Rules to build the program that generates the source-id
858 mksourceid
$(BEXE
): $(TOP
)/tool
/mksourceid.c
859 $(BCC
) -o
$@
$(TOP
)/tool
/mksourceid.c
861 # Rules to build individual *.o files from generated *.c files. This
867 parse.lo
: parse.c
$(HDR
)
868 $(LTCOMPILE
) $(TEMP_STORE
) -c parse.c
870 opcodes.lo
: opcodes.c
871 $(LTCOMPILE
) $(TEMP_STORE
) -c opcodes.c
873 # Rules to build individual *.o files from files in the src directory.
875 alter.lo
: $(TOP
)/src
/alter.c
$(HDR
)
876 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/alter.c
878 analyze.lo
: $(TOP
)/src
/analyze.c
$(HDR
)
879 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/analyze.c
881 attach.lo
: $(TOP
)/src
/attach.c
$(HDR
)
882 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/attach.c
884 auth.lo
: $(TOP
)/src
/auth.c
$(HDR
)
885 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/auth.c
887 backup.lo
: $(TOP
)/src
/backup.c
$(HDR
)
888 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/backup.c
890 bitvec.lo
: $(TOP
)/src
/bitvec.c
$(HDR
)
891 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/bitvec.c
893 btmutex.lo
: $(TOP
)/src
/btmutex.c
$(HDR
)
894 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btmutex.c
896 btree.lo
: $(TOP
)/src
/btree.c
$(HDR
) $(TOP
)/src
/pager.h
897 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btree.c
899 build.lo
: $(TOP
)/src
/build.c
$(HDR
)
900 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/build.c
902 callback.lo
: $(TOP
)/src
/callback.c
$(HDR
)
903 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/callback.c
905 complete.lo
: $(TOP
)/src
/complete.c
$(HDR
)
906 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/complete.c
908 ctime.lo
: $(TOP
)/src
/ctime.c
$(HDR
)
909 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/ctime.c
911 date.lo
: $(TOP
)/src
/date.c
$(HDR
)
912 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/date.c
914 dbpage.lo
: $(TOP
)/src
/dbpage.c
$(HDR
)
915 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/dbpage.c
917 dbstat.lo
: $(TOP
)/src
/dbstat.c
$(HDR
)
918 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/dbstat.c
920 delete.lo
: $(TOP
)/src
/delete.c
$(HDR
)
921 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/delete.c
923 expr.lo
: $(TOP
)/src
/expr.c
$(HDR
)
924 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/expr.c
926 fault.lo
: $(TOP
)/src
/fault.c
$(HDR
)
927 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fault.c
929 fkey.lo
: $(TOP
)/src
/fkey.c
$(HDR
)
930 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fkey.c
932 func.lo
: $(TOP
)/src
/func.c
$(HDR
)
933 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/func.c
935 global.lo
: $(TOP
)/src
/global.c
$(HDR
)
936 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/global.c
938 hash.lo
: $(TOP
)/src
/hash.c
$(HDR
)
939 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/hash.c
941 insert.lo
: $(TOP
)/src
/insert.c
$(HDR
)
942 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/insert.c
944 json.lo
: $(TOP
)/src
/json.c
$(HDR
)
945 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/json.c
947 legacy.lo
: $(TOP
)/src
/legacy.c
$(HDR
)
948 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/legacy.c
950 loadext.lo
: $(TOP
)/src
/loadext.c
$(HDR
)
951 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/loadext.c
953 main.lo
: $(TOP
)/src
/main.c
$(HDR
)
954 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/main.c
956 malloc.lo
: $(TOP
)/src
/malloc.c
$(HDR
)
957 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/malloc.c
959 mem0.lo
: $(TOP
)/src
/mem0.c
$(HDR
)
960 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem0.c
962 mem1.lo
: $(TOP
)/src
/mem1.c
$(HDR
)
963 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem1.c
965 mem2.lo
: $(TOP
)/src
/mem2.c
$(HDR
)
966 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem2.c
968 mem3.lo
: $(TOP
)/src
/mem3.c
$(HDR
)
969 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem3.c
971 mem5.lo
: $(TOP
)/src
/mem5.c
$(HDR
)
972 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem5.c
974 memdb.lo
: $(TOP
)/src
/memdb.c
$(HDR
)
975 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/memdb.c
977 memjournal.lo
: $(TOP
)/src
/memjournal.c
$(HDR
)
978 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/memjournal.c
980 mutex.lo
: $(TOP
)/src
/mutex.c
$(HDR
)
981 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex.c
983 mutex_noop.lo
: $(TOP
)/src
/mutex_noop.c
$(HDR
)
984 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_noop.c
986 mutex_unix.lo
: $(TOP
)/src
/mutex_unix.c
$(HDR
)
987 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_unix.c
989 mutex_w32.lo
: $(TOP
)/src
/mutex_w32.c
$(HDR
)
990 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_w32.c
992 notify.lo
: $(TOP
)/src
/notify.c
$(HDR
)
993 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/notify.c
995 pager.lo
: $(TOP
)/src
/pager.c
$(HDR
) $(TOP
)/src
/pager.h
996 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pager.c
998 pcache.lo
: $(TOP
)/src
/pcache.c
$(HDR
) $(TOP
)/src
/pcache.h
999 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache.c
1001 pcache1.lo
: $(TOP
)/src
/pcache1.c
$(HDR
) $(TOP
)/src
/pcache.h
1002 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache1.c
1004 os.lo
: $(TOP
)/src
/os.c
$(HDR
)
1005 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os.c
1007 os_kv.lo
: $(TOP
)/src
/os_kv.c
$(HDR
)
1008 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_kv.c
1010 os_unix.lo
: $(TOP
)/src
/os_unix.c
$(HDR
)
1011 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_unix.c
1013 os_win.lo
: $(TOP
)/src
/os_win.c
$(HDR
)
1014 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_win.c
1016 pragma.lo
: $(TOP
)/src
/pragma.c
$(HDR
)
1017 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pragma.c
1019 prepare.lo
: $(TOP
)/src
/prepare.c
$(HDR
)
1020 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/prepare.c
1022 printf.lo
: $(TOP
)/src
/printf.c
$(HDR
)
1023 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/printf.c
1025 random.lo
: $(TOP
)/src
/random.c
$(HDR
)
1026 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/random.c
1028 resolve.lo
: $(TOP
)/src
/resolve.c
$(HDR
)
1029 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/resolve.c
1031 rowset.lo
: $(TOP
)/src
/rowset.c
$(HDR
)
1032 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/rowset.c
1034 select.lo
: $(TOP
)/src
/select.c
$(HDR
)
1035 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/select.c
1037 status.lo
: $(TOP
)/src
/status.c
$(HDR
)
1038 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/status.c
1040 table.lo
: $(TOP
)/src
/table.c
$(HDR
)
1041 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/table.c
1043 threads.lo
: $(TOP
)/src
/threads.c
$(HDR
)
1044 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/threads.c
1046 tokenize.lo
: $(TOP
)/src
/tokenize.c keywordhash.h
$(HDR
)
1047 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/tokenize.c
1049 treeview.lo
: $(TOP
)/src
/treeview.c
$(HDR
)
1050 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/treeview.c
1052 trigger.lo
: $(TOP
)/src
/trigger.c
$(HDR
)
1053 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/trigger.c
1055 update.lo
: $(TOP
)/src
/update.c
$(HDR
)
1056 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/update.c
1058 upsert.lo
: $(TOP
)/src
/upsert.c
$(HDR
)
1059 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/upsert.c
1061 utf.lo
: $(TOP
)/src
/utf.c
$(HDR
)
1062 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/utf.c
1064 util.lo
: $(TOP
)/src
/util.c
$(HDR
)
1065 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/util.c
1067 vacuum.lo
: $(TOP
)/src
/vacuum.c
$(HDR
)
1068 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vacuum.c
1070 vdbe.lo
: $(TOP
)/src
/vdbe.c
$(HDR
)
1071 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbe.c
1073 vdbeapi.lo
: $(TOP
)/src
/vdbeapi.c
$(HDR
)
1074 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeapi.c
1076 vdbeaux.lo
: $(TOP
)/src
/vdbeaux.c
$(HDR
)
1077 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeaux.c
1079 vdbeblob.lo
: $(TOP
)/src
/vdbeblob.c
$(HDR
)
1080 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeblob.c
1082 vdbemem.lo
: $(TOP
)/src
/vdbemem.c
$(HDR
)
1083 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbemem.c
1085 vdbesort.lo
: $(TOP
)/src
/vdbesort.c
$(HDR
)
1086 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbesort.c
1088 vdbetrace.lo
: $(TOP
)/src
/vdbetrace.c
$(HDR
)
1089 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbetrace.c
1091 vdbevtab.lo
: $(TOP
)/src
/vdbevtab.c
$(HDR
)
1092 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbevtab.c
1094 vtab.lo
: $(TOP
)/src
/vtab.c
$(HDR
)
1095 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vtab.c
1097 wal.lo
: $(TOP
)/src
/wal.c
$(HDR
)
1098 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wal.c
1100 walker.lo
: $(TOP
)/src
/walker.c
$(HDR
)
1101 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/walker.c
1103 where.lo
: $(TOP
)/src
/where.c
$(HDR
)
1104 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/where.c
1106 wherecode.lo
: $(TOP
)/src
/wherecode.c
$(HDR
)
1107 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wherecode.c
1109 whereexpr.lo
: $(TOP
)/src
/whereexpr.c
$(HDR
)
1110 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/whereexpr.c
1112 window.lo
: $(TOP
)/src
/window.c
$(HDR
)
1113 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/window.c
1115 tclsqlite.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
1116 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -c
$(TOP
)/src
/tclsqlite.c
1118 tclsqlite-shell.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
1119 $(LTCOMPILE
) -DTCLSH
-o
$@
-c
$(TOP
)/src
/tclsqlite.c
1121 tclsqlite-stubs.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
1122 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -o
$@
-c
$(TOP
)/src
/tclsqlite.c
1124 tclsqlite3
$(TEXE
): tclsqlite-shell.lo libsqlite3.la
1125 $(LTLINK
) -o
$@ tclsqlite-shell.lo \
1126 libsqlite3.la
$(LIBTCL
)
1128 # Rules to build opcodes.c and opcodes.h
1130 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl has_tclsh84
1131 $(TCLSH_CMD
) $(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
1133 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl has_tclsh84
1134 cat parse.h
$(TOP
)/src
/vdbe.c |
$(TCLSH_CMD
) $(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
1136 # Rules to build parse.c and parse.h - the outputs of lemon.
1140 parse.c
: $(TOP
)/src
/parse.y lemon
$(BEXE
)
1141 cp
$(TOP
)/src
/parse.y .
1142 .
/lemon
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) -S parse.y
1144 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(BEXE
) $(TOP
)/VERSION has_tclsh84
1145 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
1147 sqlite3rc.h
: $(TOP
)/src
/sqlite3.rc
$(TOP
)/VERSION has_tclsh84
1148 echo
'#ifndef SQLITE_RESOURCE_VERSION' >$@
1149 echo
-n
'#define SQLITE_RESOURCE_VERSION ' >>$@
1150 cat
$(TOP
)/VERSION |
$(TCLSH_CMD
) $(TOP
)/tool
/replace.tcl exact .
, >>$@
1151 echo
'#endif' >>sqlite3rc.h
1153 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
1154 $(BCC
) -o mkkeywordhash
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
1155 .
/mkkeywordhash
$(BEXE
) >keywordhash.h
1157 # Source and header files that shell.c depends on
1159 $(TOP
)/src
/shell.c.in \
1160 $(TOP
)/ext
/consio
/console_io.c \
1161 $(TOP
)/ext
/consio
/console_io.h \
1162 $(TOP
)/ext
/expert
/sqlite3expert.c \
1163 $(TOP
)/ext
/expert
/sqlite3expert.h \
1164 $(TOP
)/ext
/intck
/sqlite3intck.c \
1165 $(TOP
)/ext
/intck
/sqlite3intck.h \
1166 $(TOP
)/ext
/misc
/appendvfs.c \
1167 $(TOP
)/ext
/misc
/base64.c \
1168 $(TOP
)/ext
/misc
/base85.c \
1169 $(TOP
)/ext
/misc
/completion.c \
1170 $(TOP
)/ext
/misc
/decimal.c \
1171 $(TOP
)/ext
/misc
/fileio.c \
1172 $(TOP
)/ext
/misc
/ieee754.c \
1173 $(TOP
)/ext
/misc
/memtrace.c \
1174 $(TOP
)/ext
/misc
/pcachetrace.c \
1175 $(TOP
)/ext
/misc
/regexp.c \
1176 $(TOP
)/ext
/misc
/series.c \
1177 $(TOP
)/ext
/misc
/shathree.c \
1178 $(TOP
)/ext
/misc
/sqlar.c \
1179 $(TOP
)/ext
/misc
/uint.c \
1180 $(TOP
)/ext
/misc
/zipfile.c \
1181 $(TOP
)/ext
/recover
/dbdata.c \
1182 $(TOP
)/ext
/recover
/sqlite3recover.c \
1183 $(TOP
)/ext
/recover
/sqlite3recover.h \
1184 $(TOP
)/src
/test_windirent.c \
1185 $(TOP
)/src
/test_windirent.h
1187 shell.c
: $(SHELL_DEP
) $(TOP
)/tool
/mkshellc.tcl has_tclsh84
1188 $(TCLSH_CMD
) $(TOP
)/tool
/mkshellc.tcl
>shell.c
1193 # Rules to build the extension objects.
1195 icu.lo
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
1196 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
1198 fts3.lo
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
1199 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
1201 fts3_aux.lo
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
1202 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
1204 fts3_expr.lo
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
1205 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
1207 fts3_hash.lo
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
1208 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
1210 fts3_icu.lo
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
1211 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
1213 fts3_porter.lo
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
1214 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
1216 fts3_snippet.lo
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
1217 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
1219 fts3_tokenizer.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
1220 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
1222 fts3_tokenizer1.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
1223 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
1225 fts3_tokenize_vtab.lo
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
1226 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
1228 fts3_unicode.lo
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
1229 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
1231 fts3_unicode2.lo
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
1232 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
1234 fts3_write.lo
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
1235 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
1237 rtree.lo
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
1238 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
1240 userauth.lo
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
1241 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
1243 sqlite3session.lo
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
1244 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
1246 stmt.lo
: $(TOP
)/ext
/misc
/stmt.c
1247 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
1252 $(TOP
)/ext
/fts5
/fts5.h \
1253 $(TOP
)/ext
/fts5
/fts5Int.h \
1254 $(TOP
)/ext
/fts5
/fts5_aux.c \
1255 $(TOP
)/ext
/fts5
/fts5_buffer.c \
1256 $(TOP
)/ext
/fts5
/fts5_main.c \
1257 $(TOP
)/ext
/fts5
/fts5_config.c \
1258 $(TOP
)/ext
/fts5
/fts5_expr.c \
1259 $(TOP
)/ext
/fts5
/fts5_hash.c \
1260 $(TOP
)/ext
/fts5
/fts5_index.c \
1261 fts5parse.c fts5parse.h \
1262 $(TOP
)/ext
/fts5
/fts5_storage.c \
1263 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
1264 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
1265 $(TOP
)/ext
/fts5
/fts5_varint.c \
1266 $(TOP
)/ext
/fts5
/fts5_vocab.c \
1268 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
$(BEXE
)
1269 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
1271 .
/lemon
$(BEXE
) $(OPTS
) -S fts5parse.y
1273 fts5parse.h
: fts5parse.c
1275 fts5.c
: $(FTS5_SRC
) has_tclsh84
1276 $(TCLSH_CMD
) $(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
1277 cp
$(TOP
)/ext
/fts5
/fts5.h .
1279 fts5.lo
: fts5.c
$(HDR
) $(EXTHDR
)
1280 $(LTCOMPILE
) -DSQLITE_CORE
-c fts5.c
1282 sqlite3rbu.lo
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
1283 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
1286 # Rules to build the 'testfixture' application.
1288 # If using the amalgamation, use sqlite3.c directly to build the test
1289 # fixture. Otherwise link against libsqlite3.la. (This distinction is
1290 # necessary because the test fixture requires non-API symbols which are
1291 # hidden when the library is built via the amalgamation).
1293 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
1294 TESTFIXTURE_FLAGS
+= -DTCLSH_INIT_PROC
=sqlite3TestInit
1295 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
1296 TESTFIXTURE_FLAGS
+= -DBUILD_sqlite
1297 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
1298 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
1299 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
1300 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_DBPAGE_VTAB
1301 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_BYTECODE_VTAB
1302 TESTFIXTURE_FLAGS
+= -DSQLITE_CKSUMVFS_STATIC
1303 TESTFIXTURE_FLAGS
+= -DSQLITE_STATIC_RANDOMJSON
1304 TESTFIXTURE_FLAGS
+= -DSQLITE_STRICT_SUBTYPE
=1
1306 TESTFIXTURE_SRC0
= $(TESTSRC2
) libsqlite3.la
1307 TESTFIXTURE_SRC1
= sqlite3.c
1308 TESTFIXTURE_SRC
= $(TESTSRC
) $(TOP
)/src
/tclsqlite.c
1309 TESTFIXTURE_SRC
+= $(TESTFIXTURE_SRC
$(USE_AMALGAMATION
))
1311 testfixture
$(TEXE
): has_tclsh85
$(TESTFIXTURE_SRC
)
1312 $(LTLINK
) -DSQLITE_NO_SYNC
=1 $(TEMP_STORE
) $(TESTFIXTURE_FLAGS
) \
1313 -o
$@
$(TESTFIXTURE_SRC
) $(LIBTCL
) $(TLIBS
)
1315 coretestprogs
: testfixture
$(BEXE
) sqlite3
$(BEXE
)
1317 testprogs
: $(TESTPROGS
) srcck1
$(BEXE
) fuzzcheck
$(TEXE
) sessionfuzz
$(TEXE
)
1319 # A very detailed test running most or all test cases
1320 fulltest
: alltest fuzztest
1322 # Run most or all tcl test cases
1323 alltest
: $(TESTPROGS
)
1324 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
1326 # Really really long testing
1327 soaktest
: $(TESTPROGS
)
1328 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
1330 # Do extra testing but not everything.
1331 fulltestonly
: $(TESTPROGS
) fuzztest
1332 .
/testfixture
$(TEXE
) $(TOP
)/test/full.
test
1336 # WARNING: When the "fuzztest" target is run by the testrunner.tcl script,
1337 # it does not actually run this code. Instead, it schedules equivalent
1338 # commands. Therefore, if this target is updated, then code in
1339 # testrunner_data.tcl (search for "trd_fuzztest_data") must also be updated.
1341 fuzztest
: fuzzcheck
$(TEXE
) $(FUZZDATA
) sessionfuzz
$(TEXE
)
1342 .
/fuzzcheck
$(TEXE
) $(FUZZDATA
)
1343 .
/sessionfuzz
$(TEXE
) run
$(TOP
)/test/sessionfuzz-data1.db
1345 valgrindfuzz
: fuzzcheck
$(TEXT
) $(FUZZDATA
) sessionfuzz
$(TEXE
)
1346 valgrind .
/fuzzcheck
$(TEXE
) --cell-size-check
--limit-mem
10M
$(FUZZDATA
)
1347 valgrind .
/sessionfuzz
$(TEXE
) run
$(TOP
)/test/sessionfuzz-data1.db
1349 # The veryquick.test TCL tests.
1351 tcltest
: .
/testfixture
$(TEXE
)
1352 .
/testfixture
$(TEXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
1354 # Runs all the same tests cases as the "tcltest" target but uses
1355 # the testrunner.tcl script to run them in multiple cores
1357 testrunner
: testfixture
$(TEXE
)
1358 .
/testfixture
$(TEXE
) $(TOP
)/test/testrunner.tcl
1360 # Runs both fuzztest and testrunner, consecutively.
1362 devtest
: srctree-check testfixture
$(TEXE
) fuzztest testrunner
1364 mdevtest
: srctree-check has_tclsh85
1365 $(TCLSH_CMD
) $(TOP
)/test/testrunner.tcl mdevtest
1367 sdevtest
: has_tclsh85
1368 $(TCLSH_CMD
) $(TOP
)/test/testrunner.tcl sdevtest
1370 # Validate that various generated files in the source tree
1373 srctree-check
: $(TOP
)/tool
/srctree-check.tcl
1374 $(TCLSH_CMD
) $(TOP
)/tool
/srctree-check.tcl
1376 # Testing for a release
1378 releasetest
: srctree-check testfixture
$(TEXE
)
1379 .
/testfixture
$(TEXE
) $(TOP
)/test/testrunner.tcl release
1381 # Minimal testing that runs in less than 3 minutes
1383 quicktest
: .
/testfixture
$(TEXE
)
1384 .
/testfixture
$(TEXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
1386 # This is the common case. Run many tests that do not take too long,
1387 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1389 test: srctree-check fuzztest sourcetest
$(TESTPROGS
) tcltest
1391 # Run a test using valgrind. This can take a really long time
1392 # because valgrind is so much slower than a native machine.
1394 valgrindtest
: $(TESTPROGS
) valgrindfuzz
1395 OMIT_MISUSE
=1 valgrind
-v .
/testfixture
$(TEXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
1397 # A very fast test that checks basic sanity. The name comes from
1398 # the 60s-era electronics testing: "Turn it on and see if smoke
1401 smoketest
: $(TESTPROGS
) fuzzcheck
$(TEXE
)
1402 .
/testfixture
$(TEXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
1404 shelltest
: $(TESTPROGS
)
1405 .
/testfixture
$(TEXT
) $(TOP
)/test/permutations.
test shell
1407 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in has_tclsh85
1408 $(TCLSH_CMD
) $(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
>sqlite3_analyzer.c
1410 sqlite3_analyzer
$(TEXE
): sqlite3_analyzer.c
1411 $(LTLINK
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1413 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 has_tclsh85
1414 $(TCLSH_CMD
) $(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqltclsh.c.in
>sqltclsh.c
1416 sqltclsh
$(TEXE
): sqltclsh.c
1417 $(LTLINK
) sqltclsh.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1419 sqlite3_expert
$(TEXE
): $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
1420 $(LTLINK
) $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
-o sqlite3_expert
$(TLIBS
)
1423 $(TOP
)/tool
/mkccode.tcl \
1425 $(TOP
)/src
/tclsqlite.c \
1426 $(TOP
)/ext
/repair
/sqlite3_checker.tcl \
1427 $(TOP
)/ext
/repair
/checkindex.c \
1428 $(TOP
)/ext
/repair
/checkfreelist.c \
1429 $(TOP
)/ext
/misc
/btreeinfo.c \
1430 $(TOP
)/ext
/repair
/sqlite3_checker.c.in
1432 sqlite3_checker.c
: $(CHECKER_DEPS
) has_tclsh85
1433 $(TCLSH_CMD
) $(TOP
)/tool
/mkccode.tcl
$(TOP
)/ext
/repair
/sqlite3_checker.c.in
>$@
1435 sqlite3_checker
$(TEXE
): sqlite3_checker.c
1436 $(LTLINK
) sqlite3_checker.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1438 dbdump
$(TEXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.lo
1439 $(LTLINK
) -DDBDUMP_STANDALONE
-o
$@ \
1440 $(TOP
)/ext
/misc
/dbdump.c sqlite3.lo
$(TLIBS
)
1442 dbtotxt
$(TEXE
): $(TOP
)/tool
/dbtotxt.c
1443 $(LTLINK
)-o
$@
$(TOP
)/tool
/dbtotxt.c
1445 showdb
$(TEXE
): $(TOP
)/tool
/showdb.c sqlite3.lo
1446 $(LTLINK
) -o
$@
$(TOP
)/tool
/showdb.c sqlite3.lo
$(TLIBS
)
1448 showstat4
$(TEXE
): $(TOP
)/tool
/showstat4.c sqlite3.lo
1449 $(LTLINK
) -o
$@
$(TOP
)/tool
/showstat4.c sqlite3.lo
$(TLIBS
)
1451 showjournal
$(TEXE
): $(TOP
)/tool
/showjournal.c sqlite3.lo
1452 $(LTLINK
) -o
$@
$(TOP
)/tool
/showjournal.c sqlite3.lo
$(TLIBS
)
1454 showwal
$(TEXE
): $(TOP
)/tool
/showwal.c sqlite3.lo
1455 $(LTLINK
) -o
$@
$(TOP
)/tool
/showwal.c sqlite3.lo
$(TLIBS
)
1457 showshm
$(TEXE
): $(TOP
)/tool
/showshm.c
1458 $(LTLINK
) -o
$@
$(TOP
)/tool
/showshm.c
1460 index_usage
$(TEXE
): $(TOP
)/tool
/index_usage.c sqlite3.lo
1461 $(LTLINK
) $(SHELL_OPT
) -o
$@
$(TOP
)/tool
/index_usage.c sqlite3.lo
$(TLIBS
)
1463 changeset
$(TEXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.lo
1464 $(LTLINK
) -o
$@
$(TOP
)/ext
/session
/changeset.c sqlite3.lo
$(TLIBS
)
1466 changesetfuzz
$(TEXE
): $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.lo
1467 $(LTLINK
) -o
$@
$(TOP
)/ext
/session
/changesetfuzz.c sqlite3.lo
$(TLIBS
)
1469 rollback-test
$(TEXE
): $(TOP
)/tool
/rollback-test.c sqlite3.lo
1470 $(LTLINK
) -o
$@
$(TOP
)/tool
/rollback-test.c sqlite3.lo
$(TLIBS
)
1472 atrc
$(TEXX
): $(TOP
)/test/atrc.c sqlite3.lo
1473 $(LTLINK
) -o
$@
$(TOP
)/test/atrc.c sqlite3.lo
$(TLIBS
)
1475 LogEst
$(TEXE
): $(TOP
)/tool
/logest.c sqlite3.h
1476 $(LTLINK
) -I.
-o
$@
$(TOP
)/tool
/logest.c
1478 wordcount
$(TEXE
): $(TOP
)/test/wordcount.c sqlite3.lo
1479 $(LTLINK
) -o
$@
$(TOP
)/test/wordcount.c sqlite3.lo
$(TLIBS
)
1481 speedtest1
$(TEXE
): $(TOP
)/test/speedtest1.c sqlite3.c Makefile
1482 $(LTLINK
) $(ST_OPT
) -o
$@
$(TOP
)/test/speedtest1.c sqlite3.c
$(TLIBS
)
1484 startup
$(TEXE
): $(TOP
)/test/startup.c sqlite3.c
1485 $(CC
) -Os
-g
-DSQLITE_THREADSAFE
=0 -o
$@
$(TOP
)/test/startup.c sqlite3.c
$(TLIBS
)
1487 KV_OPT
+= -DSQLITE_DIRECT_OVERFLOW_READ
1489 kvtest
$(TEXE
): $(TOP
)/test/kvtest.c sqlite3.c
1490 $(LTLINK
) $(KV_OPT
) -o
$@
$(TOP
)/test/kvtest.c sqlite3.c
$(TLIBS
)
1492 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.lo
1493 $(LTLINK
) -I.
-o
$@
$(TOP
)/ext
/rbu
/rbu.c sqlite3.lo
$(TLIBS
)
1495 loadfts
$(EXE
): $(TOP
)/tool
/loadfts.c libsqlite3.la
1496 $(LTLINK
) $(TOP
)/tool
/loadfts.c libsqlite3.la
-o
$@
$(TLIBS
)
1498 # This target will fail if the SQLite amalgamation contains any exported
1499 # symbols that do not begin with "sqlite3_". It is run as part of the
1500 # releasetest.tcl script.
1502 VALIDIDS
=' sqlite3(changeset|changegroup|session)?_'
1503 checksymbols
: sqlite3.o
1504 nm
-g
--defined-only sqlite3.o
1505 nm
-g
--defined-only sqlite3.o | egrep
-v
$(VALIDIDS
); test $$?
-ne
0
1506 echo
'0 errors out of 1 tests'
1508 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1509 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1510 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1512 amalgamation-tarball
: sqlite3.c sqlite3rc.h
1513 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1515 snapshot-tarball
: sqlite3.c sqlite3rc.h
1516 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1518 # Build a ZIP archive containing various command-line tools.
1520 tool-zip
: testfixture sqlite3 sqldiff sqlite3_analyzer
$(TOP
)/tool
/mktoolzip.tcl
1521 .
/testfixture
$(TOP
)/tool
/mktoolzip.tcl
1523 # The next two rules are used to support the "threadtest" target. Building
1524 # threadtest runs a few thread-safety tests that are implemented in C. This
1525 # target is invoked by the releasetest.tcl script.
1527 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
1528 $(TOP
)/test/tt3_checkpoint.c \
1529 $(TOP
)/test/tt3_index.c \
1530 $(TOP
)/test/tt3_vacuum.c \
1531 $(TOP
)/test/tt3_stress.c \
1532 $(TOP
)/test/tt3_lookaside1.c
1534 threadtest3
$(TEXE
): sqlite3.lo
$(THREADTEST3_SRC
)
1535 $(LTLINK
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.lo
-o
$@
$(TLIBS
)
1537 threadtest
: threadtest3
$(TEXE
)
1538 .
/threadtest3
$(TEXE
)
1540 threadtest5
: sqlite3.c
$(TOP
)/test/threadtest5.c
1541 $(LTLINK
) $(TOP
)/test/threadtest5.c sqlite3.c
-o
$@
$(TLIBS
)
1543 # Standard install and cleanup targets
1545 lib_install
: libsqlite3.la
1546 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
1547 $(LTINSTALL
) libsqlite3.la
$(DESTDIR
)$(libdir)
1549 install: sqlite3
$(TEXE
) lib_install sqlite3.h sqlite3.
pc ${HAVE_TCL
:1=tcl_install
}
1550 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
1551 $(LTINSTALL
) sqlite3
$(TEXE
) $(DESTDIR
)$(bindir)
1552 $(INSTALL
) -d
$(DESTDIR
)$(includedir)
1553 $(INSTALL
) -m
0644 sqlite3.h
$(DESTDIR
)$(includedir)
1554 $(INSTALL
) -m
0644 $(TOP
)/src
/sqlite3ext.h
$(DESTDIR
)$(includedir)
1555 $(INSTALL
) -d
$(DESTDIR
)$(pkgconfigdir
)
1556 $(INSTALL
) -m
0644 sqlite3.
pc $(DESTDIR
)$(pkgconfigdir
)
1559 echo
'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
1560 tcl_install
: lib_install libtclsqlite3.la pkgIndex.tcl
1561 $(INSTALL
) -d
$(DESTDIR
)$(TCLLIBDIR
)
1562 $(LTINSTALL
) libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)
1563 rm -f
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.a
1564 $(INSTALL
) -m
0644 pkgIndex.tcl
$(DESTDIR
)$(TCLLIBDIR
)
1567 rm -f
*.lo
*.la
*.o sqlite3
$(TEXE
) libsqlite3.la
1568 rm -f sqlite3.h opcodes.
*
1570 rm -f lemon
$(BEXE
) lempar.c parse.
* sqlite
*.
tar.gz
1571 rm -f mkkeywordhash
$(BEXE
) keywordhash.h
1572 rm -f mksourceid
$(BEXE
)
1573 rm -f
*.da
*.bb
*.bbg gmon.out
1574 rm -rf tsrc .target_source
1575 rm -f tclsqlite3
$(TEXE
)
1576 rm -f testfixture
$(TEXE
) test.db
1577 rm -f LogEst
$(TEXE
) fts3view
$(TEXE
) rollback-test
$(TEXE
) showdb
$(TEXE
)
1578 rm -f showjournal
$(TEXE
) showstat4
$(TEXE
) showwal
$(TEXE
) speedtest1
$(TEXE
)
1579 rm -f wordcount
$(TEXE
) changeset
$(TEXE
)
1580 rm -f version-info
$(TEXT
)
1581 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1584 rm -f
shell.c sqlite3ext.h
1585 rm -f sqlite3_analyzer
$(TEXE
) sqlite3_analyzer.c
1586 rm -f sqlite-
*-output.vsix
1587 rm -f mptester mptester.exe
1589 rm -f srcck1 srcck1.exe
1590 rm -f fuzzershell fuzzershell.exe
1591 rm -f fuzzcheck fuzzcheck.exe
1592 rm -f sqldiff sqldiff.exe
1593 rm -f dbhash dbhash.exe
1594 rm -f fts5.
* fts5parse.
*
1598 rm -f has_tclsh84 has_tclsh85
1601 rm -f sqlite_cfg.h config.log config.status libtool Makefile sqlite3.
pc \
1609 REAL_LIBOBJ
= $(LIBOBJ
:%.lo
=.libs
/%.o
)
1611 $(REAL_LIBOBJ
): $(LIBOBJ
)
1613 sqlite3.def
: $(REAL_LIBOBJ
)
1614 echo
'EXPORTS' >sqlite3.def
1615 nm
$(REAL_LIBOBJ
) | grep
' T ' | grep
' _sqlite3_' \
1616 | sed
's/^.* _//' >>sqlite3.def
1618 sqlite3.dll
: $(REAL_LIBOBJ
) sqlite3.def
1619 $(TCC
) -shared
-o
$@ sqlite3.def \
1620 -Wl
,"--strip-all" $(REAL_LIBOBJ
)
1625 fiddle
: sqlite3.c
shell.c
1626 make
-C ext
/wasm fiddle emcc_opt
=-Os
1629 # Spell-checking for source comments
1630 # The sources checked are either C sources or C source templates.
1631 # Their comments are extracted and processed through aspell using
1632 # a custom dictionary that contains scads of odd identifiers that
1633 # find their way into the comments.
1635 # Currently, this target is setup to be "made" in-tree only.
1636 # The output is ephemeral. Redirect it to guide spelling fixups,
1637 # either to correct spelling or add words to tool/custom.txt.
1639 .
/custom.rws
: .
/tool
/custom.txt
1640 @echo
'Updating custom dictionary from tool/custom.txt'
1641 aspell
--lang
=en create master .
/custom.rws
< $<
1643 misspell
: .
/custom.rws has_tclsh84
1644 $(TCLSH_CMD
) .
/tool
/spellsift.tcl .
/src
/*.c .
/src
/*.h .
/src
/*.in
1647 # tool/version-info: a utility for emitting sqlite3 version info
1650 version-info
$(TEXE
): $(TOP
)/tool
/version-info.c Makefile sqlite3.h
1651 $(LTLINK
) $(ST_OPT
) -o
$@
$(TOP
)/tool
/version-info.c