Fast user switcher: Add "(Supervised)" label for supervised users
[chromium-blink-merge.git] / third_party / sqlite / sqlite-src-3070603 / main.mk
blobe1df7a77f178c7bf77b8d40be770ce5e52f7b69e
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
73 # All of the source code files.
75 SRC = \
76 $(TOP)/src/alter.c \
77 $(TOP)/src/analyze.c \
78 $(TOP)/src/attach.c \
79 $(TOP)/src/auth.c \
80 $(TOP)/src/backup.c \
81 $(TOP)/src/bitvec.c \
82 $(TOP)/src/btmutex.c \
83 $(TOP)/src/btree.c \
84 $(TOP)/src/btree.h \
85 $(TOP)/src/btreeInt.h \
86 $(TOP)/src/build.c \
87 $(TOP)/src/callback.c \
88 $(TOP)/src/complete.c \
89 $(TOP)/src/ctime.c \
90 $(TOP)/src/date.c \
91 $(TOP)/src/delete.c \
92 $(TOP)/src/expr.c \
93 $(TOP)/src/fault.c \
94 $(TOP)/src/fkey.c \
95 $(TOP)/src/func.c \
96 $(TOP)/src/global.c \
97 $(TOP)/src/hash.c \
98 $(TOP)/src/hash.h \
99 $(TOP)/src/hwtime.h \
100 $(TOP)/src/insert.c \
101 $(TOP)/src/journal.c \
102 $(TOP)/src/legacy.c \
103 $(TOP)/src/loadext.c \
104 $(TOP)/src/main.c \
105 $(TOP)/src/malloc.c \
106 $(TOP)/src/mem0.c \
107 $(TOP)/src/mem1.c \
108 $(TOP)/src/mem2.c \
109 $(TOP)/src/mem3.c \
110 $(TOP)/src/mem5.c \
111 $(TOP)/src/memjournal.c \
112 $(TOP)/src/mutex.c \
113 $(TOP)/src/mutex.h \
114 $(TOP)/src/mutex_noop.c \
115 $(TOP)/src/mutex_os2.c \
116 $(TOP)/src/mutex_unix.c \
117 $(TOP)/src/mutex_w32.c \
118 $(TOP)/src/notify.c \
119 $(TOP)/src/os.c \
120 $(TOP)/src/os.h \
121 $(TOP)/src/os_common.h \
122 $(TOP)/src/os_os2.c \
123 $(TOP)/src/os_unix.c \
124 $(TOP)/src/os_win.c \
125 $(TOP)/src/pager.c \
126 $(TOP)/src/pager.h \
127 $(TOP)/src/parse.y \
128 $(TOP)/src/pcache.c \
129 $(TOP)/src/pcache.h \
130 $(TOP)/src/pcache1.c \
131 $(TOP)/src/pragma.c \
132 $(TOP)/src/prepare.c \
133 $(TOP)/src/printf.c \
134 $(TOP)/src/random.c \
135 $(TOP)/src/resolve.c \
136 $(TOP)/src/rowset.c \
137 $(TOP)/src/select.c \
138 $(TOP)/src/status.c \
139 $(TOP)/src/shell.c \
140 $(TOP)/src/sqlite.h.in \
141 $(TOP)/src/sqlite3ext.h \
142 $(TOP)/src/sqliteInt.h \
143 $(TOP)/src/sqliteLimit.h \
144 $(TOP)/src/table.c \
145 $(TOP)/src/tclsqlite.c \
146 $(TOP)/src/tokenize.c \
147 $(TOP)/src/trigger.c \
148 $(TOP)/src/utf.c \
149 $(TOP)/src/update.c \
150 $(TOP)/src/util.c \
151 $(TOP)/src/vacuum.c \
152 $(TOP)/src/vdbe.c \
153 $(TOP)/src/vdbe.h \
154 $(TOP)/src/vdbeapi.c \
155 $(TOP)/src/vdbeaux.c \
156 $(TOP)/src/vdbeblob.c \
157 $(TOP)/src/vdbemem.c \
158 $(TOP)/src/vdbetrace.c \
159 $(TOP)/src/vdbeInt.h \
160 $(TOP)/src/vtab.c \
161 $(TOP)/src/wal.c \
162 $(TOP)/src/wal.h \
163 $(TOP)/src/walker.c \
164 $(TOP)/src/where.c
166 # Source code for extensions
168 SRC += \
169 $(TOP)/ext/fts1/fts1.c \
170 $(TOP)/ext/fts1/fts1.h \
171 $(TOP)/ext/fts1/fts1_hash.c \
172 $(TOP)/ext/fts1/fts1_hash.h \
173 $(TOP)/ext/fts1/fts1_porter.c \
174 $(TOP)/ext/fts1/fts1_tokenizer.h \
175 $(TOP)/ext/fts1/fts1_tokenizer1.c
176 SRC += \
177 $(TOP)/ext/fts2/fts2.c \
178 $(TOP)/ext/fts2/fts2.h \
179 $(TOP)/ext/fts2/fts2_hash.c \
180 $(TOP)/ext/fts2/fts2_hash.h \
181 $(TOP)/ext/fts2/fts2_icu.c \
182 $(TOP)/ext/fts2/fts2_porter.c \
183 $(TOP)/ext/fts2/fts2_tokenizer.h \
184 $(TOP)/ext/fts2/fts2_tokenizer.c \
185 $(TOP)/ext/fts2/fts2_tokenizer1.c
186 SRC += \
187 $(TOP)/ext/fts3/fts3.c \
188 $(TOP)/ext/fts3/fts3.h \
189 $(TOP)/ext/fts3/fts3Int.h \
190 $(TOP)/ext/fts3/fts3_aux.c \
191 $(TOP)/ext/fts3/fts3_expr.c \
192 $(TOP)/ext/fts3/fts3_hash.c \
193 $(TOP)/ext/fts3/fts3_hash.h \
194 $(TOP)/ext/fts3/fts3_icu.c \
195 $(TOP)/ext/fts3/fts3_porter.c \
196 $(TOP)/ext/fts3/fts3_snippet.c \
197 $(TOP)/ext/fts3/fts3_tokenizer.h \
198 $(TOP)/ext/fts3/fts3_tokenizer.c \
199 $(TOP)/ext/fts3/fts3_tokenizer1.c \
200 $(TOP)/ext/fts3/fts3_write.c
201 SRC += \
202 $(TOP)/ext/icu/sqliteicu.h \
203 $(TOP)/ext/icu/icu.c
204 SRC += \
205 $(TOP)/ext/rtree/rtree.h \
206 $(TOP)/ext/rtree/rtree.c
209 # Generated source code files
211 SRC += \
212 keywordhash.h \
213 opcodes.c \
214 opcodes.h \
215 parse.c \
216 parse.h \
217 sqlite3.h
220 # Source code to the test files.
222 TESTSRC = \
223 $(TOP)/src/test1.c \
224 $(TOP)/src/test2.c \
225 $(TOP)/src/test3.c \
226 $(TOP)/src/test4.c \
227 $(TOP)/src/test5.c \
228 $(TOP)/src/test6.c \
229 $(TOP)/src/test7.c \
230 $(TOP)/src/test8.c \
231 $(TOP)/src/test9.c \
232 $(TOP)/src/test_autoext.c \
233 $(TOP)/src/test_async.c \
234 $(TOP)/src/test_backup.c \
235 $(TOP)/src/test_btree.c \
236 $(TOP)/src/test_config.c \
237 $(TOP)/src/test_demovfs.c \
238 $(TOP)/src/test_devsym.c \
239 $(TOP)/src/test_func.c \
240 $(TOP)/src/test_fuzzer.c \
241 $(TOP)/src/test_hexio.c \
242 $(TOP)/src/test_init.c \
243 $(TOP)/src/test_intarray.c \
244 $(TOP)/src/test_journal.c \
245 $(TOP)/src/test_malloc.c \
246 $(TOP)/src/test_multiplex.c \
247 $(TOP)/src/test_mutex.c \
248 $(TOP)/src/test_onefile.c \
249 $(TOP)/src/test_osinst.c \
250 $(TOP)/src/test_pcache.c \
251 $(TOP)/src/test_quota.c \
252 $(TOP)/src/test_rtree.c \
253 $(TOP)/src/test_schema.c \
254 $(TOP)/src/test_server.c \
255 $(TOP)/src/test_stat.c \
256 $(TOP)/src/test_superlock.c \
257 $(TOP)/src/test_syscall.c \
258 $(TOP)/src/test_tclvar.c \
259 $(TOP)/src/test_thread.c \
260 $(TOP)/src/test_vfs.c \
261 $(TOP)/src/test_wholenumber.c \
262 $(TOP)/src/test_wsd.c
264 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
265 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
267 TESTSRC2 = \
268 $(TOP)/src/attach.c \
269 $(TOP)/src/backup.c \
270 $(TOP)/src/btree.c \
271 $(TOP)/src/build.c \
272 $(TOP)/src/date.c \
273 $(TOP)/src/expr.c \
274 $(TOP)/src/func.c \
275 $(TOP)/src/insert.c \
276 $(TOP)/src/wal.c \
277 $(TOP)/src/mem5.c \
278 $(TOP)/src/os.c \
279 $(TOP)/src/os_os2.c \
280 $(TOP)/src/os_unix.c \
281 $(TOP)/src/os_win.c \
282 $(TOP)/src/pager.c \
283 $(TOP)/src/pragma.c \
284 $(TOP)/src/prepare.c \
285 $(TOP)/src/printf.c \
286 $(TOP)/src/random.c \
287 $(TOP)/src/pcache.c \
288 $(TOP)/src/pcache1.c \
289 $(TOP)/src/select.c \
290 $(TOP)/src/tokenize.c \
291 $(TOP)/src/utf.c \
292 $(TOP)/src/util.c \
293 $(TOP)/src/vdbeapi.c \
294 $(TOP)/src/vdbeaux.c \
295 $(TOP)/src/vdbe.c \
296 $(TOP)/src/vdbemem.c \
297 $(TOP)/src/where.c \
298 parse.c \
299 $(TOP)/ext/fts3/fts3.c \
300 $(TOP)/ext/fts3/fts3_aux.c \
301 $(TOP)/ext/fts3/fts3_expr.c \
302 $(TOP)/ext/fts3/fts3_tokenizer.c \
303 $(TOP)/ext/fts3/fts3_write.c \
304 $(TOP)/ext/async/sqlite3async.c
306 # Header files used by all library source files.
308 HDR = \
309 $(TOP)/src/btree.h \
310 $(TOP)/src/btreeInt.h \
311 $(TOP)/src/hash.h \
312 $(TOP)/src/hwtime.h \
313 keywordhash.h \
314 $(TOP)/src/mutex.h \
315 opcodes.h \
316 $(TOP)/src/os.h \
317 $(TOP)/src/os_common.h \
318 $(TOP)/src/pager.h \
319 $(TOP)/src/pcache.h \
320 parse.h \
321 sqlite3.h \
322 $(TOP)/src/sqlite3ext.h \
323 $(TOP)/src/sqliteInt.h \
324 $(TOP)/src/sqliteLimit.h \
325 $(TOP)/src/vdbe.h \
326 $(TOP)/src/vdbeInt.h
328 # Header files used by extensions
330 EXTHDR += \
331 $(TOP)/ext/fts1/fts1.h \
332 $(TOP)/ext/fts1/fts1_hash.h \
333 $(TOP)/ext/fts1/fts1_tokenizer.h
334 EXTHDR += \
335 $(TOP)/ext/fts2/fts2.h \
336 $(TOP)/ext/fts2/fts2_hash.h \
337 $(TOP)/ext/fts2/fts2_tokenizer.h
338 EXTHDR += \
339 $(TOP)/ext/fts3/fts3.h \
340 $(TOP)/ext/fts3/fts3Int.h \
341 $(TOP)/ext/fts3/fts3_hash.h \
342 $(TOP)/ext/fts3/fts3_tokenizer.h
343 EXTHDR += \
344 $(TOP)/ext/rtree/rtree.h
345 EXTHDR += \
346 $(TOP)/ext/icu/sqliteicu.h
348 # This is the default Makefile target. The objects listed here
349 # are what get build when you type just "make" with no arguments.
351 all: sqlite3.h libsqlite3.a sqlite3$(EXE)
353 libsqlite3.a: $(LIBOBJ)
354 $(AR) libsqlite3.a $(LIBOBJ)
355 $(RANLIB) libsqlite3.a
357 sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
358 $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
359 $(TOP)/src/shell.c \
360 libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
362 # This target creates a directory named "tsrc" and fills it with
363 # copies of all of the C source code and header files needed to
364 # build on the target system. Some of the C source code and header
365 # files are automatically generated. This target takes care of
366 # all that automatic generation.
368 target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl
369 rm -rf tsrc
370 mkdir tsrc
371 cp -f $(SRC) tsrc
372 rm tsrc/sqlite.h.in tsrc/parse.y
373 tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
374 mv vdbe.new tsrc/vdbe.c
375 touch target_source
377 sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
378 tclsh $(TOP)/tool/mksqlite3c.tcl
379 echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
380 cat sqlite3.c >>tclsqlite3.c
381 echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
382 cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
384 fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
385 tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
387 fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
388 tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
390 # Rules to build the LEMON compiler generator
392 lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c
393 $(BCC) -o lemon $(TOP)/tool/lemon.c
394 cp $(TOP)/src/lempar.c .
396 # Rules to build individual *.o files from generated *.c files. This
397 # applies to:
399 # parse.o
400 # opcodes.o
402 %.o: %.c $(HDR)
403 $(TCCX) -c $<
405 # Rules to build individual *.o files from files in the src directory.
407 %.o: $(TOP)/src/%.c $(HDR)
408 $(TCCX) -c $<
410 tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
411 $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
415 # Rules to build opcodes.c and opcodes.h
417 opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
418 sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
420 opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
421 cat parse.h $(TOP)/src/vdbe.c | \
422 $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
424 # Rules to build parse.c and parse.h - the outputs of lemon.
426 parse.h: parse.c
428 parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
429 cp $(TOP)/src/parse.y .
430 rm -f parse.h
431 ./lemon $(OPTS) parse.y
432 mv parse.h parse.h.temp
433 $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
435 sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
436 tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
438 keywordhash.h: $(TOP)/tool/mkkeywordhash.c
439 $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
440 ./mkkeywordhash >keywordhash.h
444 # Rules to build the extension objects.
446 icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
447 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
449 fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
450 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
452 fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
453 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
455 fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
456 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
458 fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
459 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
461 fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
462 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
464 fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
465 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
467 fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
468 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
470 fts3_aux.o: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR)
471 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c
473 fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
474 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
476 fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
477 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
479 fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
480 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
482 fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
483 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
485 fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
486 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
488 fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
489 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
491 fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
492 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
494 fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
495 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
497 rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
498 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
501 # Rules for building test programs and for running tests
503 tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
504 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
505 $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
508 # Rules to build the 'testfixture' application.
510 TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
511 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
513 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
514 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
515 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
516 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a
518 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
519 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
520 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
521 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
523 fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
524 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
525 -DSQLITE_ENABLE_FTS3=1 \
526 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \
527 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
529 fulltest: testfixture$(EXE) sqlite3$(EXE)
530 ./testfixture$(EXE) $(TOP)/test/all.test
532 soaktest: testfixture$(EXE) sqlite3$(EXE)
533 ./testfixture$(EXE) $(TOP)/test/all.test -soak=1
535 test: testfixture$(EXE) sqlite3$(EXE)
536 ./testfixture$(EXE) $(TOP)/test/veryquick.test
538 # The next two rules are used to support the "threadtest" target. Building
539 # threadtest runs a few thread-safety tests that are implemented in C. This
540 # target is invoked by the releasetest.tcl script.
542 threadtest3$(EXE): sqlite3.o $(TOP)/test/threadtest3.c $(TOP)/test/tt3_checkpoint.c
543 $(TCCX) -O2 sqlite3.o $(TOP)/test/threadtest3.c \
544 -o threadtest3$(EXE) $(THREADLIB)
546 threadtest: threadtest3$(EXE)
547 ./threadtest3$(EXE)
549 sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
550 $(TOP)/tool/spaceanal.tcl
551 sed \
552 -e '/^#/d' \
553 -e 's,\\,\\\\,g' \
554 -e 's,",\\",g' \
555 -e 's,^,",' \
556 -e 's,$$,\\n",' \
557 $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
558 $(TCCX) $(TCL_FLAGS) -DTCLSH=2 $(TESTFIXTURE_FLAGS) \
559 -DSQLITE_TEST=1 -DSQLITE_PRIVATE="" \
560 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
561 -o sqlite3_analyzer$(EXE) \
562 $(LIBTCL) $(THREADLIB)
564 TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
565 $(TEST_EXTENSION): $(TOP)/src/test_loadext.c
566 $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION)
568 extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
569 ./testfixture$(EXE) $(TOP)/test/loadext.test
572 # Standard install and cleanup targets
574 install: sqlite3 libsqlite3.a sqlite3.h
575 mv sqlite3 /usr/bin
576 mv libsqlite3.a /usr/lib
577 mv sqlite3.h /usr/include
579 clean:
580 rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.*
581 rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
582 rm -f $(PUBLISH)
583 rm -f *.da *.bb *.bbg gmon.out
584 rm -rf tsrc target_source
585 rm -f testloadext.dll libtestloadext.so
586 rm -f sqlite3.c fts?amal.c tclsqlite3.c