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 config.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@
61 # The library that programs using readline() must link against.
63 LIBREADLINE
= @TARGET_READLINE_LIBS@
65 # Should the database engine be compiled threadsafe
67 TCC
+= -DSQLITE_THREADSAFE
=@SQLITE_THREADSAFE@
69 # Any target libraries which libsqlite must be linked against
71 TLIBS
= @LIBS@
$(LIBS
)
73 # Flags controlling use of the in memory btree implementation
75 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
76 # default to file, 2 to default to memory, and 3 to force temporary
77 # tables to always be in memory.
79 TEMP_STORE
= -DSQLITE_TEMP_STORE
=@TEMP_STORE@
81 # Enable/disable loadable extensions, and other optional features
82 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
83 # The same set of OMIT and ENABLE flags should be passed to the
84 # LEMON parser generator and the mkkeywordhash tool as well.
85 OPT_FEATURE_FLAGS
= @OPT_FEATURE_FLAGS@
87 TCC
+= $(OPT_FEATURE_FLAGS
)
89 # Add in any optional parameters specified on the make commane line
90 # ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
93 # Add in compile-time options for some libraries used by extensions
96 # Version numbers and release number for the SQLite being compiled.
99 VERSION_NUMBER
= @VERSION_NUMBER@
102 # Filename extensions
104 BEXE
= @BUILD_EXEEXT@
105 TEXE
= @TARGET_EXEEXT@
107 # The following variable is "1" if the configure script was able to locate
108 # the tclConfig.sh file. It is an empty string otherwise. When this
109 # variable is "1", the TCL extension library (libtclsqlite3.so) is built
112 HAVE_TCL
= @HAVE_TCL@
114 # This is the command to use for tclsh - normally just "tclsh", but we may
115 # know the specific version we want to use
117 TCLSH_CMD
= @TCLSH_CMD@
119 # Where do we want to install the tcl plugin
121 TCLLIBDIR
= @TCLLIBDIR@
123 # The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
125 SHLIB_SUFFIX
= @TCL_SHLIB_SUFFIX@
127 # If gcov support was enabled by the configure script, add the appropriate
128 # flags here. It's not always as easy as just having the user add the right
129 # CFLAGS / LDFLAGS, because libtool wants to use CFLAGS when linking, which
130 # causes build errors with -fprofile-arcs -ftest-coverage with some GCCs.
131 # Supposedly GCC does the right thing if you use --coverage, but in
132 # practice it still fails. See:
134 # http://www.mail-archive.com/debian-gcc@lists.debian.org/msg26197.html
138 GCOV_CFLAGS1
= -DSQLITE_COVERAGE_TEST
=1 -fprofile-arcs
-ftest-coverage
139 GCOV_LDFLAGS1
= -lgcov
140 USE_GCOV
= @USE_GCOV@
141 LTCOMPILE_EXTRAS
+= $(GCOV_CFLAGS
$(USE_GCOV
))
142 LTLINK_EXTRAS
+= $(GCOV_LDFLAGS
$(USE_GCOV
))
145 # The directory into which to store package information for
147 # Some standard variables and programs
150 exec_prefix = @
exec_prefix@
152 pkgconfigdir
= $(libdir)/pkgconfig
154 includedir = @
includedir@
157 ALLOWRELEASE
= @ALLOWRELEASE@
159 # libtool compile/link/install
160 LTCOMPILE
= $(LIBTOOL
) --mode
=compile
--tag
=CC
$(TCC
) $(LTCOMPILE_EXTRAS
)
161 LTLINK
= $(LIBTOOL
) --mode
=link
$(TCC
) $(LTCOMPILE_EXTRAS
) @LDFLAGS@
$(LTLINK_EXTRAS
)
162 LTINSTALL
= $(LIBTOOL
) --mode
=install $(INSTALL
)
164 # You should not have to change anything below this line
165 ###############################################################################
167 USE_AMALGAMATION
= @USE_AMALGAMATION@
168 AMALGAMATION_LINE_MACROS
= @AMALGAMATION_LINE_MACROS@
170 # Object files for the SQLite library (non-amalgamation).
172 LIBOBJS0
= alter.lo analyze.lo attach.lo auth.lo \
173 backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
174 callback.lo complete.lo ctime.lo \
175 date.lo dbpage.lo dbstat.lo delete.lo \
176 expr.lo fault.lo fkey.lo \
177 fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
178 fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
179 fts3_tokenize_vtab.lo \
180 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
182 func.lo global.lo hash.lo \
183 icu.lo insert.lo json.lo legacy.lo loadext.lo \
184 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
185 memdb.lo memjournal.lo \
186 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
187 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
188 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
189 random.lo resolve.lo rowset.lo rtree.lo \
190 sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
191 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
192 update.lo userauth.lo upsert.lo util.lo vacuum.lo \
193 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
194 vdbetrace.lo vdbevtab.lo \
195 wal.lo walker.lo where.lo wherecode.lo whereexpr.lo \
196 window.lo utf.lo vtab.lo
198 # Object files for the amalgamation.
200 LIBOBJS1
= sqlite3.lo
202 # Determine the real value of LIBOBJ based on the 'configure' script
204 LIBOBJ
= $(LIBOBJS
$(USE_AMALGAMATION
))
207 # All of the source code files.
211 $(TOP
)/src
/analyze.c \
212 $(TOP
)/src
/attach.c \
214 $(TOP
)/src
/backup.c \
215 $(TOP
)/src
/bitvec.c \
216 $(TOP
)/src
/btmutex.c \
219 $(TOP
)/src
/btreeInt.h \
221 $(TOP
)/src
/callback.c \
222 $(TOP
)/src
/complete.c \
225 $(TOP
)/src
/dbpage.c \
226 $(TOP
)/src
/dbstat.c \
227 $(TOP
)/src
/delete.c \
232 $(TOP
)/src
/global.c \
235 $(TOP
)/src
/hwtime.h \
236 $(TOP
)/src
/insert.c \
238 $(TOP
)/src
/legacy.c \
239 $(TOP
)/src
/loadext.c \
241 $(TOP
)/src
/malloc.c \
248 $(TOP
)/src
/memjournal.c \
252 $(TOP
)/src
/mutex_noop.c \
253 $(TOP
)/src
/mutex_unix.c \
254 $(TOP
)/src
/mutex_w32.c \
255 $(TOP
)/src
/notify.c \
258 $(TOP
)/src
/os_common.h \
259 $(TOP
)/src
/os_setup.h \
260 $(TOP
)/src
/os_unix.c \
261 $(TOP
)/src
/os_win.c \
262 $(TOP
)/src
/os_win.h \
266 $(TOP
)/src
/pcache.c \
267 $(TOP
)/src
/pcache.h \
268 $(TOP
)/src
/pcache1.c \
269 $(TOP
)/src
/pragma.c \
270 $(TOP
)/src
/pragma.h \
271 $(TOP
)/src
/prepare.c \
272 $(TOP
)/src
/printf.c \
273 $(TOP
)/src
/random.c \
274 $(TOP
)/src
/resolve.c \
275 $(TOP
)/src
/rowset.c \
276 $(TOP
)/src
/select.c \
277 $(TOP
)/src
/status.c \
278 $(TOP
)/src
/shell.c.in \
279 $(TOP
)/src
/sqlite.h.in \
280 $(TOP
)/src
/sqlite3ext.h \
281 $(TOP
)/src
/sqliteInt.h \
282 $(TOP
)/src
/sqliteLimit.h \
284 $(TOP
)/src
/tclsqlite.c \
285 $(TOP
)/src
/threads.c \
286 $(TOP
)/src
/tokenize.c \
287 $(TOP
)/src
/treeview.c \
288 $(TOP
)/src
/trigger.c \
290 $(TOP
)/src
/update.c \
291 $(TOP
)/src
/upsert.c \
293 $(TOP
)/src
/vacuum.c \
296 $(TOP
)/src
/vdbeapi.c \
297 $(TOP
)/src
/vdbeaux.c \
298 $(TOP
)/src
/vdbeblob.c \
299 $(TOP
)/src
/vdbemem.c \
300 $(TOP
)/src
/vdbesort.c \
301 $(TOP
)/src
/vdbetrace.c \
302 $(TOP
)/src
/vdbevtab.c \
303 $(TOP
)/src
/vdbeInt.h \
305 $(TOP
)/src
/vxworks.h \
308 $(TOP
)/src
/walker.c \
310 $(TOP
)/src
/wherecode.c \
311 $(TOP
)/src
/whereexpr.c \
312 $(TOP
)/src
/whereInt.h \
315 # Source code for extensions
318 $(TOP
)/ext
/fts1
/fts1.c \
319 $(TOP
)/ext
/fts1
/fts1.h \
320 $(TOP
)/ext
/fts1
/fts1_hash.c \
321 $(TOP
)/ext
/fts1
/fts1_hash.h \
322 $(TOP
)/ext
/fts1
/fts1_porter.c \
323 $(TOP
)/ext
/fts1
/fts1_tokenizer.h \
324 $(TOP
)/ext
/fts1
/fts1_tokenizer1.c
326 $(TOP
)/ext
/fts2
/fts2.c \
327 $(TOP
)/ext
/fts2
/fts2.h \
328 $(TOP
)/ext
/fts2
/fts2_hash.c \
329 $(TOP
)/ext
/fts2
/fts2_hash.h \
330 $(TOP
)/ext
/fts2
/fts2_icu.c \
331 $(TOP
)/ext
/fts2
/fts2_porter.c \
332 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
333 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
334 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
336 $(TOP
)/ext
/fts3
/fts3.c \
337 $(TOP
)/ext
/fts3
/fts3.h \
338 $(TOP
)/ext
/fts3
/fts3Int.h \
339 $(TOP
)/ext
/fts3
/fts3_aux.c \
340 $(TOP
)/ext
/fts3
/fts3_expr.c \
341 $(TOP
)/ext
/fts3
/fts3_hash.c \
342 $(TOP
)/ext
/fts3
/fts3_hash.h \
343 $(TOP
)/ext
/fts3
/fts3_icu.c \
344 $(TOP
)/ext
/fts3
/fts3_porter.c \
345 $(TOP
)/ext
/fts3
/fts3_snippet.c \
346 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
347 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
348 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
349 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
350 $(TOP
)/ext
/fts3
/fts3_unicode.c \
351 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
352 $(TOP
)/ext
/fts3
/fts3_write.c
354 $(TOP
)/ext
/icu
/sqliteicu.h \
357 $(TOP
)/ext
/rtree
/rtree.h \
358 $(TOP
)/ext
/rtree
/rtree.c \
359 $(TOP
)/ext
/rtree
/geopoly.c
361 $(TOP
)/ext
/session
/sqlite3session.c \
362 $(TOP
)/ext
/session
/sqlite3session.h
364 $(TOP
)/ext
/userauth
/userauth.c \
365 $(TOP
)/ext
/userauth
/sqlite3userauth.h
367 $(TOP
)/ext
/rbu
/sqlite3rbu.h \
368 $(TOP
)/ext
/rbu
/sqlite3rbu.c
370 $(TOP
)/ext
/misc
/stmt.c
372 # Generated source code files
384 # Source code to the test files.
396 $(TOP
)/src
/test_autoext.c \
397 $(TOP
)/src
/test_async.c \
398 $(TOP
)/src
/test_backup.c \
399 $(TOP
)/src
/test_bestindex.c \
400 $(TOP
)/src
/test_blob.c \
401 $(TOP
)/src
/test_btree.c \
402 $(TOP
)/src
/test_config.c \
403 $(TOP
)/src
/test_delete.c \
404 $(TOP
)/src
/test_demovfs.c \
405 $(TOP
)/src
/test_devsym.c \
406 $(TOP
)/src
/test_fs.c \
407 $(TOP
)/src
/test_func.c \
408 $(TOP
)/src
/test_hexio.c \
409 $(TOP
)/src
/test_init.c \
410 $(TOP
)/src
/test_intarray.c \
411 $(TOP
)/src
/test_journal.c \
412 $(TOP
)/src
/test_malloc.c \
413 $(TOP
)/src
/test_md5.c \
414 $(TOP
)/src
/test_multiplex.c \
415 $(TOP
)/src
/test_mutex.c \
416 $(TOP
)/src
/test_onefile.c \
417 $(TOP
)/src
/test_osinst.c \
418 $(TOP
)/src
/test_pcache.c \
419 $(TOP
)/src
/test_quota.c \
420 $(TOP
)/src
/test_rtree.c \
421 $(TOP
)/src
/test_schema.c \
422 $(TOP
)/src
/test_server.c \
423 $(TOP
)/src
/test_superlock.c \
424 $(TOP
)/src
/test_syscall.c \
425 $(TOP
)/src
/test_tclsh.c \
426 $(TOP
)/src
/test_tclvar.c \
427 $(TOP
)/src
/test_thread.c \
428 $(TOP
)/src
/test_vdbecov.c \
429 $(TOP
)/src
/test_vfs.c \
430 $(TOP
)/src
/test_windirent.c \
431 $(TOP
)/src
/test_window.c \
432 $(TOP
)/src
/test_wsd.c \
433 $(TOP
)/ext
/fts3
/fts3_term.c \
434 $(TOP
)/ext
/fts3
/fts3_test.c \
435 $(TOP
)/ext
/session
/test_session.c \
436 $(TOP
)/ext
/rbu
/test_rbu.c
438 # Statically linked extensions
441 $(TOP
)/ext
/expert
/sqlite3expert.c \
442 $(TOP
)/ext
/expert
/test_expert.c \
443 $(TOP
)/ext
/misc
/amatch.c \
444 $(TOP
)/ext
/misc
/appendvfs.c \
445 $(TOP
)/ext
/misc
/carray.c \
446 $(TOP
)/ext
/misc
/cksumvfs.c \
447 $(TOP
)/ext
/misc
/closure.c \
448 $(TOP
)/ext
/misc
/csv.c \
449 $(TOP
)/ext
/misc
/decimal.c \
450 $(TOP
)/ext
/misc
/eval.c \
451 $(TOP
)/ext
/misc
/explain.c \
452 $(TOP
)/ext
/misc
/fileio.c \
453 $(TOP
)/ext
/misc
/fuzzer.c \
454 $(TOP
)/ext
/fts5
/fts5_tcl.c \
455 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
456 $(TOP
)/ext
/fts5
/fts5_test_tok.c \
457 $(TOP
)/ext
/misc
/ieee754.c \
458 $(TOP
)/ext
/misc
/mmapwarm.c \
459 $(TOP
)/ext
/misc
/nextchar.c \
460 $(TOP
)/ext
/misc
/normalize.c \
461 $(TOP
)/ext
/misc
/percentile.c \
462 $(TOP
)/ext
/misc
/prefixes.c \
463 $(TOP
)/ext
/misc
/qpvtab.c \
464 $(TOP
)/ext
/misc
/regexp.c \
465 $(TOP
)/ext
/misc
/remember.c \
466 $(TOP
)/ext
/misc
/series.c \
467 $(TOP
)/ext
/misc
/spellfix.c \
468 $(TOP
)/ext
/misc
/totype.c \
469 $(TOP
)/ext
/misc
/unionvtab.c \
470 $(TOP
)/ext
/misc
/wholenumber.c \
471 $(TOP
)/ext
/misc
/zipfile.c \
472 $(TOP
)/ext
/userauth
/userauth.c \
473 $(TOP
)/ext
/rtree
/test_rtreedoc.c
475 # Source code to the library files needed by the test fixture
478 $(TOP
)/src
/attach.c \
479 $(TOP
)/src
/backup.c \
480 $(TOP
)/src
/bitvec.c \
485 $(TOP
)/src
/dbpage.c \
486 $(TOP
)/src
/dbstat.c \
489 $(TOP
)/src
/global.c \
490 $(TOP
)/src
/insert.c \
495 $(TOP
)/src
/os_unix.c \
496 $(TOP
)/src
/os_win.c \
498 $(TOP
)/src
/pragma.c \
499 $(TOP
)/src
/prepare.c \
500 $(TOP
)/src
/printf.c \
501 $(TOP
)/src
/random.c \
502 $(TOP
)/src
/pcache.c \
503 $(TOP
)/src
/pcache1.c \
504 $(TOP
)/src
/select.c \
505 $(TOP
)/src
/tokenize.c \
506 $(TOP
)/src
/treeview.c \
509 $(TOP
)/src
/vdbeapi.c \
510 $(TOP
)/src
/vdbeaux.c \
512 $(TOP
)/src
/vdbemem.c \
513 $(TOP
)/src
/vdbetrace.c \
514 $(TOP
)/src
/vdbevtab.c \
516 $(TOP
)/src
/wherecode.c \
517 $(TOP
)/src
/whereexpr.c \
518 $(TOP
)/src
/window.c \
520 $(TOP
)/ext
/fts3
/fts3.c \
521 $(TOP
)/ext
/fts3
/fts3_aux.c \
522 $(TOP
)/ext
/fts3
/fts3_expr.c \
523 $(TOP
)/ext
/fts3
/fts3_term.c \
524 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
525 $(TOP
)/ext
/fts3
/fts3_write.c \
526 $(TOP
)/ext
/async
/sqlite3async.c \
527 $(TOP
)/ext
/session
/sqlite3session.c \
528 $(TOP
)/ext
/misc
/stmt.c \
531 # Header files used by all library source files.
535 $(TOP
)/src
/btreeInt.h \
537 $(TOP
)/src
/hwtime.h \
543 $(TOP
)/src
/os_common.h \
544 $(TOP
)/src
/os_setup.h \
545 $(TOP
)/src
/os_win.h \
547 $(TOP
)/src
/pcache.h \
549 $(TOP
)/src
/pragma.h \
551 $(TOP
)/src
/sqlite3ext.h \
552 $(TOP
)/src
/sqliteInt.h \
553 $(TOP
)/src
/sqliteLimit.h \
555 $(TOP
)/src
/vdbeInt.h \
556 $(TOP
)/src
/vxworks.h \
557 $(TOP
)/src
/whereInt.h \
560 # Header files used by extensions
563 $(TOP
)/ext
/fts1
/fts1.h \
564 $(TOP
)/ext
/fts1
/fts1_hash.h \
565 $(TOP
)/ext
/fts1
/fts1_tokenizer.h
567 $(TOP
)/ext
/fts2
/fts2.h \
568 $(TOP
)/ext
/fts2
/fts2_hash.h \
569 $(TOP
)/ext
/fts2
/fts2_tokenizer.h
571 $(TOP
)/ext
/fts3
/fts3.h \
572 $(TOP
)/ext
/fts3
/fts3Int.h \
573 $(TOP
)/ext
/fts3
/fts3_hash.h \
574 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
576 $(TOP
)/ext
/rtree
/rtree.h \
577 $(TOP
)/ext
/rtree
/geopoly.c
579 $(TOP
)/ext
/icu
/sqliteicu.h
581 $(TOP
)/ext
/rtree
/sqlite3rtree.h
583 $(TOP
)/ext
/userauth
/sqlite3userauth.h
585 # executables needed for testing
590 sqlite3_analyzer
$(TEXE
) \
595 # Databases containing fuzzer test cases
598 $(TOP
)/test/fuzzdata1.db \
599 $(TOP
)/test/fuzzdata2.db \
600 $(TOP
)/test/fuzzdata3.db \
601 $(TOP
)/test/fuzzdata4.db \
602 $(TOP
)/test/fuzzdata5.db \
603 $(TOP
)/test/fuzzdata6.db \
604 $(TOP
)/test/fuzzdata7.db \
605 $(TOP
)/test/fuzzdata8.db
607 # Standard options to testfixture
609 TESTOPTS
= --verbose
=file
--output
=test-out.txt
611 # Extra compiler options for various shell tools
613 SHELL_OPT
= -DSQLITE_ENABLE_FTS4
614 #SHELL_OPT += -DSQLITE_ENABLE_FTS5
615 SHELL_OPT
+= -DSQLITE_ENABLE_RTREE
616 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
617 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
618 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
619 SHELL_OPT
+= -DSQLITE_ENABLE_DBPAGE_VTAB
620 SHELL_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
621 SHELL_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
622 SHELL_OPT
+= -DSQLITE_ENABLE_OFFSET_SQL_FUNC
624 FUZZCHECK_OPT
= -DSQLITE_ENABLE_MEMSYS5
-DSQLITE_OSS_FUZZ
625 FUZZCHECK_OPT
+= -DSQLITE_MAX_MEMORY
=50000000
626 FUZZCHECK_OPT
+= -DSQLITE_PRINTF_PRECISION_LIMIT
=1000
627 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS4
628 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS3_PARENTHESIS
629 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS5
630 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_RTREE
631 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_GEOPOLY
632 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
633 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
634 FUZZCHECK_SRC
= $(TOP
)/test/fuzzcheck.c
$(TOP
)/test/ossfuzz.c
$(TOP
)/test/fuzzinvariants.c
637 # This is the default Makefile target. The objects listed here
638 # are what get build when you type just "make" with no arguments.
640 all: sqlite3.h libsqlite3.la sqlite3
$(TEXE
) $(HAVE_TCL
:1=libtclsqlite3.la
)
642 Makefile
: $(TOP
)/Makefile.in
645 sqlite3.
pc: $(TOP
)/sqlite3.
pc.in
648 libsqlite3.la
: $(LIBOBJ
)
649 $(LTLINK
) -no-undefined
-o
$@
$(LIBOBJ
) $(TLIBS
) \
650 ${ALLOWRELEASE} -rpath
"$(libdir)" -version-info
"8:6:8"
652 libtclsqlite3.la
: tclsqlite.lo libsqlite3.la
653 $(LTLINK
) -no-undefined
-o
$@ tclsqlite.lo \
654 libsqlite3.la @TCL_STUB_LIB_SPEC@
$(TLIBS
) \
655 -rpath
"$(TCLLIBDIR)" \
656 -version-info
"8:6:8" \
659 sqlite3
$(TEXE
): shell.c sqlite3.c
660 $(LTLINK
) $(READLINE_FLAGS
) $(SHELL_OPT
) -o
$@ \
662 $(LIBREADLINE
) $(TLIBS
) -rpath
"$(libdir)"
664 sqldiff
$(TEXE
): $(TOP
)/tool
/sqldiff.c sqlite3.lo sqlite3.h
665 $(LTLINK
) -o
$@
$(TOP
)/tool
/sqldiff.c sqlite3.lo
$(TLIBS
)
667 dbhash
$(TEXE
): $(TOP
)/tool
/dbhash.c sqlite3.lo sqlite3.h
668 $(LTLINK
) -o
$@
$(TOP
)/tool
/dbhash.c sqlite3.lo
$(TLIBS
)
670 scrub
$(TEXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.lo
671 $(LTLINK
) -o
$@
-I.
-DSCRUB_STANDALONE \
672 $(TOP
)/ext
/misc
/scrub.c sqlite3.lo
$(TLIBS
)
674 srcck1
$(BEXE
): $(TOP
)/tool
/srcck1.c
675 $(BCC
) -o srcck1
$(BEXE
) $(TOP
)/tool
/srcck1.c
677 sourcetest
: srcck1
$(BEXE
) sqlite3.c
680 fuzzershell
$(TEXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
681 $(LTLINK
) -o
$@
$(FUZZERSHELL_OPT
) \
682 $(TOP
)/tool
/fuzzershell.c sqlite3.c
$(TLIBS
)
684 fuzzcheck
$(TEXE
): $(FUZZCHECK_SRC
) sqlite3.c sqlite3.h
685 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(FUZZCHECK_SRC
) sqlite3.c
$(TLIBS
)
687 ossshell
$(TEXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
688 $(LTLINK
) -o
$@
$(FUZZCHECK_OPT
) $(TOP
)/test/ossshell.c \
689 $(TOP
)/test/ossfuzz.c sqlite3.c
$(TLIBS
)
691 sessionfuzz
$(TEXE
): $(TOP
)/test/sessionfuzz.c sqlite3.c sqlite3.h
692 $(LTLINK
) -o
$@
$(TOP
)/test/sessionfuzz.c
$(TLIBS
)
694 dbfuzz
$(TEXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
695 $(LTLINK
) -o
$@
$(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c
$(TLIBS
)
698 -DSQLITE_THREADSAFE
=0 \
699 -DSQLITE_OMIT_LOAD_EXTENSION \
701 -DSQLITE_ENABLE_DBSTAT_VTAB \
702 -DSQLITE_ENABLE_BYTECODE_VTAB \
703 -DSQLITE_ENABLE_RTREE \
704 -DSQLITE_ENABLE_FTS4 \
707 dbfuzz2
$(TEXE
): $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
708 $(CC
) $(OPT_FEATURE_FLAGS
) $(OPTS
) -I.
-g
-O0 \
709 -DSTANDALONE
-o dbfuzz2 \
710 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
)
712 cp
$(TOP
)/test/dbfuzz2-seed
* dbfuzz2-dir
714 dbfuzz2-asan
: $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
715 clang-6.0
$(OPT_FEATURE_FLAGS
) $(OPTS
) -I.
-g
-O0 \
716 -fsanitize
=fuzzer
,undefined
,address
-o dbfuzz2-asan \
717 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
)
719 cp
$(TOP
)/test/dbfuzz2-seed
* dbfuzz2-dir
721 dbfuzz2-msan
: $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
722 clang-6.0
$(OPT_FEATURE_FLAGS
) $(OPTS
) -I.
-g
-O0 \
723 -fsanitize
=fuzzer
,undefined
,memory
-o dbfuzz2-msan \
724 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
)
726 cp
$(TOP
)/test/dbfuzz2-seed
* dbfuzz2-dir
728 mptester
$(TEXE
): sqlite3.lo
$(TOP
)/mptest
/mptest.c
729 $(LTLINK
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.lo \
730 $(TLIBS
) -rpath
"$(libdir)"
732 MPTEST1
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/crash01.
test --repeat
20
733 MPTEST2
=.
/mptester
$(TEXE
) mptest.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
734 mptest
: mptester
$(TEXE
)
736 $(MPTEST1
) --journalmode DELETE
737 $(MPTEST2
) --journalmode WAL
738 $(MPTEST1
) --journalmode WAL
739 $(MPTEST2
) --journalmode PERSIST
740 $(MPTEST1
) --journalmode PERSIST
741 $(MPTEST2
) --journalmode TRUNCATE
742 $(MPTEST1
) --journalmode TRUNCATE
743 $(MPTEST2
) --journalmode DELETE
746 # This target creates a directory named "tsrc" and fills it with
747 # copies of all of the C source code and header files needed to
748 # build on the target system. Some of the C source code and header
749 # files are automatically generated. This target takes care of
750 # all that automatic generation.
752 .target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
756 rm tsrc
/sqlite.h.in tsrc
/parse.y
757 $(TCLSH_CMD
) $(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
758 mv vdbe.new tsrc
/vdbe.c
759 cp fts5.c fts5.h tsrc
762 sqlite3.c
: .target_source
$(TOP
)/tool
/mksqlite3c.tcl
763 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3c.tcl
$(AMALGAMATION_LINE_MACROS
)
764 cp tsrc
/sqlite3ext.h .
765 cp
$(TOP
)/ext
/session
/sqlite3session.h .
767 sqlite3ext.h
: .target_source
768 cp tsrc
/sqlite3ext.h .
770 tclsqlite3.c
: sqlite3.c
771 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
772 cat sqlite3.c
>>tclsqlite3.c
773 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
774 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
776 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
777 $(TCLSH_CMD
) $(TOP
)/tool
/split-sqlite3c.tcl
779 # Rule to build the amalgamation
781 sqlite3.lo
: sqlite3.c
782 $(LTCOMPILE
) $(TEMP_STORE
) -c sqlite3.c
784 # Rules to build the LEMON compiler generator
786 lemon
$(BEXE
): $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
787 $(BCC
) -o
$@
$(TOP
)/tool
/lemon.c
788 cp
$(TOP
)/tool
/lempar.c .
790 # Rules to build the program that generates the source-id
792 mksourceid
$(BEXE
): $(TOP
)/tool
/mksourceid.c
793 $(BCC
) -o
$@
$(TOP
)/tool
/mksourceid.c
795 # Rules to build individual *.o files from generated *.c files. This
801 parse.lo
: parse.c
$(HDR
)
802 $(LTCOMPILE
) $(TEMP_STORE
) -c parse.c
804 opcodes.lo
: opcodes.c
805 $(LTCOMPILE
) $(TEMP_STORE
) -c opcodes.c
807 # Rules to build individual *.o files from files in the src directory.
809 alter.lo
: $(TOP
)/src
/alter.c
$(HDR
)
810 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/alter.c
812 analyze.lo
: $(TOP
)/src
/analyze.c
$(HDR
)
813 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/analyze.c
815 attach.lo
: $(TOP
)/src
/attach.c
$(HDR
)
816 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/attach.c
818 auth.lo
: $(TOP
)/src
/auth.c
$(HDR
)
819 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/auth.c
821 backup.lo
: $(TOP
)/src
/backup.c
$(HDR
)
822 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/backup.c
824 bitvec.lo
: $(TOP
)/src
/bitvec.c
$(HDR
)
825 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/bitvec.c
827 btmutex.lo
: $(TOP
)/src
/btmutex.c
$(HDR
)
828 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btmutex.c
830 btree.lo
: $(TOP
)/src
/btree.c
$(HDR
) $(TOP
)/src
/pager.h
831 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/btree.c
833 build.lo
: $(TOP
)/src
/build.c
$(HDR
)
834 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/build.c
836 callback.lo
: $(TOP
)/src
/callback.c
$(HDR
)
837 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/callback.c
839 complete.lo
: $(TOP
)/src
/complete.c
$(HDR
)
840 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/complete.c
842 ctime.lo
: $(TOP
)/src
/ctime.c
$(HDR
)
843 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/ctime.c
845 date.lo
: $(TOP
)/src
/date.c
$(HDR
)
846 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/date.c
848 dbpage.lo
: $(TOP
)/src
/dbpage.c
$(HDR
)
849 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/dbpage.c
851 dbstat.lo
: $(TOP
)/src
/dbstat.c
$(HDR
)
852 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/dbstat.c
854 delete.lo
: $(TOP
)/src
/delete.c
$(HDR
)
855 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/delete.c
857 expr.lo
: $(TOP
)/src
/expr.c
$(HDR
)
858 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/expr.c
860 fault.lo
: $(TOP
)/src
/fault.c
$(HDR
)
861 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fault.c
863 fkey.lo
: $(TOP
)/src
/fkey.c
$(HDR
)
864 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/fkey.c
866 func.lo
: $(TOP
)/src
/func.c
$(HDR
)
867 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/func.c
869 global.lo
: $(TOP
)/src
/global.c
$(HDR
)
870 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/global.c
872 hash.lo
: $(TOP
)/src
/hash.c
$(HDR
)
873 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/hash.c
875 insert.lo
: $(TOP
)/src
/insert.c
$(HDR
)
876 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/insert.c
878 json.lo
: $(TOP
)/src
/json.c
$(HDR
)
879 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/json.c
881 legacy.lo
: $(TOP
)/src
/legacy.c
$(HDR
)
882 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/legacy.c
884 loadext.lo
: $(TOP
)/src
/loadext.c
$(HDR
)
885 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/loadext.c
887 main.lo
: $(TOP
)/src
/main.c
$(HDR
)
888 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/main.c
890 malloc.lo
: $(TOP
)/src
/malloc.c
$(HDR
)
891 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/malloc.c
893 mem0.lo
: $(TOP
)/src
/mem0.c
$(HDR
)
894 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem0.c
896 mem1.lo
: $(TOP
)/src
/mem1.c
$(HDR
)
897 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem1.c
899 mem2.lo
: $(TOP
)/src
/mem2.c
$(HDR
)
900 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem2.c
902 mem3.lo
: $(TOP
)/src
/mem3.c
$(HDR
)
903 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem3.c
905 mem5.lo
: $(TOP
)/src
/mem5.c
$(HDR
)
906 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mem5.c
908 memdb.lo
: $(TOP
)/src
/memdb.c
$(HDR
)
909 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/memdb.c
911 memjournal.lo
: $(TOP
)/src
/memjournal.c
$(HDR
)
912 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/memjournal.c
914 mutex.lo
: $(TOP
)/src
/mutex.c
$(HDR
)
915 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex.c
917 mutex_noop.lo
: $(TOP
)/src
/mutex_noop.c
$(HDR
)
918 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_noop.c
920 mutex_unix.lo
: $(TOP
)/src
/mutex_unix.c
$(HDR
)
921 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_unix.c
923 mutex_w32.lo
: $(TOP
)/src
/mutex_w32.c
$(HDR
)
924 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/mutex_w32.c
926 notify.lo
: $(TOP
)/src
/notify.c
$(HDR
)
927 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/notify.c
929 pager.lo
: $(TOP
)/src
/pager.c
$(HDR
) $(TOP
)/src
/pager.h
930 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pager.c
932 pcache.lo
: $(TOP
)/src
/pcache.c
$(HDR
) $(TOP
)/src
/pcache.h
933 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache.c
935 pcache1.lo
: $(TOP
)/src
/pcache1.c
$(HDR
) $(TOP
)/src
/pcache.h
936 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pcache1.c
938 os.lo
: $(TOP
)/src
/os.c
$(HDR
)
939 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os.c
941 os_unix.lo
: $(TOP
)/src
/os_unix.c
$(HDR
)
942 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_unix.c
944 os_win.lo
: $(TOP
)/src
/os_win.c
$(HDR
)
945 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/os_win.c
947 pragma.lo
: $(TOP
)/src
/pragma.c
$(HDR
)
948 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/pragma.c
950 prepare.lo
: $(TOP
)/src
/prepare.c
$(HDR
)
951 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/prepare.c
953 printf.lo
: $(TOP
)/src
/printf.c
$(HDR
)
954 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/printf.c
956 random.lo
: $(TOP
)/src
/random.c
$(HDR
)
957 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/random.c
959 resolve.lo
: $(TOP
)/src
/resolve.c
$(HDR
)
960 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/resolve.c
962 rowset.lo
: $(TOP
)/src
/rowset.c
$(HDR
)
963 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/rowset.c
965 select.lo
: $(TOP
)/src
/select.c
$(HDR
)
966 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/select.c
968 status.lo
: $(TOP
)/src
/status.c
$(HDR
)
969 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/status.c
971 table.lo
: $(TOP
)/src
/table.c
$(HDR
)
972 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/table.c
974 threads.lo
: $(TOP
)/src
/threads.c
$(HDR
)
975 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/threads.c
977 tokenize.lo
: $(TOP
)/src
/tokenize.c keywordhash.h
$(HDR
)
978 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/tokenize.c
980 treeview.lo
: $(TOP
)/src
/treeview.c
$(HDR
)
981 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/treeview.c
983 trigger.lo
: $(TOP
)/src
/trigger.c
$(HDR
)
984 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/trigger.c
986 update.lo
: $(TOP
)/src
/update.c
$(HDR
)
987 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/update.c
989 upsert.lo
: $(TOP
)/src
/upsert.c
$(HDR
)
990 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/upsert.c
992 utf.lo
: $(TOP
)/src
/utf.c
$(HDR
)
993 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/utf.c
995 util.lo
: $(TOP
)/src
/util.c
$(HDR
)
996 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/util.c
998 vacuum.lo
: $(TOP
)/src
/vacuum.c
$(HDR
)
999 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vacuum.c
1001 vdbe.lo
: $(TOP
)/src
/vdbe.c
$(HDR
)
1002 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbe.c
1004 vdbeapi.lo
: $(TOP
)/src
/vdbeapi.c
$(HDR
)
1005 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeapi.c
1007 vdbeaux.lo
: $(TOP
)/src
/vdbeaux.c
$(HDR
)
1008 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeaux.c
1010 vdbeblob.lo
: $(TOP
)/src
/vdbeblob.c
$(HDR
)
1011 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbeblob.c
1013 vdbemem.lo
: $(TOP
)/src
/vdbemem.c
$(HDR
)
1014 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbemem.c
1016 vdbesort.lo
: $(TOP
)/src
/vdbesort.c
$(HDR
)
1017 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbesort.c
1019 vdbetrace.lo
: $(TOP
)/src
/vdbetrace.c
$(HDR
)
1020 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbetrace.c
1022 vdbevtab.lo
: $(TOP
)/src
/vdbevtab.c
$(HDR
)
1023 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vdbevtab.c
1025 vtab.lo
: $(TOP
)/src
/vtab.c
$(HDR
)
1026 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/vtab.c
1028 wal.lo
: $(TOP
)/src
/wal.c
$(HDR
)
1029 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wal.c
1031 walker.lo
: $(TOP
)/src
/walker.c
$(HDR
)
1032 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/walker.c
1034 where.lo
: $(TOP
)/src
/where.c
$(HDR
)
1035 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/where.c
1037 wherecode.lo
: $(TOP
)/src
/wherecode.c
$(HDR
)
1038 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/wherecode.c
1040 whereexpr.lo
: $(TOP
)/src
/whereexpr.c
$(HDR
)
1041 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/whereexpr.c
1043 window.lo
: $(TOP
)/src
/window.c
$(HDR
)
1044 $(LTCOMPILE
) $(TEMP_STORE
) -c
$(TOP
)/src
/window.c
1046 tclsqlite.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
1047 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -c
$(TOP
)/src
/tclsqlite.c
1049 tclsqlite-shell.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
1050 $(LTCOMPILE
) -DTCLSH
-o
$@
-c
$(TOP
)/src
/tclsqlite.c
1052 tclsqlite-stubs.lo
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
1053 $(LTCOMPILE
) -DUSE_TCL_STUBS
=1 -o
$@
-c
$(TOP
)/src
/tclsqlite.c
1055 tclsqlite3
$(TEXE
): tclsqlite-shell.lo libsqlite3.la
1056 $(LTLINK
) -o
$@ tclsqlite-shell.lo \
1057 libsqlite3.la
$(LIBTCL
)
1059 # Rules to build opcodes.c and opcodes.h
1061 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
1062 $(TCLSH_CMD
) $(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
1064 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
1065 cat parse.h
$(TOP
)/src
/vdbe.c |
$(TCLSH_CMD
) $(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
1067 # Rules to build parse.c and parse.h - the outputs of lemon.
1071 parse.c
: $(TOP
)/src
/parse.y lemon
$(BEXE
)
1072 cp
$(TOP
)/src
/parse.y .
1073 .
/lemon
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) -S parse.y
1075 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(BEXE
) $(TOP
)/VERSION
1076 $(TCLSH_CMD
) $(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
1078 sqlite3rc.h
: $(TOP
)/src
/sqlite3.rc
$(TOP
)/VERSION
1079 echo
'#ifndef SQLITE_RESOURCE_VERSION' >$@
1080 echo
-n
'#define SQLITE_RESOURCE_VERSION ' >>$@
1081 cat
$(TOP
)/VERSION |
$(TCLSH_CMD
) $(TOP
)/tool
/replace.tcl exact .
, >>$@
1082 echo
'#endif' >>sqlite3rc.h
1084 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
1085 $(BCC
) -o mkkeywordhash
$(BEXE
) $(OPT_FEATURE_FLAGS
) $(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
1086 .
/mkkeywordhash
$(BEXE
) >keywordhash.h
1088 # Source files that go into making shell.c
1090 $(TOP
)/src
/shell.c.in \
1091 $(TOP
)/ext
/misc
/appendvfs.c \
1092 $(TOP
)/ext
/misc
/completion.c \
1093 $(TOP
)/ext
/misc
/decimal.c \
1094 $(TOP
)/ext
/misc
/fileio.c \
1095 $(TOP
)/ext
/misc
/ieee754.c \
1096 $(TOP
)/ext
/misc
/regexp.c \
1097 $(TOP
)/ext
/misc
/series.c \
1098 $(TOP
)/ext
/misc
/shathree.c \
1099 $(TOP
)/ext
/misc
/sqlar.c \
1100 $(TOP
)/ext
/misc
/uint.c \
1101 $(TOP
)/ext
/expert
/sqlite3expert.c \
1102 $(TOP
)/ext
/expert
/sqlite3expert.h \
1103 $(TOP
)/ext
/misc
/zipfile.c \
1104 $(TOP
)/ext
/misc
/memtrace.c \
1105 $(TOP
)/src
/test_windirent.c
1107 shell.c
: $(SHELL_SRC
) $(TOP
)/tool
/mkshellc.tcl
1108 $(TCLSH_CMD
) $(TOP
)/tool
/mkshellc.tcl
>shell.c
1113 # Rules to build the extension objects.
1115 icu.lo
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
1116 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
1118 fts2.lo
: $(TOP
)/ext
/fts2
/fts2.c
$(HDR
) $(EXTHDR
)
1119 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2.c
1121 fts2_hash.lo
: $(TOP
)/ext
/fts2
/fts2_hash.c
$(HDR
) $(EXTHDR
)
1122 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_hash.c
1124 fts2_icu.lo
: $(TOP
)/ext
/fts2
/fts2_icu.c
$(HDR
) $(EXTHDR
)
1125 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_icu.c
1127 fts2_porter.lo
: $(TOP
)/ext
/fts2
/fts2_porter.c
$(HDR
) $(EXTHDR
)
1128 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_porter.c
1130 fts2_tokenizer.lo
: $(TOP
)/ext
/fts2
/fts2_tokenizer.c
$(HDR
) $(EXTHDR
)
1131 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer.c
1133 fts2_tokenizer1.lo
: $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
$(HDR
) $(EXTHDR
)
1134 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer1.c
1136 fts3.lo
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
1137 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
1139 fts3_aux.lo
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
1140 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
1142 fts3_expr.lo
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
1143 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
1145 fts3_hash.lo
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
1146 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
1148 fts3_icu.lo
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
1149 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
1151 fts3_porter.lo
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
1152 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
1154 fts3_snippet.lo
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
1155 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
1157 fts3_tokenizer.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
1158 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
1160 fts3_tokenizer1.lo
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
1161 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
1163 fts3_tokenize_vtab.lo
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
1164 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
1166 fts3_unicode.lo
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
1167 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
1169 fts3_unicode2.lo
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
1170 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
1172 fts3_write.lo
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
1173 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
1175 rtree.lo
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
1176 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
1178 userauth.lo
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
1179 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
1181 sqlite3session.lo
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
1182 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
1184 stmt.lo
: $(TOP
)/ext
/misc
/stmt.c
1185 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
1190 $(TOP
)/ext
/fts5
/fts5.h \
1191 $(TOP
)/ext
/fts5
/fts5Int.h \
1192 $(TOP
)/ext
/fts5
/fts5_aux.c \
1193 $(TOP
)/ext
/fts5
/fts5_buffer.c \
1194 $(TOP
)/ext
/fts5
/fts5_main.c \
1195 $(TOP
)/ext
/fts5
/fts5_config.c \
1196 $(TOP
)/ext
/fts5
/fts5_expr.c \
1197 $(TOP
)/ext
/fts5
/fts5_hash.c \
1198 $(TOP
)/ext
/fts5
/fts5_index.c \
1199 fts5parse.c fts5parse.h \
1200 $(TOP
)/ext
/fts5
/fts5_storage.c \
1201 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
1202 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
1203 $(TOP
)/ext
/fts5
/fts5_varint.c \
1204 $(TOP
)/ext
/fts5
/fts5_vocab.c \
1206 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
$(BEXE
)
1207 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
1209 .
/lemon
$(BEXE
) $(OPTS
) -S fts5parse.y
1211 fts5parse.h
: fts5parse.c
1214 $(TCLSH_CMD
) $(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
1215 cp
$(TOP
)/ext
/fts5
/fts5.h .
1217 fts5.lo
: fts5.c
$(HDR
) $(EXTHDR
)
1218 $(LTCOMPILE
) -DSQLITE_CORE
-c fts5.c
1220 sqlite3rbu.lo
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
1221 $(LTCOMPILE
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
1224 # Rules to build the 'testfixture' application.
1226 # If using the amalgamation, use sqlite3.c directly to build the test
1227 # fixture. Otherwise link against libsqlite3.la. (This distinction is
1228 # necessary because the test fixture requires non-API symbols which are
1229 # hidden when the library is built via the amalgamation).
1231 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
1232 TESTFIXTURE_FLAGS
+= -DTCLSH_INIT_PROC
=sqlite3TestInit
1233 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
1234 TESTFIXTURE_FLAGS
+= -DBUILD_sqlite
1235 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
1236 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
1237 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
1238 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_DBPAGE_VTAB
1239 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_BYTECODE_VTAB
1240 TESTFIXTURE_FLAGS
+= -DSQLITE_CKSUMVFS_STATIC
1242 TESTFIXTURE_SRC0
= $(TESTSRC2
) libsqlite3.la
1243 TESTFIXTURE_SRC1
= sqlite3.c
1244 TESTFIXTURE_SRC
= $(TESTSRC
) $(TOP
)/src
/tclsqlite.c
1245 TESTFIXTURE_SRC
+= $(TESTFIXTURE_SRC
$(USE_AMALGAMATION
))
1247 testfixture
$(TEXE
): $(TESTFIXTURE_SRC
)
1248 $(LTLINK
) -DSQLITE_NO_SYNC
=1 $(TEMP_STORE
) $(TESTFIXTURE_FLAGS
) \
1249 -o
$@
$(TESTFIXTURE_SRC
) $(LIBTCL
) $(TLIBS
)
1251 coretestprogs
: $(TESTPROGS
)
1253 testprogs
: coretestprogs srcck1
$(BEXE
) fuzzcheck
$(TEXE
) sessionfuzz
$(TEXE
)
1255 # A very detailed test running most or all test cases
1256 fulltest
: alltest fuzztest
1258 # Run most or all tcl test cases
1259 alltest
: $(TESTPROGS
)
1260 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
1262 # Really really long testing
1263 soaktest
: $(TESTPROGS
)
1264 .
/testfixture
$(TEXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
1266 # Do extra testing but not everything.
1267 fulltestonly
: $(TESTPROGS
) fuzztest
1268 .
/testfixture
$(TEXE
) $(TOP
)/test/full.
test
1271 fuzztest
: fuzzcheck
$(TEXE
) $(FUZZDATA
) sessionfuzz
$(TEXE
) $(TOP
)/test/sessionfuzz-data1.db
1272 .
/fuzzcheck
$(TEXE
) $(FUZZDATA
)
1273 .
/sessionfuzz
$(TEXE
) run
$(TOP
)/test/sessionfuzz-data1.db
1275 valgrindfuzz
: fuzzcheck
$(TEXT
) $(FUZZDATA
) sessionfuzz
$(TEXE
) $(TOP
)/test/sessionfuzz-data1.db
1276 valgrind .
/fuzzcheck
$(TEXE
) --cell-size-check
--limit-mem
10M
$(FUZZDATA
)
1277 valgrind .
/sessionfuzz
$(TEXE
) run
$(TOP
)/test/sessionfuzz-data1.db
1279 # The veryquick.test TCL tests.
1281 tcltest
: .
/testfixture
$(TEXE
)
1282 .
/testfixture
$(TEXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
1284 # Minimal testing that runs in less than 3 minutes
1286 quicktest
: .
/testfixture
$(TEXE
)
1287 .
/testfixture
$(TEXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
1289 # This is the common case. Run many tests that do not take too long,
1290 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
1292 test: fuzztest sourcetest
$(TESTPROGS
) tcltest
1294 # Run a test using valgrind. This can take a really long time
1295 # because valgrind is so much slower than a native machine.
1297 valgrindtest
: $(TESTPROGS
) valgrindfuzz
1298 OMIT_MISUSE
=1 valgrind
-v .
/testfixture
$(TEXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
1300 # A very fast test that checks basic sanity. The name comes from
1301 # the 60s-era electronics testing: "Turn it on and see if smoke
1304 smoketest
: $(TESTPROGS
) fuzzcheck
$(TEXE
)
1305 .
/testfixture
$(TEXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
1307 shelltest
: $(TESTPROGS
)
1308 .
/testfixture
$(TEXT
) $(TOP
)/test/permutations.
test shell
1310 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
1311 $(TCLSH_CMD
) $(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
>sqlite3_analyzer.c
1313 sqlite3_analyzer
$(TEXE
): sqlite3_analyzer.c
1314 $(LTLINK
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1316 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
1317 $(TCLSH_CMD
) $(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqltclsh.c.in
>sqltclsh.c
1319 sqltclsh
$(TEXE
): sqltclsh.c
1320 $(LTLINK
) sqltclsh.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1322 sqlite3_expert
$(TEXE
): $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
1323 $(LTLINK
) $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
-o sqlite3_expert
$(TLIBS
)
1326 $(TOP
)/tool
/mkccode.tcl \
1328 $(TOP
)/src
/tclsqlite.c \
1329 $(TOP
)/ext
/repair
/sqlite3_checker.tcl \
1330 $(TOP
)/ext
/repair
/checkindex.c \
1331 $(TOP
)/ext
/repair
/checkfreelist.c \
1332 $(TOP
)/ext
/misc
/btreeinfo.c \
1333 $(TOP
)/ext
/repair
/sqlite3_checker.c.in
1335 sqlite3_checker.c
: $(CHECKER_DEPS
)
1336 $(TCLSH_CMD
) $(TOP
)/tool
/mkccode.tcl
$(TOP
)/ext
/repair
/sqlite3_checker.c.in
>$@
1338 sqlite3_checker
$(TEXE
): sqlite3_checker.c
1339 $(LTLINK
) sqlite3_checker.c
-o
$@
$(LIBTCL
) $(TLIBS
)
1341 dbdump
$(TEXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.lo
1342 $(LTLINK
) -DDBDUMP_STANDALONE
-o
$@ \
1343 $(TOP
)/ext
/misc
/dbdump.c sqlite3.lo
$(TLIBS
)
1345 dbtotxt
$(TEXE
): $(TOP
)/tool
/dbtotxt.c
1346 $(LTLINK
)-o
$@
$(TOP
)/tool
/dbtotxt.c
1348 showdb
$(TEXE
): $(TOP
)/tool
/showdb.c sqlite3.lo
1349 $(LTLINK
) -o
$@
$(TOP
)/tool
/showdb.c sqlite3.lo
$(TLIBS
)
1351 showstat4
$(TEXE
): $(TOP
)/tool
/showstat4.c sqlite3.lo
1352 $(LTLINK
) -o
$@
$(TOP
)/tool
/showstat4.c sqlite3.lo
$(TLIBS
)
1354 showjournal
$(TEXE
): $(TOP
)/tool
/showjournal.c sqlite3.lo
1355 $(LTLINK
) -o
$@
$(TOP
)/tool
/showjournal.c sqlite3.lo
$(TLIBS
)
1357 showwal
$(TEXE
): $(TOP
)/tool
/showwal.c sqlite3.lo
1358 $(LTLINK
) -o
$@
$(TOP
)/tool
/showwal.c sqlite3.lo
$(TLIBS
)
1360 showshm
$(TEXE
): $(TOP
)/tool
/showshm.c
1361 $(LTLINK
) -o
$@
$(TOP
)/tool
/showshm.c
1363 index_usage
$(TEXE
): $(TOP
)/tool
/index_usage.c sqlite3.lo
1364 $(LTLINK
) $(SHELL_OPT
) -o
$@
$(TOP
)/tool
/index_usage.c sqlite3.lo
$(TLIBS
)
1366 changeset
$(TEXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.lo
1367 $(LTLINK
) -o
$@
$(TOP
)/ext
/session
/changeset.c sqlite3.lo
$(TLIBS
)
1369 changesetfuzz
$(TEXE
): $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.lo
1370 $(LTLINK
) -o
$@
$(TOP
)/ext
/session
/changesetfuzz.c sqlite3.lo
$(TLIBS
)
1372 rollback-test
$(TEXE
): $(TOP
)/tool
/rollback-test.c sqlite3.lo
1373 $(LTLINK
) -o
$@
$(TOP
)/tool
/rollback-test.c sqlite3.lo
$(TLIBS
)
1375 atrc
$(TEXX
): $(TOP
)/test/atrc.c sqlite3.lo
1376 $(LTLINK
) -o
$@
$(TOP
)/test/atrc.c sqlite3.lo
$(TLIBS
)
1378 LogEst
$(TEXE
): $(TOP
)/tool
/logest.c sqlite3.h
1379 $(LTLINK
) -I.
-o
$@
$(TOP
)/tool
/logest.c
1381 wordcount
$(TEXE
): $(TOP
)/test/wordcount.c sqlite3.lo
1382 $(LTLINK
) -o
$@
$(TOP
)/test/wordcount.c sqlite3.lo
$(TLIBS
)
1384 speedtest1
$(TEXE
): $(TOP
)/test/speedtest1.c sqlite3.c
1385 $(LTLINK
) $(ST_OPT
) -o
$@
$(TOP
)/test/speedtest1.c sqlite3.c
$(TLIBS
)
1387 startup
$(TEXE
): $(TOP
)/test/startup.c sqlite3.c
1388 $(CC
) -Os
-g
-DSQLITE_THREADSAFE
=0 -o
$@
$(TOP
)/test/startup.c sqlite3.c
$(TLIBS
)
1390 KV_OPT
+= -DSQLITE_DIRECT_OVERFLOW_READ
1392 kvtest
$(TEXE
): $(TOP
)/test/kvtest.c sqlite3.c
1393 $(LTLINK
) $(KV_OPT
) -o
$@
$(TOP
)/test/kvtest.c sqlite3.c
$(TLIBS
)
1395 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.lo
1396 $(LTLINK
) -I.
-o
$@
$(TOP
)/ext
/rbu
/rbu.c sqlite3.lo
$(TLIBS
)
1398 loadfts
$(EXE
): $(TOP
)/tool
/loadfts.c libsqlite3.la
1399 $(LTLINK
) $(TOP
)/tool
/loadfts.c libsqlite3.la
-o
$@
$(TLIBS
)
1401 # This target will fail if the SQLite amalgamation contains any exported
1402 # symbols that do not begin with "sqlite3_". It is run as part of the
1403 # releasetest.tcl script.
1405 VALIDIDS
=' sqlite3(changeset|changegroup|session)?_'
1406 checksymbols
: sqlite3.o
1407 nm
-g
--defined-only sqlite3.o
1408 nm
-g
--defined-only sqlite3.o | egrep
-v
$(VALIDIDS
); test $$?
-ne
0
1409 echo
'0 errors out of 1 tests'
1411 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1412 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1413 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1415 amalgamation-tarball
: sqlite3.c sqlite3rc.h
1416 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1418 snapshot-tarball
: sqlite3.c sqlite3rc.h
1419 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1421 # The next two rules are used to support the "threadtest" target. Building
1422 # threadtest runs a few thread-safety tests that are implemented in C. This
1423 # target is invoked by the releasetest.tcl script.
1425 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
1426 $(TOP
)/test/tt3_checkpoint.c \
1427 $(TOP
)/test/tt3_index.c \
1428 $(TOP
)/test/tt3_vacuum.c \
1429 $(TOP
)/test/tt3_stress.c \
1430 $(TOP
)/test/tt3_lookaside1.c
1432 threadtest3
$(TEXE
): sqlite3.lo
$(THREADTEST3_SRC
)
1433 $(LTLINK
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.lo
-o
$@
$(TLIBS
)
1435 threadtest
: threadtest3
$(TEXE
)
1436 .
/threadtest3
$(TEXE
)
1438 threadtest5
: sqlite3.c
$(TOP
)/test/threadtest5.c
1439 $(LTLINK
) $(TOP
)/test/threadtest5.c sqlite3.c
-o
$@
$(TLIBS
)
1442 $(TCLSH_CMD
) $(TOP
)/test/releasetest.tcl
1444 # Standard install and cleanup targets
1446 lib_install
: libsqlite3.la
1447 $(INSTALL
) -d
$(DESTDIR
)$(libdir)
1448 $(LTINSTALL
) libsqlite3.la
$(DESTDIR
)$(libdir)
1450 install: sqlite3
$(TEXE
) lib_install sqlite3.h sqlite3.
pc ${HAVE_TCL
:1=tcl_install
}
1451 $(INSTALL
) -d
$(DESTDIR
)$(bindir)
1452 $(LTINSTALL
) sqlite3
$(TEXE
) $(DESTDIR
)$(bindir)
1453 $(INSTALL
) -d
$(DESTDIR
)$(includedir)
1454 $(INSTALL
) -m
0644 sqlite3.h
$(DESTDIR
)$(includedir)
1455 $(INSTALL
) -m
0644 $(TOP
)/src
/sqlite3ext.h
$(DESTDIR
)$(includedir)
1456 $(INSTALL
) -d
$(DESTDIR
)$(pkgconfigdir
)
1457 $(INSTALL
) -m
0644 sqlite3.
pc $(DESTDIR
)$(pkgconfigdir
)
1460 echo
'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
1461 tcl_install
: lib_install libtclsqlite3.la pkgIndex.tcl
1462 $(INSTALL
) -d
$(DESTDIR
)$(TCLLIBDIR
)
1463 $(LTINSTALL
) libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)
1464 rm -f
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.la
$(DESTDIR
)$(TCLLIBDIR
)/libtclsqlite3.a
1465 $(INSTALL
) -m
0644 pkgIndex.tcl
$(DESTDIR
)$(TCLLIBDIR
)
1468 rm -f
*.lo
*.la
*.o sqlite3
$(TEXE
) libsqlite3.la
1469 rm -f sqlite3.h opcodes.
*
1471 rm -f lemon
$(BEXE
) lempar.c parse.
* sqlite
*.
tar.gz
1472 rm -f mkkeywordhash
$(BEXE
) keywordhash.h
1473 rm -f
*.da
*.bb
*.bbg gmon.out
1474 rm -rf tsrc .target_source
1475 rm -f tclsqlite3
$(TEXE
)
1476 rm -f testfixture
$(TEXE
) test.db
1477 rm -f LogEst
$(TEXE
) fts3view
$(TEXE
) rollback-test
$(TEXE
) showdb
$(TEXE
)
1478 rm -f showjournal
$(TEXE
) showstat4
$(TEXE
) showwal
$(TEXE
) speedtest1
$(TEXE
)
1479 rm -f wordcount
$(TEXE
) changeset
$(TEXE
)
1480 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
1483 rm -f
shell.c sqlite3ext.h
1484 rm -f sqlite3_analyzer
$(TEXE
) sqlite3_analyzer.c
1485 rm -f sqlite-
*-output.vsix
1486 rm -f mptester mptester.exe
1488 rm -f srcck1 srcck1.exe
1489 rm -f fuzzershell fuzzershell.exe
1490 rm -f fuzzcheck fuzzcheck.exe
1491 rm -f sqldiff sqldiff.exe
1492 rm -f dbhash dbhash.exe
1493 rm -f fts5.
* fts5parse.
*
1497 rm -f config.h config.log config.status libtool Makefile sqlite3.
pc
1504 REAL_LIBOBJ
= $(LIBOBJ
:%.lo
=.libs
/%.o
)
1506 $(REAL_LIBOBJ
): $(LIBOBJ
)
1508 sqlite3.def
: $(REAL_LIBOBJ
)
1509 echo
'EXPORTS' >sqlite3.def
1510 nm
$(REAL_LIBOBJ
) | grep
' T ' | grep
' _sqlite3_' \
1511 | sed
's/^.* _//' >>sqlite3.def
1513 sqlite3.dll
: $(REAL_LIBOBJ
) sqlite3.def
1514 $(TCC
) -shared
-o
$@ sqlite3.def \
1515 -Wl
,"--strip-all" $(REAL_LIBOBJ
)
1519 # fiddle/wasm section
1521 fiddle_dir
= ext
/fiddle
1522 fiddle_dir_abs
= $(TOP
)/$(fiddle_dir
)
1523 # ^^^ some emcc opts require absolute paths
1524 fiddle_html
= $(fiddle_dir
)/fiddle.html
1525 fiddle_module_js
= $(fiddle_dir
)/fiddle-module.js
1526 sqlite3_wasm_js
= $(fiddle_dir
)/sqlite3.js
1527 sqlite3_wasm
= $(fiddle_dir
)/sqlite3.wasm
1533 emcc_flags
= $(emcc_opt
) -sALLOW_TABLE_GROWTH
-sSTRICT_JS \
1534 -sENVIRONMENT
=web
-sMODULARIZE \
1535 -sEXPORTED_RUNTIME_METHODS
=@
$(fiddle_dir_abs
)/EXPORTED_RUNTIME_METHODS \
1536 -sDYNAMIC_EXECUTION
=0 \
1538 $(fiddle_module_js
): Makefile sqlite3.c
shell.c \
1539 $(fiddle_dir
)/EXPORTED_RUNTIME_METHODS \
1540 $(fiddle_dir
)/EXPORTED_FUNCTIONS.fiddle
1541 emcc
-o
$@
$(emcc_flags
) \
1542 -sEXPORT_NAME
=initFiddleModule \
1543 -sEXPORTED_FUNCTIONS
=@
$(fiddle_dir_abs
)/EXPORTED_FUNCTIONS.fiddle \
1546 gzip
< $(fiddle_dir
)/fiddle-module.wasm
> $(fiddle_dir
)/fiddle-module.wasm.gz
1547 $(sqlite3_wasm_js
): Makefile sqlite3.c \
1548 $(fiddle_dir
)/sqlite3-api.js \
1549 $(fiddle_dir
)/EXPORTED_RUNTIME_METHODS \
1550 $(fiddle_dir
)/EXPORTED_FUNCTIONS.sqlite3-api
1551 emcc
-o
$@
$(emcc_flags
) \
1552 -sEXPORT_NAME
=initSqlite3Module \
1553 -sEXPORTED_FUNCTIONS
=@
$(fiddle_dir_abs
)/EXPORTED_FUNCTIONS.sqlite3-api \
1554 --post-js
=$(fiddle_dir
)/sqlite3-api.js \
1558 gzip
< $(sqlite3_wasm
) > $(sqlite3_wasm
).gz
1559 gzip
< $(fiddle_dir
)/sqlite3-api.js
> $(fiddle_dir
)/sqlite3-api.js.gz
1560 $(fiddle_dir
)/fiddle.js.gz
: $(fiddle_dir
)/fiddle.js
1562 $(fiddle_dir
)/sqlite3-api.js.gz
: $(fiddle_dir
)/sqlite3-api.js
1565 fiddle_generated
= $(fiddle_module_js
) $(fiddle_module_js
).gz \
1566 $(fiddle_dir
)/fiddle-module.wasm \
1567 $(fiddle_dir
)/fiddle-module.wasm.gz \
1568 $(fiddle_dir
)/fiddle.js.gz
1569 sqlite3_wasm_generated
= \
1570 $(sqlite3_wasm
) $(sqlite3_wasm
).gz \
1571 $(sqlite3_wasm_js
) $(sqlite3_wasm_js
).gz \
1572 $(fiddle_dir
)/sqlite3.js.gz \
1573 $(fiddle_dir
)/sqlite3-api.js.gz
1576 rm -f
$(fiddle_generated
) $(sqlite3_wasm_generated
)
1578 fiddle
: $(fiddle_module_js
) $(fiddle_dir
)/fiddle.js.gz
1579 sqlite3-wasm
: $(sqlite3_wasm_js
)
1580 wasm
: fiddle sqlite3-wasm
1581 ########################################################################
1582 # Explanation of the emcc build flags follows. Full docs for these can
1585 # https://github.com/emscripten-core/emscripten/blob/main/src/settings.js
1587 # -sENVIRONMENT=web: elides bootstrap code related to non-web JS
1588 # environments like node.js. Removing this makes the output a tiny
1589 # tick larger but hypothetically makes it more portable to
1590 # non-browser JS environments.
1592 # -sMODULARIZE: changes how the generated code is structured to avoid
1593 # declaring a global Module object and instead installing a function
1594 # which loads and initialized the module. The function is named...
1596 # -sEXPORT_NAME=jsFunctionName (see -sMODULARIZE)
1598 # -sEXPORTED_RUNTIME_METHODS=@/absolute/path/to/file: a file
1599 # containing a list of emscripten-supplied APIs, one per line, which
1600 # must be exported into the generated JS. Must be an absolute path!
1602 # -sEXPORTED_FUNCTIONS=@/absolute/path/to/file: a file containing a
1603 # list of C functions, one per line, which must be exported via wasm
1604 # so they're visible to JS. C symbols names in that file must all
1605 # start with an underscore for reasons known only to the emcc
1606 # developers. e.g., _sqlite3_open_v2 and _sqlite3_finalize. Must be
1609 # -sSTRICT_JS ensures that the emitted JS code includes the 'use
1610 # strict' option. Note that -sSTRICT is more broadly-scoped and
1611 # results in build errors.
1613 # -sALLOW_TABLE_GROWTH is required for (at a minimum) the UDF-binding
1616 # -sDYNAMIC_EXECUTION=0 disables eval() and the Function constructor.
1617 # If the build runs without these, it's preferable to use this flag
1618 # because certain execution environments disallow those constructs.
1619 # This flag is not strictly necessary, however.
1621 # -sWASM_BIGINT is UNTESTED but "should" allow the int64-using C APIs
1622 # to work with JS/wasm, insofar as the JS environment supports the
1623 # BigInt type. That support requires an extremely recent browser:
1624 # Safari didn't get that support until late 2020.
1626 # --no-entry: for compiling library code with no main(). If this is
1627 # not supplied and the code has a main(), it is called as part of the
1628 # module init process. Note that main() is #if'd out of shell.c
1629 # (renamed) when building in wasm mode.
1631 # --pre-js/--post-js=FILE relative or absolute paths to JS files to
1632 # prepend/append to the emcc-generated bootstrapping JS. It's
1633 # easier/faster to develop with separate JS files (reduces rebuilding
1634 # requirements) but certain configurations, namely -sMODULARIZE, may
1635 # require using at least a --pre-js file. They can be used
1636 # individually and need not be paired.
1638 # -O0..-O3 and -Oz: optimization levels affect not only C-style
1639 # optimization but whether or not the resulting generated JS code
1640 # gets minified. -O0 compiles _much_ more quickly than -O3 or -Oz,
1641 # and doesn't minimize any JS code, so is recommended for
1642 # development. -O3 or -Oz are recommended for deployment, but
1643 # primarily because -Oz will shrink the wasm file notably. JS-side
1644 # minification makes little difference in terms of overall
1645 # distributable size.
1646 ########################################################################