2 ###############################################################################
3 # The following macros should be defined before this script is
6 # TOP The toplevel directory of the source tree. This is the
7 # directory that contains this "Makefile.in" and the
8 # "configure.in" script.
10 # BCC C Compiler and options for use in building executables that
11 # will run on the platform that is doing the build.
13 # THREADLIB Specify any extra linker options needed to make the library
16 # LIBS Extra libraries options
18 # OPTS Extra compiler command-line options.
20 # EXE The suffix to add to executable files. ".exe" for windows
23 # TCC C Compiler and options for use in building executables that
24 # will run on the target platform. This is usually the same
25 # as BCC, unless you are cross-compiling.
27 # AR Tools used to build a static library.
30 # TCL_FLAGS Extra compiler options needed for programs that use the
33 # LIBTCL Linker options needed to link against the TCL library.
35 # READLINE_FLAGS Compiler options needed for programs that use the
38 # LIBREADLINE Linker options needed by programs using readline() must
41 # Once the macros above are defined, the rest of this make script will
42 # build the SQLite library and testing tools.
43 ################################################################################
45 # This is how we compile
47 TCCX
= $(TCC
) $(OPTS
) -I.
-I
$(TOP
)/src
-I
$(TOP
)
48 TCCX
+= -I
$(TOP
)/ext
/rtree
-I
$(TOP
)/ext
/icu
-I
$(TOP
)/ext
/fts3
49 TCCX
+= -I
$(TOP
)/ext
/async
-I
$(TOP
)/ext
/userauth
50 TCCX
+= -I
$(TOP
)/ext
/session
51 TCCX
+= -I
$(TOP
)/ext
/fts5
54 # Object files for the SQLite library.
56 LIBOBJ
+= vdbe.o parse.o \
57 alter.o analyze.o attach.o auth.o \
58 backup.o bitvec.o btmutex.o btree.o build.o \
59 callback.o complete.o ctime.o \
60 date.o dbpage.o dbstat.o delete.o expr.o \
62 fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
63 fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \
64 fts3_tokenize_vtab.o \
65 fts3_unicode.o fts3_unicode2.o \
66 fts3_write.o fts5.o func.o global.o hash.o \
67 icu.o insert.o json.o legacy.o loadext.o \
68 main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
69 memdb.o memjournal.o \
70 mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
71 notify.o opcodes.o os.o os_kv.o os_unix.o os_win.o \
72 pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \
73 random.o resolve.o rowset.o rtree.o \
74 select.o sqlite3rbu.o status.o stmt.o \
75 table.o threads.o tokenize.o treeview.o trigger.o \
76 update.o upsert.o userauth.o util.o vacuum.o \
77 vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \
78 vdbetrace.o vdbevtab.o \
79 wal.o walker.o where.o wherecode.o whereexpr.o \
82 LIBOBJ
+= sqlite3session.o
84 # All of the source code files.
88 $(TOP
)/src
/analyze.c \
93 $(TOP
)/src
/btmutex.c \
96 $(TOP
)/src
/btreeInt.h \
98 $(TOP
)/src
/callback.c \
99 $(TOP
)/src
/complete.c \
102 $(TOP
)/src
/dbpage.c \
103 $(TOP
)/src
/dbstat.c \
104 $(TOP
)/src
/delete.c \
109 $(TOP
)/src
/global.c \
112 $(TOP
)/src
/hwtime.h \
113 $(TOP
)/src
/insert.c \
115 $(TOP
)/src
/legacy.c \
116 $(TOP
)/src
/loadext.c \
118 $(TOP
)/src
/malloc.c \
125 $(TOP
)/src
/memjournal.c \
129 $(TOP
)/src
/mutex_noop.c \
130 $(TOP
)/src
/mutex_unix.c \
131 $(TOP
)/src
/mutex_w32.c \
132 $(TOP
)/src
/notify.c \
135 $(TOP
)/src
/os_common.h \
136 $(TOP
)/src
/os_setup.h \
138 $(TOP
)/src
/os_unix.c \
139 $(TOP
)/src
/os_win.c \
140 $(TOP
)/src
/os_win.h \
144 $(TOP
)/src
/pcache.c \
145 $(TOP
)/src
/pcache.h \
146 $(TOP
)/src
/pcache1.c \
147 $(TOP
)/src
/pragma.c \
148 $(TOP
)/src
/pragma.h \
149 $(TOP
)/src
/prepare.c \
150 $(TOP
)/src
/printf.c \
151 $(TOP
)/src
/random.c \
152 $(TOP
)/src
/resolve.c \
153 $(TOP
)/src
/rowset.c \
154 $(TOP
)/src
/select.c \
155 $(TOP
)/src
/status.c \
156 $(TOP
)/src
/shell.c.in \
157 $(TOP
)/src
/sqlite.h.in \
158 $(TOP
)/src
/sqlite3ext.h \
159 $(TOP
)/src
/sqliteInt.h \
160 $(TOP
)/src
/sqliteLimit.h \
162 $(TOP
)/src
/tclsqlite.c \
163 $(TOP
)/src
/threads.c \
164 $(TOP
)/src
/tokenize.c \
165 $(TOP
)/src
/treeview.c \
166 $(TOP
)/src
/trigger.c \
168 $(TOP
)/src
/update.c \
169 $(TOP
)/src
/upsert.c \
171 $(TOP
)/src
/vacuum.c \
174 $(TOP
)/src
/vdbeapi.c \
175 $(TOP
)/src
/vdbeaux.c \
176 $(TOP
)/src
/vdbeblob.c \
177 $(TOP
)/src
/vdbemem.c \
178 $(TOP
)/src
/vdbesort.c \
179 $(TOP
)/src
/vdbetrace.c \
180 $(TOP
)/src
/vdbevtab.c \
181 $(TOP
)/src
/vdbeInt.h \
183 $(TOP
)/src
/vxworks.h \
186 $(TOP
)/src
/walker.c \
188 $(TOP
)/src
/wherecode.c \
189 $(TOP
)/src
/whereexpr.c \
190 $(TOP
)/src
/whereInt.h \
193 # Source code for extensions
196 $(TOP
)/ext
/fts3
/fts3.c \
197 $(TOP
)/ext
/fts3
/fts3.h \
198 $(TOP
)/ext
/fts3
/fts3Int.h \
199 $(TOP
)/ext
/fts3
/fts3_aux.c \
200 $(TOP
)/ext
/fts3
/fts3_expr.c \
201 $(TOP
)/ext
/fts3
/fts3_hash.c \
202 $(TOP
)/ext
/fts3
/fts3_hash.h \
203 $(TOP
)/ext
/fts3
/fts3_icu.c \
204 $(TOP
)/ext
/fts3
/fts3_porter.c \
205 $(TOP
)/ext
/fts3
/fts3_snippet.c \
206 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
207 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
208 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
209 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
210 $(TOP
)/ext
/fts3
/fts3_unicode.c \
211 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
212 $(TOP
)/ext
/fts3
/fts3_write.c
214 $(TOP
)/ext
/icu
/sqliteicu.h \
217 $(TOP
)/ext
/rtree
/sqlite3rtree.h \
218 $(TOP
)/ext
/rtree
/rtree.h \
219 $(TOP
)/ext
/rtree
/rtree.c \
220 $(TOP
)/ext
/rtree
/geopoly.c
222 $(TOP
)/ext
/session
/sqlite3session.c \
223 $(TOP
)/ext
/session
/sqlite3session.h
225 $(TOP
)/ext
/userauth
/userauth.c \
226 $(TOP
)/ext
/userauth
/sqlite3userauth.h
228 $(TOP
)/ext
/rbu
/sqlite3rbu.c \
229 $(TOP
)/ext
/rbu
/sqlite3rbu.h
231 $(TOP
)/ext
/misc
/stmt.c
237 $(TOP
)/ext
/fts5
/fts5.h \
238 $(TOP
)/ext
/fts5
/fts5Int.h \
242 $(TOP
)/ext
/fts5
/fts5_aux.c \
243 $(TOP
)/ext
/fts5
/fts5_buffer.c \
244 $(TOP
)/ext
/fts5
/fts5_main.c \
245 $(TOP
)/ext
/fts5
/fts5_config.c \
246 $(TOP
)/ext
/fts5
/fts5_expr.c \
247 $(TOP
)/ext
/fts5
/fts5_hash.c \
248 $(TOP
)/ext
/fts5
/fts5_index.c \
250 $(TOP
)/ext
/fts5
/fts5_storage.c \
251 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
252 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
253 $(TOP
)/ext
/fts5
/fts5_varint.c \
254 $(TOP
)/ext
/fts5
/fts5_vocab.c \
257 $(TOP
)/ext
/lsm1
/lsm.h \
258 $(TOP
)/ext
/lsm1
/lsmInt.h \
259 $(TOP
)/ext
/lsm1
/lsm_ckpt.c \
260 $(TOP
)/ext
/lsm1
/lsm_file.c \
261 $(TOP
)/ext
/lsm1
/lsm_log.c \
262 $(TOP
)/ext
/lsm1
/lsm_main.c \
263 $(TOP
)/ext
/lsm1
/lsm_mem.c \
264 $(TOP
)/ext
/lsm1
/lsm_mutex.c \
265 $(TOP
)/ext
/lsm1
/lsm_shared.c \
266 $(TOP
)/ext
/lsm1
/lsm_sorted.c \
267 $(TOP
)/ext
/lsm1
/lsm_str.c \
268 $(TOP
)/ext
/lsm1
/lsm_tree.c \
269 $(TOP
)/ext
/lsm1
/lsm_unix.c \
270 $(TOP
)/ext
/lsm1
/lsm_varint.c \
271 $(TOP
)/ext
/lsm1
/lsm_vtab.c \
272 $(TOP
)/ext
/lsm1
/lsm_win32.c
275 # Generated source code files
287 # Source code to the test files.
290 $(TOP
)/ext
/expert
/sqlite3expert.c \
291 $(TOP
)/ext
/expert
/test_expert.c \
292 $(TOP
)/ext
/fts3
/fts3_term.c \
293 $(TOP
)/ext
/fts3
/fts3_test.c \
294 $(TOP
)/ext
/rbu
/test_rbu.c \
303 $(TOP
)/src
/test_autoext.c \
304 $(TOP
)/src
/test_async.c \
305 $(TOP
)/src
/test_backup.c \
306 $(TOP
)/src
/test_bestindex.c \
307 $(TOP
)/src
/test_blob.c \
308 $(TOP
)/src
/test_btree.c \
309 $(TOP
)/src
/test_config.c \
310 $(TOP
)/src
/test_delete.c \
311 $(TOP
)/src
/test_demovfs.c \
312 $(TOP
)/src
/test_devsym.c \
313 $(TOP
)/src
/test_fs.c \
314 $(TOP
)/src
/test_func.c \
315 $(TOP
)/src
/test_hexio.c \
316 $(TOP
)/src
/test_init.c \
317 $(TOP
)/src
/test_intarray.c \
318 $(TOP
)/src
/test_journal.c \
319 $(TOP
)/src
/test_malloc.c \
320 $(TOP
)/src
/test_md5.c \
321 $(TOP
)/src
/test_multiplex.c \
322 $(TOP
)/src
/test_mutex.c \
323 $(TOP
)/src
/test_onefile.c \
324 $(TOP
)/src
/test_osinst.c \
325 $(TOP
)/src
/test_pcache.c \
326 $(TOP
)/src
/test_quota.c \
327 $(TOP
)/src
/test_rtree.c \
328 $(TOP
)/src
/test_schema.c \
329 $(TOP
)/src
/test_sqllog.c \
330 $(TOP
)/src
/test_superlock.c \
331 $(TOP
)/src
/test_syscall.c \
332 $(TOP
)/src
/test_tclsh.c \
333 $(TOP
)/src
/test_tclvar.c \
334 $(TOP
)/src
/test_thread.c \
335 $(TOP
)/src
/test_vdbecov.c \
336 $(TOP
)/src
/test_vfs.c \
337 $(TOP
)/src
/test_windirent.c \
338 $(TOP
)/src
/test_window.c \
339 $(TOP
)/src
/test_wsd.c
341 # Extensions to be statically loaded.
344 $(TOP
)/ext
/misc
/amatch.c \
345 $(TOP
)/ext
/misc
/appendvfs.c \
346 $(TOP
)/ext
/misc
/basexx.c \
347 $(TOP
)/ext
/misc
/carray.c \
348 $(TOP
)/ext
/misc
/cksumvfs.c \
349 $(TOP
)/ext
/misc
/closure.c \
350 $(TOP
)/ext
/misc
/csv.c \
351 $(TOP
)/ext
/misc
/decimal.c \
352 $(TOP
)/ext
/misc
/eval.c \
353 $(TOP
)/ext
/misc
/explain.c \
354 $(TOP
)/ext
/misc
/fileio.c \
355 $(TOP
)/ext
/misc
/fuzzer.c \
356 $(TOP
)/ext
/misc
/ieee754.c \
357 $(TOP
)/ext
/misc
/mmapwarm.c \
358 $(TOP
)/ext
/misc
/nextchar.c \
359 $(TOP
)/ext
/misc
/normalize.c \
360 $(TOP
)/ext
/misc
/percentile.c \
361 $(TOP
)/ext
/misc
/prefixes.c \
362 $(TOP
)/ext
/misc
/qpvtab.c \
363 $(TOP
)/ext
/misc
/regexp.c \
364 $(TOP
)/ext
/misc
/remember.c \
365 $(TOP
)/ext
/misc
/series.c \
366 $(TOP
)/ext
/misc
/spellfix.c \
367 $(TOP
)/ext
/misc
/totype.c \
368 $(TOP
)/ext
/misc
/unionvtab.c \
369 $(TOP
)/ext
/misc
/wholenumber.c \
370 $(TOP
)/ext
/misc
/zipfile.c \
371 $(TOP
)/ext
/fts5
/fts5_tcl.c \
372 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
373 $(TOP
)/ext
/fts5
/fts5_test_tok.c \
374 $(TOP
)/ext
/rtree
/test_rtreedoc.c \
375 $(TOP
)/ext
/recover
/sqlite3recover.c \
376 $(TOP
)/ext
/recover
/dbdata.c \
377 $(TOP
)/ext
/recover
/test_recover.c
380 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
383 $(TOP
)/src
/attach.c \
384 $(TOP
)/src
/backup.c \
388 $(TOP
)/src
/dbpage.c \
389 $(TOP
)/src
/dbstat.c \
392 $(TOP
)/src
/global.c \
393 $(TOP
)/src
/insert.c \
399 $(TOP
)/src
/os_unix.c \
400 $(TOP
)/src
/os_win.c \
402 $(TOP
)/src
/pragma.c \
403 $(TOP
)/src
/prepare.c \
404 $(TOP
)/src
/printf.c \
405 $(TOP
)/src
/random.c \
406 $(TOP
)/src
/pcache.c \
407 $(TOP
)/src
/pcache1.c \
408 $(TOP
)/src
/select.c \
409 $(TOP
)/src
/threads.c \
410 $(TOP
)/src
/tokenize.c \
411 $(TOP
)/src
/treeview.c \
414 $(TOP
)/src
/vdbeapi.c \
415 $(TOP
)/src
/vdbeaux.c \
417 $(TOP
)/src
/vdbemem.c \
418 $(TOP
)/src
/vdbevtab.c \
420 $(TOP
)/src
/wherecode.c \
421 $(TOP
)/src
/whereexpr.c \
423 $(TOP
)/ext
/fts3
/fts3.c \
424 $(TOP
)/ext
/fts3
/fts3_aux.c \
425 $(TOP
)/ext
/fts3
/fts3_expr.c \
426 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
427 $(TOP
)/ext
/fts3
/fts3_write.c \
428 $(TOP
)/ext
/async
/sqlite3async.c \
429 $(TOP
)/ext
/misc
/stmt.c \
430 $(TOP
)/ext
/session
/sqlite3session.c \
431 $(TOP
)/ext
/session
/test_session.c \
434 # Header files used by all library source files.
438 $(TOP
)/src
/btreeInt.h \
440 $(TOP
)/src
/hwtime.h \
446 $(TOP
)/src
/os_common.h \
447 $(TOP
)/src
/os_setup.h \
448 $(TOP
)/src
/os_win.h \
450 $(TOP
)/src
/pcache.h \
452 $(TOP
)/src
/pragma.h \
454 $(TOP
)/src
/sqlite3ext.h \
455 $(TOP
)/src
/sqliteInt.h \
456 $(TOP
)/src
/sqliteLimit.h \
458 $(TOP
)/src
/vdbeInt.h \
459 $(TOP
)/src
/vxworks.h \
460 $(TOP
)/src
/whereInt.h
462 # Header files used by extensions
465 $(TOP
)/ext
/fts3
/fts3.h \
466 $(TOP
)/ext
/fts3
/fts3Int.h \
467 $(TOP
)/ext
/fts3
/fts3_hash.h \
468 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
470 $(TOP
)/ext
/rtree
/rtree.h \
471 $(TOP
)/ext
/rtree
/geopoly.c
473 $(TOP
)/ext
/icu
/sqliteicu.h
475 $(TOP
)/ext
/fts5
/fts5Int.h \
477 $(TOP
)/ext
/fts5
/fts5.h
479 $(TOP
)/ext
/userauth
/sqlite3userauth.h
481 # executables needed for testing
486 sqlite3_analyzer
$(EXE
) \
487 sqlite3_checker
$(EXE
) \
492 # Databases containing fuzzer test cases
495 $(TOP
)/test/fuzzdata1.db \
496 $(TOP
)/test/fuzzdata2.db \
497 $(TOP
)/test/fuzzdata3.db \
498 $(TOP
)/test/fuzzdata4.db \
499 $(TOP
)/test/fuzzdata5.db \
500 $(TOP
)/test/fuzzdata6.db \
501 $(TOP
)/test/fuzzdata7.db \
502 $(TOP
)/test/fuzzdata8.db
504 # Standard options to testfixture
506 TESTOPTS
= --verbose
=file
--output
=test-out.txt
508 # Extra compiler options for various shell tools
510 SHELL_OPT
+= -DSQLITE_ENABLE_FTS4
-DSQLITE_ENABLE_FTS5
511 SHELL_OPT
+= -DSQLITE_ENABLE_RTREE
512 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
513 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
514 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
515 SHELL_OPT
+= -DSQLITE_ENABLE_DBPAGE_VTAB
516 SHELL_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
517 SHELL_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
518 SHELL_OPT
+= -DSQLITE_ENABLE_OFFSET_SQL_FUNC
519 FUZZCHECK_OPT
+= -I
$(TOP
)/test
520 FUZZCHECK_OPT
+= -I
$(TOP
)/ext
/recover
521 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_MEMSYS5
522 FUZZCHECK_OPT
+= -DSQLITE_MAX_MEMORY
=50000000
523 FUZZCHECK_OPT
+= -DSQLITE_PRINTF_PRECISION_LIMIT
=1000
524 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS4
525 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_RTREE
526 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_GEOPOLY
527 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
528 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
529 FUZZSRC
+= $(TOP
)/test/fuzzcheck.c
530 FUZZSRC
+= $(TOP
)/test/ossfuzz.c
531 FUZZSRC
+= $(TOP
)/test/vt02.c
532 FUZZSRC
+= $(TOP
)/test/fuzzinvariants.c
533 FUZZSRC
+= $(TOP
)/ext
/recover
/dbdata.c
534 FUZZSRC
+= $(TOP
)/ext
/recover
/sqlite3recover.c
536 KV_OPT
= -DSQLITE_THREADSAFE
=0 -DSQLITE_DIRECT_OVERFLOW_READ
537 ST_OPT
= -DSQLITE_THREADSAFE
=0
539 # This is the default Makefile target. The objects listed here
540 # are what get build when you type just "make" with no arguments.
542 all: sqlite3.h sqlite3ext.h libsqlite3.a sqlite3
$(EXE
)
544 libsqlite3.a
: sqlite3.h
$(LIBOBJ
)
545 $(AR
) libsqlite3.a
$(LIBOBJ
)
546 $(RANLIB
) libsqlite3.a
548 sqlite3
$(EXE
): sqlite3.h libsqlite3.a
shell.c
549 $(TCCX
) $(READLINE_FLAGS
) -o sqlite3
$(EXE
) $(SHELL_OPT
) \
550 shell.c libsqlite3.a
$(LIBREADLINE
) $(TLIBS
) $(THREADLIB
)
552 sqldiff
$(EXE
): $(TOP
)/tool
/sqldiff.c sqlite3.c sqlite3.h
553 $(TCCX
) -o sqldiff
$(EXE
) -DSQLITE_THREADSAFE
=0 \
554 $(TOP
)/tool
/sqldiff.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
556 dbhash
$(EXE
): $(TOP
)/tool
/dbhash.c sqlite3.c sqlite3.h
557 $(TCCX
) -o dbhash
$(EXE
) -DSQLITE_THREADSAFE
=0 \
558 $(TOP
)/tool
/dbhash.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
560 scrub
$(EXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.o
561 $(TCC
) -I.
-DSCRUB_STANDALONE
-o scrub
$(EXE
) $(TOP
)/ext
/misc
/scrub.c sqlite3.o
$(THREADLIB
)
563 srcck1
$(EXE
): $(TOP
)/tool
/srcck1.c
564 $(BCC
) -o srcck1
$(EXE
) $(TOP
)/tool
/srcck1.c
566 sourcetest
: srcck1
$(EXE
) sqlite3.c
569 src-verify
: $(TOP
)/tool
/src-verify.c
570 $(BCC
) -o src-verify
$(EXE
) $(TOP
)/tool
/src-verify.c
572 verify-source
: .
/src-verify
575 fuzzershell
$(EXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
576 $(TCCX
) -o fuzzershell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
577 $(FUZZERSHELL_OPT
) $(TOP
)/tool
/fuzzershell.c sqlite3.c \
578 $(TLIBS
) $(THREADLIB
)
580 dbfuzz
$(EXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
581 $(TCCX
) -o dbfuzz
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
582 $(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c \
583 $(TLIBS
) $(THREADLIB
)
586 -DSQLITE_THREADSAFE
=0 \
587 -DSQLITE_OMIT_LOAD_EXTENSION \
589 -DSQLITE_ENABLE_DBSTAT_VTAB \
590 -DSQLITE_ENABLE_BYTECODE_VTAB \
591 -DSQLITE_ENABLE_RTREE \
592 -DSQLITE_ENABLE_FTS4 \
595 dbfuzz2
$(EXE
): $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
596 $(TCCX
) -I.
-g
-O0
-DSTANDALONE
-o dbfuzz2
$(EXE
) \
597 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
599 fuzzcheck
$(EXE
): $(FUZZSRC
) sqlite3.c sqlite3.h
$(FUZZDEP
)
600 $(TCCX
) -o fuzzcheck
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
601 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) -DSQLITE_OSS_FUZZ \
602 $(FUZZSRC
) sqlite3.c
$(TLIBS
) $(THREADLIB
)
604 ossshell
$(EXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
605 $(TCCX
) -o ossshell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
606 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) \
607 $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
609 sessionfuzz
$(EXE
): $(TOP
)/test/sessionfuzz.c sqlite3.c sqlite3.h
610 $(TCC
) -o sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz.c
-lz
$(TLIBS
) $(THREADLIB
)
612 mptester
$(EXE
): sqlite3.c
$(TOP
)/mptest
/mptest.c
613 $(TCCX
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.c \
614 $(TLIBS
) $(THREADLIB
)
616 MPTEST1
=.
/mptester
$(EXE
) mptest1.db
$(TOP
)/mptest
/crash01.
test --repeat
20
617 MPTEST2
=.
/mptester
$(EXE
) mptest2.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
618 mptest
: mptester
$(EXE
)
619 $(MPTEST1
) --journalmode DELETE
620 $(MPTEST2
) --journalmode WAL
621 $(MPTEST1
) --journalmode WAL
622 $(MPTEST2
) --journalmode PERSIST
623 $(MPTEST1
) --journalmode PERSIST
624 $(MPTEST2
) --journalmode TRUNCATE
625 $(MPTEST1
) --journalmode TRUNCATE
626 $(MPTEST2
) --journalmode DELETE
629 $(TCCX
) -I.
-c sqlite3.c
631 # This target creates a directory named "tsrc" and fills it with
632 # copies of all of the C source code and header files needed to
633 # build on the target system. Some of the C source code and header
634 # files are automatically generated. This target takes care of
635 # all that automatic generation.
637 target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
641 rm tsrc
/sqlite.h.in tsrc
/parse.y
642 tclsh
$(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
643 mv vdbe.new tsrc
/vdbe.c
644 cp fts5.c fts5.h tsrc
647 sqlite3.c
: target_source
$(TOP
)/tool
/mksqlite3c.tcl src-verify
648 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
649 cp tsrc
/sqlite3ext.h .
650 cp
$(TOP
)/ext
/session
/sqlite3session.h .
651 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
652 cat sqlite3.c
>>tclsqlite3.c
653 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
654 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
656 sqlite3ext.h
: target_source
657 cp tsrc
/sqlite3ext.h .
659 sqlite3.c-debug
: target_source
$(TOP
)/tool
/mksqlite3c.tcl src-verify
660 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
--linemacros
=1
661 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
662 cat sqlite3.c
>>tclsqlite3.c
663 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
664 echo
'#line 1 "tclsqlite.c"' >>tclsqlite3.c
665 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
667 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
668 tclsh
$(TOP
)/tool
/split-sqlite3c.tcl
670 # Rules to build the LEMON compiler generator
672 lemon
: $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
673 $(BCC
) -o lemon
$(TOP
)/tool
/lemon.c
674 cp
$(TOP
)/tool
/lempar.c .
676 # A tool to generate the source-id
678 mksourceid
: $(TOP
)/tool
/mksourceid.c
679 $(BCC
) -o mksourceid
$(TOP
)/tool
/mksourceid.c
681 # Rules to build individual *.o files from generated *.c files. This
690 # Rules to build individual *.o files from files in the src directory.
692 %.o
: $(TOP
)/src
/%.c
$(HDR
)
695 tclsqlite.o
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
696 $(TCCX
) $(TCL_FLAGS
) -c
$(TOP
)/src
/tclsqlite.c
700 # Rules to build opcodes.c and opcodes.h
702 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
703 tclsh
$(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
705 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
706 cat parse.h
$(TOP
)/src
/vdbe.c | \
707 tclsh
$(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
709 # Rules to build parse.c and parse.h - the outputs of lemon.
713 parse.c
: $(TOP
)/src
/parse.y lemon
714 cp
$(TOP
)/src
/parse.y .
715 .
/lemon
-s
$(OPTS
) parse.y
717 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(TOP
)/VERSION
$(TOP
)/ext
/rtree
/sqlite3rtree.h
718 tclsh
$(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
720 sqlite3rc.h
: $(TOP
)/src
/sqlite3.rc
$(TOP
)/VERSION
721 echo
'#ifndef SQLITE_RESOURCE_VERSION' >$@
722 echo
-n
'#define SQLITE_RESOURCE_VERSION ' >>$@
723 cat
$(TOP
)/VERSION | tclsh
$(TOP
)/tool
/replace.tcl exact .
, >>$@
724 echo
'#endif' >>sqlite3rc.h
726 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
727 $(BCC
) -o mkkeywordhash
$(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
728 .
/mkkeywordhash
>keywordhash.h
730 # Source files that go into making shell.c
732 $(TOP
)/src
/shell.c.in \
733 $(TOP
)/ext
/misc
/appendvfs.c \
734 $(TOP
)/ext
/misc
/completion.c \
735 $(TOP
)/ext
/misc
/base64.c \
736 $(TOP
)/ext
/misc
/base85.c \
737 $(TOP
)/ext
/misc
/decimal.c \
738 $(TOP
)/ext
/misc
/fileio.c \
739 $(TOP
)/ext
/misc
/ieee754.c \
740 $(TOP
)/ext
/misc
/regexp.c \
741 $(TOP
)/ext
/misc
/series.c \
742 $(TOP
)/ext
/misc
/shathree.c \
743 $(TOP
)/ext
/misc
/sqlar.c \
744 $(TOP
)/ext
/misc
/uint.c \
745 $(TOP
)/ext
/expert
/sqlite3expert.c \
746 $(TOP
)/ext
/expert
/sqlite3expert.h \
747 $(TOP
)/ext
/misc
/zipfile.c \
748 $(TOP
)/ext
/misc
/memtrace.c \
749 $(TOP
)/ext
/misc
/pcachetrace.c \
750 $(TOP
)/ext
/recover
/dbdata.c \
751 $(TOP
)/ext
/recover
/sqlite3recover.c \
752 $(TOP
)/ext
/recover
/sqlite3recover.h \
753 $(TOP
)/src
/test_windirent.c
755 shell.c
: $(SHELL_SRC
) $(TOP
)/tool
/mkshellc.tcl
756 tclsh
$(TOP
)/tool
/mkshellc.tcl
>shell.c
760 # Rules to build the extension objects.
762 icu.o
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
763 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
765 fts3.o
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
766 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
768 fts3_aux.o
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
769 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
771 fts3_expr.o
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
772 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
774 fts3_hash.o
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
775 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
777 fts3_icu.o
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
778 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
780 fts3_snippet.o
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
781 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
783 fts3_porter.o
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
784 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
786 fts3_tokenizer.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
787 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
789 fts3_tokenizer1.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
790 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
792 fts3_tokenize_vtab.o
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
793 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
795 fts3_unicode.o
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
796 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
798 fts3_unicode2.o
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
799 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
801 fts3_write.o
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
802 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
804 fts5.o
: fts5.c sqlite3ext.h sqlite3.h
805 $(TCCX
) -DSQLITE_CORE
-c fts5.c
807 stmt.o
: $(TOP
)/ext
/misc
/stmt.c sqlite3ext.h sqlite3.h
808 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
810 rtree.o
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
811 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
815 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
816 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
818 .
/lemon
$(OPTS
) fts5parse.y
820 fts5parse.h
: fts5parse.c
822 fts5.c
: $(FTS5_SRC
) $(FTS5_HDR
)
823 tclsh
$(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
824 cp
$(TOP
)/ext
/fts5
/fts5.h .
827 tclsh
$(TOP
)/ext
/lsm1
/tool
/mklsm1c.tcl
828 cp
$(TOP
)/ext
/lsm1
/lsm.h .
830 userauth.o
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
831 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
833 sqlite3session.o
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
834 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
836 sqlite3rbu.o
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
837 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
839 # Rules for building test programs and for running tests
841 tclsqlite3
: $(TOP
)/src
/tclsqlite.c libsqlite3.a
842 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
-o tclsqlite3 \
843 $(TOP
)/src
/tclsqlite.c libsqlite3.a
$(LIBTCL
) $(THREADLIB
)
845 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
$(TOP
)/tool
/mkccode.tcl
846 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
>sqlite3_analyzer.c
848 sqlite3_analyzer
$(EXE
): sqlite3_analyzer.c
849 $(TCCX
) $(TCL_FLAGS
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
851 sqltclsh.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/sqltclsh.tcl
$(TOP
)/ext
/misc
/appendvfs.c
$(TOP
)/tool
/mkccode.tcl
852 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqltclsh.c.in
>sqltclsh.c
854 sqltclsh
$(EXE
): sqltclsh.c
855 $(TCCX
) $(TCL_FLAGS
) sqltclsh.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
857 sqlite3_expert
$(EXE
): $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
858 $(TCCX
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
-o sqlite3_expert
$(EXE
) $(THREADLIB
)
861 $(TOP
)/tool
/mkccode.tcl \
863 $(TOP
)/src
/tclsqlite.c \
864 $(TOP
)/ext
/repair
/sqlite3_checker.tcl \
865 $(TOP
)/ext
/repair
/checkindex.c \
866 $(TOP
)/ext
/repair
/checkfreelist.c \
867 $(TOP
)/ext
/misc
/btreeinfo.c \
868 $(TOP
)/ext
/repair
/sqlite3_checker.c.in
870 sqlite3_checker.c
: $(CHECKER_DEPS
)
871 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/ext
/repair
/sqlite3_checker.c.in
>$@
873 sqlite3_checker
$(TEXE
): sqlite3_checker.c
874 $(TCCX
) $(TCL_FLAGS
) sqlite3_checker.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
876 dbdump
$(EXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
877 $(TCCX
) -DDBDUMP_STANDALONE
-o dbdump
$(EXE
) \
878 $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
$(THREADLIB
)
880 # Rules to build the 'testfixture' application.
882 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
883 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
884 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
885 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
886 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
887 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_DBPAGE_VTAB
888 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_BYTECODE_VTAB
889 TESTFIXTURE_FLAGS
+= -DTCLSH_INIT_PROC
=sqlite3TestInit
890 TESTFIXTURE_FLAGS
+= -DSQLITE_CKSUMVFS_STATIC
892 testfixture
$(EXE
): $(TESTSRC2
) libsqlite3.a
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
893 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
894 $(TESTSRC
) $(TESTSRC2
) $(TOP
)/src
/tclsqlite.c \
895 -o testfixture
$(EXE
) $(LIBTCL
) libsqlite3.a
$(THREADLIB
)
897 amalgamation-testfixture
$(EXE
): sqlite3.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c \
898 $(TOP
)/ext
/session
/test_session.c
899 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
900 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c \
901 $(TOP
)/ext
/session
/test_session.c \
902 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
904 coretestprogs
: $(TESTPROGS
)
906 testprogs
: coretestprogs srcck1
$(EXE
) fuzzcheck
$(EXE
) sessionfuzz
$(EXE
)
908 fulltest
: $(TESTPROGS
) fuzztest
909 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
911 soaktest
: $(TESTPROGS
)
912 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
914 fulltestonly
: $(TESTPROGS
) fuzztest
915 .
/testfixture
$(EXE
) $(TOP
)/test/full.
test $(TESTOPTS
)
917 queryplantest
: testfixture
$(EXE
) sqlite3
$(EXE
)
918 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test queryplanner
$(TESTOPTS
)
920 fuzztest
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz-data1.db
921 .
/fuzzcheck
$(EXE
) $(FUZZDATA
)
922 .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
924 valgrindfuzz
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz-data1.db
925 valgrind .
/fuzzcheck
$(EXE
) --cell-size-check
--limit-mem
10M
$(FUZZDATA
)
926 valgrind .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
928 # The veryquick.test TCL tests.
930 tcltest
: .
/testfixture
$(EXE
)
931 .
/testfixture
$(EXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
933 # Runs all the same tests cases as the "tcltest" target but uses
934 # the testrunner.tcl script to run them in multiple cores
936 testrunner
: testfixture
$(EXE
)
937 .
/testfixture
$(EXE
) $(TOP
)/test/testrunner.tcl
939 # Runs both fuzztest and testrunner, consecutively.
941 devtest
: testfixture
$(EXE
) fuzztest testrunner
944 tclsh
$(TOP
)/test/testrunner.tcl mdevtest
946 # A very quick test using only testfixture and omitting all the slower
947 # tests. Designed to run in under 3 minutes on a workstation.
949 quicktest
: .
/testfixture
$(EXE
)
950 .
/testfixture
$(EXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
952 # The default test case. Runs most of the faster standard TCL tests,
953 # and fuzz tests, and sqlite3_analyzer and sqldiff tests.
954 test: fuzztest sourcetest
$(TESTPROGS
) tcltest
957 # Run a test using valgrind. This can take a really long time
958 # because valgrind is so much slower than a native machine.
960 valgrindtest
: $(TESTPROGS
) valgrindfuzz
961 OMIT_MISUSE
=1 valgrind
-v \
962 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
964 # A very fast test that checks basic sanity. The name comes from
965 # the 60s-era electronics testing: "Turn it on and see if smoke
968 smoketest
: $(TESTPROGS
) fuzzcheck
$(EXE
)
969 .
/testfixture
$(EXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
971 shelltest
: $(TESTPROGS
)
972 .
/testfixture
$(EXT
) $(TOP
)/test/permutations.
test shell
974 # The next two rules are used to support the "threadtest" target. Building
975 # threadtest runs a few thread-safety tests that are implemented in C. This
976 # target is invoked by the releasetest.tcl script.
978 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
979 $(TOP
)/test/tt3_checkpoint.c \
980 $(TOP
)/test/tt3_index.c \
981 $(TOP
)/test/tt3_vacuum.c \
982 $(TOP
)/test/tt3_stress.c \
983 $(TOP
)/test/tt3_lookaside1.c
985 threadtest3
$(EXE
): sqlite3.o
$(THREADTEST3_SRC
) $(TOP
)/src
/test_multiplex.c
986 $(TCCX
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.o
-o
$@
$(THREADLIB
)
988 threadtest
: threadtest3
$(EXE
)
991 TEST_EXTENSION
= $(SHPREFIX
)testloadext.
$(SO
)
992 $(TEST_EXTENSION
): $(TOP
)/src
/test_loadext.c
993 $(MKSHLIB
) $(TOP
)/src
/test_loadext.c
-o
$(TEST_EXTENSION
)
995 extensiontest
: testfixture
$(EXE
) $(TEST_EXTENSION
)
996 .
/testfixture
$(EXE
) $(TOP
)/test/loadext.
test
998 dbtotxt
$(EXE
): $(TOP
)/tool
/dbtotxt.c
999 $(TCC
) -o dbtotxt
$(EXE
) $(TOP
)/tool
/dbtotxt.c
1001 showdb
$(EXE
): $(TOP
)/tool
/showdb.c sqlite3.o
1002 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showdb
$(EXE
) \
1003 $(TOP
)/tool
/showdb.c sqlite3.o
$(THREADLIB
)
1005 showstat4
$(EXE
): $(TOP
)/tool
/showstat4.c sqlite3.o
1006 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showstat4
$(EXE
) \
1007 $(TOP
)/tool
/showstat4.c sqlite3.o
$(THREADLIB
)
1009 showjournal
$(EXE
): $(TOP
)/tool
/showjournal.c sqlite3.o
1010 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showjournal
$(EXE
) \
1011 $(TOP
)/tool
/showjournal.c sqlite3.o
$(THREADLIB
)
1013 showwal
$(EXE
): $(TOP
)/tool
/showwal.c sqlite3.o
1014 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showwal
$(EXE
) \
1015 $(TOP
)/tool
/showwal.c sqlite3.o
$(THREADLIB
)
1017 showshm
$(EXE
): $(TOP
)/tool
/showshm.c
1018 $(TCC
) -o showshm
$(EXE
) $(TOP
)/tool
/showshm.c
1020 index_usage
$(EXE
): $(TOP
)/tool
/index_usage.c sqlite3.o
1021 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_DEPRECATED
$(SHELL_OPTS
) -o index_usage
$(EXE
) \
1022 $(TOP
)/tool
/index_usage.c sqlite3.o
$(THREADLIB
)
1024 changeset
$(EXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.o
1025 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changeset
$(EXE
) \
1026 $(TOP
)/ext
/session
/changeset.c sqlite3.o
$(THREADLIB
)
1028 changesetfuzz
$(EXE
): $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
1029 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changesetfuzz
$(EXE
) \
1030 $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
$(THREADLIB
)
1032 fts3view
$(EXE
): $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
1033 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o fts3view
$(EXE
) \
1034 $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
$(THREADLIB
)
1036 rollback-test
$(EXE
): $(TOP
)/tool
/rollback-test.c sqlite3.o
1037 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o rollback-test
$(EXE
) \
1038 $(TOP
)/tool
/rollback-test.c sqlite3.o
$(THREADLIB
)
1040 atrc
$(EXE
): $(TOP
)/test/atrc.c sqlite3.o
1041 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o atrc
$(EXE
) \
1042 $(TOP
)/test/atrc.c sqlite3.o
$(THREADLIB
)
1044 LogEst
$(EXE
): $(TOP
)/tool
/logest.c sqlite3.h
1045 $(TCC
) -o LogEst
$(EXE
) $(TOP
)/tool
/logest.c
1047 wordcount
$(EXE
): $(TOP
)/test/wordcount.c sqlite3.c
1048 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o wordcount
$(EXE
) \
1049 $(TOP
)/test/wordcount.c sqlite3.c
1051 speedtest1
$(EXE
): $(TOP
)/test/speedtest1.c sqlite3.c
1052 $(TCCX
) -I.
$(ST_OPT
) -o speedtest1
$(EXE
) $(TOP
)/test/speedtest1.c sqlite3.c
$(THREADLIB
)
1054 kvtest
$(EXE
): $(TOP
)/test/kvtest.c sqlite3.c
1055 $(TCCX
) -I.
$(KV_OPT
) -o kvtest
$(EXE
) $(TOP
)/test/kvtest.c sqlite3.c
$(THREADLIB
)
1057 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.o
1058 $(TCC
) -I.
-o rbu
$(EXE
) $(TOP
)/ext
/rbu
/rbu.c sqlite3.o \
1061 loadfts
: $(TOP
)/tool
/loadfts.c libsqlite3.a
1062 $(TCC
) $(TOP
)/tool
/loadfts.c libsqlite3.a
-o loadfts
$(THREADLIB
)
1064 threadtest5
: $(TOP
)/test/threadtest5.c libsqlite3.a
1065 $(TCC
) $(TOP
)/test/threadtest5.c libsqlite3.a
-o threadtest5
$(THREADLIB
)
1067 # This target will fail if the SQLite amalgamation contains any exported
1068 # symbols that do not begin with "sqlite3_". It is run as part of the
1069 # releasetest.tcl script.
1071 checksymbols
: sqlite3.o
1072 nm
-g
--defined-only sqlite3.o | grep
-v
" sqlite3_" ; test $$?
-ne
0
1074 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1075 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1076 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1078 amalgamation-tarball
: sqlite3.c sqlite3rc.h
1079 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1081 snapshot-tarball
: sqlite3.c sqlite3rc.h
1082 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1085 # Standard install and cleanup targets
1087 install: sqlite3 libsqlite3.a sqlite3.h
1089 mv libsqlite3.a
/usr
/lib
1090 mv sqlite3.h
/usr
/include
1093 rm -f
*.o sqlite3 sqlite3.exe libsqlite3.a sqlite3.h opcodes.
*
1094 rm -f lemon lemon.exe lempar.c parse.
* sqlite
*.
tar.gz
1095 rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h
1097 rm -f
*.da
*.bb
*.bbg gmon.out
1098 rm -rf tsrc target_source
1099 rm -f testloadext.dll libtestloadext.so
1100 rm -f amalgamation-testfixture amalgamation-testfixture.exe
1101 rm -f fts3-testfixture fts3-testfixture.exe
1102 rm -f testfixture testfixture.exe
1103 rm -f threadtest3 threadtest3.exe
1104 rm -f LogEst LogEst.exe
1105 rm -f fts3view fts3view.exe
1106 rm -f rollback-test rollback-test.exe
1107 rm -f showdb showdb.exe
1108 rm -f showjournal showjournal.exe
1109 rm -f showstat4 showstat4.exe
1110 rm -f showwal showwal.exe
1111 rm -f changeset changeset.exe
1112 rm -f speedtest1 speedtest1.exe
1113 rm -f wordcount wordcount.exe
1115 rm -f srcck1 srcck1.exe
1116 rm -f sqlite3.c sqlite3-
*.c fts?amal.c tclsqlite3.c
1118 rm -f
shell.c sqlite3ext.h
1119 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c
1120 rm -f sqlite3_expert sqlite3_expert.exe
1121 rm -f sqlite-
*-output.vsix
1122 rm -f mptester mptester.exe
1123 rm -f fuzzershell fuzzershell.exe
1124 rm -f fuzzcheck fuzzcheck.exe
1126 rm -f sqldiff sqldiff.exe
1127 rm -f fts5.
* fts5parse.
*