Revert of Enabling audio quality test on mac. (patchset #1 id:1 of https://codereview...
[chromium-blink-merge.git] / third_party / sqlite / src / main.mk
blob5e351aca2e1af737da9845964002502e687eb6a5
1 ###############################################################################
2 # The following macros should be defined before this script is
3 # invoked:
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
13 # thread safe
15 # OPTS Extra compiler command-line options.
17 # EXE The suffix to add to executable files. ".exe" for windows
18 # and "" for Unix.
20 # TCC C Compiler and options for use in building executables that
21 # will run on the target platform. This is usually the same
22 # as BCC, unless you are cross-compiling.
24 # AR Tools used to build a static library.
25 # RANLIB
27 # TCL_FLAGS Extra compiler options needed for programs that use the
28 # TCL library.
30 # LIBTCL Linker options needed to link against the TCL library.
32 # READLINE_FLAGS Compiler options needed for programs that use the
33 # readline() library.
35 # LIBREADLINE Linker options needed by programs using readline() must
36 # link against.
38 # NAWK Nawk compatible awk program. Older (obsolete?) solaris
39 # systems need this to avoid using the original AT&T AWK.
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
51 # Object files for the SQLite library.
53 LIBOBJ+= alter.o analyze.o attach.o auth.o \
54 backup.o bitvec.o btmutex.o btree.o build.o \
55 callback.o complete.o ctime.o date.o delete.o expr.o fault.o fkey.o \
56 fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
57 fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o fts3_write.o \
58 func.o global.o hash.o \
59 icu.o insert.o journal.o legacy.o loadext.o \
60 main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
61 memjournal.o \
62 mutex.o mutex_noop.o mutex_os2.o mutex_unix.o mutex_w32.o \
63 notify.o opcodes.o os.o os_os2.o os_unix.o os_win.o \
64 pager.o parse.o pcache.o pcache1.o pragma.o prepare.o printf.o \
65 random.o resolve.o rowset.o rtree.o select.o status.o \
66 table.o tokenize.o trigger.o \
67 update.o util.o vacuum.o \
68 vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbetrace.o \
69 wal.o walker.o where.o utf.o vtab.o
72 LIBOBJ += fts2.o \
73 fts2_hash.o \
74 fts2_icu.o \
75 fts2_porter.o \
76 fts2_tokenizer.o \
77 fts2_tokenizer1.o
79 # All of the source code files.
81 SRC = \
82 $(TOP)/src/alter.c \
83 $(TOP)/src/analyze.c \
84 $(TOP)/src/attach.c \
85 $(TOP)/src/auth.c \
86 $(TOP)/src/backup.c \
87 $(TOP)/src/bitvec.c \
88 $(TOP)/src/btmutex.c \
89 $(TOP)/src/btree.c \
90 $(TOP)/src/btree.h \
91 $(TOP)/src/btreeInt.h \
92 $(TOP)/src/build.c \
93 $(TOP)/src/callback.c \
94 $(TOP)/src/complete.c \
95 $(TOP)/src/ctime.c \
96 $(TOP)/src/date.c \
97 $(TOP)/src/delete.c \
98 $(TOP)/src/expr.c \
99 $(TOP)/src/fault.c \
100 $(TOP)/src/fkey.c \
101 $(TOP)/src/func.c \
102 $(TOP)/src/global.c \
103 $(TOP)/src/hash.c \
104 $(TOP)/src/hash.h \
105 $(TOP)/src/hwtime.h \
106 $(TOP)/src/insert.c \
107 $(TOP)/src/journal.c \
108 $(TOP)/src/legacy.c \
109 $(TOP)/src/loadext.c \
110 $(TOP)/src/main.c \
111 $(TOP)/src/malloc.c \
112 $(TOP)/src/mem0.c \
113 $(TOP)/src/mem1.c \
114 $(TOP)/src/mem2.c \
115 $(TOP)/src/mem3.c \
116 $(TOP)/src/mem5.c \
117 $(TOP)/src/memjournal.c \
118 $(TOP)/src/mutex.c \
119 $(TOP)/src/mutex.h \
120 $(TOP)/src/mutex_noop.c \
121 $(TOP)/src/mutex_os2.c \
122 $(TOP)/src/mutex_unix.c \
123 $(TOP)/src/mutex_w32.c \
124 $(TOP)/src/notify.c \
125 $(TOP)/src/os.c \
126 $(TOP)/src/os.h \
127 $(TOP)/src/os_common.h \
128 $(TOP)/src/os_os2.c \
129 $(TOP)/src/os_unix.c \
130 $(TOP)/src/os_win.c \
131 $(TOP)/src/pager.c \
132 $(TOP)/src/pager.h \
133 $(TOP)/src/parse.y \
134 $(TOP)/src/pcache.c \
135 $(TOP)/src/pcache.h \
136 $(TOP)/src/pcache1.c \
137 $(TOP)/src/pragma.c \
138 $(TOP)/src/prepare.c \
139 $(TOP)/src/printf.c \
140 $(TOP)/src/random.c \
141 $(TOP)/src/resolve.c \
142 $(TOP)/src/rowset.c \
143 $(TOP)/src/select.c \
144 $(TOP)/src/status.c \
145 $(TOP)/src/shell.c \
146 $(TOP)/src/sqlite.h.in \
147 $(TOP)/src/sqlite3ext.h \
148 $(TOP)/src/sqliteInt.h \
149 $(TOP)/src/sqliteLimit.h \
150 $(TOP)/src/table.c \
151 $(TOP)/src/tclsqlite.c \
152 $(TOP)/src/tokenize.c \
153 $(TOP)/src/trigger.c \
154 $(TOP)/src/utf.c \
155 $(TOP)/src/update.c \
156 $(TOP)/src/util.c \
157 $(TOP)/src/vacuum.c \
158 $(TOP)/src/vdbe.c \
159 $(TOP)/src/vdbe.h \
160 $(TOP)/src/vdbeapi.c \
161 $(TOP)/src/vdbeaux.c \
162 $(TOP)/src/vdbeblob.c \
163 $(TOP)/src/vdbemem.c \
164 $(TOP)/src/vdbetrace.c \
165 $(TOP)/src/vdbeInt.h \
166 $(TOP)/src/vtab.c \
167 $(TOP)/src/wal.c \
168 $(TOP)/src/wal.h \
169 $(TOP)/src/walker.c \
170 $(TOP)/src/where.c
172 # Source code for extensions
174 SRC += \
175 $(TOP)/ext/fts1/fts1.c \
176 $(TOP)/ext/fts1/fts1.h \
177 $(TOP)/ext/fts1/fts1_hash.c \
178 $(TOP)/ext/fts1/fts1_hash.h \
179 $(TOP)/ext/fts1/fts1_porter.c \
180 $(TOP)/ext/fts1/fts1_tokenizer.h \
181 $(TOP)/ext/fts1/fts1_tokenizer1.c
182 SRC += \
183 $(TOP)/ext/fts2/fts2.c \
184 $(TOP)/ext/fts2/fts2.h \
185 $(TOP)/ext/fts2/fts2_hash.c \
186 $(TOP)/ext/fts2/fts2_hash.h \
187 $(TOP)/ext/fts2/fts2_icu.c \
188 $(TOP)/ext/fts2/fts2_porter.c \
189 $(TOP)/ext/fts2/fts2_tokenizer.h \
190 $(TOP)/ext/fts2/fts2_tokenizer.c \
191 $(TOP)/ext/fts2/fts2_tokenizer1.c
192 SRC += \
193 $(TOP)/ext/fts3/fts3.c \
194 $(TOP)/ext/fts3/fts3.h \
195 $(TOP)/ext/fts3/fts3Int.h \
196 $(TOP)/ext/fts3/fts3_aux.c \
197 $(TOP)/ext/fts3/fts3_expr.c \
198 $(TOP)/ext/fts3/fts3_hash.c \
199 $(TOP)/ext/fts3/fts3_hash.h \
200 $(TOP)/ext/fts3/fts3_icu.c \
201 $(TOP)/ext/fts3/fts3_porter.c \
202 $(TOP)/ext/fts3/fts3_snippet.c \
203 $(TOP)/ext/fts3/fts3_tokenizer.h \
204 $(TOP)/ext/fts3/fts3_tokenizer.c \
205 $(TOP)/ext/fts3/fts3_tokenizer1.c \
206 $(TOP)/ext/fts3/fts3_write.c
207 SRC += \
208 $(TOP)/ext/icu/sqliteicu.h \
209 $(TOP)/ext/icu/icu.c
210 SRC += \
211 $(TOP)/ext/rtree/rtree.h \
212 $(TOP)/ext/rtree/rtree.c
215 # Generated source code files
217 SRC += \
218 keywordhash.h \
219 opcodes.c \
220 opcodes.h \
221 parse.c \
222 parse.h \
223 sqlite3.h
226 # Source code to the test files.
228 TESTSRC = \
229 $(TOP)/src/test1.c \
230 $(TOP)/src/test2.c \
231 $(TOP)/src/test3.c \
232 $(TOP)/src/test4.c \
233 $(TOP)/src/test5.c \
234 $(TOP)/src/test6.c \
235 $(TOP)/src/test7.c \
236 $(TOP)/src/test8.c \
237 $(TOP)/src/test9.c \
238 $(TOP)/src/test_autoext.c \
239 $(TOP)/src/test_async.c \
240 $(TOP)/src/test_backup.c \
241 $(TOP)/src/test_btree.c \
242 $(TOP)/src/test_config.c \
243 $(TOP)/src/test_demovfs.c \
244 $(TOP)/src/test_devsym.c \
245 $(TOP)/src/test_func.c \
246 $(TOP)/src/test_fuzzer.c \
247 $(TOP)/src/test_hexio.c \
248 $(TOP)/src/test_init.c \
249 $(TOP)/src/test_intarray.c \
250 $(TOP)/src/test_journal.c \
251 $(TOP)/src/test_malloc.c \
252 $(TOP)/src/test_multiplex.c \
253 $(TOP)/src/test_mutex.c \
254 $(TOP)/src/test_onefile.c \
255 $(TOP)/src/test_osinst.c \
256 $(TOP)/src/test_pcache.c \
257 $(TOP)/src/test_quota.c \
258 $(TOP)/src/test_rtree.c \
259 $(TOP)/src/test_schema.c \
260 $(TOP)/src/test_server.c \
261 $(TOP)/src/test_stat.c \
262 $(TOP)/src/test_superlock.c \
263 $(TOP)/src/test_syscall.c \
264 $(TOP)/src/test_tclvar.c \
265 $(TOP)/src/test_thread.c \
266 $(TOP)/src/test_vfs.c \
267 $(TOP)/src/test_wholenumber.c \
268 $(TOP)/src/test_wsd.c
270 TESTSRC += \
271 $(TOP)/ext/fts2/fts2.c \
272 $(TOP)/ext/fts2/fts2.h \
273 $(TOP)/ext/fts2/fts2_hash.c \
274 $(TOP)/ext/fts2/fts2_hash.h \
275 $(TOP)/ext/fts2/fts2_icu.c \
276 $(TOP)/ext/fts2/fts2_porter.c \
277 $(TOP)/ext/fts2/fts2_tokenizer.h \
278 $(TOP)/ext/fts2/fts2_tokenizer.c \
279 $(TOP)/ext/fts2/fts2_tokenizer1.c
281 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
282 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
284 TESTSRC2 = \
285 $(TOP)/src/attach.c \
286 $(TOP)/src/backup.c \
287 $(TOP)/src/btree.c \
288 $(TOP)/src/build.c \
289 $(TOP)/src/date.c \
290 $(TOP)/src/expr.c \
291 $(TOP)/src/func.c \
292 $(TOP)/src/insert.c \
293 $(TOP)/src/wal.c \
294 $(TOP)/src/mem5.c \
295 $(TOP)/src/os.c \
296 $(TOP)/src/os_os2.c \
297 $(TOP)/src/os_unix.c \
298 $(TOP)/src/os_win.c \
299 $(TOP)/src/pager.c \
300 $(TOP)/src/pragma.c \
301 $(TOP)/src/prepare.c \
302 $(TOP)/src/printf.c \
303 $(TOP)/src/random.c \
304 $(TOP)/src/pcache.c \
305 $(TOP)/src/pcache1.c \
306 $(TOP)/src/select.c \
307 $(TOP)/src/tokenize.c \
308 $(TOP)/src/utf.c \
309 $(TOP)/src/util.c \
310 $(TOP)/src/vdbeapi.c \
311 $(TOP)/src/vdbeaux.c \
312 $(TOP)/src/vdbe.c \
313 $(TOP)/src/vdbemem.c \
314 $(TOP)/src/where.c \
315 parse.c \
316 $(TOP)/ext/fts3/fts3.c \
317 $(TOP)/ext/fts3/fts3_aux.c \
318 $(TOP)/ext/fts3/fts3_expr.c \
319 $(TOP)/ext/fts3/fts3_tokenizer.c \
320 $(TOP)/ext/fts3/fts3_write.c \
321 $(TOP)/ext/async/sqlite3async.c
323 # Header files used by all library source files.
325 HDR = \
326 $(TOP)/src/btree.h \
327 $(TOP)/src/btreeInt.h \
328 $(TOP)/src/hash.h \
329 $(TOP)/src/hwtime.h \
330 keywordhash.h \
331 $(TOP)/src/mutex.h \
332 opcodes.h \
333 $(TOP)/src/os.h \
334 $(TOP)/src/os_common.h \
335 $(TOP)/src/pager.h \
336 $(TOP)/src/pcache.h \
337 parse.h \
338 sqlite3.h \
339 $(TOP)/src/sqlite3ext.h \
340 $(TOP)/src/sqliteInt.h \
341 $(TOP)/src/sqliteLimit.h \
342 $(TOP)/src/vdbe.h \
343 $(TOP)/src/vdbeInt.h
345 # Header files used by extensions
347 EXTHDR += \
348 $(TOP)/ext/fts1/fts1.h \
349 $(TOP)/ext/fts1/fts1_hash.h \
350 $(TOP)/ext/fts1/fts1_tokenizer.h
351 EXTHDR += \
352 $(TOP)/ext/fts2/fts2.h \
353 $(TOP)/ext/fts2/fts2_hash.h \
354 $(TOP)/ext/fts2/fts2_tokenizer.h
355 EXTHDR += \
356 $(TOP)/ext/fts3/fts3.h \
357 $(TOP)/ext/fts3/fts3Int.h \
358 $(TOP)/ext/fts3/fts3_hash.h \
359 $(TOP)/ext/fts3/fts3_tokenizer.h
360 EXTHDR += \
361 $(TOP)/ext/rtree/rtree.h
362 EXTHDR += \
363 $(TOP)/ext/icu/sqliteicu.h
365 # This is the default Makefile target. The objects listed here
366 # are what get build when you type just "make" with no arguments.
368 all: sqlite3.h libsqlite3.a sqlite3$(EXE)
370 libsqlite3.a: $(LIBOBJ)
371 $(AR) libsqlite3.a $(LIBOBJ)
372 $(RANLIB) libsqlite3.a
374 sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
375 $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
376 $(TOP)/src/shell.c $(SHELL_ICU) \
377 libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) -ldl
379 # This target creates a directory named "tsrc" and fills it with
380 # copies of all of the C source code and header files needed to
381 # build on the target system. Some of the C source code and header
382 # files are automatically generated. This target takes care of
383 # all that automatic generation.
385 target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl
386 rm -rf tsrc
387 mkdir tsrc
388 cp -f $(SRC) tsrc
389 rm tsrc/sqlite.h.in tsrc/parse.y
390 tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
391 mv vdbe.new tsrc/vdbe.c
392 touch target_source
394 sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
395 tclsh $(TOP)/tool/mksqlite3c.tcl
396 echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
397 cat sqlite3.c >>tclsqlite3.c
398 echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
399 cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
401 fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
402 tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
404 fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
405 tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
407 # Rules to build the LEMON compiler generator
409 lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c
410 $(BCC) -o lemon $(TOP)/tool/lemon.c
411 cp $(TOP)/src/lempar.c .
413 # Rules to build individual *.o files from generated *.c files. This
414 # applies to:
416 # parse.o
417 # opcodes.o
419 %.o: %.c $(HDR)
420 $(TCCX) -c $<
422 # Rules to build individual *.o files from files in the src directory.
424 %.o: $(TOP)/src/%.c $(HDR)
425 $(TCCX) -c $<
427 tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
428 $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
432 # Rules to build opcodes.c and opcodes.h
434 opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
435 sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
437 opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
438 cat parse.h $(TOP)/src/vdbe.c | \
439 $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
441 # Rules to build parse.c and parse.h - the outputs of lemon.
443 parse.h: parse.c
445 parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
446 cp $(TOP)/src/parse.y .
447 rm -f parse.h
448 ./lemon $(OPTS) parse.y
449 mv parse.h parse.h.temp
450 $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
452 sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
453 tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
455 keywordhash.h: $(TOP)/tool/mkkeywordhash.c
456 $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
457 ./mkkeywordhash >keywordhash.h
461 # Rules to build the extension objects.
463 icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
464 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
466 fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
467 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
469 fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
470 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
472 fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
473 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
475 fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
476 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
478 fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
479 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
481 fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
482 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
484 fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
485 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
487 fts3_aux.o: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR)
488 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c
490 fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
491 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
493 fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
494 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
496 fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
497 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
499 fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
500 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
502 fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
503 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
505 fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
506 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
508 fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
509 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
511 fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
512 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
514 rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
515 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
518 # Rules for building test programs and for running tests
520 tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
521 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
522 $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
525 # Rules to build the 'testfixture' application.
527 TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
528 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
530 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
531 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
532 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
533 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a
535 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
536 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
537 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
538 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
540 fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
541 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
542 -DSQLITE_ENABLE_FTS3=1 \
543 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \
544 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
546 fulltest: testfixture$(EXE) sqlite3$(EXE)
547 ./testfixture$(EXE) $(TOP)/test/all.test
549 soaktest: testfixture$(EXE) sqlite3$(EXE)
550 ./testfixture$(EXE) $(TOP)/test/all.test -soak=1
552 test: testfixture$(EXE) sqlite3$(EXE)
553 ./testfixture$(EXE) $(TOP)/test/veryquick.test
555 # The next two rules are used to support the "threadtest" target. Building
556 # threadtest runs a few thread-safety tests that are implemented in C. This
557 # target is invoked by the releasetest.tcl script.
559 threadtest3$(EXE): sqlite3.o $(TOP)/test/threadtest3.c $(TOP)/test/tt3_checkpoint.c
560 $(TCCX) -O2 sqlite3.o $(TOP)/test/threadtest3.c \
561 -o threadtest3$(EXE) $(THREADLIB)
563 threadtest: threadtest3$(EXE)
564 ./threadtest3$(EXE)
566 fts2test: testfixture$(EXE) sqlite3$(EXE)
567 ./testfixture$(EXE) $(TOP)/test/fts2.test
569 sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
570 $(TOP)/tool/spaceanal.tcl
571 sed \
572 -e '/^#/d' \
573 -e 's,\\,\\\\,g' \
574 -e 's,",\\",g' \
575 -e 's,^,",' \
576 -e 's,$$,\\n",' \
577 $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
578 $(TCCX) $(TCL_FLAGS) -DTCLSH=2 $(TESTFIXTURE_FLAGS) \
579 -DSQLITE_TEST=1 -DSQLITE_PRIVATE="" \
580 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
581 -o sqlite3_analyzer$(EXE) \
582 $(LIBTCL) $(THREADLIB)
584 TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
585 $(TEST_EXTENSION): $(TOP)/src/test_loadext.c
586 $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION)
588 extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
589 ./testfixture$(EXE) $(TOP)/test/loadext.test
592 # Standard install and cleanup targets
594 install: sqlite3 libsqlite3.a sqlite3.h
595 mv sqlite3 /usr/bin
596 mv libsqlite3.a /usr/lib
597 mv sqlite3.h /usr/include
599 clean:
600 rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.*
601 rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
602 rm -f $(PUBLISH)
603 rm -f *.da *.bb *.bbg gmon.out
604 rm -rf tsrc target_source
605 rm -f testloadext.dll libtestloadext.so
606 rm -f sqlite3.c fts?amal.c tclsqlite3.c