1 ###############################################################################
2 # The following macros should be defined before this script is
5 # TOP The toplevel directory of the source tree. This is the
6 # directory that contains this "Makefile.in" and the
7 # "configure.in" script.
9 # BCC C Compiler and options for use in building executables that
10 # will run on the platform that is doing the build.
12 # THREADLIB Specify any extra linker options needed to make the library
15 # LIBS Extra libraries options
17 # OPTS Extra compiler command-line options.
19 # EXE The suffix to add to executable files. ".exe" for windows
22 # TCC C Compiler and options for use in building executables that
23 # will run on the target platform. This is usually the same
24 # as BCC, unless you are cross-compiling.
26 # AR Tools used to build a static library.
29 # TCL_FLAGS Extra compiler options needed for programs that use the
32 # LIBTCL Linker options needed to link against the TCL library.
34 # READLINE_FLAGS Compiler options needed for programs that use the
37 # LIBREADLINE Linker options needed by programs using readline() must
40 # Once the macros above are defined, the rest of this make script will
41 # build the SQLite library and testing tools.
42 ################################################################################
44 # This is how we compile
46 TCCX
= $(TCC
) $(OPTS
) -I.
-I
$(TOP
)/src
-I
$(TOP
)
47 TCCX
+= -I
$(TOP
)/ext
/rtree
-I
$(TOP
)/ext
/icu
-I
$(TOP
)/ext
/fts3
48 TCCX
+= -I
$(TOP
)/ext
/async
-I
$(TOP
)/ext
/userauth
49 TCCX
+= -I
$(TOP
)/ext
/session
50 TCCX
+= -I
$(TOP
)/ext
/fts5
53 # Object files for the SQLite library.
55 LIBOBJ
+= vdbe.o parse.o \
56 alter.o analyze.o attach.o auth.o \
57 backup.o bitvec.o btmutex.o btree.o build.o \
58 callback.o complete.o ctime.o \
59 date.o dbpage.o dbstat.o delete.o expr.o \
61 fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
62 fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \
63 fts3_tokenize_vtab.o \
64 fts3_unicode.o fts3_unicode2.o \
65 fts3_write.o fts5.o func.o global.o hash.o \
66 icu.o insert.o json1.o legacy.o loadext.o \
67 main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
68 memdb.o memjournal.o \
69 mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
70 notify.o opcodes.o os.o os_unix.o os_win.o \
71 pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \
72 random.o resolve.o rowset.o rtree.o \
73 select.o sqlite3rbu.o status.o stmt.o \
74 table.o threads.o tokenize.o treeview.o trigger.o \
75 update.o upsert.o userauth.o util.o vacuum.o \
76 vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \
77 vdbetrace.o wal.o walker.o where.o wherecode.o whereexpr.o \
80 LIBOBJ
+= sqlite3session.o
82 # All of the source code files.
86 $(TOP
)/src
/analyze.c \
91 $(TOP
)/src
/btmutex.c \
94 $(TOP
)/src
/btreeInt.h \
96 $(TOP
)/src
/callback.c \
97 $(TOP
)/src
/complete.c \
100 $(TOP
)/src
/dbpage.c \
101 $(TOP
)/src
/dbstat.c \
102 $(TOP
)/src
/delete.c \
107 $(TOP
)/src
/global.c \
110 $(TOP
)/src
/hwtime.h \
111 $(TOP
)/src
/insert.c \
112 $(TOP
)/src
/legacy.c \
113 $(TOP
)/src
/loadext.c \
115 $(TOP
)/src
/malloc.c \
122 $(TOP
)/src
/memjournal.c \
126 $(TOP
)/src
/mutex_noop.c \
127 $(TOP
)/src
/mutex_unix.c \
128 $(TOP
)/src
/mutex_w32.c \
129 $(TOP
)/src
/notify.c \
132 $(TOP
)/src
/os_common.h \
133 $(TOP
)/src
/os_setup.h \
134 $(TOP
)/src
/os_unix.c \
135 $(TOP
)/src
/os_win.c \
136 $(TOP
)/src
/os_win.h \
140 $(TOP
)/src
/pcache.c \
141 $(TOP
)/src
/pcache.h \
142 $(TOP
)/src
/pcache1.c \
143 $(TOP
)/src
/pragma.c \
144 $(TOP
)/src
/pragma.h \
145 $(TOP
)/src
/prepare.c \
146 $(TOP
)/src
/printf.c \
147 $(TOP
)/src
/random.c \
148 $(TOP
)/src
/resolve.c \
149 $(TOP
)/src
/rowset.c \
150 $(TOP
)/src
/select.c \
151 $(TOP
)/src
/status.c \
152 $(TOP
)/src
/shell.c.in \
153 $(TOP
)/src
/sqlite.h.in \
154 $(TOP
)/src
/sqlite3ext.h \
155 $(TOP
)/src
/sqliteInt.h \
156 $(TOP
)/src
/sqliteLimit.h \
158 $(TOP
)/src
/tclsqlite.c \
159 $(TOP
)/src
/threads.c \
160 $(TOP
)/src
/tokenize.c \
161 $(TOP
)/src
/treeview.c \
162 $(TOP
)/src
/trigger.c \
164 $(TOP
)/src
/update.c \
165 $(TOP
)/src
/upsert.c \
167 $(TOP
)/src
/vacuum.c \
170 $(TOP
)/src
/vdbeapi.c \
171 $(TOP
)/src
/vdbeaux.c \
172 $(TOP
)/src
/vdbeblob.c \
173 $(TOP
)/src
/vdbemem.c \
174 $(TOP
)/src
/vdbesort.c \
175 $(TOP
)/src
/vdbetrace.c \
176 $(TOP
)/src
/vdbeInt.h \
178 $(TOP
)/src
/vxworks.h \
181 $(TOP
)/src
/walker.c \
183 $(TOP
)/src
/wherecode.c \
184 $(TOP
)/src
/whereexpr.c \
185 $(TOP
)/src
/whereInt.h \
188 # Source code for extensions
191 $(TOP
)/ext
/fts1
/fts1.c \
192 $(TOP
)/ext
/fts1
/fts1.h \
193 $(TOP
)/ext
/fts1
/fts1_hash.c \
194 $(TOP
)/ext
/fts1
/fts1_hash.h \
195 $(TOP
)/ext
/fts1
/fts1_porter.c \
196 $(TOP
)/ext
/fts1
/fts1_tokenizer.h \
197 $(TOP
)/ext
/fts1
/fts1_tokenizer1.c
199 $(TOP
)/ext
/fts2
/fts2.c \
200 $(TOP
)/ext
/fts2
/fts2.h \
201 $(TOP
)/ext
/fts2
/fts2_hash.c \
202 $(TOP
)/ext
/fts2
/fts2_hash.h \
203 $(TOP
)/ext
/fts2
/fts2_icu.c \
204 $(TOP
)/ext
/fts2
/fts2_porter.c \
205 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
206 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
207 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
209 $(TOP
)/ext
/fts3
/fts3.c \
210 $(TOP
)/ext
/fts3
/fts3.h \
211 $(TOP
)/ext
/fts3
/fts3Int.h \
212 $(TOP
)/ext
/fts3
/fts3_aux.c \
213 $(TOP
)/ext
/fts3
/fts3_expr.c \
214 $(TOP
)/ext
/fts3
/fts3_hash.c \
215 $(TOP
)/ext
/fts3
/fts3_hash.h \
216 $(TOP
)/ext
/fts3
/fts3_icu.c \
217 $(TOP
)/ext
/fts3
/fts3_porter.c \
218 $(TOP
)/ext
/fts3
/fts3_snippet.c \
219 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
220 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
221 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
222 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
223 $(TOP
)/ext
/fts3
/fts3_unicode.c \
224 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
225 $(TOP
)/ext
/fts3
/fts3_write.c
227 $(TOP
)/ext
/icu
/sqliteicu.h \
230 $(TOP
)/ext
/rtree
/sqlite3rtree.h \
231 $(TOP
)/ext
/rtree
/rtree.h \
232 $(TOP
)/ext
/rtree
/rtree.c \
233 $(TOP
)/ext
/rtree
/geopoly.c
235 $(TOP
)/ext
/session
/sqlite3session.c \
236 $(TOP
)/ext
/session
/sqlite3session.h
238 $(TOP
)/ext
/userauth
/userauth.c \
239 $(TOP
)/ext
/userauth
/sqlite3userauth.h
241 $(TOP
)/ext
/rbu
/sqlite3rbu.c \
242 $(TOP
)/ext
/rbu
/sqlite3rbu.h
244 $(TOP
)/ext
/misc
/json1.c \
245 $(TOP
)/ext
/misc
/stmt.c
251 $(TOP
)/ext
/fts5
/fts5.h \
252 $(TOP
)/ext
/fts5
/fts5Int.h \
256 $(TOP
)/ext
/fts5
/fts5_aux.c \
257 $(TOP
)/ext
/fts5
/fts5_buffer.c \
258 $(TOP
)/ext
/fts5
/fts5_main.c \
259 $(TOP
)/ext
/fts5
/fts5_config.c \
260 $(TOP
)/ext
/fts5
/fts5_expr.c \
261 $(TOP
)/ext
/fts5
/fts5_hash.c \
262 $(TOP
)/ext
/fts5
/fts5_index.c \
264 $(TOP
)/ext
/fts5
/fts5_storage.c \
265 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
266 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
267 $(TOP
)/ext
/fts5
/fts5_varint.c \
268 $(TOP
)/ext
/fts5
/fts5_vocab.c \
271 $(TOP
)/ext
/lsm1
/lsm.h \
272 $(TOP
)/ext
/lsm1
/lsmInt.h \
273 $(TOP
)/ext
/lsm1
/lsm_ckpt.c \
274 $(TOP
)/ext
/lsm1
/lsm_file.c \
275 $(TOP
)/ext
/lsm1
/lsm_log.c \
276 $(TOP
)/ext
/lsm1
/lsm_main.c \
277 $(TOP
)/ext
/lsm1
/lsm_mem.c \
278 $(TOP
)/ext
/lsm1
/lsm_mutex.c \
279 $(TOP
)/ext
/lsm1
/lsm_shared.c \
280 $(TOP
)/ext
/lsm1
/lsm_sorted.c \
281 $(TOP
)/ext
/lsm1
/lsm_str.c \
282 $(TOP
)/ext
/lsm1
/lsm_tree.c \
283 $(TOP
)/ext
/lsm1
/lsm_unix.c \
284 $(TOP
)/ext
/lsm1
/lsm_varint.c \
285 $(TOP
)/ext
/lsm1
/lsm_vtab.c \
286 $(TOP
)/ext
/lsm1
/lsm_win32.c
289 # Generated source code files
301 # Source code to the test files.
304 $(TOP
)/ext
/expert
/sqlite3expert.c \
305 $(TOP
)/ext
/expert
/test_expert.c \
306 $(TOP
)/ext
/fts3
/fts3_term.c \
307 $(TOP
)/ext
/fts3
/fts3_test.c \
308 $(TOP
)/ext
/rbu
/test_rbu.c \
318 $(TOP
)/src
/test_autoext.c \
319 $(TOP
)/src
/test_async.c \
320 $(TOP
)/src
/test_backup.c \
321 $(TOP
)/src
/test_bestindex.c \
322 $(TOP
)/src
/test_blob.c \
323 $(TOP
)/src
/test_btree.c \
324 $(TOP
)/src
/test_config.c \
325 $(TOP
)/src
/test_delete.c \
326 $(TOP
)/src
/test_demovfs.c \
327 $(TOP
)/src
/test_devsym.c \
328 $(TOP
)/src
/test_fs.c \
329 $(TOP
)/src
/test_func.c \
330 $(TOP
)/src
/test_hexio.c \
331 $(TOP
)/src
/test_init.c \
332 $(TOP
)/src
/test_intarray.c \
333 $(TOP
)/src
/test_journal.c \
334 $(TOP
)/src
/test_malloc.c \
335 $(TOP
)/src
/test_md5.c \
336 $(TOP
)/src
/test_multiplex.c \
337 $(TOP
)/src
/test_mutex.c \
338 $(TOP
)/src
/test_onefile.c \
339 $(TOP
)/src
/test_osinst.c \
340 $(TOP
)/src
/test_pcache.c \
341 $(TOP
)/src
/test_quota.c \
342 $(TOP
)/src
/test_rtree.c \
343 $(TOP
)/src
/test_schema.c \
344 $(TOP
)/src
/test_server.c \
345 $(TOP
)/src
/test_sqllog.c \
346 $(TOP
)/src
/test_superlock.c \
347 $(TOP
)/src
/test_syscall.c \
348 $(TOP
)/src
/test_tclsh.c \
349 $(TOP
)/src
/test_tclvar.c \
350 $(TOP
)/src
/test_thread.c \
351 $(TOP
)/src
/test_vdbecov.c \
352 $(TOP
)/src
/test_vfs.c \
353 $(TOP
)/src
/test_windirent.c \
354 $(TOP
)/src
/test_window.c \
355 $(TOP
)/src
/test_wsd.c
357 # Extensions to be statically loaded.
360 $(TOP
)/ext
/misc
/amatch.c \
361 $(TOP
)/ext
/misc
/carray.c \
362 $(TOP
)/ext
/misc
/closure.c \
363 $(TOP
)/ext
/misc
/csv.c \
364 $(TOP
)/ext
/misc
/eval.c \
365 $(TOP
)/ext
/misc
/explain.c \
366 $(TOP
)/ext
/misc
/fileio.c \
367 $(TOP
)/ext
/misc
/fuzzer.c \
368 $(TOP
)/ext
/misc
/ieee754.c \
369 $(TOP
)/ext
/misc
/mmapwarm.c \
370 $(TOP
)/ext
/misc
/nextchar.c \
371 $(TOP
)/ext
/misc
/normalize.c \
372 $(TOP
)/ext
/misc
/percentile.c \
373 $(TOP
)/ext
/misc
/prefixes.c \
374 $(TOP
)/ext
/misc
/regexp.c \
375 $(TOP
)/ext
/misc
/remember.c \
376 $(TOP
)/ext
/misc
/series.c \
377 $(TOP
)/ext
/misc
/spellfix.c \
378 $(TOP
)/ext
/misc
/totype.c \
379 $(TOP
)/ext
/misc
/unionvtab.c \
380 $(TOP
)/ext
/misc
/wholenumber.c \
381 $(TOP
)/ext
/misc
/zipfile.c \
382 $(TOP
)/ext
/fts5
/fts5_tcl.c \
383 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
384 $(TOP
)/ext
/fts5
/fts5_test_tok.c
387 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
388 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
391 $(TOP
)/src
/attach.c \
392 $(TOP
)/src
/backup.c \
396 $(TOP
)/src
/dbpage.c \
397 $(TOP
)/src
/dbstat.c \
400 $(TOP
)/src
/global.c \
401 $(TOP
)/src
/insert.c \
406 $(TOP
)/src
/os_unix.c \
407 $(TOP
)/src
/os_win.c \
409 $(TOP
)/src
/pragma.c \
410 $(TOP
)/src
/prepare.c \
411 $(TOP
)/src
/printf.c \
412 $(TOP
)/src
/random.c \
413 $(TOP
)/src
/pcache.c \
414 $(TOP
)/src
/pcache1.c \
415 $(TOP
)/src
/select.c \
416 $(TOP
)/src
/threads.c \
417 $(TOP
)/src
/tokenize.c \
420 $(TOP
)/src
/vdbeapi.c \
421 $(TOP
)/src
/vdbeaux.c \
423 $(TOP
)/src
/vdbemem.c \
425 $(TOP
)/src
/wherecode.c \
426 $(TOP
)/src
/whereexpr.c \
428 $(TOP
)/ext
/fts3
/fts3.c \
429 $(TOP
)/ext
/fts3
/fts3_aux.c \
430 $(TOP
)/ext
/fts3
/fts3_expr.c \
431 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
432 $(TOP
)/ext
/fts3
/fts3_write.c \
433 $(TOP
)/ext
/async
/sqlite3async.c \
434 $(TOP
)/ext
/misc
/stmt.c \
435 $(TOP
)/ext
/session
/sqlite3session.c \
436 $(TOP
)/ext
/session
/test_session.c
438 # Header files used by all library source files.
442 $(TOP
)/src
/btreeInt.h \
444 $(TOP
)/src
/hwtime.h \
450 $(TOP
)/src
/os_common.h \
451 $(TOP
)/src
/os_setup.h \
452 $(TOP
)/src
/os_win.h \
454 $(TOP
)/src
/pcache.h \
456 $(TOP
)/src
/pragma.h \
458 $(TOP
)/src
/sqlite3ext.h \
459 $(TOP
)/src
/sqliteInt.h \
460 $(TOP
)/src
/sqliteLimit.h \
462 $(TOP
)/src
/vdbeInt.h \
463 $(TOP
)/src
/vxworks.h \
464 $(TOP
)/src
/whereInt.h
466 # Header files used by extensions
469 $(TOP
)/ext
/fts1
/fts1.h \
470 $(TOP
)/ext
/fts1
/fts1_hash.h \
471 $(TOP
)/ext
/fts1
/fts1_tokenizer.h
473 $(TOP
)/ext
/fts2
/fts2.h \
474 $(TOP
)/ext
/fts2
/fts2_hash.h \
475 $(TOP
)/ext
/fts2
/fts2_tokenizer.h
477 $(TOP
)/ext
/fts3
/fts3.h \
478 $(TOP
)/ext
/fts3
/fts3Int.h \
479 $(TOP
)/ext
/fts3
/fts3_hash.h \
480 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
482 $(TOP
)/ext
/rtree
/rtree.h \
483 $(TOP
)/ext
/rtree
/geopoly.c
485 $(TOP
)/ext
/icu
/sqliteicu.h
487 $(TOP
)/ext
/fts5
/fts5Int.h \
489 $(TOP
)/ext
/fts5
/fts5.h
491 $(TOP
)/ext
/userauth
/sqlite3userauth.h
493 # executables needed for testing
498 sqlite3_analyzer
$(EXE
) \
499 sqlite3_checker
$(EXE
) \
504 # Databases containing fuzzer test cases
507 $(TOP
)/test/fuzzdata1.db \
508 $(TOP
)/test/fuzzdata2.db \
509 $(TOP
)/test/fuzzdata3.db \
510 $(TOP
)/test/fuzzdata4.db \
511 $(TOP
)/test/fuzzdata5.db \
512 $(TOP
)/test/fuzzdata6.db \
513 $(TOP
)/test/fuzzdata7.db \
514 $(TOP
)/test/fuzzdata8.db
516 # Standard options to testfixture
518 TESTOPTS
= --verbose
=file
--output
=test-out.txt
520 # Extra compiler options for various shell tools
522 SHELL_OPT
+= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_FTS4
-DSQLITE_ENABLE_FTS5
523 SHELL_OPT
+= -DSQLITE_ENABLE_RTREE
524 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
525 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
526 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
527 SHELL_OPT
+= -DSQLITE_ENABLE_DBPAGE_VTAB
528 SHELL_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
529 SHELL_OPT
+= -DSQLITE_ENABLE_OFFSET_SQL_FUNC
530 FUZZERSHELL_OPT
= -DSQLITE_ENABLE_JSON1
531 FUZZCHECK_OPT
= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_MEMSYS5
532 FUZZCHECK_OPT
+= -DSQLITE_MAX_MEMORY
=50000000
533 FUZZCHECK_OPT
+= -DSQLITE_PRINTF_PRECISION_LIMIT
=1000
534 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DESERIALIZE
535 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS4
536 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_RTREE
537 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_GEOPOLY
538 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
540 KV_OPT
= -DSQLITE_THREADSAFE
=0 -DSQLITE_DIRECT_OVERFLOW_READ
541 ST_OPT
= -DSQLITE_THREADSAFE
=0
543 # This is the default Makefile target. The objects listed here
544 # are what get build when you type just "make" with no arguments.
546 all: sqlite3.h libsqlite3.a sqlite3
$(EXE
)
548 libsqlite3.a
: $(LIBOBJ
)
549 $(AR
) libsqlite3.a
$(LIBOBJ
)
550 $(RANLIB
) libsqlite3.a
552 sqlite3
$(EXE
): shell.c libsqlite3.a sqlite3.h
553 $(TCCX
) $(READLINE_FLAGS
) -o sqlite3
$(EXE
) $(SHELL_OPT
) \
554 shell.c libsqlite3.a
$(LIBREADLINE
) $(TLIBS
) $(THREADLIB
)
556 sqldiff
$(EXE
): $(TOP
)/tool
/sqldiff.c sqlite3.c sqlite3.h
557 $(TCCX
) -o sqldiff
$(EXE
) -DSQLITE_THREADSAFE
=0 \
558 $(TOP
)/tool
/sqldiff.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
560 dbhash
$(EXE
): $(TOP
)/tool
/dbhash.c sqlite3.c sqlite3.h
561 $(TCCX
) -o dbhash
$(EXE
) -DSQLITE_THREADSAFE
=0 \
562 $(TOP
)/tool
/dbhash.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
564 scrub
$(EXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.o
565 $(TCC
) -I.
-DSCRUB_STANDALONE
-o scrub
$(EXE
) $(TOP
)/ext
/misc
/scrub.c sqlite3.o
$(THREADLIB
)
567 srcck1
$(EXE
): $(TOP
)/tool
/srcck1.c
568 $(BCC
) -o srcck1
$(EXE
) $(TOP
)/tool
/srcck1.c
570 sourcetest
: srcck1
$(EXE
) sqlite3.c
573 fuzzershell
$(EXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
574 $(TCCX
) -o fuzzershell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
575 $(FUZZERSHELL_OPT
) $(TOP
)/tool
/fuzzershell.c sqlite3.c \
576 $(TLIBS
) $(THREADLIB
)
578 dbfuzz
$(EXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
579 $(TCCX
) -o dbfuzz
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
580 $(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c \
581 $(TLIBS
) $(THREADLIB
)
584 -DSQLITE_THREADSAFE
=0 \
585 -DSQLITE_OMIT_LOAD_EXTENSION \
586 -DSQLITE_ENABLE_DESERIALIZE \
588 -DSQLITE_ENABLE_DBSTAT_VTAB \
589 -DSQLITE_ENABLE_RTREE \
590 -DSQLITE_ENABLE_FTS4 \
593 dbfuzz2
$(EXE
): $(TOP
)/test/dbfuzz2.c sqlite3.c sqlite3.h
594 $(TCCX
) -I.
-g
-O0
-DSTANDALONE
-o dbfuzz2
$(EXE
) \
595 $(DBFUZZ2_OPTS
) $(TOP
)/test/dbfuzz2.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
597 fuzzcheck
$(EXE
): $(TOP
)/test/fuzzcheck.c sqlite3.c sqlite3.h
$(TOP
)/test/ossfuzz.c
598 $(TCCX
) -o fuzzcheck
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
599 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) -DSQLITE_OSS_FUZZ \
600 $(TOP
)/test/fuzzcheck.c
$(TOP
)/test/ossfuzz.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
602 ossshell
$(EXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
603 $(TCCX
) -o ossshell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
604 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) \
605 $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
607 sessionfuzz
$(EXE
): $(TOP
)/test/sessionfuzz.c sqlite3.c sqlite3.h
608 $(TCC
) -o sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz.c
-lz
$(TLIBS
) $(THREADLIB
)
610 mptester
$(EXE
): sqlite3.c
$(TOP
)/mptest
/mptest.c
611 $(TCCX
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.c \
612 $(TLIBS
) $(THREADLIB
)
614 MPTEST1
=.
/mptester
$(EXE
) mptest1.db
$(TOP
)/mptest
/crash01.
test --repeat
20
615 MPTEST2
=.
/mptester
$(EXE
) mptest2.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
616 mptest
: mptester
$(EXE
)
617 $(MPTEST1
) --journalmode DELETE
618 $(MPTEST2
) --journalmode WAL
619 $(MPTEST1
) --journalmode WAL
620 $(MPTEST2
) --journalmode PERSIST
621 $(MPTEST1
) --journalmode PERSIST
622 $(MPTEST2
) --journalmode TRUNCATE
623 $(MPTEST1
) --journalmode TRUNCATE
624 $(MPTEST2
) --journalmode DELETE
627 $(TCCX
) -I.
-c sqlite3.c
629 # This target creates a directory named "tsrc" and fills it with
630 # copies of all of the C source code and header files needed to
631 # build on the target system. Some of the C source code and header
632 # files are automatically generated. This target takes care of
633 # all that automatic generation.
635 target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
639 rm tsrc
/sqlite.h.in tsrc
/parse.y
640 tclsh
$(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
641 mv vdbe.new tsrc
/vdbe.c
642 cp fts5.c fts5.h tsrc
645 sqlite3.c
: target_source
$(TOP
)/tool
/mksqlite3c.tcl
646 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
647 cp tsrc
/sqlite3ext.h .
648 cp
$(TOP
)/ext
/session
/sqlite3session.h .
649 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
650 cat sqlite3.c
>>tclsqlite3.c
651 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
652 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
654 sqlite3ext.h
: target_source
655 cp tsrc
/sqlite3ext.h .
657 sqlite3.c-debug
: target_source
$(TOP
)/tool
/mksqlite3c.tcl
658 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
--linemacros
659 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
660 cat sqlite3.c
>>tclsqlite3.c
661 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
662 echo
'#line 1 "tclsqlite.c"' >>tclsqlite3.c
663 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
665 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
666 tclsh
$(TOP
)/tool
/split-sqlite3c.tcl
668 fts2amal.c
: target_source
$(TOP
)/ext
/fts2
/mkfts2amal.tcl
669 tclsh
$(TOP
)/ext
/fts2
/mkfts2amal.tcl
671 fts3amal.c
: target_source
$(TOP
)/ext
/fts3
/mkfts3amal.tcl
672 tclsh
$(TOP
)/ext
/fts3
/mkfts3amal.tcl
674 # Rules to build the LEMON compiler generator
676 lemon
: $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
677 $(BCC
) -o lemon
$(TOP
)/tool
/lemon.c
678 cp
$(TOP
)/tool
/lempar.c .
680 # A tool to generate the source-id
682 mksourceid
: $(TOP
)/tool
/mksourceid.c
683 $(BCC
) -o mksourceid
$(TOP
)/tool
/mksourceid.c
685 # Rules to build individual *.o files from generated *.c files. This
694 # Rules to build individual *.o files from files in the src directory.
696 %.o
: $(TOP
)/src
/%.c
$(HDR
)
699 tclsqlite.o
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
700 $(TCCX
) $(TCL_FLAGS
) -c
$(TOP
)/src
/tclsqlite.c
704 # Rules to build opcodes.c and opcodes.h
706 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
707 tclsh
$(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
709 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
710 cat parse.h
$(TOP
)/src
/vdbe.c | \
711 tclsh
$(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
713 # Rules to build parse.c and parse.h - the outputs of lemon.
717 parse.c
: $(TOP
)/src
/parse.y lemon
718 cp
$(TOP
)/src
/parse.y .
719 .
/lemon
-s
$(OPTS
) parse.y
721 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(TOP
)/VERSION
$(TOP
)/ext
/rtree
/sqlite3rtree.h
722 tclsh
$(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
724 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
725 $(BCC
) -o mkkeywordhash
$(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
726 .
/mkkeywordhash
>keywordhash.h
728 # Source files that go into making shell.c
730 $(TOP
)/src
/shell.c.in \
731 $(TOP
)/ext
/misc
/appendvfs.c \
732 $(TOP
)/ext
/misc
/shathree.c \
733 $(TOP
)/ext
/misc
/fileio.c \
734 $(TOP
)/ext
/misc
/completion.c \
735 $(TOP
)/ext
/misc
/sqlar.c \
736 $(TOP
)/ext
/expert
/sqlite3expert.c \
737 $(TOP
)/ext
/expert
/sqlite3expert.h \
738 $(TOP
)/ext
/misc
/zipfile.c \
739 $(TOP
)/ext
/misc
/memtrace.c \
740 $(TOP
)/ext
/misc
/dbdata.c \
741 $(TOP
)/src
/test_windirent.c
743 shell.c
: $(SHELL_SRC
) $(TOP
)/tool
/mkshellc.tcl
744 tclsh
$(TOP
)/tool
/mkshellc.tcl
>shell.c
748 # Rules to build the extension objects.
750 icu.o
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
751 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
753 fts2.o
: $(TOP
)/ext
/fts2
/fts2.c
$(HDR
) $(EXTHDR
)
754 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2.c
756 fts2_hash.o
: $(TOP
)/ext
/fts2
/fts2_hash.c
$(HDR
) $(EXTHDR
)
757 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_hash.c
759 fts2_icu.o
: $(TOP
)/ext
/fts2
/fts2_icu.c
$(HDR
) $(EXTHDR
)
760 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_icu.c
762 fts2_porter.o
: $(TOP
)/ext
/fts2
/fts2_porter.c
$(HDR
) $(EXTHDR
)
763 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_porter.c
765 fts2_tokenizer.o
: $(TOP
)/ext
/fts2
/fts2_tokenizer.c
$(HDR
) $(EXTHDR
)
766 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer.c
768 fts2_tokenizer1.o
: $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
$(HDR
) $(EXTHDR
)
769 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer1.c
771 fts3.o
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
772 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
774 fts3_aux.o
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
775 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
777 fts3_expr.o
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
778 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
780 fts3_hash.o
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
781 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
783 fts3_icu.o
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
784 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
786 fts3_snippet.o
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
787 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
789 fts3_porter.o
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
790 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
792 fts3_tokenizer.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
793 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
795 fts3_tokenizer1.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
796 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
798 fts3_tokenize_vtab.o
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
799 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
801 fts3_unicode.o
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
802 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
804 fts3_unicode2.o
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
805 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
807 fts3_write.o
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
808 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
811 $(TCCX
) -DSQLITE_CORE
-c fts5.c
813 json1.o
: $(TOP
)/ext
/misc
/json1.c
814 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/json1.c
816 stmt.o
: $(TOP
)/ext
/misc
/stmt.c
817 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
819 rtree.o
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
820 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
824 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
825 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
827 .
/lemon
$(OPTS
) fts5parse.y
829 fts5parse.h
: fts5parse.c
831 fts5.c
: $(FTS5_SRC
) $(FTS5_HDR
)
832 tclsh
$(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
833 cp
$(TOP
)/ext
/fts5
/fts5.h .
836 tclsh
$(TOP
)/ext
/lsm1
/tool
/mklsm1c.tcl
837 cp
$(TOP
)/ext
/lsm1
/lsm.h .
839 userauth.o
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
840 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
842 sqlite3session.o
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
843 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
845 sqlite3rbu.o
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
846 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
848 # Rules for building test programs and for running tests
850 tclsqlite3
: $(TOP
)/src
/tclsqlite.c libsqlite3.a
851 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
-o tclsqlite3 \
852 $(TOP
)/src
/tclsqlite.c libsqlite3.a
$(LIBTCL
) $(THREADLIB
)
854 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
$(TOP
)/tool
/mkccode.tcl
855 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
>sqlite3_analyzer.c
857 sqlite3_analyzer
$(EXE
): sqlite3_analyzer.c
858 $(TCCX
) $(TCL_FLAGS
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
860 sqltclsh.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/sqltclsh.tcl
$(TOP
)/ext
/misc
/appendvfs.c
$(TOP
)/tool
/mkccode.tcl
861 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqltclsh.c.in
>sqltclsh.c
863 sqltclsh
$(EXE
): sqltclsh.c
864 $(TCCX
) $(TCL_FLAGS
) sqltclsh.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
866 sqlite3_expert
$(EXE
): $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
867 $(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
)
870 $(TOP
)/tool
/mkccode.tcl \
872 $(TOP
)/src
/tclsqlite.c \
873 $(TOP
)/ext
/repair
/sqlite3_checker.tcl \
874 $(TOP
)/ext
/repair
/checkindex.c \
875 $(TOP
)/ext
/repair
/checkfreelist.c \
876 $(TOP
)/ext
/misc
/btreeinfo.c \
877 $(TOP
)/ext
/repair
/sqlite3_checker.c.in
879 sqlite3_checker.c
: $(CHECKER_DEPS
)
880 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/ext
/repair
/sqlite3_checker.c.in
>$@
882 sqlite3_checker
$(TEXE
): sqlite3_checker.c
883 $(TCCX
) $(TCL_FLAGS
) sqlite3_checker.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
885 dbdump
$(EXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
886 $(TCCX
) -DDBDUMP_STANDALONE
-o dbdump
$(EXE
) \
887 $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
$(THREADLIB
)
889 # Rules to build the 'testfixture' application.
891 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
892 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
893 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
894 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
895 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
896 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_DBPAGE_VTAB
897 TESTFIXTURE_FLAGS
+= -DTCLSH_INIT_PROC
=sqlite3TestInit
899 testfixture
$(EXE
): $(TESTSRC2
) libsqlite3.a
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
900 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
901 $(TESTSRC
) $(TESTSRC2
) $(TOP
)/src
/tclsqlite.c \
902 -o testfixture
$(EXE
) $(LIBTCL
) libsqlite3.a
$(THREADLIB
)
904 amalgamation-testfixture
$(EXE
): sqlite3.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c \
905 $(TOP
)/ext
/session
/test_session.c
906 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
907 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c \
908 $(TOP
)/ext
/session
/test_session.c \
909 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
911 fts3-testfixture
$(EXE
): sqlite3.c fts3amal.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
912 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
913 -DSQLITE_ENABLE_FTS3
=1 \
914 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c fts3amal.c \
915 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
917 coretestprogs
: $(TESTPROGS
)
919 testprogs
: coretestprogs srcck1
$(EXE
) fuzzcheck
$(EXE
) sessionfuzz
$(EXE
)
921 fulltest
: $(TESTPROGS
) fuzztest
922 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
924 soaktest
: $(TESTPROGS
)
925 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
927 fulltestonly
: $(TESTPROGS
) fuzztest
928 .
/testfixture
$(EXE
) $(TOP
)/test/full.
test $(TESTOPTS
)
930 queryplantest
: testfixture
$(EXE
) sqlite3
$(EXE
)
931 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test queryplanner
$(TESTOPTS
)
933 fuzztest
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz-data1.db
934 .
/fuzzcheck
$(EXE
) $(FUZZDATA
)
935 .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
937 valgrindfuzz
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz-data1.db
938 valgrind .
/fuzzcheck
$(EXE
) --cell-size-check
--limit-mem
10M
--timeout
600 $(FUZZDATA
)
939 valgrind .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
941 # The veryquick.test TCL tests.
943 tcltest
: .
/testfixture
$(EXE
)
944 .
/testfixture
$(EXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
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
956 # Run a test using valgrind. This can take a really long time
957 # because valgrind is so much slower than a native machine.
959 valgrindtest
: $(TESTPROGS
) valgrindfuzz
960 OMIT_MISUSE
=1 valgrind
-v \
961 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
963 # A very fast test that checks basic sanity. The name comes from
964 # the 60s-era electronics testing: "Turn it on and see if smoke
967 smoketest
: $(TESTPROGS
) fuzzcheck
$(EXE
)
968 .
/testfixture
$(EXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
970 # The next two rules are used to support the "threadtest" target. Building
971 # threadtest runs a few thread-safety tests that are implemented in C. This
972 # target is invoked by the releasetest.tcl script.
974 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
975 $(TOP
)/test/tt3_checkpoint.c \
976 $(TOP
)/test/tt3_index.c \
977 $(TOP
)/test/tt3_vacuum.c \
978 $(TOP
)/test/tt3_stress.c \
979 $(TOP
)/test/tt3_lookaside1.c
981 threadtest3
$(EXE
): sqlite3.o
$(THREADTEST3_SRC
) $(TOP
)/src
/test_multiplex.c
982 $(TCCX
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.o
-o
$@
$(THREADLIB
)
984 threadtest
: threadtest3
$(EXE
)
987 TEST_EXTENSION
= $(SHPREFIX
)testloadext.
$(SO
)
988 $(TEST_EXTENSION
): $(TOP
)/src
/test_loadext.c
989 $(MKSHLIB
) $(TOP
)/src
/test_loadext.c
-o
$(TEST_EXTENSION
)
991 extensiontest
: testfixture
$(EXE
) $(TEST_EXTENSION
)
992 .
/testfixture
$(EXE
) $(TOP
)/test/loadext.
test
994 dbtotxt
$(EXE
): $(TOP
)/tool
/dbtotxt.c
995 $(TCC
) -o dbtotxt
$(EXE
) $(TOP
)/tool
/dbtotxt.c
997 showdb
$(EXE
): $(TOP
)/tool
/showdb.c sqlite3.o
998 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showdb
$(EXE
) \
999 $(TOP
)/tool
/showdb.c sqlite3.o
$(THREADLIB
)
1001 showstat4
$(EXE
): $(TOP
)/tool
/showstat4.c sqlite3.o
1002 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showstat4
$(EXE
) \
1003 $(TOP
)/tool
/showstat4.c sqlite3.o
$(THREADLIB
)
1005 showjournal
$(EXE
): $(TOP
)/tool
/showjournal.c sqlite3.o
1006 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showjournal
$(EXE
) \
1007 $(TOP
)/tool
/showjournal.c sqlite3.o
$(THREADLIB
)
1009 showwal
$(EXE
): $(TOP
)/tool
/showwal.c sqlite3.o
1010 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showwal
$(EXE
) \
1011 $(TOP
)/tool
/showwal.c sqlite3.o
$(THREADLIB
)
1013 showshm
$(EXE
): $(TOP
)/tool
/showshm.c
1014 $(TCC
) -o showshm
$(EXE
) $(TOP
)/tool
/showshm.c
1016 index_usage
$(EXE
): $(TOP
)/tool
/index_usage.c sqlite3.o
1017 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_DEPRECATED
$(SHELL_OPTS
) -o index_usage
$(EXE
) \
1018 $(TOP
)/tool
/index_usage.c sqlite3.o
$(THREADLIB
)
1020 changeset
$(EXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.o
1021 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changeset
$(EXE
) \
1022 $(TOP
)/ext
/session
/changeset.c sqlite3.o
$(THREADLIB
)
1024 changesetfuzz
$(EXE
): $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
1025 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changesetfuzz
$(EXE
) \
1026 $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
$(THREADLIB
)
1028 fts3view
$(EXE
): $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
1029 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o fts3view
$(EXE
) \
1030 $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
$(THREADLIB
)
1032 rollback-test
$(EXE
): $(TOP
)/tool
/rollback-test.c sqlite3.o
1033 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o rollback-test
$(EXE
) \
1034 $(TOP
)/tool
/rollback-test.c sqlite3.o
$(THREADLIB
)
1036 atrc
$(EXE
): $(TOP
)/test/atrc.c sqlite3.o
1037 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o atrc
$(EXE
) \
1038 $(TOP
)/test/atrc.c sqlite3.o
$(THREADLIB
)
1040 LogEst
$(EXE
): $(TOP
)/tool
/logest.c sqlite3.h
1041 $(TCC
) -o LogEst
$(EXE
) $(TOP
)/tool
/logest.c
1043 wordcount
$(EXE
): $(TOP
)/test/wordcount.c sqlite3.c
1044 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o wordcount
$(EXE
) \
1045 $(TOP
)/test/wordcount.c sqlite3.c
1047 speedtest1
$(EXE
): $(TOP
)/test/speedtest1.c sqlite3.c
1048 $(TCCX
) -I.
$(ST_OPT
) -o speedtest1
$(EXE
) $(TOP
)/test/speedtest1.c sqlite3.c
$(THREADLIB
)
1050 kvtest
$(EXE
): $(TOP
)/test/kvtest.c sqlite3.c
1051 $(TCCX
) -I.
$(KV_OPT
) -o kvtest
$(EXE
) $(TOP
)/test/kvtest.c sqlite3.c
$(THREADLIB
)
1053 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.o
1054 $(TCC
) -I.
-o rbu
$(EXE
) $(TOP
)/ext
/rbu
/rbu.c sqlite3.o \
1057 loadfts
: $(TOP
)/tool
/loadfts.c libsqlite3.a
1058 $(TCC
) $(TOP
)/tool
/loadfts.c libsqlite3.a
-o loadfts
$(THREADLIB
)
1060 # This target will fail if the SQLite amalgamation contains any exported
1061 # symbols that do not begin with "sqlite3_". It is run as part of the
1062 # releasetest.tcl script.
1064 checksymbols
: sqlite3.o
1065 nm
-g
--defined-only sqlite3.o | grep
-v
" sqlite3_" ; test $$?
-ne
0
1067 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1068 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1069 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1071 amalgamation-tarball
: sqlite3.c
1072 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1074 snapshot-tarball
: sqlite3.c
1075 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1078 # Standard install and cleanup targets
1080 install: sqlite3 libsqlite3.a sqlite3.h
1082 mv libsqlite3.a
/usr
/lib
1083 mv sqlite3.h
/usr
/include
1086 rm -f
*.o sqlite3 sqlite3.exe libsqlite3.a sqlite3.h opcodes.
*
1087 rm -f lemon lemon.exe lempar.c parse.
* sqlite
*.
tar.gz
1088 rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h
1090 rm -f
*.da
*.bb
*.bbg gmon.out
1091 rm -rf tsrc target_source
1092 rm -f testloadext.dll libtestloadext.so
1093 rm -f amalgamation-testfixture amalgamation-testfixture.exe
1094 rm -f fts3-testfixture fts3-testfixture.exe
1095 rm -f testfixture testfixture.exe
1096 rm -f threadtest3 threadtest3.exe
1097 rm -f LogEst LogEst.exe
1098 rm -f fts3view fts3view.exe
1099 rm -f rollback-test rollback-test.exe
1100 rm -f showdb showdb.exe
1101 rm -f showjournal showjournal.exe
1102 rm -f showstat4 showstat4.exe
1103 rm -f showwal showwal.exe
1104 rm -f changeset changeset.exe
1105 rm -f speedtest1 speedtest1.exe
1106 rm -f wordcount wordcount.exe
1108 rm -f srcck1 srcck1.exe
1109 rm -f sqlite3.c sqlite3-
*.c fts?amal.c tclsqlite3.c
1111 rm -f
shell.c sqlite3ext.h
1112 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c
1113 rm -f sqlite3_expert sqlite3_expert.exe
1114 rm -f sqlite-
*-output.vsix
1115 rm -f mptester mptester.exe
1116 rm -f fuzzershell fuzzershell.exe
1117 rm -f fuzzcheck fuzzcheck.exe
1119 rm -f sqldiff sqldiff.exe
1120 rm -f fts5.
* fts5parse.
*