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
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
))
141 # The directory into which to store package information for
143 # Some standard variables and programs
146 exec_prefix = @
exec_prefix@
148 pkgconfigdir
= $(libdir)/pkgconfig
150 includedir = @
includedir@
153 ALLOWRELEASE
= @ALLOWRELEASE@
155 # libtool compile/link/install
156 LTCOMPILE
= $(LIBTOOL
) --mode
=compile
--tag
=CC
$(TCC
) $(LTCOMPILE_EXTRAS
)
157 LTLINK
= $(LIBTOOL
) --mode
=link
$(TCC
) $(LTCOMPILE_EXTRAS
) @LDFLAGS@
$(LTLINK_EXTRAS
)
158 LTINSTALL
= $(LIBTOOL
) --mode
=install $(INSTALL
)
160 # You should not have to change anything below this line
161 ###############################################################################
163 USE_AMALGAMATION
= @USE_AMALGAMATION@
165 # Object files for the SQLite library (non-amalgamation).
167 LIBOBJS0
= alter.lo analyze.lo attach.lo auth.lo \
168 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
169 callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
170 expr.lo fault.lo fkey.lo \
171 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
172 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
173 fts3_tokenize_vtab.lo \
174 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
176 func.lo global.lo hash.lo \
177 icu.lo insert.lo json1.lo legacy.lo loadext.lo \
178 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
180 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
181 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
182 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
183 random.lo resolve.lo rowset.lo rtree.lo \
184 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
185 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
186 update.lo util.lo vacuum.lo \
187 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
188 vdbetrace.lo wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
191 # Object files for the amalgamation.
193 LIBOBJS1
= sqlite3.lo
195 # Determine the real value of LIBOBJ based on the 'configure' script
197 LIBOBJ
= $(LIBOBJS
$(USE_AMALGAMATION
))
200 # All of the source code files.
204 $(TOP
)/src
/analyze.c \
205 $(TOP
)/src
/attach.c \
207 $(TOP
)/src
/backup.c \
208 $(TOP
)/src
/bitvec.c \
209 $(TOP
)/src
/btmutex.c \
212 $(TOP
)/src
/btreeInt.h \
214 $(TOP
)/src
/callback.c \
215 $(TOP
)/src
/complete.c \
218 $(TOP
)/src
/dbstat.c \
219 $(TOP
)/src
/delete.c \
224 $(TOP
)/src
/global.c \
227 $(TOP
)/src
/hwtime.h \
228 $(TOP
)/src
/insert.c \
229 $(TOP
)/src
/legacy.c \
230 $(TOP
)/src
/loadext.c \
232 $(TOP
)/src
/malloc.c \
238 $(TOP
)/src
/memjournal.c \
242 $(TOP
)/src
/mutex_noop.c \
243 $(TOP
)/src
/mutex_unix.c \
244 $(TOP
)/src
/mutex_w32.c \
245 $(TOP
)/src
/notify.c \
248 $(TOP
)/src
/os_common.h \
249 $(TOP
)/src
/os_setup.h \
250 $(TOP
)/src
/os_unix.c \
251 $(TOP
)/src
/os_win.c \
252 $(TOP
)/src
/os_win.h \
256 $(TOP
)/src
/pcache.c \
257 $(TOP
)/src
/pcache.h \
258 $(TOP
)/src
/pcache1.c \
259 $(TOP
)/src
/pragma.c \
260 $(TOP
)/src
/pragma.h \
261 $(TOP
)/src
/prepare.c \
262 $(TOP
)/src
/printf.c \
263 $(TOP
)/src
/random.c \
264 $(TOP
)/src
/resolve.c \
265 $(TOP
)/src
/rowset.c \
266 $(TOP
)/src
/select.c \
267 $(TOP
)/src
/status.c \
269 $(TOP
)/src
/sqlite.h.in \
270 $(TOP
)/src
/sqlite3ext.h \
271 $(TOP
)/src
/sqliteInt.h \
272 $(TOP
)/src
/sqliteLimit.h \
274 $(TOP
)/src
/tclsqlite.c \
275 $(TOP
)/src
/threads.c \
276 $(TOP
)/src
/tokenize.c \
277 $(TOP
)/src
/treeview.c \
278 $(TOP
)/src
/trigger.c \
280 $(TOP
)/src
/update.c \
282 $(TOP
)/src
/vacuum.c \
285 $(TOP
)/src
/vdbeapi.c \
286 $(TOP
)/src
/vdbeaux.c \
287 $(TOP
)/src
/vdbeblob.c \
288 $(TOP
)/src
/vdbemem.c \
289 $(TOP
)/src
/vdbesort.c \
290 $(TOP
)/src
/vdbetrace.c \
291 $(TOP
)/src
/vdbeInt.h \
293 $(TOP
)/src
/vxworks.h \
296 $(TOP
)/src
/walker.c \
298 $(TOP
)/src
/wherecode.c \
299 $(TOP
)/src
/whereexpr.c \
300 $(TOP
)/src
/whereInt.h
302 # Source code for extensions
305 $(TOP
)/ext
/fts1
/fts1.c \
306 $(TOP
)/ext
/fts1
/fts1.h \
307 $(TOP
)/ext
/fts1
/fts1_hash.c \
308 $(TOP
)/ext
/fts1
/fts1_hash.h \
309 $(TOP
)/ext
/fts1
/fts1_porter.c \
310 $(TOP
)/ext
/fts1
/fts1_tokenizer.h \
311 $(TOP
)/ext
/fts1
/fts1_tokenizer1.c
313 $(TOP
)/ext
/fts2
/fts2.c \
314 $(TOP
)/ext
/fts2
/fts2.h \
315 $(TOP
)/ext
/fts2
/fts2_hash.c \
316 $(TOP
)/ext
/fts2
/fts2_hash.h \
317 $(TOP
)/ext
/fts2
/fts2_icu.c \
318 $(TOP
)/ext
/fts2
/fts2_porter.c \
319 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
320 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
321 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
323 $(TOP
)/ext
/fts3
/fts3.c \
324 $(TOP
)/ext
/fts3
/fts3.h \
325 $(TOP
)/ext
/fts3
/fts3Int.h \
326 $(TOP
)/ext
/fts3
/fts3_aux.c \
327 $(TOP
)/ext
/fts3
/fts3_expr.c \
328 $(TOP
)/ext
/fts3
/fts3_hash.c \
329 $(TOP
)/ext
/fts3
/fts3_hash.h \
330 $(TOP
)/ext
/fts3
/fts3_icu.c \
331 $(TOP
)/ext
/fts3
/fts3_porter.c \
332 $(TOP
)/ext
/fts3
/fts3_snippet.c \
333 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
334 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
335 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
336 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
337 $(TOP
)/ext
/fts3
/fts3_unicode.c \
338 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
339 $(TOP
)/ext
/fts3
/fts3_write.c
341 $(TOP
)/ext
/icu
/sqliteicu.h \
344 $(TOP
)/ext
/rtree
/rtree.h \
345 $(TOP
)/ext
/rtree
/rtree.c
347 $(TOP
)/ext
/session
/sqlite3session.c \
348 $(TOP
)/ext
/session
/sqlite3session.h
350 $(TOP
)/ext
/rbu
/sqlite3rbu.h \
351 $(TOP
)/ext
/rbu
/sqlite3rbu.c
353 $(TOP
)/ext
/misc
/json1.c \
354 $(TOP
)/ext
/misc
/stmt.c
356 # Generated source code files
367 # 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_multiplex.c \
397 $(TOP
)/src
/test_mutex.c \
398 $(TOP
)/src
/test_onefile.c \
399 $(TOP
)/src
/test_osinst.c \
400 $(TOP
)/src
/test_pcache.c \
401 $(TOP
)/src
/test_quota.c \
402 $(TOP
)/src
/test_rtree.c \
403 $(TOP
)/src
/test_schema.c \
404 $(TOP
)/src
/test_server.c \
405 $(TOP
)/src
/test_superlock.c \
406 $(TOP
)/src
/test_syscall.c \
407 $(TOP
)/src
/test_tclvar.c \
408 $(TOP
)/src
/test_thread.c \
409 $(TOP
)/src
/test_vfs.c \
410 $(TOP
)/src
/test_windirent.c \
411 $(TOP
)/src
/test_wsd.c \
412 $(TOP
)/ext
/fts3
/fts3_term.c \
413 $(TOP
)/ext
/fts3
/fts3_test.c \
414 $(TOP
)/ext
/session
/test_session.c \
415 $(TOP
)/ext
/rbu
/test_rbu.c
417 # Statically linked extensions
420 $(TOP
)/ext
/misc
/amatch.c \
421 $(TOP
)/ext
/misc
/carray.c \
422 $(TOP
)/ext
/misc
/closure.c \
423 $(TOP
)/ext
/misc
/csv.c \
424 $(TOP
)/ext
/misc
/eval.c \
425 $(TOP
)/ext
/misc
/fileio.c \
426 $(TOP
)/ext
/misc
/fuzzer.c \
427 $(TOP
)/ext
/fts5
/fts5_tcl.c \
428 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
429 $(TOP
)/ext
/fts5
/fts5_test_tok.c \
430 $(TOP
)/ext
/misc
/ieee754.c \
431 $(TOP
)/ext
/misc
/nextchar.c \
432 $(TOP
)/ext
/misc
/percentile.c \
433 $(TOP
)/ext
/misc
/regexp.c \
434 $(TOP
)/ext
/misc
/remember.c \
435 $(TOP
)/ext
/misc
/series.c \
436 $(TOP
)/ext
/misc
/spellfix.c \
437 $(TOP
)/ext
/misc
/totype.c \
438 $(TOP
)/ext
/misc
/unionvtab.c \
439 $(TOP
)/ext
/misc
/wholenumber.c
441 # Source code to the library files needed by the test fixture
444 $(TOP
)/src
/attach.c \
445 $(TOP
)/src
/backup.c \
446 $(TOP
)/src
/bitvec.c \
451 $(TOP
)/src
/dbstat.c \
454 $(TOP
)/src
/insert.c \
459 $(TOP
)/src
/os_unix.c \
460 $(TOP
)/src
/os_win.c \
462 $(TOP
)/src
/pragma.c \
463 $(TOP
)/src
/prepare.c \
464 $(TOP
)/src
/printf.c \
465 $(TOP
)/src
/random.c \
466 $(TOP
)/src
/pcache.c \
467 $(TOP
)/src
/pcache1.c \
468 $(TOP
)/src
/select.c \
469 $(TOP
)/src
/tokenize.c \
472 $(TOP
)/src
/vdbeapi.c \
473 $(TOP
)/src
/vdbeaux.c \
475 $(TOP
)/src
/vdbemem.c \
476 $(TOP
)/src
/vdbetrace.c \
478 $(TOP
)/src
/wherecode.c \
479 $(TOP
)/src
/whereexpr.c \
481 $(TOP
)/ext
/fts3
/fts3.c \
482 $(TOP
)/ext
/fts3
/fts3_aux.c \
483 $(TOP
)/ext
/fts3
/fts3_expr.c \
484 $(TOP
)/ext
/fts3
/fts3_term.c \
485 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
486 $(TOP
)/ext
/fts3
/fts3_write.c \
487 $(TOP
)/ext
/async
/sqlite3async.c \
488 $(TOP
)/ext
/session
/sqlite3session.c \
489 $(TOP
)/ext
/misc
/stmt.c
491 # Header files used by all library source files.
495 $(TOP
)/src
/btreeInt.h \
497 $(TOP
)/src
/hwtime.h \
503 $(TOP
)/src
/os_common.h \
504 $(TOP
)/src
/os_setup.h \
505 $(TOP
)/src
/os_win.h \
507 $(TOP
)/src
/pcache.h \
509 $(TOP
)/src
/pragma.h \
511 $(TOP
)/src
/sqlite3ext.h \
512 $(TOP
)/src
/sqliteInt.h \
513 $(TOP
)/src
/sqliteLimit.h \
515 $(TOP
)/src
/vdbeInt.h \
516 $(TOP
)/src
/vxworks.h \
517 $(TOP
)/src
/whereInt.h \
520 # Header files used by extensions
523 $(TOP
)/ext
/fts1
/fts1.h \
524 $(TOP
)/ext
/fts1
/fts1_hash.h \
525 $(TOP
)/ext
/fts1
/fts1_tokenizer.h
527 $(TOP
)/ext
/fts2
/fts2.h \
528 $(TOP
)/ext
/fts2
/fts2_hash.h \
529 $(TOP
)/ext
/fts2
/fts2_tokenizer.h
531 $(TOP
)/ext
/fts3
/fts3.h \
532 $(TOP
)/ext
/fts3
/fts3Int.h \
533 $(TOP
)/ext
/fts3
/fts3_hash.h \
534 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
536 $(TOP
)/ext
/rtree
/rtree.h
538 $(TOP
)/ext
/icu
/sqliteicu.h
540 $(TOP
)/ext
/rtree
/sqlite3rtree.h
542 # executables needed for testing
547 sqlite3_analyzer
$(TEXE
) \
551 # Databases containing fuzzer test cases
554 $(TOP
)/test/fuzzdata1.db \
555 $(TOP
)/test/fuzzdata2.db \
556 $(TOP
)/test/fuzzdata3.db \
557 $(TOP
)/test/fuzzdata4.db \
558 $(TOP
)/test/fuzzdata5.db
560 # Standard options to testfixture
562 TESTOPTS
= --verbose
=file
--output
=test-out.txt
564 # Extra compiler options for various shell tools
566 SHELL_OPT
= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_FTS4
567 # SHELL_OPT += -DSQLITE_ENABLE_FTS5
568 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
569 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
570 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
571 FUZZERSHELL_OPT
= -DSQLITE_ENABLE_JSON1
572 FUZZCHECK_OPT
= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_MEMSYS5
-DSQLITE_OSS_FUZZ
573 FUZZCHECK_OPT
+= -DSQLITE_MAX_MEMORY
=50000000
574 FUZZCHECK_SRC
= $(TOP
)/test/fuzzcheck.c
$(TOP
)/test/ossfuzz.c
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 libsqlite3.la sqlite3
$(TEXE
) $(HAVE_TCL
:1=libtclsqlite3.la
)
582 Makefile
: $(TOP
)/Makefile.in
585 sqlite3.
pc: $(TOP
)/sqlite3.
pc.in
588 libsqlite3.la
: $(LIBOBJ
)
589 $(LTLINK
) -no-undefined
-o
$@
$(LIBOBJ
) $(TLIBS
) \
590 ${ALLOWRELEASE} -rpath
"$(libdir)" -version-info
"8:6:8"
592 libtclsqlite3.la
: tclsqlite.lo libsqlite3.la
593 $(LTLINK
) -no-undefined
-o
$@ tclsqlite.lo \
594 libsqlite3.la @TCL_STUB_LIB_SPEC@
$(TLIBS
) \
595 -rpath
"$(TCLLIBDIR)" \
596 -version-info
"8:6:8" \
599 sqlite3
$(TEXE
): $(TOP
)/src
/shell.c sqlite3.c
600 $(LTLINK
) $(READLINE_FLAGS
) $(SHELL_OPT
) -o
$@ \
601 $(TOP
)/src
/shell.c sqlite3.c \
602 $(LIBREADLINE
) $(TLIBS
) -rpath
"$(libdir)"
604 sqldiff
$(TEXE
): $(TOP
)/tool
/sqldiff.c sqlite3.lo sqlite3.h
605 $(LTLINK
) -o
$@
$(TOP
)/tool
/sqldiff.c sqlite3.lo
$(TLIBS
)
607 dbhash
$(TEXE
): $(TOP
)/tool
/dbhash.c sqlite3.lo sqlite3.h
608 $(LTLINK
) -o
$@
$(TOP
)/tool
/dbhash.c sqlite3.lo
$(TLIBS
)
610 scrub
$(TEXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.lo
611 $(LTLINK
) -o
$@
-I.
-DSCRUB_STANDALONE \
612 $(TOP
)/ext
/misc
/scrub.c sqlite3.lo
$(TLIBS
)
614 srcck1
$(BEXE
): $(TOP
)/tool
/srcck1.c
615 $(BCC
) -o srcck1
$(BEXE
) $(TOP
)/tool
/srcck1.c
617 sourcetest
: srcck1
$(BEXE
) sqlite3.c
620 fuzzershell
$(TEXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
621 $(LTLINK
) -o
$@
$(FUZZERSHELL_OPT
) \
622 $(TOP
)/tool
/fuzzershell.c sqlite3.c
$(TLIBS
)
624 fuzzcheck
$(TEXE
): $(FUZZCHECK_SRC
) sqlite3.c sqlite3.h
625 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(FUZZCHECK_SRC
) sqlite3.c
$(TLIBS
)
627 ossshell
$(TEXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
628 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(TOP
)/test/ossshell.c \
629 $(TOP
)/test/ossfuzz.c sqlite3.c
$(TLIBS
)
631 dbfuzz
$(TEXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
632 $(LTLINK
) -o
$@
$(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c
$(TLIBS
)
634 mptester
$(TEXE
): sqlite3.lo
$(TOP
)/mptest
/mptest.c
635 $(LTLINK
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.lo \
636 $(TLIBS
) -rpath
"$(libdir)"
638 MPTEST1
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/crash01.
test --repeat
20
639 MPTEST2
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
640 mptest
: mptester
$(TEXE
)
642 $(MPTEST1
) --journalmode DELETE
643 $(MPTEST2
) --journalmode WAL
644 $(MPTEST1
) --journalmode WAL
645 $(MPTEST2
) --journalmode PERSIST
646 $(MPTEST1
) --journalmode PERSIST
647 $(MPTEST2
) --journalmode TRUNCATE
648 $(MPTEST1
) --journalmode TRUNCATE
649 $(MPTEST2
) --journalmode DELETE
652 # This target creates a directory named "tsrc" and fills it with
653 # copies of all of the C source code and header files needed to
654 # build on the target system. Some of the C source code and header
655 # files are automatically generated. This target takes care of
656 # all that automatic generation.
658 .target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
662 rm tsrc
/sqlite.h.in tsrc
/parse.y
663 $(TCLSH_CMD
) $(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
664 mv vdbe.new tsrc
/vdbe.c
665 cp fts5.c fts5.h tsrc
668 sqlite3.c
: .target_source
$(TOP
)/tool
/mksqlite3c.tcl
669 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3c.tcl
670 cp tsrc
/shell.c tsrc
/sqlite3ext.h .
671 cp
$(TOP
)/ext
/session
/sqlite3session.h .
673 sqlite3ext.h
: .target_source
674 cp tsrc
/sqlite3ext.h .
676 tclsqlite3.c
: sqlite3.c
677 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
678 cat sqlite3.c
>>tclsqlite3.c
679 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
680 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
682 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
683 $(TCLSH_CMD
) $(TOP
)/tool
/split-sqlite3c.tcl
685 # Rule to build the amalgamation
687 sqlite3.lo
: sqlite3.c
688 $(LTCOMPILE
) $(TEMP_STORE
) -c sqlite3.c
690 # Rules to build the LEMON compiler generator
692 lemon
$(BEXE
): $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
693 $(BCC
) -o
$@
$(TOP
)/tool
/lemon.c
694 cp
$(TOP
)/tool
/lempar.c .
696 # Rules to build the program that generates the source-id
698 mksourceid
$(BEXE
): $(TOP
)/tool
/mksourceid.c
699 $(BCC
) -o
$@
$(TOP
)/tool
/mksourceid.c
701 # Rules to build individual *.o files from generated *.c files. This
707 parse.lo
: parse.c
$(HDR
)
708 $(LTCOMPILE
) $(TEMP_STORE
) -c parse.c
710 opcodes.lo
: opcodes.c
711 $(LTCOMPILE
) $(TEMP_STORE
) -c opcodes.c
713 # Rules to build individual *.o files from files in the src directory.
715 alter.lo
: $(TOP
)/src
/alter.c
$(HDR
)
716 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/alter.c
718 analyze.lo
: $(TOP
)/src
/analyze.c
$(HDR
)
719 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/analyze.c
721 attach.lo
: $(TOP
)/src
/attach.c
$(HDR
)
722 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/attach.c
724 auth.lo
: $(TOP
)/src
/auth.c
$(HDR
)
725 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/auth.c
727 backup.lo
: $(TOP
)/src
/backup.c
$(HDR
)
728 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/backup.c
730 bitvec.lo
: $(TOP
)/src
/bitvec.c
$(HDR
)
731 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/bitvec.c
733 btmutex.lo
: $(TOP
)/src
/btmutex.c
$(HDR
)
734 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btmutex.c
736 btree.lo
: $(TOP
)/src
/btree.c
$(HDR
) $(TOP
)/src
/pager.h
737 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btree.c
739 build.lo
: $(TOP
)/src
/build.c
$(HDR
)
740 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/build.c
742 callback.lo
: $(TOP
)/src
/callback.c
$(HDR
)
743 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/callback.c
745 complete.lo
: $(TOP
)/src
/complete.c
$(HDR
)
746 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/complete.c
748 ctime.lo
: $(TOP
)/src
/ctime.c
$(HDR
)
749 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/ctime.c
751 date.lo
: $(TOP
)/src
/date.c
$(HDR
)
752 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/date.c
754 dbstat.lo
: $(TOP
)/src
/dbstat.c
$(HDR
)
755 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/dbstat.c
757 delete.lo
: $(TOP
)/src
/delete.c
$(HDR
)
758 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/delete.c
760 expr.lo
: $(TOP
)/src
/expr.c
$(HDR
)
761 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/expr.c
763 fault.lo
: $(TOP
)/src
/fault.c
$(HDR
)
764 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fault.c
766 fkey.lo
: $(TOP
)/src
/fkey.c
$(HDR
)
767 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fkey.c
769 func.lo
: $(TOP
)/src
/func.c
$(HDR
)
770 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/func.c
772 global.lo
: $(TOP
)/src
/global.c
$(HDR
)
773 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/global.c
775 hash.lo
: $(TOP
)/src
/hash.c
$(HDR
)
776 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/hash.c
778 insert.lo
: $(TOP
)/src
/insert.c
$(HDR
)
779 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/insert.c
781 legacy.lo
: $(TOP
)/src
/legacy.c
$(HDR
)
782 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/legacy.c
784 loadext.lo
: $(TOP
)/src
/loadext.c
$(HDR
)
785 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/loadext.c
787 main.lo
: $(TOP
)/src
/main.c
$(HDR
)
788 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/main.c
790 malloc.lo
: $(TOP
)/src
/malloc.c
$(HDR
)
791 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/malloc.c
793 mem0.lo
: $(TOP
)/src
/mem0.c
$(HDR
)
794 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem0.c
796 mem1.lo
: $(TOP
)/src
/mem1.c
$(HDR
)
797 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem1.c
799 mem2.lo
: $(TOP
)/src
/mem2.c
$(HDR
)
800 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem2.c
802 mem3.lo
: $(TOP
)/src
/mem3.c
$(HDR
)
803 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem3.c
805 mem5.lo
: $(TOP
)/src
/mem5.c
$(HDR
)
806 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem5.c
808 memjournal.lo
: $(TOP
)/src
/memjournal.c
$(HDR
)
809 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/memjournal.c
811 mutex.lo
: $(TOP
)/src
/mutex.c
$(HDR
)
812 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex.c
814 mutex_noop.lo
: $(TOP
)/src
/mutex_noop.c
$(HDR
)
815 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_noop.c
817 mutex_unix.lo
: $(TOP
)/src
/mutex_unix.c
$(HDR
)
818 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_unix.c
820 mutex_w32.lo
: $(TOP
)/src
/mutex_w32.c
$(HDR
)
821 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_w32.c
823 notify.lo
: $(TOP
)/src
/notify.c
$(HDR
)
824 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/notify.c
826 pager.lo
: $(TOP
)/src
/pager.c
$(HDR
) $(TOP
)/src
/pager.h
827 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pager.c
829 pcache.lo
: $(TOP
)/src
/pcache.c
$(HDR
) $(TOP
)/src
/pcache.h
830 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache.c
832 pcache1.lo
: $(TOP
)/src
/pcache1.c
$(HDR
) $(TOP
)/src
/pcache.h
833 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache1.c
835 os.lo
: $(TOP
)/src
/os.c
$(HDR
)
836 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os.c
838 os_unix.lo
: $(TOP
)/src
/os_unix.c
$(HDR
)
839 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_unix.c
841 os_win.lo
: $(TOP
)/src
/os_win.c
$(HDR
)
842 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_win.c
844 pragma.lo
: $(TOP
)/src
/pragma.c
$(HDR
)
845 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pragma.c
847 prepare.lo
: $(TOP
)/src
/prepare.c
$(HDR
)
848 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/prepare.c
850 printf.lo
: $(TOP
)/src
/printf.c
$(HDR
)
851 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/printf.c
853 random.lo
: $(TOP
)/src
/random.c
$(HDR
)
854 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/random.c
856 resolve.lo
: $(TOP
)/src
/resolve.c
$(HDR
)
857 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/resolve.c
859 rowset.lo
: $(TOP
)/src
/rowset.c
$(HDR
)
860 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/rowset.c
862 select.lo
: $(TOP
)/src
/select.c
$(HDR
)
863 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/select.c
865 status.lo
: $(TOP
)/src
/status.c
$(HDR
)
866 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/status.c
868 table.lo
: $(TOP
)/src
/table.c
$(HDR
)
869 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/table.c
871 threads.lo
: $(TOP
)/src
/threads.c
$(HDR
)
872 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/threads.c
874 tokenize.lo
: $(TOP
)/src
/tokenize.c keywordhash.h
$(HDR
)
875 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/tokenize.c
877 treeview.lo
: $(TOP
)/src
/treeview.c
$(HDR
)
878 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/treeview.c
880 trigger.lo
: $(TOP
)/src
/trigger.c
$(HDR
)
881 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/trigger.c
883 update.lo
: $(TOP
)/src
/update.c
$(HDR
)
884 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/update.c
886 utf.lo
: $(TOP
)/src
/utf.c
$(HDR
)
887 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/utf.c
889 util.lo
: $(TOP
)/src
/util.c
$(HDR
)
890 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/util.c
892 vacuum.lo
: $(TOP
)/src
/vacuum.c
$(HDR
)
893 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vacuum.c
895 vdbe.lo
: $(TOP
)/src
/vdbe.c
$(HDR
)
896 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbe.c
898 vdbeapi.lo
: $(TOP
)/src
/vdbeapi.c
$(HDR
)
899 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeapi.c
901 vdbeaux.lo
: $(TOP
)/src
/vdbeaux.c
$(HDR
)
902 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeaux.c
904 vdbeblob.lo
: $(TOP
)/src
/vdbeblob.c
$(HDR
)
905 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeblob.c
907 vdbemem.lo
: $(TOP
)/src
/vdbemem.c
$(HDR
)
908 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbemem.c
910 vdbesort.lo
: $(TOP
)/src
/vdbesort.c
$(HDR
)
911 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbesort.c
913 vdbetrace.lo
: $(TOP
)/src
/vdbetrace.c
$(HDR
)
914 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbetrace.c
916 vtab.lo
: $(TOP
)/src
/vtab.c
$(HDR
)
917 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vtab.c
919 wal.lo
: $(TOP
)/src
/wal.c
$(HDR
)
920 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wal.c
922 walker.lo
: $(TOP
)/src
/walker.c
$(HDR
)
923 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/walker.c
925 where.lo
: $(TOP
)/src
/where.c
$(HDR
)
926 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/where.c
928 wherecode.lo
: $(TOP
)/src
/wherecode.c
$(HDR
)
929 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wherecode.c
931 whereexpr.lo
: $(TOP
)/src
/whereexpr.c
$(HDR
)
932 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/whereexpr.c
934 tclsqlite.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
935 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -c
$(TOP
)/src
/tclsqlite.c
937 tclsqlite-shell.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
938 $(LTCOMPILE
) -DTCLSH
=1 -o
$@
-c
$(TOP
)/src
/tclsqlite.c
940 tclsqlite-stubs.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
941 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -o
$@
-c
$(TOP
)/src
/tclsqlite.c
943 tclsqlite3
$(TEXE
): tclsqlite-shell.lo libsqlite3.la
944 $(LTLINK
) -o
$@ tclsqlite-shell.lo \
945 libsqlite3.la
$(LIBTCL
)
947 # Rules to build opcodes.c and opcodes.h
949 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
950 $(TCLSH_CMD
) $(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
952 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
953 cat parse.h
$(TOP
)/src
/vdbe.c |
$(TCLSH_CMD
) $(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
955 # Rules to build parse.c and parse.h - the outputs of lemon.
959 parse.c
: $(TOP
)/src
/parse.y lemon
$(BEXE
) $(TOP
)/tool
/addopcodes.tcl
960 cp
$(TOP
)/src
/parse.y .
962 .
/lemon
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) parse.y
963 mv parse.h parse.h.temp
964 $(TCLSH_CMD
) $(TOP
)/tool
/addopcodes.tcl parse.h.temp
>parse.h
966 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(BEXE
) $(TOP
)/VERSION
967 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
969 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
970 $(BCC
) -o mkkeywordhash
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
971 .
/mkkeywordhash
$(BEXE
) >keywordhash.h
975 # Rules to build the extension objects.
977 icu.lo
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
978 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
980 fts2.lo
: $(TOP
)/ext
/fts2
/fts2.c
$(HDR
) $(EXTHDR
)
981 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2.c
983 fts2_hash.lo
: $(TOP
)/ext
/fts2
/fts2_hash.c
$(HDR
) $(EXTHDR
)
984 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_hash.c
986 fts2_icu.lo
: $(TOP
)/ext
/fts2
/fts2_icu.c
$(HDR
) $(EXTHDR
)
987 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_icu.c
989 fts2_porter.lo
: $(TOP
)/ext
/fts2
/fts2_porter.c
$(HDR
) $(EXTHDR
)
990 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_porter.c
992 fts2_tokenizer.lo
: $(TOP
)/ext
/fts2
/fts2_tokenizer.c
$(HDR
) $(EXTHDR
)
993 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer.c
995 fts2_tokenizer1.lo
: $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
$(HDR
) $(EXTHDR
)
996 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer1.c
998 fts3.lo
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
999 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
1001 fts3_aux.lo
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
1002 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
1004 fts3_expr.lo
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
1005 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
1007 fts3_hash.lo
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
1008 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
1010 fts3_icu.lo
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
1011 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
1013 fts3_porter.lo
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
1014 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
1016 fts3_snippet.lo
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
1017 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
1019 fts3_tokenizer.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
1020 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
1022 fts3_tokenizer1.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
1023 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
1025 fts3_tokenize_vtab.lo
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
1026 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
1028 fts3_unicode.lo
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
1029 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
1031 fts3_unicode2.lo
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
1032 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
1034 fts3_write.lo
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
1035 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
1037 rtree.lo
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
1038 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
1040 sqlite3session.lo
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
1041 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
1043 json1.lo
: $(TOP
)/ext
/misc
/json1.c
1044 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/json1.c
1046 stmt.lo
: $(TOP
)/ext
/misc
/stmt.c
1047 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
1052 $(TOP
)/ext
/fts5
/fts5.h \
1053 $(TOP
)/ext
/fts5
/fts5Int.h \
1054 $(TOP
)/ext
/fts5
/fts5_aux.c \
1055 $(TOP
)/ext
/fts5
/fts5_buffer.c \
1056 $(TOP
)/ext
/fts5
/fts5_main.c \
1057 $(TOP
)/ext
/fts5
/fts5_config.c \
1058 $(TOP
)/ext
/fts5
/fts5_expr.c \
1059 $(TOP
)/ext
/fts5
/fts5_hash.c \
1060 $(TOP
)/ext
/fts5
/fts5_index.c \
1061 fts5parse.c fts5parse.h \
1062 $(TOP
)/ext
/fts5
/fts5_storage.c \
1063 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
1064 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
1065 $(TOP
)/ext
/fts5
/fts5_varint.c \
1066 $(TOP
)/ext
/fts5
/fts5_vocab.c \
1068 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
1069 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
1071 .
/lemon
$(BEXE
) $(OPTS
) fts5parse.y
1073 fts5parse.h
: fts5parse.c
1076 $(TCLSH_CMD
) $(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
1077 cp
$(TOP
)/ext
/fts5
/fts5.h .
1079 fts5.lo
: fts5.c
$(HDR
) $(EXTHDR
)
1080 $(LTCOMPILE
) -DSQLITE_CORE
-c fts5.c
1082 sqlite3rbu.lo
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
1083 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
1086 # Rules to build the 'testfixture' application.
1088 # If using the amalgamation, use sqlite3.c directly to build the test
1089 # fixture. Otherwise link against libsqlite3.la. (This distinction is
1090 # necessary because the test fixture requires non-API symbols which are
1091 # hidden when the library is built via the amalgamation).
1093 TESTFIXTURE_FLAGS
= -DTCLSH
=1 -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
1094 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
1095 TESTFIXTURE_FLAGS
+= -DBUILD_sqlite
1096 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
1097 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
1098 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
1100 TESTFIXTURE_SRC0
= $(TESTSRC2
) libsqlite3.la
1101 TESTFIXTURE_SRC1
= sqlite3.c
1102 TESTFIXTURE_SRC
= $(TESTSRC
) $(TOP
)/src
/tclsqlite.c
1103 TESTFIXTURE_SRC
+= $(TESTFIXTURE_SRC
$(USE_AMALGAMATION
))
1105 testfixture
$(TEXE
): $(TESTFIXTURE_SRC
)
1106 $(LTLINK
) -DSQLITE_NO_SYNC
=1 $(TEMP_STORE
) $(TESTFIXTURE_FLAGS
) \
1107 -o
$@
$(TESTFIXTURE_SRC
) $(LIBTCL
) $(TLIBS
)
1109 # A very detailed test running most or all test cases
1110 fulltest
: $(TESTPROGS
) fuzztest
1111 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
1113 # Really really long testing
1114 soaktest
: $(TESTPROGS
)
1115 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
1117 # Do extra testing but not everything.
1118 fulltestonly
: $(TESTPROGS
) fuzztest
1119 .
/testfixture
$(TEXE
) $(TOP
)/test/full.
test
1122 fuzztest
: fuzzcheck
$(TEXE
) $(FUZZDATA
)
1123 .
/fuzzcheck
$(TEXE
) $(FUZZDATA
)
1125 fastfuzztest
: fuzzcheck
$(TEXE
) $(FUZZDATA
)
1126 .
/fuzzcheck
$(TEXE
) --limit-mem
100M
$(FUZZDATA
)
1128 valgrindfuzz
: fuzzcheck
$(TEXT
) $(FUZZDATA
)
1129 valgrind .
/fuzzcheck
$(TEXE
) --cell-size-check
--limit-mem
10M
--timeout
600 $(FUZZDATA
)
1131 # The veryquick.test TCL tests.
1133 tcltest
: .
/testfixture
$(TEXE
)
1134 .
/testfixture
$(TEXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
1136 # Minimal testing that runs in less than 3 minutes
1138 quicktest
: .
/testfixture
$(TEXE
)
1139 .
/testfixture
$(TEXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
1141 # This is the common case. Run many tests that do not take too long,
1142 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1144 test: fastfuzztest sourcetest
$(TESTPROGS
) tcltest
1146 # Run a test using valgrind. This can take a really long time
1147 # because valgrind is so much slower than a native machine.
1149 valgrindtest
: $(TESTPROGS
) valgrindfuzz
1150 OMIT_MISUSE
=1 valgrind
-v .
/testfixture
$(TEXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
1152 # A very fast test that checks basic sanity. The name comes from
1153 # the 60s-era electronics testing: "Turn it on and see if smoke
1156 smoketest
: $(TESTPROGS
) fuzzcheck
$(TEXE
)
1157 .
/testfixture
$(TEXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
1159 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
1160 echo
"#define TCLSH 2" > $@
1161 echo
"#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
1162 cat sqlite3.c
$(TOP
)/src
/tclsqlite.c
>> $@
1163 echo
"static const char *tclsh_main_loop(void){" >> $@
1164 echo
"static const char *zMainloop = " >> $@
1165 $(TCLSH_CMD
) $(TOP
)/tool
/tostr.tcl
$(TOP
)/tool
/spaceanal.tcl
>> $@
1166 echo
"; return zMainloop; }" >> $@
1168 sqlite3_analyzer
$(TEXE
): sqlite3_analyzer.c
1169 $(LTLINK
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1171 dbdump
$(TEXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.lo
1172 $(LTLINK
) -DDBDUMP_STANDALONE
-o
$@ \
1173 $(TOP
)/ext
/misc
/dbdump.c sqlite3.lo
$(TLIBS
)
1175 showdb
$(TEXE
): $(TOP
)/tool
/showdb.c sqlite3.lo
1176 $(LTLINK
) -o
$@
$(TOP
)/tool
/showdb.c sqlite3.lo
$(TLIBS
)
1178 showstat4
$(TEXE
): $(TOP
)/tool
/showstat4.c sqlite3.lo
1179 $(LTLINK
) -o
$@
$(TOP
)/tool
/showstat4.c sqlite3.lo
$(TLIBS
)
1181 showjournal
$(TEXE
): $(TOP
)/tool
/showjournal.c sqlite3.lo
1182 $(LTLINK
) -o
$@
$(TOP
)/tool
/showjournal.c sqlite3.lo
$(TLIBS
)
1184 showwal
$(TEXE
): $(TOP
)/tool
/showwal.c sqlite3.lo
1185 $(LTLINK
) -o
$@
$(TOP
)/tool
/showwal.c sqlite3.lo
$(TLIBS
)
1187 changeset
$(TEXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.lo
1188 $(LTLINK
) -o
$@
$(TOP
)/ext
/session
/changeset.c sqlite3.lo
$(TLIBS
)
1190 rollback-test
$(TEXE
): $(TOP
)/tool
/rollback-test.c sqlite3.lo
1191 $(LTLINK
) -o
$@
$(TOP
)/tool
/rollback-test.c sqlite3.lo
$(TLIBS
)
1193 LogEst
$(TEXE
): $(TOP
)/tool
/logest.c sqlite3.h
1194 $(LTLINK
) -I.
-o
$@
$(TOP
)/tool
/logest.c
1196 wordcount
$(TEXE
): $(TOP
)/test/wordcount.c sqlite3.lo
1197 $(LTLINK
) -o
$@
$(TOP
)/test/wordcount.c sqlite3.lo
$(TLIBS
)
1199 speedtest1
$(TEXE
): $(TOP
)/test/speedtest1.c sqlite3.c
1200 $(LTLINK
) $(ST_OPT
) -o
$@
$(TOP
)/test/speedtest1.c sqlite3.c
$(TLIBS
)
1202 KV_OPT
+= -DSQLITE_DIRECT_OVERFLOW_READ
1204 kvtest
$(TEXE
): $(TOP
)/test/kvtest.c sqlite3.c
1205 $(LTLINK
) $(KV_OPT
) -o
$@
$(TOP
)/test/kvtest.c sqlite3.c
$(TLIBS
)
1207 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.lo
1208 $(LTLINK
) -I.
-o
$@
$(TOP
)/ext
/rbu
/rbu.c sqlite3.lo
$(TLIBS
)
1210 loadfts
$(EXE
): $(TOP
)/tool
/loadfts.c libsqlite3.la
1211 $(LTLINK
) $(TOP
)/tool
/loadfts.c libsqlite3.la
-o
$@
$(TLIBS
)
1213 # This target will fail if the SQLite amalgamation contains any exported
1214 # symbols that do not begin with "sqlite3_". It is run as part of the
1215 # releasetest.tcl script.
1217 VALIDIDS
=' sqlite3(changeset|changegroup|session)?_'
1218 checksymbols
: sqlite3.lo
1219 nm
-g
--defined-only sqlite3.lo | egrep
-v
$(VALIDIDS
); test $$?
-ne
0
1220 echo
'0 errors out of 1 tests'
1222 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1223 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1224 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1226 amalgamation-tarball
: sqlite3.c
1227 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1229 snapshot-tarball
: sqlite3.c
1230 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1232 # The next two rules are used to support the "threadtest" target. Building
1233 # threadtest runs a few thread-safety tests that are implemented in C. This
1234 # target is invoked by the releasetest.tcl script.
1236 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
1237 $(TOP
)/test/tt3_checkpoint.c \
1238 $(TOP
)/test/tt3_index.c \
1239 $(TOP
)/test/tt3_vacuum.c \
1240 $(TOP
)/test/tt3_stress.c \
1241 $(TOP
)/test/tt3_lookaside1.c
1243 threadtest3
$(TEXE
): sqlite3.lo
$(THREADTEST3_SRC
)
1244 $(LTLINK
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.lo
-o
$@
$(TLIBS
)
1246 threadtest
: threadtest3
$(TEXE
)
1247 .
/threadtest3
$(TEXE
)
1250 $(TCLSH_CMD
) $(TOP
)/test/releasetest.tcl
1252 # Standard install and cleanup targets
1254 lib_install
: libsqlite3.la
1255 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
1256 $(LTINSTALL
) libsqlite3.la
$(DESTDIR
)$(libdir)
1258 install: sqlite3
$(TEXE
) lib_install sqlite3.h sqlite3.
pc ${HAVE_TCL
:1=tcl_install
}
1259 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
1260 $(LTINSTALL
) sqlite3
$(TEXE
) $(DESTDIR
)$(bindir)
1261 $(INSTALL
) -d
$(DESTDIR
)$(includedir)
1262 $(INSTALL
) -m
0644 sqlite3.h
$(DESTDIR
)$(includedir)
1263 $(INSTALL
) -m
0644 $(TOP
)/src
/sqlite3ext.h
$(DESTDIR
)$(includedir)
1264 $(INSTALL
) -d
$(DESTDIR
)$(pkgconfigdir
)
1265 $(INSTALL
) -m
0644 sqlite3.
pc $(DESTDIR
)$(pkgconfigdir
)
1268 echo
'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3$(SHLIB_SUFFIX) sqlite3]' > $@
1269 tcl_install
: lib_install libtclsqlite3.la pkgIndex.tcl
1270 $(INSTALL
) -d
$(DESTDIR
)$(TCLLIBDIR
)
1271 $(LTINSTALL
) libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)
1272 rm -f
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.a
1273 $(INSTALL
) -m
0644 pkgIndex.tcl
$(DESTDIR
)$(TCLLIBDIR
)
1276 rm -f
*.lo
*.la
*.o sqlite3
$(TEXE
) libsqlite3.la
1277 rm -f sqlite3.h opcodes.
*
1279 rm -f lemon
$(BEXE
) lempar.c parse.
* sqlite
*.
tar.gz
1280 rm -f mkkeywordhash
$(BEXE
) keywordhash.h
1281 rm -f
*.da
*.bb
*.bbg gmon.out
1282 rm -rf tsrc .target_source
1283 rm -f tclsqlite3
$(TEXE
)
1284 rm -f testfixture
$(TEXE
) test.db
1285 rm -f LogEst
$(TEXE
) fts3view
$(TEXE
) rollback-test
$(TEXE
) showdb
$(TEXE
)
1286 rm -f showjournal
$(TEXE
) showstat4
$(TEXE
) showwal
$(TEXE
) speedtest1
$(TEXE
)
1287 rm -f wordcount
$(TEXE
) changeset
$(TEXE
)
1288 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1291 rm -f
shell.c sqlite3ext.h
1292 rm -f sqlite3_analyzer
$(TEXE
) sqlite3_analyzer.c
1293 rm -f sqlite-
*-output.vsix
1294 rm -f mptester mptester.exe
1296 rm -f srcck1 srcck1.exe
1297 rm -f fuzzershell fuzzershell.exe
1298 rm -f fuzzcheck fuzzcheck.exe
1299 rm -f sqldiff sqldiff.exe
1300 rm -f dbhash dbhash.exe
1301 rm -f fts5.
* fts5parse.
*
1304 rm -f config.h config.log config.status libtool Makefile sqlite3.
pc
1311 REAL_LIBOBJ
= $(LIBOBJ
:%.lo
=.libs
/%.o
)
1313 $(REAL_LIBOBJ
): $(LIBOBJ
)
1315 sqlite3.def
: $(REAL_LIBOBJ
)
1316 echo
'EXPORTS' >sqlite3.def
1317 nm
$(REAL_LIBOBJ
) | grep
' T ' | grep
' _sqlite3_' \
1318 | sed
's/^.* _//' >>sqlite3.def
1320 sqlite3.dll
: $(REAL_LIBOBJ
) sqlite3.def
1321 $(TCC
) -shared
-o
$@ sqlite3.def \
1322 -Wl
,"--strip-all" $(REAL_LIBOBJ
)