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
236 $(TOP
)/ext
/fts5
/fts5.h \
237 $(TOP
)/ext
/fts5
/fts5Int.h \
241 $(TOP
)/ext
/fts5
/fts5_aux.c \
242 $(TOP
)/ext
/fts5
/fts5_buffer.c \
243 $(TOP
)/ext
/fts5
/fts5_main.c \
244 $(TOP
)/ext
/fts5
/fts5_config.c \
245 $(TOP
)/ext
/fts5
/fts5_expr.c \
246 $(TOP
)/ext
/fts5
/fts5_hash.c \
247 $(TOP
)/ext
/fts5
/fts5_index.c \
249 $(TOP
)/ext
/fts5
/fts5_storage.c \
250 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
251 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
252 $(TOP
)/ext
/fts5
/fts5_varint.c \
253 $(TOP
)/ext
/fts5
/fts5_vocab.c \
256 $(TOP
)/ext
/lsm1
/lsm.h \
257 $(TOP
)/ext
/lsm1
/lsmInt.h \
258 $(TOP
)/ext
/lsm1
/lsm_ckpt.c \
259 $(TOP
)/ext
/lsm1
/lsm_file.c \
260 $(TOP
)/ext
/lsm1
/lsm_log.c \
261 $(TOP
)/ext
/lsm1
/lsm_main.c \
262 $(TOP
)/ext
/lsm1
/lsm_mem.c \
263 $(TOP
)/ext
/lsm1
/lsm_mutex.c \
264 $(TOP
)/ext
/lsm1
/lsm_shared.c \
265 $(TOP
)/ext
/lsm1
/lsm_sorted.c \
266 $(TOP
)/ext
/lsm1
/lsm_str.c \
267 $(TOP
)/ext
/lsm1
/lsm_tree.c \
268 $(TOP
)/ext
/lsm1
/lsm_unix.c \
269 $(TOP
)/ext
/lsm1
/lsm_varint.c \
270 $(TOP
)/ext
/lsm1
/lsm_vtab.c \
271 $(TOP
)/ext
/lsm1
/lsm_win32.c
274 # Generated source code files
286 # Source code to the test files.
289 $(TOP
)/ext
/expert
/sqlite3expert.c \
290 $(TOP
)/ext
/expert
/test_expert.c \
291 $(TOP
)/ext
/fts3
/fts3_term.c \
292 $(TOP
)/ext
/fts3
/fts3_test.c \
293 $(TOP
)/ext
/rbu
/test_rbu.c \
302 $(TOP
)/src
/test_autoext.c \
303 $(TOP
)/src
/test_async.c \
304 $(TOP
)/src
/test_backup.c \
305 $(TOP
)/src
/test_bestindex.c \
306 $(TOP
)/src
/test_blob.c \
307 $(TOP
)/src
/test_btree.c \
308 $(TOP
)/src
/test_config.c \
309 $(TOP
)/src
/test_delete.c \
310 $(TOP
)/src
/test_demovfs.c \
311 $(TOP
)/src
/test_devsym.c \
312 $(TOP
)/src
/test_fs.c \
313 $(TOP
)/src
/test_func.c \
314 $(TOP
)/src
/test_hexio.c \
315 $(TOP
)/src
/test_init.c \
316 $(TOP
)/src
/test_intarray.c \
317 $(TOP
)/src
/test_journal.c \
318 $(TOP
)/src
/test_malloc.c \
319 $(TOP
)/src
/test_md5.c \
320 $(TOP
)/src
/test_multiplex.c \
321 $(TOP
)/src
/test_mutex.c \
322 $(TOP
)/src
/test_onefile.c \
323 $(TOP
)/src
/test_osinst.c \
324 $(TOP
)/src
/test_pcache.c \
325 $(TOP
)/src
/test_quota.c \
326 $(TOP
)/src
/test_rtree.c \
327 $(TOP
)/src
/test_schema.c \
328 $(TOP
)/src
/test_sqllog.c \
329 $(TOP
)/src
/test_superlock.c \
330 $(TOP
)/src
/test_syscall.c \
331 $(TOP
)/src
/test_tclsh.c \
332 $(TOP
)/src
/test_tclvar.c \
333 $(TOP
)/src
/test_thread.c \
334 $(TOP
)/src
/test_vdbecov.c \
335 $(TOP
)/src
/test_vfs.c \
336 $(TOP
)/src
/test_windirent.c \
337 $(TOP
)/src
/test_window.c \
338 $(TOP
)/src
/test_wsd.c
340 # Extensions to be statically loaded.
343 $(TOP
)/ext
/misc
/amatch.c \
344 $(TOP
)/ext
/misc
/appendvfs.c \
345 $(TOP
)/ext
/misc
/basexx.c \
346 $(TOP
)/ext
/misc
/carray.c \
347 $(TOP
)/ext
/misc
/cksumvfs.c \
348 $(TOP
)/ext
/misc
/closure.c \
349 $(TOP
)/ext
/misc
/csv.c \
350 $(TOP
)/ext
/misc
/decimal.c \
351 $(TOP
)/ext
/misc
/eval.c \
352 $(TOP
)/ext
/misc
/explain.c \
353 $(TOP
)/ext
/misc
/fileio.c \
354 $(TOP
)/ext
/misc
/fuzzer.c \
355 $(TOP
)/ext
/misc
/ieee754.c \
356 $(TOP
)/ext
/misc
/mmapwarm.c \
357 $(TOP
)/ext
/misc
/nextchar.c \
358 $(TOP
)/ext
/misc
/normalize.c \
359 $(TOP
)/ext
/misc
/percentile.c \
360 $(TOP
)/ext
/misc
/prefixes.c \
361 $(TOP
)/ext
/misc
/qpvtab.c \
362 $(TOP
)/ext
/misc
/randomjson.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 \
378 $(TOP
)/ext
/intck
/test_intck.c \
379 $(TOP
)/ext
/intck
/sqlite3intck.c
382 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
385 $(TOP
)/src
/attach.c \
386 $(TOP
)/src
/backup.c \
390 $(TOP
)/src
/dbpage.c \
391 $(TOP
)/src
/dbstat.c \
394 $(TOP
)/src
/global.c \
395 $(TOP
)/src
/insert.c \
401 $(TOP
)/src
/os_unix.c \
402 $(TOP
)/src
/os_win.c \
404 $(TOP
)/src
/pragma.c \
405 $(TOP
)/src
/prepare.c \
406 $(TOP
)/src
/printf.c \
407 $(TOP
)/src
/random.c \
408 $(TOP
)/src
/pcache.c \
409 $(TOP
)/src
/pcache1.c \
410 $(TOP
)/src
/select.c \
411 $(TOP
)/src
/threads.c \
412 $(TOP
)/src
/tokenize.c \
413 $(TOP
)/src
/treeview.c \
416 $(TOP
)/src
/vdbeapi.c \
417 $(TOP
)/src
/vdbeaux.c \
419 $(TOP
)/src
/vdbemem.c \
420 $(TOP
)/src
/vdbevtab.c \
422 $(TOP
)/src
/wherecode.c \
423 $(TOP
)/src
/whereexpr.c \
425 $(TOP
)/ext
/fts3
/fts3.c \
426 $(TOP
)/ext
/fts3
/fts3_aux.c \
427 $(TOP
)/ext
/fts3
/fts3_expr.c \
428 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
429 $(TOP
)/ext
/fts3
/fts3_write.c \
430 $(TOP
)/ext
/async
/sqlite3async.c \
431 $(TOP
)/ext
/misc
/stmt.c \
432 $(TOP
)/ext
/session
/sqlite3session.c \
433 $(TOP
)/ext
/session
/test_session.c \
436 # Header files used by all library source files.
440 $(TOP
)/src
/btreeInt.h \
442 $(TOP
)/src
/hwtime.h \
448 $(TOP
)/src
/os_common.h \
449 $(TOP
)/src
/os_setup.h \
450 $(TOP
)/src
/os_win.h \
452 $(TOP
)/src
/pcache.h \
454 $(TOP
)/src
/pragma.h \
456 $(TOP
)/src
/sqlite3ext.h \
457 $(TOP
)/src
/sqliteInt.h \
458 $(TOP
)/src
/sqliteLimit.h \
460 $(TOP
)/src
/vdbeInt.h \
461 $(TOP
)/src
/vxworks.h \
462 $(TOP
)/src
/whereInt.h
464 # Header files used by extensions
467 $(TOP
)/ext
/fts3
/fts3.h \
468 $(TOP
)/ext
/fts3
/fts3Int.h \
469 $(TOP
)/ext
/fts3
/fts3_hash.h \
470 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
472 $(TOP
)/ext
/rtree
/rtree.h \
473 $(TOP
)/ext
/rtree
/geopoly.c
475 $(TOP
)/ext
/icu
/sqliteicu.h
477 $(TOP
)/ext
/fts5
/fts5Int.h \
479 $(TOP
)/ext
/fts5
/fts5.h
481 $(TOP
)/ext
/userauth
/sqlite3userauth.h
483 # executables needed for testing
488 sqlite3_analyzer
$(EXE
) \
489 sqlite3_checker
$(EXE
) \
494 # Databases containing fuzzer test cases
497 $(TOP
)/test/fuzzdata1.db \
498 $(TOP
)/test/fuzzdata2.db \
499 $(TOP
)/test/fuzzdata3.db \
500 $(TOP
)/test/fuzzdata4.db \
501 $(TOP
)/test/fuzzdata5.db \
502 $(TOP
)/test/fuzzdata6.db \
503 $(TOP
)/test/fuzzdata7.db \
504 $(TOP
)/test/fuzzdata8.db
506 # Standard options to testfixture
508 TESTOPTS
= --verbose
=file
--output
=test-out.txt
510 # Extra compiler options for various shell tools
512 SHELL_OPT
+= -DSQLITE_ENABLE_FTS4
-DSQLITE_ENABLE_FTS5
513 SHELL_OPT
+= -DSQLITE_ENABLE_RTREE
514 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
515 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
516 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
517 SHELL_OPT
+= -DSQLITE_ENABLE_DBPAGE_VTAB
518 SHELL_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
519 SHELL_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
520 SHELL_OPT
+= -DSQLITE_ENABLE_OFFSET_SQL_FUNC
521 FUZZCHECK_OPT
+= -I
$(TOP
)/test
522 FUZZCHECK_OPT
+= -I
$(TOP
)/ext
/recover
523 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_MEMSYS5
524 FUZZCHECK_OPT
+= -DSQLITE_MAX_MEMORY
=50000000
525 FUZZCHECK_OPT
+= -DSQLITE_PRINTF_PRECISION_LIMIT
=1000
526 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS4
527 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_RTREE
528 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_GEOPOLY
529 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
530 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
531 FUZZCHECK_OPT
+= -DSQLITE_STRICT_SUBTYPE
=1
532 FUZZCHECK_OPT
+= -DSQLITE_STATIC_RANDOMJSON
533 FUZZSRC
+= $(TOP
)/test/fuzzcheck.c
534 FUZZSRC
+= $(TOP
)/test/ossfuzz.c
535 FUZZSRC
+= $(TOP
)/test/vt02.c
536 FUZZSRC
+= $(TOP
)/test/fuzzinvariants.c
537 FUZZSRC
+= $(TOP
)/ext
/recover
/dbdata.c
538 FUZZSRC
+= $(TOP
)/ext
/recover
/sqlite3recover.c
539 FUZZSRC
+= $(TOP
)/ext
/misc
/randomjson.c
541 KV_OPT
= -DSQLITE_THREADSAFE
=0 -DSQLITE_DIRECT_OVERFLOW_READ
542 ST_OPT
= -DSQLITE_THREADSAFE
=0
544 # This is the default Makefile target. The objects listed here
545 # are what get build when you type just "make" with no arguments.
547 all: sqlite3.h sqlite3ext.h libsqlite3.a sqlite3
$(EXE
)
549 libsqlite3.a
: sqlite3.h
$(LIBOBJ
)
550 $(AR
) libsqlite3.a
$(LIBOBJ
)
551 $(RANLIB
) libsqlite3.a
553 sqlite3
$(EXE
): sqlite3.h libsqlite3.a
shell.c
554 $(TCCX
) $(READLINE_FLAGS
) -o sqlite3
$(EXE
) $(SHELL_OPT
) \
555 shell.c libsqlite3.a
$(LIBREADLINE
) $(TLIBS
) $(THREADLIB
)
557 sqldiff
$(EXE
): $(TOP
)/tool
/sqldiff.c sqlite3.c sqlite3.h
558 $(TCCX
) -o sqldiff
$(EXE
) -DSQLITE_THREADSAFE
=0 \
559 $(TOP
)/tool
/sqldiff.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
561 dbhash
$(EXE
): $(TOP
)/tool
/dbhash.c sqlite3.c sqlite3.h
562 $(TCCX
) -o dbhash
$(EXE
) -DSQLITE_THREADSAFE
=0 \
563 $(TOP
)/tool
/dbhash.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
565 scrub
$(EXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.o
566 $(TCC
) -I.
-DSCRUB_STANDALONE
-o scrub
$(EXE
) $(TOP
)/ext
/misc
/scrub.c sqlite3.o
$(THREADLIB
)
568 srcck1
$(EXE
): $(TOP
)/tool
/srcck1.c
569 $(BCC
) -o srcck1
$(EXE
) $(TOP
)/tool
/srcck1.c
571 sourcetest
: srcck1
$(EXE
) sqlite3.c
574 src-verify
: $(TOP
)/tool
/src-verify.c
575 $(BCC
) -o src-verify
$(EXE
) $(TOP
)/tool
/src-verify.c
577 verify-source
: .
/src-verify
580 fuzzershell
$(EXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
581 $(TCCX
) -o fuzzershell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
582 $(FUZZERSHELL_OPT
) $(TOP
)/tool
/fuzzershell.c sqlite3.c \
583 $(TLIBS
) $(THREADLIB
)
585 dbfuzz
$(EXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
586 $(TCCX
) -o dbfuzz
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
587 $(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c \
588 $(TLIBS
) $(THREADLIB
)
591 -DSQLITE_THREADSAFE
=0 \
592 -DSQLITE_OMIT_LOAD_EXTENSION \
594 -DSQLITE_ENABLE_DBSTAT_VTAB \
595 -DSQLITE_ENABLE_BYTECODE_VTAB \
596 -DSQLITE_ENABLE_RTREE \
597 -DSQLITE_ENABLE_FTS4 \
600 dbfuzz2
$(EXE
): $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
601 $(TCCX
) -I.
-g
-O0
-DSTANDALONE
-o dbfuzz2
$(EXE
) \
602 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
604 fuzzcheck
$(EXE
): $(FUZZSRC
) sqlite3.c sqlite3.h
$(FUZZDEP
)
605 $(TCCX
) -o
$@
-DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
606 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) -DSQLITE_OSS_FUZZ \
607 $(FUZZSRC
) sqlite3.c
$(TLIBS
) $(THREADLIB
)
609 fuzzcheck-asan
$(EXE
): $(FUZZSRC
) sqlite3.c sqlite3.h
$(FUZZDEP
)
610 $(TCCX
) -fsanitize
=address
-o
$W -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
611 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) -DSQLITE_OSS_FUZZ \
612 $(FUZZSRC
) sqlite3.c
$(TLIBS
) $(THREADLIB
)
614 fuzzcheck-ubsan
$(EXE
): $(FUZZSRC
) sqlite3.c sqlite3.h
$(FUZZDEP
)
615 $(TCCX
) -fsanitize
=undefined
-o
$@
-DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
616 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) -DSQLITE_OSS_FUZZ \
617 $(FUZZSRC
) sqlite3.c
$(TLIBS
) $(THREADLIB
)
619 ossshell
$(EXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
620 $(TCCX
) -o ossshell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
621 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) \
622 $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
624 sessionfuzz
$(EXE
): $(TOP
)/test/sessionfuzz.c sqlite3.c sqlite3.h
625 $(TCC
) -o sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz.c
-lz
$(TLIBS
) $(THREADLIB
)
627 mptester
$(EXE
): sqlite3.c
$(TOP
)/mptest
/mptest.c
628 $(TCCX
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.c \
629 $(TLIBS
) $(THREADLIB
)
631 MPTEST1
=.
/mptester
$(EXE
) mptest1.db
$(TOP
)/mptest
/crash01.
test --repeat
20
632 MPTEST2
=.
/mptester
$(EXE
) mptest2.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
633 mptest
: mptester
$(EXE
)
634 $(MPTEST1
) --journalmode DELETE
635 $(MPTEST2
) --journalmode WAL
636 $(MPTEST1
) --journalmode WAL
637 $(MPTEST2
) --journalmode PERSIST
638 $(MPTEST1
) --journalmode PERSIST
639 $(MPTEST2
) --journalmode TRUNCATE
640 $(MPTEST1
) --journalmode TRUNCATE
641 $(MPTEST2
) --journalmode DELETE
644 $(TCCX
) -I.
-c sqlite3.c
646 # This target creates a directory named "tsrc" and fills it with
647 # copies of all of the C source code and header files needed to
648 # build on the target system. Some of the C source code and header
649 # files are automatically generated. This target takes care of
650 # all that automatic generation.
652 target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
656 rm tsrc
/sqlite.h.in tsrc
/parse.y
657 tclsh
$(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
658 mv vdbe.new tsrc
/vdbe.c
659 cp fts5.c fts5.h tsrc
662 sqlite3.c
: target_source
$(TOP
)/tool
/mksqlite3c.tcl src-verify
663 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
$(EXTRA_SRC
)
664 cp tsrc
/sqlite3ext.h .
665 cp
$(TOP
)/ext
/session
/sqlite3session.h .
666 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
667 cat sqlite3.c
>>tclsqlite3.c
668 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
669 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
671 sqlite3ext.h
: target_source
672 cp tsrc
/sqlite3ext.h .
674 sqlite3.c-debug
: target_source
$(TOP
)/tool
/mksqlite3c.tcl src-verify
675 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
--linemacros
=1 $(EXTRA_SRC
)
676 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
677 cat sqlite3.c
>>tclsqlite3.c
678 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
679 echo
'#line 1 "tclsqlite.c"' >>tclsqlite3.c
680 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
682 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
683 tclsh
$(TOP
)/tool
/split-sqlite3c.tcl
685 # Rules to build the LEMON compiler generator
687 lemon
: $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
688 $(BCC
) -o lemon
$(TOP
)/tool
/lemon.c
689 cp
$(TOP
)/tool
/lempar.c .
691 # A tool to generate the source-id
693 mksourceid
: $(TOP
)/tool
/mksourceid.c
694 $(BCC
) -o mksourceid
$(TOP
)/tool
/mksourceid.c
696 # Rules to build individual *.o files from generated *.c files. This
705 # Rules to build individual *.o files from files in the src directory.
707 %.o
: $(TOP
)/src
/%.c
$(HDR
)
710 tclsqlite.o
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
711 $(TCCX
) $(TCL_FLAGS
) -c
$(TOP
)/src
/tclsqlite.c
715 # Rules to build opcodes.c and opcodes.h
717 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
718 tclsh
$(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
720 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
721 cat parse.h
$(TOP
)/src
/vdbe.c | tclsh
$(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
723 # Rules to build parse.c and parse.h - the outputs of lemon.
727 parse.c
: $(TOP
)/src
/parse.y lemon
728 cp
$(TOP
)/src
/parse.y .
729 .
/lemon
-s
$(OPTS
) parse.y
731 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(TOP
)/VERSION
$(TOP
)/ext
/rtree
/sqlite3rtree.h
732 tclsh
$(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
734 sqlite3rc.h
: $(TOP
)/src
/sqlite3.rc
$(TOP
)/VERSION
735 echo
'#ifndef SQLITE_RESOURCE_VERSION' >$@
736 echo
-n
'#define SQLITE_RESOURCE_VERSION ' >>$@
737 cat
$(TOP
)/VERSION | tclsh
$(TOP
)/tool
/replace.tcl exact .
, >>$@
738 echo
'#endif' >>sqlite3rc.h
740 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
741 $(BCC
) -o mkkeywordhash
$(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
742 .
/mkkeywordhash
>keywordhash.h
744 # Source and header files that shell.c depends on
746 $(TOP
)/src
/shell.c.in \
747 $(TOP
)/ext
/consio
/console_io.c \
748 $(TOP
)/ext
/consio
/console_io.h \
749 $(TOP
)/ext
/expert
/sqlite3expert.c \
750 $(TOP
)/ext
/expert
/sqlite3expert.h \
751 $(TOP
)/ext
/intck
/sqlite3intck.c \
752 $(TOP
)/ext
/intck
/sqlite3intck.h \
753 $(TOP
)/ext
/misc
/appendvfs.c \
754 $(TOP
)/ext
/misc
/base64.c \
755 $(TOP
)/ext
/misc
/base85.c \
756 $(TOP
)/ext
/misc
/completion.c \
757 $(TOP
)/ext
/misc
/decimal.c \
758 $(TOP
)/ext
/misc
/fileio.c \
759 $(TOP
)/ext
/misc
/ieee754.c \
760 $(TOP
)/ext
/misc
/memtrace.c \
761 $(TOP
)/ext
/misc
/pcachetrace.c \
762 $(TOP
)/ext
/misc
/regexp.c \
763 $(TOP
)/ext
/misc
/series.c \
764 $(TOP
)/ext
/misc
/shathree.c \
765 $(TOP
)/ext
/misc
/sqlar.c \
766 $(TOP
)/ext
/misc
/uint.c \
767 $(TOP
)/ext
/misc
/zipfile.c \
768 $(TOP
)/ext
/recover
/dbdata.c \
769 $(TOP
)/ext
/recover
/sqlite3recover.c \
770 $(TOP
)/ext
/recover
/sqlite3recover.h \
771 $(TOP
)/src
/test_windirent.c \
772 $(TOP
)/src
/test_windirent.h
774 shell.c
: $(SHELL_DEP
) $(TOP
)/tool
/mkshellc.tcl
775 tclsh
$(TOP
)/tool
/mkshellc.tcl
>shell.c
779 # Rules to build the extension objects.
781 icu.o
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
782 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
784 fts3.o
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
785 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
787 fts3_aux.o
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
788 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
790 fts3_expr.o
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
791 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
793 fts3_hash.o
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
794 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
796 fts3_icu.o
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
797 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
799 fts3_snippet.o
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
800 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
802 fts3_porter.o
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
803 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
805 fts3_tokenizer.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
806 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
808 fts3_tokenizer1.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
809 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
811 fts3_tokenize_vtab.o
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
812 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
814 fts3_unicode.o
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
815 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
817 fts3_unicode2.o
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
818 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
820 fts3_write.o
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
821 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
823 fts5.o
: fts5.c sqlite3ext.h sqlite3.h
824 $(TCCX
) -DSQLITE_CORE
-c fts5.c
826 stmt.o
: $(TOP
)/ext
/misc
/stmt.c sqlite3ext.h sqlite3.h
827 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
829 rtree.o
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
830 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
834 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
835 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
837 .
/lemon
$(OPTS
) fts5parse.y
839 fts5parse.h
: fts5parse.c
841 fts5.c
: $(FTS5_SRC
) $(FTS5_HDR
)
842 tclsh
$(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
843 cp
$(TOP
)/ext
/fts5
/fts5.h .
846 tclsh
$(TOP
)/ext
/lsm1
/tool
/mklsm1c.tcl
847 cp
$(TOP
)/ext
/lsm1
/lsm.h .
849 userauth.o
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
850 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
852 sqlite3session.o
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
853 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
855 sqlite3rbu.o
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
856 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
858 # Rules for building test programs and for running tests
860 tclsqlite3
: $(TOP
)/src
/tclsqlite.c libsqlite3.a
861 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
-o tclsqlite3 \
862 $(TOP
)/src
/tclsqlite.c libsqlite3.a
$(LIBTCL
) $(THREADLIB
)
864 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
$(TOP
)/tool
/mkccode.tcl
865 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
>sqlite3_analyzer.c
867 sqlite3_analyzer
$(EXE
): sqlite3_analyzer.c
868 $(TCCX
) $(TCL_FLAGS
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
870 sqltclsh.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/sqltclsh.tcl
$(TOP
)/ext
/misc
/appendvfs.c
$(TOP
)/tool
/mkccode.tcl
871 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqltclsh.c.in
>sqltclsh.c
873 sqltclsh
$(EXE
): sqltclsh.c
874 $(TCCX
) $(TCL_FLAGS
) sqltclsh.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
876 sqlite3_expert
$(EXE
): $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
877 $(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
)
880 $(TOP
)/tool
/mkccode.tcl \
882 $(TOP
)/src
/tclsqlite.c \
883 $(TOP
)/ext
/repair
/sqlite3_checker.tcl \
884 $(TOP
)/ext
/repair
/checkindex.c \
885 $(TOP
)/ext
/repair
/checkfreelist.c \
886 $(TOP
)/ext
/misc
/btreeinfo.c \
887 $(TOP
)/ext
/repair
/sqlite3_checker.c.in
889 sqlite3_checker.c
: $(CHECKER_DEPS
)
890 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/ext
/repair
/sqlite3_checker.c.in
>$@
892 sqlite3_checker
$(TEXE
): sqlite3_checker.c
893 $(TCCX
) $(TCL_FLAGS
) sqlite3_checker.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
895 dbdump
$(EXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
896 $(TCCX
) -DDBDUMP_STANDALONE
-o dbdump
$(EXE
) \
897 $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
$(THREADLIB
)
899 # Rules to build the 'testfixture' application.
901 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
902 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
903 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
904 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
905 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
906 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_DBPAGE_VTAB
907 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_BYTECODE_VTAB
908 TESTFIXTURE_FLAGS
+= -DTCLSH_INIT_PROC
=sqlite3TestInit
909 TESTFIXTURE_FLAGS
+= -DSQLITE_CKSUMVFS_STATIC
910 TESTFIXTURE_FLAGS
+= -DSQLITE_STATIC_RANDOMJSON
911 TESTFIXTURE_FLAGS
+= -DSQLITE_STRICT_SUBTYPE
=1
913 testfixture
$(EXE
): $(TESTSRC2
) libsqlite3.a
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
914 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
915 $(TESTSRC
) $(TESTSRC2
) $(TOP
)/src
/tclsqlite.c \
916 -o testfixture
$(EXE
) $(LIBTCL
) libsqlite3.a
$(THREADLIB
)
918 amalgamation-testfixture
$(EXE
): sqlite3.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c \
919 $(TOP
)/ext
/session
/test_session.c
920 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
921 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c \
922 $(TOP
)/ext
/session
/test_session.c \
923 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
925 coretestprogs
: $(TESTPROGS
)
927 testprogs
: coretestprogs srcck1
$(EXE
) fuzzcheck
$(EXE
) sessionfuzz
$(EXE
)
929 fulltest
: $(TESTPROGS
) fuzztest
930 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
932 soaktest
: $(TESTPROGS
)
933 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
935 fulltestonly
: $(TESTPROGS
) fuzztest
936 .
/testfixture
$(EXE
) $(TOP
)/test/full.
test $(TESTOPTS
)
938 queryplantest
: testfixture
$(EXE
) sqlite3
$(EXE
)
939 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test queryplanner
$(TESTOPTS
)
941 fuzztest
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
)
942 .
/fuzzcheck
$(EXE
) $(FUZZDATA
)
943 .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
945 valgrindfuzz
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
)
946 valgrind .
/fuzzcheck
$(EXE
) --cell-size-check
--limit-mem
10M
$(FUZZDATA
)
947 valgrind .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
949 # The veryquick.test TCL tests.
951 tcltest
: .
/testfixture
$(EXE
)
952 .
/testfixture
$(EXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
954 # Runs all the same tests cases as the "tcltest" target but uses
955 # the testrunner.tcl script to run them in multiple cores
957 testrunner
: testfixture
$(EXE
)
958 .
/testfixture
$(EXE
) $(TOP
)/test/testrunner.tcl
960 # Runs both fuzztest and testrunner, consecutively.
962 devtest
: testfixture
$(EXE
) fuzztest testrunner
965 tclsh
$(TOP
)/test/testrunner.tcl mdevtest
967 # A very quick test using only testfixture and omitting all the slower
968 # tests. Designed to run in under 3 minutes on a workstation.
970 quicktest
: .
/testfixture
$(EXE
)
971 .
/testfixture
$(EXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
973 # The default test case. Runs most of the faster standard TCL tests,
974 # and fuzz tests, and sqlite3_analyzer and sqldiff tests.
975 test: fuzztest sourcetest
$(TESTPROGS
) tcltest
978 # Run a test using valgrind. This can take a really long time
979 # because valgrind is so much slower than a native machine.
981 valgrindtest
: $(TESTPROGS
) valgrindfuzz
982 OMIT_MISUSE
=1 valgrind
-v \
983 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
985 # A very fast test that checks basic sanity. The name comes from
986 # the 60s-era electronics testing: "Turn it on and see if smoke
989 smoketest
: $(TESTPROGS
) fuzzcheck
$(EXE
)
990 .
/testfixture
$(EXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
992 shelltest
: $(TESTPROGS
)
993 .
/testfixture
$(EXT
) $(TOP
)/test/permutations.
test shell
995 # The next two rules are used to support the "threadtest" target. Building
996 # threadtest runs a few thread-safety tests that are implemented in C. This
997 # target is invoked by the releasetest.tcl script.
999 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
1000 $(TOP
)/test/tt3_checkpoint.c \
1001 $(TOP
)/test/tt3_index.c \
1002 $(TOP
)/test/tt3_vacuum.c \
1003 $(TOP
)/test/tt3_stress.c \
1004 $(TOP
)/test/tt3_lookaside1.c
1006 threadtest3
$(EXE
): sqlite3.o
$(THREADTEST3_SRC
) $(TOP
)/src
/test_multiplex.c
1007 $(TCCX
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.o
-o
$@
$(THREADLIB
)
1009 threadtest
: threadtest3
$(EXE
)
1012 TEST_EXTENSION
= $(SHPREFIX
)testloadext.
$(SO
)
1013 $(TEST_EXTENSION
): $(TOP
)/src
/test_loadext.c
1014 $(MKSHLIB
) $(TOP
)/src
/test_loadext.c
-o
$(TEST_EXTENSION
)
1016 extensiontest
: testfixture
$(EXE
) $(TEST_EXTENSION
)
1017 .
/testfixture
$(EXE
) $(TOP
)/test/loadext.
test
1019 dbtotxt
$(EXE
): $(TOP
)/tool
/dbtotxt.c
1020 $(TCC
) -o dbtotxt
$(EXE
) $(TOP
)/tool
/dbtotxt.c
1022 showdb
$(EXE
): $(TOP
)/tool
/showdb.c sqlite3.o
1023 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showdb
$(EXE
) \
1024 $(TOP
)/tool
/showdb.c sqlite3.o
$(THREADLIB
)
1026 showstat4
$(EXE
): $(TOP
)/tool
/showstat4.c sqlite3.o
1027 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showstat4
$(EXE
) \
1028 $(TOP
)/tool
/showstat4.c sqlite3.o
$(THREADLIB
)
1030 showjournal
$(EXE
): $(TOP
)/tool
/showjournal.c sqlite3.o
1031 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showjournal
$(EXE
) \
1032 $(TOP
)/tool
/showjournal.c sqlite3.o
$(THREADLIB
)
1034 showwal
$(EXE
): $(TOP
)/tool
/showwal.c sqlite3.o
1035 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showwal
$(EXE
) \
1036 $(TOP
)/tool
/showwal.c sqlite3.o
$(THREADLIB
)
1038 showshm
$(EXE
): $(TOP
)/tool
/showshm.c
1039 $(TCC
) -o showshm
$(EXE
) $(TOP
)/tool
/showshm.c
1041 index_usage
$(EXE
): $(TOP
)/tool
/index_usage.c sqlite3.o
1042 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_DEPRECATED
$(SHELL_OPTS
) -o index_usage
$(EXE
) \
1043 $(TOP
)/tool
/index_usage.c sqlite3.o
$(THREADLIB
)
1045 changeset
$(EXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.o
1046 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changeset
$(EXE
) \
1047 $(TOP
)/ext
/session
/changeset.c sqlite3.o
$(THREADLIB
)
1049 changesetfuzz
$(EXE
): $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
1050 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changesetfuzz
$(EXE
) \
1051 $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
$(THREADLIB
)
1053 fts3view
$(EXE
): $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
1054 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o fts3view
$(EXE
) \
1055 $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
$(THREADLIB
)
1057 rollback-test
$(EXE
): $(TOP
)/tool
/rollback-test.c sqlite3.o
1058 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o rollback-test
$(EXE
) \
1059 $(TOP
)/tool
/rollback-test.c sqlite3.o
$(THREADLIB
)
1061 atrc
$(EXE
): $(TOP
)/test/atrc.c sqlite3.o
1062 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o atrc
$(EXE
) \
1063 $(TOP
)/test/atrc.c sqlite3.o
$(THREADLIB
)
1065 LogEst
$(EXE
): $(TOP
)/tool
/logest.c sqlite3.h
1066 $(TCC
) -o LogEst
$(EXE
) $(TOP
)/tool
/logest.c
1068 wordcount
$(EXE
): $(TOP
)/test/wordcount.c sqlite3.c
1069 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o wordcount
$(EXE
) \
1070 $(TOP
)/test/wordcount.c sqlite3.c
1072 speedtest1
$(EXE
): $(TOP
)/test/speedtest1.c sqlite3.c
1073 $(TCCX
) -I.
$(ST_OPT
) -o speedtest1
$(EXE
) $(TOP
)/test/speedtest1.c sqlite3.c
$(THREADLIB
)
1075 kvtest
$(EXE
): $(TOP
)/test/kvtest.c sqlite3.c
1076 $(TCCX
) -I.
$(KV_OPT
) -o kvtest
$(EXE
) $(TOP
)/test/kvtest.c sqlite3.c
$(THREADLIB
)
1078 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.o
1079 $(TCC
) -I.
-o rbu
$(EXE
) $(TOP
)/ext
/rbu
/rbu.c sqlite3.o \
1082 loadfts
: $(TOP
)/tool
/loadfts.c libsqlite3.a
1083 $(TCC
) $(TOP
)/tool
/loadfts.c libsqlite3.a
-o loadfts
$(THREADLIB
)
1085 threadtest5
: $(TOP
)/test/threadtest5.c libsqlite3.a
1086 $(TCC
) $(TOP
)/test/threadtest5.c libsqlite3.a
-o threadtest5
$(THREADLIB
)
1088 # This target will fail if the SQLite amalgamation contains any exported
1089 # symbols that do not begin with "sqlite3_". It is run as part of the
1090 # releasetest.tcl script.
1092 checksymbols
: sqlite3.o
1093 nm
-g
--defined-only sqlite3.o | grep
-v
" sqlite3_" ; test $$?
-ne
0
1095 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1096 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1097 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1099 amalgamation-tarball
: sqlite3.c sqlite3rc.h
1100 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1102 snapshot-tarball
: sqlite3.c sqlite3rc.h
1103 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1106 # Standard install and cleanup targets
1108 install: sqlite3 libsqlite3.a sqlite3.h
1110 mv libsqlite3.a
/usr
/lib
1111 mv sqlite3.h
/usr
/include
1114 rm -f
*.o sqlite3 sqlite3.exe libsqlite3.a sqlite3.h opcodes.
*
1115 rm -f lemon lemon.exe lempar.c parse.
* sqlite
*.
tar.gz
1116 rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h
1118 rm -f
*.da
*.bb
*.bbg gmon.out
1119 rm -rf tsrc target_source
1120 rm -f testloadext.dll libtestloadext.so
1121 rm -f amalgamation-testfixture amalgamation-testfixture.exe
1122 rm -f fts3-testfixture fts3-testfixture.exe
1123 rm -f testfixture testfixture.exe
1124 rm -f threadtest3 threadtest3.exe
1125 rm -f LogEst LogEst.exe
1126 rm -f fts3view fts3view.exe
1127 rm -f rollback-test rollback-test.exe
1128 rm -f showdb showdb.exe
1129 rm -f showjournal showjournal.exe
1130 rm -f showstat4 showstat4.exe
1131 rm -f showwal showwal.exe
1132 rm -f changeset changeset.exe
1133 rm -f speedtest1 speedtest1.exe
1134 rm -f wordcount wordcount.exe
1136 rm -f srcck1 srcck1.exe
1137 rm -f sqlite3.c sqlite3-
*.c fts?amal.c tclsqlite3.c
1139 rm -f
shell.c sqlite3ext.h
1140 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c
1141 rm -f sqlite3_expert sqlite3_expert.exe
1142 rm -f sqlite-
*-output.vsix
1143 rm -f mptester mptester.exe
1144 rm -f fuzzershell fuzzershell.exe
1145 rm -f fuzzcheck fuzzcheck.exe
1147 rm -f sqldiff sqldiff.exe
1148 rm -f fts5.
* fts5parse.
*