Revert of Report viewport memory and timing correctly for Slimming Paint. (patchset...
[chromium-blink-merge.git] / third_party / sqlite / src / main.mk
blob5b010c30156f6736c8d0865e8b92ba98f5141658
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 recover.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/recover.c \
142 $(TOP)/src/resolve.c \
143 $(TOP)/src/rowset.c \
144 $(TOP)/src/select.c \
145 $(TOP)/src/status.c \
146 $(TOP)/src/shell.c \
147 $(TOP)/src/sqlite.h.in \
148 $(TOP)/src/sqlite3ext.h \
149 $(TOP)/src/sqliteInt.h \
150 $(TOP)/src/sqliteLimit.h \
151 $(TOP)/src/table.c \
152 $(TOP)/src/tclsqlite.c \
153 $(TOP)/src/tokenize.c \
154 $(TOP)/src/trigger.c \
155 $(TOP)/src/utf.c \
156 $(TOP)/src/update.c \
157 $(TOP)/src/util.c \
158 $(TOP)/src/vacuum.c \
159 $(TOP)/src/vdbe.c \
160 $(TOP)/src/vdbe.h \
161 $(TOP)/src/vdbeapi.c \
162 $(TOP)/src/vdbeaux.c \
163 $(TOP)/src/vdbeblob.c \
164 $(TOP)/src/vdbemem.c \
165 $(TOP)/src/vdbetrace.c \
166 $(TOP)/src/vdbeInt.h \
167 $(TOP)/src/vtab.c \
168 $(TOP)/src/wal.c \
169 $(TOP)/src/wal.h \
170 $(TOP)/src/walker.c \
171 $(TOP)/src/where.c
173 # Source code for extensions
175 SRC += \
176 $(TOP)/ext/fts1/fts1.c \
177 $(TOP)/ext/fts1/fts1.h \
178 $(TOP)/ext/fts1/fts1_hash.c \
179 $(TOP)/ext/fts1/fts1_hash.h \
180 $(TOP)/ext/fts1/fts1_porter.c \
181 $(TOP)/ext/fts1/fts1_tokenizer.h \
182 $(TOP)/ext/fts1/fts1_tokenizer1.c
183 SRC += \
184 $(TOP)/ext/fts2/fts2.c \
185 $(TOP)/ext/fts2/fts2.h \
186 $(TOP)/ext/fts2/fts2_hash.c \
187 $(TOP)/ext/fts2/fts2_hash.h \
188 $(TOP)/ext/fts2/fts2_icu.c \
189 $(TOP)/ext/fts2/fts2_porter.c \
190 $(TOP)/ext/fts2/fts2_tokenizer.h \
191 $(TOP)/ext/fts2/fts2_tokenizer.c \
192 $(TOP)/ext/fts2/fts2_tokenizer1.c
193 SRC += \
194 $(TOP)/ext/fts3/fts3.c \
195 $(TOP)/ext/fts3/fts3.h \
196 $(TOP)/ext/fts3/fts3Int.h \
197 $(TOP)/ext/fts3/fts3_aux.c \
198 $(TOP)/ext/fts3/fts3_expr.c \
199 $(TOP)/ext/fts3/fts3_hash.c \
200 $(TOP)/ext/fts3/fts3_hash.h \
201 $(TOP)/ext/fts3/fts3_icu.c \
202 $(TOP)/ext/fts3/fts3_porter.c \
203 $(TOP)/ext/fts3/fts3_snippet.c \
204 $(TOP)/ext/fts3/fts3_tokenizer.h \
205 $(TOP)/ext/fts3/fts3_tokenizer.c \
206 $(TOP)/ext/fts3/fts3_tokenizer1.c \
207 $(TOP)/ext/fts3/fts3_write.c
208 SRC += \
209 $(TOP)/ext/icu/sqliteicu.h \
210 $(TOP)/ext/icu/icu.c
211 SRC += \
212 $(TOP)/ext/rtree/rtree.h \
213 $(TOP)/ext/rtree/rtree.c
216 # Generated source code files
218 SRC += \
219 keywordhash.h \
220 opcodes.c \
221 opcodes.h \
222 parse.c \
223 parse.h \
224 sqlite3.h
227 # Source code to the test files.
229 TESTSRC = \
230 $(TOP)/src/test1.c \
231 $(TOP)/src/test2.c \
232 $(TOP)/src/test3.c \
233 $(TOP)/src/test4.c \
234 $(TOP)/src/test5.c \
235 $(TOP)/src/test6.c \
236 $(TOP)/src/test7.c \
237 $(TOP)/src/test8.c \
238 $(TOP)/src/test9.c \
239 $(TOP)/src/test_autoext.c \
240 $(TOP)/src/test_async.c \
241 $(TOP)/src/test_backup.c \
242 $(TOP)/src/test_btree.c \
243 $(TOP)/src/test_config.c \
244 $(TOP)/src/test_demovfs.c \
245 $(TOP)/src/test_devsym.c \
246 $(TOP)/src/test_func.c \
247 $(TOP)/src/test_fuzzer.c \
248 $(TOP)/src/test_hexio.c \
249 $(TOP)/src/test_init.c \
250 $(TOP)/src/test_intarray.c \
251 $(TOP)/src/test_journal.c \
252 $(TOP)/src/test_malloc.c \
253 $(TOP)/src/test_multiplex.c \
254 $(TOP)/src/test_mutex.c \
255 $(TOP)/src/test_onefile.c \
256 $(TOP)/src/test_osinst.c \
257 $(TOP)/src/test_pcache.c \
258 $(TOP)/src/test_quota.c \
259 $(TOP)/src/test_rtree.c \
260 $(TOP)/src/test_schema.c \
261 $(TOP)/src/test_server.c \
262 $(TOP)/src/test_stat.c \
263 $(TOP)/src/test_superlock.c \
264 $(TOP)/src/test_syscall.c \
265 $(TOP)/src/test_tclvar.c \
266 $(TOP)/src/test_thread.c \
267 $(TOP)/src/test_vfs.c \
268 $(TOP)/src/test_wholenumber.c \
269 $(TOP)/src/test_wsd.c
271 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
272 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
274 TESTSRC2 = \
275 $(TOP)/src/attach.c \
276 $(TOP)/src/backup.c \
277 $(TOP)/src/btree.c \
278 $(TOP)/src/build.c \
279 $(TOP)/src/date.c \
280 $(TOP)/src/expr.c \
281 $(TOP)/src/func.c \
282 $(TOP)/src/insert.c \
283 $(TOP)/src/wal.c \
284 $(TOP)/src/mem5.c \
285 $(TOP)/src/os.c \
286 $(TOP)/src/os_os2.c \
287 $(TOP)/src/os_unix.c \
288 $(TOP)/src/os_win.c \
289 $(TOP)/src/pager.c \
290 $(TOP)/src/pragma.c \
291 $(TOP)/src/prepare.c \
292 $(TOP)/src/printf.c \
293 $(TOP)/src/random.c \
294 $(TOP)/src/recover.c \
295 $(TOP)/src/pcache.c \
296 $(TOP)/src/pcache1.c \
297 $(TOP)/src/select.c \
298 $(TOP)/src/tokenize.c \
299 $(TOP)/src/utf.c \
300 $(TOP)/src/util.c \
301 $(TOP)/src/vdbeapi.c \
302 $(TOP)/src/vdbeaux.c \
303 $(TOP)/src/vdbe.c \
304 $(TOP)/src/vdbemem.c \
305 $(TOP)/src/where.c \
306 parse.c \
307 $(TOP)/ext/fts3/fts3.c \
308 $(TOP)/ext/fts3/fts3_aux.c \
309 $(TOP)/ext/fts3/fts3_expr.c \
310 $(TOP)/ext/fts3/fts3_tokenizer.c \
311 $(TOP)/ext/fts3/fts3_write.c \
312 $(TOP)/ext/async/sqlite3async.c
314 TESTSRC2 += \
315 $(TOP)/ext/fts2/fts2.c \
316 $(TOP)/ext/fts2/fts2.h \
317 $(TOP)/ext/fts2/fts2_hash.c \
318 $(TOP)/ext/fts2/fts2_hash.h \
319 $(TOP)/ext/fts2/fts2_icu.c \
320 $(TOP)/ext/fts2/fts2_porter.c \
321 $(TOP)/ext/fts2/fts2_tokenizer.h \
322 $(TOP)/ext/fts2/fts2_tokenizer.c \
323 $(TOP)/ext/fts2/fts2_tokenizer1.c
325 # Header files used by all library source files.
327 HDR = \
328 $(TOP)/src/btree.h \
329 $(TOP)/src/btreeInt.h \
330 $(TOP)/src/hash.h \
331 $(TOP)/src/hwtime.h \
332 keywordhash.h \
333 $(TOP)/src/mutex.h \
334 opcodes.h \
335 $(TOP)/src/os.h \
336 $(TOP)/src/os_common.h \
337 $(TOP)/src/pager.h \
338 $(TOP)/src/pcache.h \
339 parse.h \
340 sqlite3.h \
341 $(TOP)/src/sqlite3ext.h \
342 $(TOP)/src/sqliteInt.h \
343 $(TOP)/src/sqliteLimit.h \
344 $(TOP)/src/vdbe.h \
345 $(TOP)/src/vdbeInt.h
347 # Header files used by extensions
349 EXTHDR += \
350 $(TOP)/ext/fts1/fts1.h \
351 $(TOP)/ext/fts1/fts1_hash.h \
352 $(TOP)/ext/fts1/fts1_tokenizer.h
353 EXTHDR += \
354 $(TOP)/ext/fts2/fts2.h \
355 $(TOP)/ext/fts2/fts2_hash.h \
356 $(TOP)/ext/fts2/fts2_tokenizer.h
357 EXTHDR += \
358 $(TOP)/ext/fts3/fts3.h \
359 $(TOP)/ext/fts3/fts3Int.h \
360 $(TOP)/ext/fts3/fts3_hash.h \
361 $(TOP)/ext/fts3/fts3_tokenizer.h
362 EXTHDR += \
363 $(TOP)/ext/rtree/rtree.h
364 EXTHDR += \
365 $(TOP)/ext/icu/sqliteicu.h
367 # This is the default Makefile target. The objects listed here
368 # are what get build when you type just "make" with no arguments.
370 all: sqlite3.h libsqlite3.a sqlite3$(EXE)
372 libsqlite3.a: $(LIBOBJ)
373 $(AR) libsqlite3.a $(LIBOBJ)
374 $(RANLIB) libsqlite3.a
376 sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
377 $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
378 $(TOP)/src/shell.c $(SHELL_ICU) \
379 libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
381 # This target creates a directory named "tsrc" and fills it with
382 # copies of all of the C source code and header files needed to
383 # build on the target system. Some of the C source code and header
384 # files are automatically generated. This target takes care of
385 # all that automatic generation.
387 target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl
388 rm -rf tsrc
389 mkdir tsrc
390 cp -f $(SRC) tsrc
391 rm tsrc/sqlite.h.in tsrc/parse.y
392 tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
393 mv vdbe.new tsrc/vdbe.c
394 touch target_source
396 sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
397 tclsh $(TOP)/tool/mksqlite3c.tcl
398 echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
399 cat sqlite3.c >>tclsqlite3.c
400 echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
401 cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
403 fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
404 tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
406 fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
407 tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
409 # Rules to build the LEMON compiler generator
411 lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c
412 $(BCC) -o lemon $(TOP)/tool/lemon.c
413 cp $(TOP)/src/lempar.c .
415 # Rules to build individual *.o files from generated *.c files. This
416 # applies to:
418 # parse.o
419 # opcodes.o
421 %.o: %.c $(HDR)
422 $(TCCX) -c $<
424 # Rules to build individual *.o files from files in the src directory.
426 %.o: $(TOP)/src/%.c $(HDR)
427 $(TCCX) -c $<
429 tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
430 $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
434 # Rules to build opcodes.c and opcodes.h
436 opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
437 sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
439 opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
440 cat parse.h $(TOP)/src/vdbe.c | \
441 $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
443 # Rules to build parse.c and parse.h - the outputs of lemon.
445 parse.h: parse.c
447 parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
448 cp $(TOP)/src/parse.y .
449 rm -f parse.h
450 ./lemon $(OPTS) parse.y
451 mv parse.h parse.h.temp
452 $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
454 sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
455 tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
457 keywordhash.h: $(TOP)/tool/mkkeywordhash.c
458 $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
459 ./mkkeywordhash >keywordhash.h
463 # Rules to build the extension objects.
465 icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
466 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
468 fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
469 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
471 fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
472 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
474 fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
475 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
477 fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
478 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
480 fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
481 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
483 fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
484 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
486 fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
487 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
489 fts3_aux.o: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR)
490 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c
492 fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
493 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
495 fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
496 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
498 fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
499 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
501 fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
502 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
504 fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
505 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
507 fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
508 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
510 fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
511 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
513 fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
514 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
516 rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
517 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
520 # Rules for building test programs and for running tests
522 tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
523 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
524 $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
527 # Rules to build the 'testfixture' application.
529 TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
530 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
532 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
533 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
534 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
535 $(LIBTCL) $(THREADLIB) libsqlite3.a $(TLIBS)
536 mv a.out testfixture$(EXE)
538 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
539 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
540 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
541 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
543 fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
544 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
545 -DSQLITE_ENABLE_FTS3=1 \
546 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \
547 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
549 fulltest: testfixture$(EXE) sqlite3$(EXE)
550 ./testfixture$(EXE) $(TOP)/test/all.test
552 soaktest: testfixture$(EXE) sqlite3$(EXE)
553 ./testfixture$(EXE) $(TOP)/test/all.test -soak=1
555 test: testfixture$(EXE) sqlite3$(EXE)
556 ./testfixture$(EXE) $(TOP)/test/veryquick.test
558 # The next two rules are used to support the "threadtest" target. Building
559 # threadtest runs a few thread-safety tests that are implemented in C. This
560 # target is invoked by the releasetest.tcl script.
562 threadtest3$(EXE): sqlite3.o $(TOP)/test/threadtest3.c $(TOP)/test/tt3_checkpoint.c
563 $(TCCX) -O2 sqlite3.o $(TOP)/test/threadtest3.c \
564 -o threadtest3$(EXE) $(THREADLIB)
566 threadtest: threadtest3$(EXE)
567 ./threadtest3$(EXE)
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