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 vdbevtab.o \
78 wal.o walker.o where.o wherecode.o whereexpr.o \
81 LIBOBJ
+= sqlite3session.o
83 # All of the source code files.
87 $(TOP
)/src
/analyze.c \
92 $(TOP
)/src
/btmutex.c \
95 $(TOP
)/src
/btreeInt.h \
97 $(TOP
)/src
/callback.c \
98 $(TOP
)/src
/complete.c \
101 $(TOP
)/src
/dbpage.c \
102 $(TOP
)/src
/dbstat.c \
103 $(TOP
)/src
/delete.c \
108 $(TOP
)/src
/global.c \
111 $(TOP
)/src
/hwtime.h \
112 $(TOP
)/src
/insert.c \
113 $(TOP
)/src
/legacy.c \
114 $(TOP
)/src
/loadext.c \
116 $(TOP
)/src
/malloc.c \
123 $(TOP
)/src
/memjournal.c \
127 $(TOP
)/src
/mutex_noop.c \
128 $(TOP
)/src
/mutex_unix.c \
129 $(TOP
)/src
/mutex_w32.c \
130 $(TOP
)/src
/notify.c \
133 $(TOP
)/src
/os_common.h \
134 $(TOP
)/src
/os_setup.h \
135 $(TOP
)/src
/os_unix.c \
136 $(TOP
)/src
/os_win.c \
137 $(TOP
)/src
/os_win.h \
141 $(TOP
)/src
/pcache.c \
142 $(TOP
)/src
/pcache.h \
143 $(TOP
)/src
/pcache1.c \
144 $(TOP
)/src
/pragma.c \
145 $(TOP
)/src
/pragma.h \
146 $(TOP
)/src
/prepare.c \
147 $(TOP
)/src
/printf.c \
148 $(TOP
)/src
/random.c \
149 $(TOP
)/src
/resolve.c \
150 $(TOP
)/src
/rowset.c \
151 $(TOP
)/src
/select.c \
152 $(TOP
)/src
/status.c \
153 $(TOP
)/src
/shell.c.in \
154 $(TOP
)/src
/sqlite.h.in \
155 $(TOP
)/src
/sqlite3ext.h \
156 $(TOP
)/src
/sqliteInt.h \
157 $(TOP
)/src
/sqliteLimit.h \
159 $(TOP
)/src
/tclsqlite.c \
160 $(TOP
)/src
/threads.c \
161 $(TOP
)/src
/tokenize.c \
162 $(TOP
)/src
/treeview.c \
163 $(TOP
)/src
/trigger.c \
165 $(TOP
)/src
/update.c \
166 $(TOP
)/src
/upsert.c \
168 $(TOP
)/src
/vacuum.c \
171 $(TOP
)/src
/vdbeapi.c \
172 $(TOP
)/src
/vdbeaux.c \
173 $(TOP
)/src
/vdbeblob.c \
174 $(TOP
)/src
/vdbemem.c \
175 $(TOP
)/src
/vdbesort.c \
176 $(TOP
)/src
/vdbetrace.c \
177 $(TOP
)/src
/vdbevtab.c \
178 $(TOP
)/src
/vdbeInt.h \
180 $(TOP
)/src
/vxworks.h \
183 $(TOP
)/src
/walker.c \
185 $(TOP
)/src
/wherecode.c \
186 $(TOP
)/src
/whereexpr.c \
187 $(TOP
)/src
/whereInt.h \
190 # Source code for extensions
193 $(TOP
)/ext
/fts1
/fts1.c \
194 $(TOP
)/ext
/fts1
/fts1.h \
195 $(TOP
)/ext
/fts1
/fts1_hash.c \
196 $(TOP
)/ext
/fts1
/fts1_hash.h \
197 $(TOP
)/ext
/fts1
/fts1_porter.c \
198 $(TOP
)/ext
/fts1
/fts1_tokenizer.h \
199 $(TOP
)/ext
/fts1
/fts1_tokenizer1.c
201 $(TOP
)/ext
/fts2
/fts2.c \
202 $(TOP
)/ext
/fts2
/fts2.h \
203 $(TOP
)/ext
/fts2
/fts2_hash.c \
204 $(TOP
)/ext
/fts2
/fts2_hash.h \
205 $(TOP
)/ext
/fts2
/fts2_icu.c \
206 $(TOP
)/ext
/fts2
/fts2_porter.c \
207 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
208 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
209 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
211 $(TOP
)/ext
/fts3
/fts3.c \
212 $(TOP
)/ext
/fts3
/fts3.h \
213 $(TOP
)/ext
/fts3
/fts3Int.h \
214 $(TOP
)/ext
/fts3
/fts3_aux.c \
215 $(TOP
)/ext
/fts3
/fts3_expr.c \
216 $(TOP
)/ext
/fts3
/fts3_hash.c \
217 $(TOP
)/ext
/fts3
/fts3_hash.h \
218 $(TOP
)/ext
/fts3
/fts3_icu.c \
219 $(TOP
)/ext
/fts3
/fts3_porter.c \
220 $(TOP
)/ext
/fts3
/fts3_snippet.c \
221 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
222 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
223 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
224 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
225 $(TOP
)/ext
/fts3
/fts3_unicode.c \
226 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
227 $(TOP
)/ext
/fts3
/fts3_write.c
229 $(TOP
)/ext
/icu
/sqliteicu.h \
232 $(TOP
)/ext
/rtree
/sqlite3rtree.h \
233 $(TOP
)/ext
/rtree
/rtree.h \
234 $(TOP
)/ext
/rtree
/rtree.c \
235 $(TOP
)/ext
/rtree
/geopoly.c
237 $(TOP
)/ext
/session
/sqlite3session.c \
238 $(TOP
)/ext
/session
/sqlite3session.h
240 $(TOP
)/ext
/userauth
/userauth.c \
241 $(TOP
)/ext
/userauth
/sqlite3userauth.h
243 $(TOP
)/ext
/rbu
/sqlite3rbu.c \
244 $(TOP
)/ext
/rbu
/sqlite3rbu.h
246 $(TOP
)/ext
/misc
/json1.c \
247 $(TOP
)/ext
/misc
/stmt.c
253 $(TOP
)/ext
/fts5
/fts5.h \
254 $(TOP
)/ext
/fts5
/fts5Int.h \
258 $(TOP
)/ext
/fts5
/fts5_aux.c \
259 $(TOP
)/ext
/fts5
/fts5_buffer.c \
260 $(TOP
)/ext
/fts5
/fts5_main.c \
261 $(TOP
)/ext
/fts5
/fts5_config.c \
262 $(TOP
)/ext
/fts5
/fts5_expr.c \
263 $(TOP
)/ext
/fts5
/fts5_hash.c \
264 $(TOP
)/ext
/fts5
/fts5_index.c \
266 $(TOP
)/ext
/fts5
/fts5_storage.c \
267 $(TOP
)/ext
/fts5
/fts5_tokenize.c \
268 $(TOP
)/ext
/fts5
/fts5_unicode2.c \
269 $(TOP
)/ext
/fts5
/fts5_varint.c \
270 $(TOP
)/ext
/fts5
/fts5_vocab.c \
273 $(TOP
)/ext
/lsm1
/lsm.h \
274 $(TOP
)/ext
/lsm1
/lsmInt.h \
275 $(TOP
)/ext
/lsm1
/lsm_ckpt.c \
276 $(TOP
)/ext
/lsm1
/lsm_file.c \
277 $(TOP
)/ext
/lsm1
/lsm_log.c \
278 $(TOP
)/ext
/lsm1
/lsm_main.c \
279 $(TOP
)/ext
/lsm1
/lsm_mem.c \
280 $(TOP
)/ext
/lsm1
/lsm_mutex.c \
281 $(TOP
)/ext
/lsm1
/lsm_shared.c \
282 $(TOP
)/ext
/lsm1
/lsm_sorted.c \
283 $(TOP
)/ext
/lsm1
/lsm_str.c \
284 $(TOP
)/ext
/lsm1
/lsm_tree.c \
285 $(TOP
)/ext
/lsm1
/lsm_unix.c \
286 $(TOP
)/ext
/lsm1
/lsm_varint.c \
287 $(TOP
)/ext
/lsm1
/lsm_vtab.c \
288 $(TOP
)/ext
/lsm1
/lsm_win32.c
291 # Generated source code files
303 # Source code to the test files.
306 $(TOP
)/ext
/expert
/sqlite3expert.c \
307 $(TOP
)/ext
/expert
/test_expert.c \
308 $(TOP
)/ext
/fts3
/fts3_term.c \
309 $(TOP
)/ext
/fts3
/fts3_test.c \
310 $(TOP
)/ext
/rbu
/test_rbu.c \
320 $(TOP
)/src
/test_autoext.c \
321 $(TOP
)/src
/test_async.c \
322 $(TOP
)/src
/test_backup.c \
323 $(TOP
)/src
/test_bestindex.c \
324 $(TOP
)/src
/test_blob.c \
325 $(TOP
)/src
/test_btree.c \
326 $(TOP
)/src
/test_config.c \
327 $(TOP
)/src
/test_delete.c \
328 $(TOP
)/src
/test_demovfs.c \
329 $(TOP
)/src
/test_devsym.c \
330 $(TOP
)/src
/test_fs.c \
331 $(TOP
)/src
/test_func.c \
332 $(TOP
)/src
/test_hexio.c \
333 $(TOP
)/src
/test_init.c \
334 $(TOP
)/src
/test_intarray.c \
335 $(TOP
)/src
/test_journal.c \
336 $(TOP
)/src
/test_malloc.c \
337 $(TOP
)/src
/test_md5.c \
338 $(TOP
)/src
/test_multiplex.c \
339 $(TOP
)/src
/test_mutex.c \
340 $(TOP
)/src
/test_onefile.c \
341 $(TOP
)/src
/test_osinst.c \
342 $(TOP
)/src
/test_pcache.c \
343 $(TOP
)/src
/test_quota.c \
344 $(TOP
)/src
/test_rtree.c \
345 $(TOP
)/src
/test_schema.c \
346 $(TOP
)/src
/test_server.c \
347 $(TOP
)/src
/test_sqllog.c \
348 $(TOP
)/src
/test_superlock.c \
349 $(TOP
)/src
/test_syscall.c \
350 $(TOP
)/src
/test_tclsh.c \
351 $(TOP
)/src
/test_tclvar.c \
352 $(TOP
)/src
/test_thread.c \
353 $(TOP
)/src
/test_vdbecov.c \
354 $(TOP
)/src
/test_vfs.c \
355 $(TOP
)/src
/test_windirent.c \
356 $(TOP
)/src
/test_window.c \
357 $(TOP
)/src
/test_wsd.c
359 # Extensions to be statically loaded.
362 $(TOP
)/ext
/misc
/amatch.c \
363 $(TOP
)/ext
/misc
/carray.c \
364 $(TOP
)/ext
/misc
/closure.c \
365 $(TOP
)/ext
/misc
/csv.c \
366 $(TOP
)/ext
/misc
/decimal.c \
367 $(TOP
)/ext
/misc
/eval.c \
368 $(TOP
)/ext
/misc
/explain.c \
369 $(TOP
)/ext
/misc
/fileio.c \
370 $(TOP
)/ext
/misc
/fuzzer.c \
371 $(TOP
)/ext
/misc
/ieee754.c \
372 $(TOP
)/ext
/misc
/mmapwarm.c \
373 $(TOP
)/ext
/misc
/nextchar.c \
374 $(TOP
)/ext
/misc
/normalize.c \
375 $(TOP
)/ext
/misc
/percentile.c \
376 $(TOP
)/ext
/misc
/prefixes.c \
377 $(TOP
)/ext
/misc
/regexp.c \
378 $(TOP
)/ext
/misc
/remember.c \
379 $(TOP
)/ext
/misc
/series.c \
380 $(TOP
)/ext
/misc
/spellfix.c \
381 $(TOP
)/ext
/misc
/totype.c \
382 $(TOP
)/ext
/misc
/unionvtab.c \
383 $(TOP
)/ext
/misc
/wholenumber.c \
384 $(TOP
)/ext
/misc
/zipfile.c \
385 $(TOP
)/ext
/fts5
/fts5_tcl.c \
386 $(TOP
)/ext
/fts5
/fts5_test_mi.c \
387 $(TOP
)/ext
/fts5
/fts5_test_tok.c
390 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
391 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
394 $(TOP
)/src
/attach.c \
395 $(TOP
)/src
/backup.c \
399 $(TOP
)/src
/dbpage.c \
400 $(TOP
)/src
/dbstat.c \
403 $(TOP
)/src
/global.c \
404 $(TOP
)/src
/insert.c \
409 $(TOP
)/src
/os_unix.c \
410 $(TOP
)/src
/os_win.c \
412 $(TOP
)/src
/pragma.c \
413 $(TOP
)/src
/prepare.c \
414 $(TOP
)/src
/printf.c \
415 $(TOP
)/src
/random.c \
416 $(TOP
)/src
/pcache.c \
417 $(TOP
)/src
/pcache1.c \
418 $(TOP
)/src
/select.c \
419 $(TOP
)/src
/threads.c \
420 $(TOP
)/src
/tokenize.c \
423 $(TOP
)/src
/vdbeapi.c \
424 $(TOP
)/src
/vdbeaux.c \
426 $(TOP
)/src
/vdbemem.c \
427 $(TOP
)/src
/vdbevtab.c \
429 $(TOP
)/src
/wherecode.c \
430 $(TOP
)/src
/whereexpr.c \
432 $(TOP
)/ext
/fts3
/fts3.c \
433 $(TOP
)/ext
/fts3
/fts3_aux.c \
434 $(TOP
)/ext
/fts3
/fts3_expr.c \
435 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
436 $(TOP
)/ext
/fts3
/fts3_write.c \
437 $(TOP
)/ext
/async
/sqlite3async.c \
438 $(TOP
)/ext
/misc
/stmt.c \
439 $(TOP
)/ext
/session
/sqlite3session.c \
440 $(TOP
)/ext
/session
/test_session.c
442 # Header files used by all library source files.
446 $(TOP
)/src
/btreeInt.h \
448 $(TOP
)/src
/hwtime.h \
454 $(TOP
)/src
/os_common.h \
455 $(TOP
)/src
/os_setup.h \
456 $(TOP
)/src
/os_win.h \
458 $(TOP
)/src
/pcache.h \
460 $(TOP
)/src
/pragma.h \
462 $(TOP
)/src
/sqlite3ext.h \
463 $(TOP
)/src
/sqliteInt.h \
464 $(TOP
)/src
/sqliteLimit.h \
466 $(TOP
)/src
/vdbeInt.h \
467 $(TOP
)/src
/vxworks.h \
468 $(TOP
)/src
/whereInt.h
470 # Header files used by extensions
473 $(TOP
)/ext
/fts1
/fts1.h \
474 $(TOP
)/ext
/fts1
/fts1_hash.h \
475 $(TOP
)/ext
/fts1
/fts1_tokenizer.h
477 $(TOP
)/ext
/fts2
/fts2.h \
478 $(TOP
)/ext
/fts2
/fts2_hash.h \
479 $(TOP
)/ext
/fts2
/fts2_tokenizer.h
481 $(TOP
)/ext
/fts3
/fts3.h \
482 $(TOP
)/ext
/fts3
/fts3Int.h \
483 $(TOP
)/ext
/fts3
/fts3_hash.h \
484 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
486 $(TOP
)/ext
/rtree
/rtree.h \
487 $(TOP
)/ext
/rtree
/geopoly.c
489 $(TOP
)/ext
/icu
/sqliteicu.h
491 $(TOP
)/ext
/fts5
/fts5Int.h \
493 $(TOP
)/ext
/fts5
/fts5.h
495 $(TOP
)/ext
/userauth
/sqlite3userauth.h
497 # executables needed for testing
502 sqlite3_analyzer
$(EXE
) \
503 sqlite3_checker
$(EXE
) \
508 # Databases containing fuzzer test cases
511 $(TOP
)/test/fuzzdata1.db \
512 $(TOP
)/test/fuzzdata2.db \
513 $(TOP
)/test/fuzzdata3.db \
514 $(TOP
)/test/fuzzdata4.db \
515 $(TOP
)/test/fuzzdata5.db \
516 $(TOP
)/test/fuzzdata6.db \
517 $(TOP
)/test/fuzzdata7.db \
518 $(TOP
)/test/fuzzdata8.db
520 # Standard options to testfixture
522 TESTOPTS
= --verbose
=file
--output
=test-out.txt
524 # Extra compiler options for various shell tools
526 SHELL_OPT
+= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_FTS4
-DSQLITE_ENABLE_FTS5
527 SHELL_OPT
+= -DSQLITE_ENABLE_RTREE
528 SHELL_OPT
+= -DSQLITE_ENABLE_EXPLAIN_COMMENTS
529 SHELL_OPT
+= -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
530 SHELL_OPT
+= -DSQLITE_ENABLE_STMTVTAB
531 SHELL_OPT
+= -DSQLITE_ENABLE_DBPAGE_VTAB
532 SHELL_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
533 SHELL_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
534 SHELL_OPT
+= -DSQLITE_ENABLE_OFFSET_SQL_FUNC
535 FUZZERSHELL_OPT
= -DSQLITE_ENABLE_JSON1
536 FUZZCHECK_OPT
= -DSQLITE_ENABLE_JSON1
-DSQLITE_ENABLE_MEMSYS5
537 FUZZCHECK_OPT
+= -DSQLITE_MAX_MEMORY
=50000000
538 FUZZCHECK_OPT
+= -DSQLITE_PRINTF_PRECISION_LIMIT
=1000
539 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DESERIALIZE
540 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_FTS4
541 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_RTREE
542 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_GEOPOLY
543 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_DBSTAT_VTAB
544 FUZZCHECK_OPT
+= -DSQLITE_ENABLE_BYTECODE_VTAB
546 KV_OPT
= -DSQLITE_THREADSAFE
=0 -DSQLITE_DIRECT_OVERFLOW_READ
547 ST_OPT
= -DSQLITE_THREADSAFE
=0
549 # This is the default Makefile target. The objects listed here
550 # are what get build when you type just "make" with no arguments.
552 all: sqlite3.h libsqlite3.a sqlite3
$(EXE
)
554 libsqlite3.a
: $(LIBOBJ
)
555 $(AR
) libsqlite3.a
$(LIBOBJ
)
556 $(RANLIB
) libsqlite3.a
558 sqlite3
$(EXE
): shell.c libsqlite3.a sqlite3.h
559 $(TCCX
) $(READLINE_FLAGS
) -o sqlite3
$(EXE
) $(SHELL_OPT
) \
560 shell.c libsqlite3.a
$(LIBREADLINE
) $(TLIBS
) $(THREADLIB
)
562 sqldiff
$(EXE
): $(TOP
)/tool
/sqldiff.c sqlite3.c sqlite3.h
563 $(TCCX
) -o sqldiff
$(EXE
) -DSQLITE_THREADSAFE
=0 \
564 $(TOP
)/tool
/sqldiff.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
566 dbhash
$(EXE
): $(TOP
)/tool
/dbhash.c sqlite3.c sqlite3.h
567 $(TCCX
) -o dbhash
$(EXE
) -DSQLITE_THREADSAFE
=0 \
568 $(TOP
)/tool
/dbhash.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
570 scrub
$(EXE
): $(TOP
)/ext
/misc
/scrub.c sqlite3.o
571 $(TCC
) -I.
-DSCRUB_STANDALONE
-o scrub
$(EXE
) $(TOP
)/ext
/misc
/scrub.c sqlite3.o
$(THREADLIB
)
573 srcck1
$(EXE
): $(TOP
)/tool
/srcck1.c
574 $(BCC
) -o srcck1
$(EXE
) $(TOP
)/tool
/srcck1.c
576 sourcetest
: srcck1
$(EXE
) sqlite3.c
579 fuzzershell
$(EXE
): $(TOP
)/tool
/fuzzershell.c sqlite3.c sqlite3.h
580 $(TCCX
) -o fuzzershell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
581 $(FUZZERSHELL_OPT
) $(TOP
)/tool
/fuzzershell.c sqlite3.c \
582 $(TLIBS
) $(THREADLIB
)
584 dbfuzz
$(EXE
): $(TOP
)/test/dbfuzz.c sqlite3.c sqlite3.h
585 $(TCCX
) -o dbfuzz
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
586 $(DBFUZZ_OPT
) $(TOP
)/test/dbfuzz.c sqlite3.c \
587 $(TLIBS
) $(THREADLIB
)
590 -DSQLITE_THREADSAFE
=0 \
591 -DSQLITE_OMIT_LOAD_EXTENSION \
592 -DSQLITE_ENABLE_DESERIALIZE \
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
): $(TOP
)/test/fuzzcheck.c sqlite3.c sqlite3.h
$(TOP
)/test/ossfuzz.c
605 $(TCCX
) -o fuzzcheck
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
606 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) -DSQLITE_OSS_FUZZ \
607 $(TOP
)/test/fuzzcheck.c
$(TOP
)/test/ossfuzz.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
609 ossshell
$(EXE
): $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c sqlite3.h
610 $(TCCX
) -o ossshell
$(EXE
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION \
611 -DSQLITE_ENABLE_MEMSYS5
$(FUZZCHECK_OPT
) \
612 $(TOP
)/test/ossfuzz.c
$(TOP
)/test/ossshell.c sqlite3.c
$(TLIBS
) $(THREADLIB
)
614 sessionfuzz
$(EXE
): $(TOP
)/test/sessionfuzz.c sqlite3.c sqlite3.h
615 $(TCC
) -o sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz.c
-lz
$(TLIBS
) $(THREADLIB
)
617 mptester
$(EXE
): sqlite3.c
$(TOP
)/mptest
/mptest.c
618 $(TCCX
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.c \
619 $(TLIBS
) $(THREADLIB
)
621 MPTEST1
=.
/mptester
$(EXE
) mptest1.db
$(TOP
)/mptest
/crash01.
test --repeat
20
622 MPTEST2
=.
/mptester
$(EXE
) mptest2.db
$(TOP
)/mptest
/multiwrite01.
test --repeat
20
623 mptest
: mptester
$(EXE
)
624 $(MPTEST1
) --journalmode DELETE
625 $(MPTEST2
) --journalmode WAL
626 $(MPTEST1
) --journalmode WAL
627 $(MPTEST2
) --journalmode PERSIST
628 $(MPTEST1
) --journalmode PERSIST
629 $(MPTEST2
) --journalmode TRUNCATE
630 $(MPTEST1
) --journalmode TRUNCATE
631 $(MPTEST2
) --journalmode DELETE
634 $(TCCX
) -I.
-c sqlite3.c
636 # This target creates a directory named "tsrc" and fills it with
637 # copies of all of the C source code and header files needed to
638 # build on the target system. Some of the C source code and header
639 # files are automatically generated. This target takes care of
640 # all that automatic generation.
642 target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl fts5.c
646 rm tsrc
/sqlite.h.in tsrc
/parse.y
647 tclsh
$(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
648 mv vdbe.new tsrc
/vdbe.c
649 cp fts5.c fts5.h tsrc
652 sqlite3.c
: target_source
$(TOP
)/tool
/mksqlite3c.tcl
653 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
654 cp tsrc
/sqlite3ext.h .
655 cp
$(TOP
)/ext
/session
/sqlite3session.h .
656 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
657 cat sqlite3.c
>>tclsqlite3.c
658 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
659 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
661 sqlite3ext.h
: target_source
662 cp tsrc
/sqlite3ext.h .
664 sqlite3.c-debug
: target_source
$(TOP
)/tool
/mksqlite3c.tcl
665 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
--linemacros
666 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
667 cat sqlite3.c
>>tclsqlite3.c
668 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
669 echo
'#line 1 "tclsqlite.c"' >>tclsqlite3.c
670 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
672 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
673 tclsh
$(TOP
)/tool
/split-sqlite3c.tcl
675 fts2amal.c
: target_source
$(TOP
)/ext
/fts2
/mkfts2amal.tcl
676 tclsh
$(TOP
)/ext
/fts2
/mkfts2amal.tcl
678 fts3amal.c
: target_source
$(TOP
)/ext
/fts3
/mkfts3amal.tcl
679 tclsh
$(TOP
)/ext
/fts3
/mkfts3amal.tcl
681 # Rules to build the LEMON compiler generator
683 lemon
: $(TOP
)/tool
/lemon.c
$(TOP
)/tool
/lempar.c
684 $(BCC
) -o lemon
$(TOP
)/tool
/lemon.c
685 cp
$(TOP
)/tool
/lempar.c .
687 # A tool to generate the source-id
689 mksourceid
: $(TOP
)/tool
/mksourceid.c
690 $(BCC
) -o mksourceid
$(TOP
)/tool
/mksourceid.c
692 # Rules to build individual *.o files from generated *.c files. This
701 # Rules to build individual *.o files from files in the src directory.
703 %.o
: $(TOP
)/src
/%.c
$(HDR
)
706 tclsqlite.o
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
707 $(TCCX
) $(TCL_FLAGS
) -c
$(TOP
)/src
/tclsqlite.c
711 # Rules to build opcodes.c and opcodes.h
713 opcodes.c
: opcodes.h
$(TOP
)/tool
/mkopcodec.tcl
714 tclsh
$(TOP
)/tool
/mkopcodec.tcl opcodes.h
>opcodes.c
716 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/tool
/mkopcodeh.tcl
717 cat parse.h
$(TOP
)/src
/vdbe.c | \
718 tclsh
$(TOP
)/tool
/mkopcodeh.tcl
>opcodes.h
720 # Rules to build parse.c and parse.h - the outputs of lemon.
724 parse.c
: $(TOP
)/src
/parse.y lemon
725 cp
$(TOP
)/src
/parse.y .
726 .
/lemon
-s
$(OPTS
) parse.y
728 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest mksourceid
$(TOP
)/VERSION
$(TOP
)/ext
/rtree
/sqlite3rtree.h
729 tclsh
$(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
731 sqlite3rc.h
: $(TOP
)/src
/sqlite3.rc
$(TOP
)/VERSION
732 echo
'#ifndef SQLITE_RESOURCE_VERSION' >$@
733 echo
-n
'#define SQLITE_RESOURCE_VERSION ' >>$@
734 cat
$(TOP
)/VERSION | tclsh
$(TOP
)/tool
/replace.tcl exact .
, >>$@
735 echo
'#endif' >>sqlite3rc.h
737 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
738 $(BCC
) -o mkkeywordhash
$(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
739 .
/mkkeywordhash
>keywordhash.h
741 # Source files that go into making shell.c
743 $(TOP
)/src
/shell.c.in \
744 $(TOP
)/ext
/misc
/appendvfs.c \
745 $(TOP
)/ext
/misc
/completion.c \
746 $(TOP
)/ext
/misc
/decimal.c \
747 $(TOP
)/ext
/misc
/fileio.c \
748 $(TOP
)/ext
/misc
/ieee754.c \
749 $(TOP
)/ext
/misc
/shathree.c \
750 $(TOP
)/ext
/misc
/sqlar.c \
751 $(TOP
)/ext
/misc
/uint.c \
752 $(TOP
)/ext
/expert
/sqlite3expert.c \
753 $(TOP
)/ext
/expert
/sqlite3expert.h \
754 $(TOP
)/ext
/misc
/zipfile.c \
755 $(TOP
)/ext
/misc
/memtrace.c \
756 $(TOP
)/ext
/misc
/dbdata.c \
757 $(TOP
)/src
/test_windirent.c
759 shell.c
: $(SHELL_SRC
) $(TOP
)/tool
/mkshellc.tcl
760 tclsh
$(TOP
)/tool
/mkshellc.tcl
>shell.c
764 # Rules to build the extension objects.
766 icu.o
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
767 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
769 fts2.o
: $(TOP
)/ext
/fts2
/fts2.c
$(HDR
) $(EXTHDR
)
770 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2.c
772 fts2_hash.o
: $(TOP
)/ext
/fts2
/fts2_hash.c
$(HDR
) $(EXTHDR
)
773 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_hash.c
775 fts2_icu.o
: $(TOP
)/ext
/fts2
/fts2_icu.c
$(HDR
) $(EXTHDR
)
776 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_icu.c
778 fts2_porter.o
: $(TOP
)/ext
/fts2
/fts2_porter.c
$(HDR
) $(EXTHDR
)
779 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_porter.c
781 fts2_tokenizer.o
: $(TOP
)/ext
/fts2
/fts2_tokenizer.c
$(HDR
) $(EXTHDR
)
782 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer.c
784 fts2_tokenizer1.o
: $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
$(HDR
) $(EXTHDR
)
785 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer1.c
787 fts3.o
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
788 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
790 fts3_aux.o
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
791 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
793 fts3_expr.o
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
794 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
796 fts3_hash.o
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
797 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
799 fts3_icu.o
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
800 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
802 fts3_snippet.o
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
803 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
805 fts3_porter.o
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
806 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
808 fts3_tokenizer.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
809 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
811 fts3_tokenizer1.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
812 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
814 fts3_tokenize_vtab.o
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
815 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
817 fts3_unicode.o
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
818 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
820 fts3_unicode2.o
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
821 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
823 fts3_write.o
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
824 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
827 $(TCCX
) -DSQLITE_CORE
-c fts5.c
829 json1.o
: $(TOP
)/ext
/misc
/json1.c
830 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/json1.c
832 stmt.o
: $(TOP
)/ext
/misc
/stmt.c
833 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/misc
/stmt.c
835 rtree.o
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
836 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
840 fts5parse.c
: $(TOP
)/ext
/fts5
/fts5parse.y lemon
841 cp
$(TOP
)/ext
/fts5
/fts5parse.y .
843 .
/lemon
$(OPTS
) fts5parse.y
845 fts5parse.h
: fts5parse.c
847 fts5.c
: $(FTS5_SRC
) $(FTS5_HDR
)
848 tclsh
$(TOP
)/ext
/fts5
/tool
/mkfts5c.tcl
849 cp
$(TOP
)/ext
/fts5
/fts5.h .
852 tclsh
$(TOP
)/ext
/lsm1
/tool
/mklsm1c.tcl
853 cp
$(TOP
)/ext
/lsm1
/lsm.h .
855 userauth.o
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
856 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
858 sqlite3session.o
: $(TOP
)/ext
/session
/sqlite3session.c
$(HDR
) $(EXTHDR
)
859 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/session
/sqlite3session.c
861 sqlite3rbu.o
: $(TOP
)/ext
/rbu
/sqlite3rbu.c
$(HDR
) $(EXTHDR
)
862 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rbu
/sqlite3rbu.c
864 # Rules for building test programs and for running tests
866 tclsqlite3
: $(TOP
)/src
/tclsqlite.c libsqlite3.a
867 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
-o tclsqlite3 \
868 $(TOP
)/src
/tclsqlite.c libsqlite3.a
$(LIBTCL
) $(THREADLIB
)
870 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
$(TOP
)/tool
/mkccode.tcl
871 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqlite3_analyzer.c.in
>sqlite3_analyzer.c
873 sqlite3_analyzer
$(EXE
): sqlite3_analyzer.c
874 $(TCCX
) $(TCL_FLAGS
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
876 sqltclsh.c
: sqlite3.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/sqltclsh.tcl
$(TOP
)/ext
/misc
/appendvfs.c
$(TOP
)/tool
/mkccode.tcl
877 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/tool
/sqltclsh.c.in
>sqltclsh.c
879 sqltclsh
$(EXE
): sqltclsh.c
880 $(TCCX
) $(TCL_FLAGS
) sqltclsh.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
882 sqlite3_expert
$(EXE
): $(TOP
)/ext
/expert
/sqlite3expert.h
$(TOP
)/ext
/expert
/sqlite3expert.c
$(TOP
)/ext
/expert
/expert.c sqlite3.c
883 $(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
)
886 $(TOP
)/tool
/mkccode.tcl \
888 $(TOP
)/src
/tclsqlite.c \
889 $(TOP
)/ext
/repair
/sqlite3_checker.tcl \
890 $(TOP
)/ext
/repair
/checkindex.c \
891 $(TOP
)/ext
/repair
/checkfreelist.c \
892 $(TOP
)/ext
/misc
/btreeinfo.c \
893 $(TOP
)/ext
/repair
/sqlite3_checker.c.in
895 sqlite3_checker.c
: $(CHECKER_DEPS
)
896 tclsh
$(TOP
)/tool
/mkccode.tcl
$(TOP
)/ext
/repair
/sqlite3_checker.c.in
>$@
898 sqlite3_checker
$(TEXE
): sqlite3_checker.c
899 $(TCCX
) $(TCL_FLAGS
) sqlite3_checker.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
901 dbdump
$(EXE
): $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
902 $(TCCX
) -DDBDUMP_STANDALONE
-o dbdump
$(EXE
) \
903 $(TOP
)/ext
/misc
/dbdump.c sqlite3.o
$(THREADLIB
)
905 # Rules to build the 'testfixture' application.
907 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
908 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
909 TESTFIXTURE_FLAGS
+= -DSQLITE_SERIES_CONSTRAINT_VERIFY
=1
910 TESTFIXTURE_FLAGS
+= -DSQLITE_DEFAULT_PAGE_SIZE
=1024
911 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_STMTVTAB
912 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_DBPAGE_VTAB
913 TESTFIXTURE_FLAGS
+= -DSQLITE_ENABLE_BYTECODE_VTAB
914 TESTFIXTURE_FLAGS
+= -DTCLSH_INIT_PROC
=sqlite3TestInit
916 testfixture
$(EXE
): $(TESTSRC2
) libsqlite3.a
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
917 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
918 $(TESTSRC
) $(TESTSRC2
) $(TOP
)/src
/tclsqlite.c \
919 -o testfixture
$(EXE
) $(LIBTCL
) libsqlite3.a
$(THREADLIB
)
921 amalgamation-testfixture
$(EXE
): sqlite3.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c \
922 $(TOP
)/ext
/session
/test_session.c
923 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
924 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c \
925 $(TOP
)/ext
/session
/test_session.c \
926 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
928 fts3-testfixture
$(EXE
): sqlite3.c fts3amal.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
929 $(TCCX
) $(TCL_FLAGS
) $(TESTFIXTURE_FLAGS
) \
930 -DSQLITE_ENABLE_FTS3
=1 \
931 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c fts3amal.c \
932 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
934 coretestprogs
: $(TESTPROGS
)
936 testprogs
: coretestprogs srcck1
$(EXE
) fuzzcheck
$(EXE
) sessionfuzz
$(EXE
)
938 fulltest
: $(TESTPROGS
) fuzztest
939 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test $(TESTOPTS
)
941 soaktest
: $(TESTPROGS
)
942 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test -soak
=1 $(TESTOPTS
)
944 fulltestonly
: $(TESTPROGS
) fuzztest
945 .
/testfixture
$(EXE
) $(TOP
)/test/full.
test $(TESTOPTS
)
947 queryplantest
: testfixture
$(EXE
) sqlite3
$(EXE
)
948 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test queryplanner
$(TESTOPTS
)
950 fuzztest
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz-data1.db
951 .
/fuzzcheck
$(EXE
) $(FUZZDATA
)
952 .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
954 valgrindfuzz
: fuzzcheck
$(EXE
) $(FUZZDATA
) sessionfuzz
$(EXE
) $(TOP
)/test/sessionfuzz-data1.db
955 valgrind .
/fuzzcheck
$(EXE
) --cell-size-check
--limit-mem
10M
--timeout
600 $(FUZZDATA
)
956 valgrind .
/sessionfuzz run
$(TOP
)/test/sessionfuzz-data1.db
958 # The veryquick.test TCL tests.
960 tcltest
: .
/testfixture
$(EXE
)
961 .
/testfixture
$(EXE
) $(TOP
)/test/veryquick.
test $(TESTOPTS
)
963 # A very quick test using only testfixture and omitting all the slower
964 # tests. Designed to run in under 3 minutes on a workstation.
966 quicktest
: .
/testfixture
$(EXE
)
967 .
/testfixture
$(EXE
) $(TOP
)/test/extraquick.
test $(TESTOPTS
)
969 # The default test case. Runs most of the faster standard TCL tests,
970 # and fuzz tests, and sqlite3_analyzer and sqldiff tests.
971 test: fuzztest sourcetest
$(TESTPROGS
) tcltest
973 # Run a test using valgrind. This can take a really long time
974 # because valgrind is so much slower than a native machine.
976 valgrindtest
: $(TESTPROGS
) valgrindfuzz
977 OMIT_MISUSE
=1 valgrind
-v \
978 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test valgrind
$(TESTOPTS
)
980 # A very fast test that checks basic sanity. The name comes from
981 # the 60s-era electronics testing: "Turn it on and see if smoke
984 smoketest
: $(TESTPROGS
) fuzzcheck
$(EXE
)
985 .
/testfixture
$(EXE
) $(TOP
)/test/main.
test $(TESTOPTS
)
987 shelltest
: $(TESTPROGS
)
988 .
/testfixture
$(EXT
) $(TOP
)/test/permutations.
test shell
990 # The next two rules are used to support the "threadtest" target. Building
991 # threadtest runs a few thread-safety tests that are implemented in C. This
992 # target is invoked by the releasetest.tcl script.
994 THREADTEST3_SRC
= $(TOP
)/test/threadtest3.c \
995 $(TOP
)/test/tt3_checkpoint.c \
996 $(TOP
)/test/tt3_index.c \
997 $(TOP
)/test/tt3_vacuum.c \
998 $(TOP
)/test/tt3_stress.c \
999 $(TOP
)/test/tt3_lookaside1.c
1001 threadtest3
$(EXE
): sqlite3.o
$(THREADTEST3_SRC
) $(TOP
)/src
/test_multiplex.c
1002 $(TCCX
) $(TOP
)/test/threadtest3.c
$(TOP
)/src
/test_multiplex.c sqlite3.o
-o
$@
$(THREADLIB
)
1004 threadtest
: threadtest3
$(EXE
)
1007 TEST_EXTENSION
= $(SHPREFIX
)testloadext.
$(SO
)
1008 $(TEST_EXTENSION
): $(TOP
)/src
/test_loadext.c
1009 $(MKSHLIB
) $(TOP
)/src
/test_loadext.c
-o
$(TEST_EXTENSION
)
1011 extensiontest
: testfixture
$(EXE
) $(TEST_EXTENSION
)
1012 .
/testfixture
$(EXE
) $(TOP
)/test/loadext.
test
1014 dbtotxt
$(EXE
): $(TOP
)/tool
/dbtotxt.c
1015 $(TCC
) -o dbtotxt
$(EXE
) $(TOP
)/tool
/dbtotxt.c
1017 showdb
$(EXE
): $(TOP
)/tool
/showdb.c sqlite3.o
1018 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showdb
$(EXE
) \
1019 $(TOP
)/tool
/showdb.c sqlite3.o
$(THREADLIB
)
1021 showstat4
$(EXE
): $(TOP
)/tool
/showstat4.c sqlite3.o
1022 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showstat4
$(EXE
) \
1023 $(TOP
)/tool
/showstat4.c sqlite3.o
$(THREADLIB
)
1025 showjournal
$(EXE
): $(TOP
)/tool
/showjournal.c sqlite3.o
1026 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showjournal
$(EXE
) \
1027 $(TOP
)/tool
/showjournal.c sqlite3.o
$(THREADLIB
)
1029 showwal
$(EXE
): $(TOP
)/tool
/showwal.c sqlite3.o
1030 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showwal
$(EXE
) \
1031 $(TOP
)/tool
/showwal.c sqlite3.o
$(THREADLIB
)
1033 showshm
$(EXE
): $(TOP
)/tool
/showshm.c
1034 $(TCC
) -o showshm
$(EXE
) $(TOP
)/tool
/showshm.c
1036 index_usage
$(EXE
): $(TOP
)/tool
/index_usage.c sqlite3.o
1037 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_DEPRECATED
$(SHELL_OPTS
) -o index_usage
$(EXE
) \
1038 $(TOP
)/tool
/index_usage.c sqlite3.o
$(THREADLIB
)
1040 changeset
$(EXE
): $(TOP
)/ext
/session
/changeset.c sqlite3.o
1041 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changeset
$(EXE
) \
1042 $(TOP
)/ext
/session
/changeset.c sqlite3.o
$(THREADLIB
)
1044 changesetfuzz
$(EXE
): $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
1045 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o changesetfuzz
$(EXE
) \
1046 $(TOP
)/ext
/session
/changesetfuzz.c sqlite3.o
$(THREADLIB
)
1048 fts3view
$(EXE
): $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
1049 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o fts3view
$(EXE
) \
1050 $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
$(THREADLIB
)
1052 rollback-test
$(EXE
): $(TOP
)/tool
/rollback-test.c sqlite3.o
1053 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o rollback-test
$(EXE
) \
1054 $(TOP
)/tool
/rollback-test.c sqlite3.o
$(THREADLIB
)
1056 atrc
$(EXE
): $(TOP
)/test/atrc.c sqlite3.o
1057 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o atrc
$(EXE
) \
1058 $(TOP
)/test/atrc.c sqlite3.o
$(THREADLIB
)
1060 LogEst
$(EXE
): $(TOP
)/tool
/logest.c sqlite3.h
1061 $(TCC
) -o LogEst
$(EXE
) $(TOP
)/tool
/logest.c
1063 wordcount
$(EXE
): $(TOP
)/test/wordcount.c sqlite3.c
1064 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o wordcount
$(EXE
) \
1065 $(TOP
)/test/wordcount.c sqlite3.c
1067 speedtest1
$(EXE
): $(TOP
)/test/speedtest1.c sqlite3.c
1068 $(TCCX
) -I.
$(ST_OPT
) -o speedtest1
$(EXE
) $(TOP
)/test/speedtest1.c sqlite3.c
$(THREADLIB
)
1070 kvtest
$(EXE
): $(TOP
)/test/kvtest.c sqlite3.c
1071 $(TCCX
) -I.
$(KV_OPT
) -o kvtest
$(EXE
) $(TOP
)/test/kvtest.c sqlite3.c
$(THREADLIB
)
1073 rbu
$(EXE
): $(TOP
)/ext
/rbu
/rbu.c
$(TOP
)/ext
/rbu
/sqlite3rbu.c sqlite3.o
1074 $(TCC
) -I.
-o rbu
$(EXE
) $(TOP
)/ext
/rbu
/rbu.c sqlite3.o \
1077 loadfts
: $(TOP
)/tool
/loadfts.c libsqlite3.a
1078 $(TCC
) $(TOP
)/tool
/loadfts.c libsqlite3.a
-o loadfts
$(THREADLIB
)
1080 # This target will fail if the SQLite amalgamation contains any exported
1081 # symbols that do not begin with "sqlite3_". It is run as part of the
1082 # releasetest.tcl script.
1084 checksymbols
: sqlite3.o
1085 nm
-g
--defined-only sqlite3.o | grep
-v
" sqlite3_" ; test $$?
-ne
0
1087 # Build the amalgamation-autoconf package. The amalamgation-tarball target builds
1088 # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
1089 # The snapshot-tarball target builds a tarball named by the SHA1 hash
1091 amalgamation-tarball
: sqlite3.c sqlite3rc.h
1092 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--normal
1094 snapshot-tarball
: sqlite3.c sqlite3rc.h
1095 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
--snapshot
1098 # Standard install and cleanup targets
1100 install: sqlite3 libsqlite3.a sqlite3.h
1102 mv libsqlite3.a
/usr
/lib
1103 mv sqlite3.h
/usr
/include
1106 rm -f
*.o sqlite3 sqlite3.exe libsqlite3.a sqlite3.h opcodes.
*
1107 rm -f lemon lemon.exe lempar.c parse.
* sqlite
*.
tar.gz
1108 rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h
1110 rm -f
*.da
*.bb
*.bbg gmon.out
1111 rm -rf tsrc target_source
1112 rm -f testloadext.dll libtestloadext.so
1113 rm -f amalgamation-testfixture amalgamation-testfixture.exe
1114 rm -f fts3-testfixture fts3-testfixture.exe
1115 rm -f testfixture testfixture.exe
1116 rm -f threadtest3 threadtest3.exe
1117 rm -f LogEst LogEst.exe
1118 rm -f fts3view fts3view.exe
1119 rm -f rollback-test rollback-test.exe
1120 rm -f showdb showdb.exe
1121 rm -f showjournal showjournal.exe
1122 rm -f showstat4 showstat4.exe
1123 rm -f showwal showwal.exe
1124 rm -f changeset changeset.exe
1125 rm -f speedtest1 speedtest1.exe
1126 rm -f wordcount wordcount.exe
1128 rm -f srcck1 srcck1.exe
1129 rm -f sqlite3.c sqlite3-
*.c fts?amal.c tclsqlite3.c
1131 rm -f
shell.c sqlite3ext.h
1132 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c
1133 rm -f sqlite3_expert sqlite3_expert.exe
1134 rm -f sqlite-
*-output.vsix
1135 rm -f mptester mptester.exe
1136 rm -f fuzzershell fuzzershell.exe
1137 rm -f fuzzcheck fuzzcheck.exe
1139 rm -f sqldiff sqldiff.exe
1140 rm -f fts5.
* fts5parse.
*