Merge branch 'master' into ditto
[sqlcipher.git] / main.mk
blob83228c30e8f7aab6b80a0ecdaf1559b159e52683
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_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_expr.c \
191 $(TOP)/ext/fts3/fts3_hash.c \
192 $(TOP)/ext/fts3/fts3_hash.h \
193 $(TOP)/ext/fts3/fts3_icu.c \
194 $(TOP)/ext/fts3/fts3_porter.c \
195 $(TOP)/ext/fts3/fts3_snippet.c \
196 $(TOP)/ext/fts3/fts3_tokenizer.h \
197 $(TOP)/ext/fts3/fts3_tokenizer.c \
198 $(TOP)/ext/fts3/fts3_tokenizer1.c \
199 $(TOP)/ext/fts3/fts3_write.c
200 SRC += \
201 $(TOP)/ext/icu/sqliteicu.h \
202 $(TOP)/ext/icu/icu.c
203 SRC += \
204 $(TOP)/ext/rtree/rtree.h \
205 $(TOP)/ext/rtree/rtree.c
208 # Generated source code files
210 SRC += \
211 keywordhash.h \
212 opcodes.c \
213 opcodes.h \
214 parse.c \
215 parse.h \
216 sqlite3.h
219 # Source code to the test files.
221 TESTSRC = \
222 $(TOP)/src/test1.c \
223 $(TOP)/src/test2.c \
224 $(TOP)/src/test3.c \
225 $(TOP)/src/test4.c \
226 $(TOP)/src/test5.c \
227 $(TOP)/src/test6.c \
228 $(TOP)/src/test7.c \
229 $(TOP)/src/test8.c \
230 $(TOP)/src/test9.c \
231 $(TOP)/src/test_autoext.c \
232 $(TOP)/src/test_async.c \
233 $(TOP)/src/test_backup.c \
234 $(TOP)/src/test_btree.c \
235 $(TOP)/src/test_config.c \
236 $(TOP)/src/test_demovfs.c \
237 $(TOP)/src/test_devsym.c \
238 $(TOP)/src/test_func.c \
239 $(TOP)/src/test_hexio.c \
240 $(TOP)/src/test_init.c \
241 $(TOP)/src/test_intarray.c \
242 $(TOP)/src/test_journal.c \
243 $(TOP)/src/test_malloc.c \
244 $(TOP)/src/test_mutex.c \
245 $(TOP)/src/test_onefile.c \
246 $(TOP)/src/test_osinst.c \
247 $(TOP)/src/test_pcache.c \
248 $(TOP)/src/test_schema.c \
249 $(TOP)/src/test_server.c \
250 $(TOP)/src/test_stat.c \
251 $(TOP)/src/test_tclvar.c \
252 $(TOP)/src/test_thread.c \
253 $(TOP)/src/test_vfs.c \
254 $(TOP)/src/test_wsd.c
256 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
257 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
259 TESTSRC2 = \
260 $(TOP)/src/attach.c \
261 $(TOP)/src/backup.c \
262 $(TOP)/src/btree.c \
263 $(TOP)/src/build.c \
264 $(TOP)/src/date.c \
265 $(TOP)/src/expr.c \
266 $(TOP)/src/func.c \
267 $(TOP)/src/insert.c \
268 $(TOP)/src/wal.c \
269 $(TOP)/src/mem5.c \
270 $(TOP)/src/os.c \
271 $(TOP)/src/os_os2.c \
272 $(TOP)/src/os_unix.c \
273 $(TOP)/src/os_win.c \
274 $(TOP)/src/pager.c \
275 $(TOP)/src/pragma.c \
276 $(TOP)/src/prepare.c \
277 $(TOP)/src/printf.c \
278 $(TOP)/src/random.c \
279 $(TOP)/src/pcache.c \
280 $(TOP)/src/pcache1.c \
281 $(TOP)/src/select.c \
282 $(TOP)/src/tokenize.c \
283 $(TOP)/src/utf.c \
284 $(TOP)/src/util.c \
285 $(TOP)/src/vdbeapi.c \
286 $(TOP)/src/vdbeaux.c \
287 $(TOP)/src/vdbe.c \
288 $(TOP)/src/vdbemem.c \
289 $(TOP)/src/where.c \
290 parse.c \
291 $(TOP)/ext/fts3/fts3.c \
292 $(TOP)/ext/fts3/fts3_expr.c \
293 $(TOP)/ext/fts3/fts3_tokenizer.c \
294 $(TOP)/ext/fts3/fts3_write.c \
295 $(TOP)/ext/async/sqlite3async.c
297 # Header files used by all library source files.
299 HDR = \
300 $(TOP)/src/btree.h \
301 $(TOP)/src/btreeInt.h \
302 $(TOP)/src/hash.h \
303 $(TOP)/src/hwtime.h \
304 keywordhash.h \
305 $(TOP)/src/mutex.h \
306 opcodes.h \
307 $(TOP)/src/os.h \
308 $(TOP)/src/os_common.h \
309 $(TOP)/src/pager.h \
310 $(TOP)/src/pcache.h \
311 parse.h \
312 sqlite3.h \
313 $(TOP)/src/sqlite3ext.h \
314 $(TOP)/src/sqliteInt.h \
315 $(TOP)/src/sqliteLimit.h \
316 $(TOP)/src/vdbe.h \
317 $(TOP)/src/vdbeInt.h
319 # Header files used by extensions
321 EXTHDR += \
322 $(TOP)/ext/fts1/fts1.h \
323 $(TOP)/ext/fts1/fts1_hash.h \
324 $(TOP)/ext/fts1/fts1_tokenizer.h
325 EXTHDR += \
326 $(TOP)/ext/fts2/fts2.h \
327 $(TOP)/ext/fts2/fts2_hash.h \
328 $(TOP)/ext/fts2/fts2_tokenizer.h
329 EXTHDR += \
330 $(TOP)/ext/fts3/fts3.h \
331 $(TOP)/ext/fts3/fts3Int.h \
332 $(TOP)/ext/fts3/fts3_hash.h \
333 $(TOP)/ext/fts3/fts3_tokenizer.h
334 EXTHDR += \
335 $(TOP)/ext/rtree/rtree.h
336 EXTHDR += \
337 $(TOP)/ext/icu/sqliteicu.h
339 # This is the default Makefile target. The objects listed here
340 # are what get build when you type just "make" with no arguments.
342 all: sqlite3.h libsqlite3.a sqlite3$(EXE)
344 libsqlite3.a: $(LIBOBJ)
345 $(AR) libsqlite3.a $(LIBOBJ)
346 $(RANLIB) libsqlite3.a
348 sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
349 $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
350 $(TOP)/src/shell.c \
351 libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
353 # This target creates a directory named "tsrc" and fills it with
354 # copies of all of the C source code and header files needed to
355 # build on the target system. Some of the C source code and header
356 # files are automatically generated. This target takes care of
357 # all that automatic generation.
359 target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl
360 rm -rf tsrc
361 mkdir tsrc
362 cp -f $(SRC) tsrc
363 rm tsrc/sqlite.h.in tsrc/parse.y
364 tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
365 mv vdbe.new tsrc/vdbe.c
366 touch target_source
368 sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
369 tclsh $(TOP)/tool/mksqlite3c.tcl
370 cp sqlite3.c tclsqlite3.c
371 cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
373 fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
374 tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
376 fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
377 tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
379 # Rules to build the LEMON compiler generator
381 lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c
382 $(BCC) -o lemon $(TOP)/tool/lemon.c
383 cp $(TOP)/src/lempar.c .
385 # Rules to build individual *.o files from generated *.c files. This
386 # applies to:
388 # parse.o
389 # opcodes.o
391 %.o: %.c $(HDR)
392 $(TCCX) -c $<
394 # Rules to build individual *.o files from files in the src directory.
396 %.o: $(TOP)/src/%.c $(HDR)
397 $(TCCX) -c $<
399 tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
400 $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
404 # Rules to build opcodes.c and opcodes.h
406 opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
407 sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
409 opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
410 cat parse.h $(TOP)/src/vdbe.c | \
411 $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
413 # Rules to build parse.c and parse.h - the outputs of lemon.
415 parse.h: parse.c
417 parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
418 cp $(TOP)/src/parse.y .
419 rm -f parse.h
420 ./lemon $(OPTS) parse.y
421 mv parse.h parse.h.temp
422 $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
424 sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
425 tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
427 keywordhash.h: $(TOP)/tool/mkkeywordhash.c
428 $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
429 ./mkkeywordhash >keywordhash.h
433 # Rules to build the extension objects.
435 icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
436 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
438 fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
439 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
441 fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
442 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
444 fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
445 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
447 fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
448 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
450 fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
451 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
453 fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
454 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
456 fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
457 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
459 fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
460 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
462 fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
463 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
465 fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
466 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
468 fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR)
469 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c
471 fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
472 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
474 fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
475 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
477 fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
478 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
480 fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
481 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
483 rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
484 $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
487 # Rules for building test programs and for running tests
489 tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
490 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
491 $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
494 # Rules to build the 'testfixture' application.
496 TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
497 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
499 testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
500 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
501 $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
502 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a
504 amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
505 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
506 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
507 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
509 fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
510 $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
511 -DSQLITE_ENABLE_FTS3=1 \
512 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \
513 -o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
515 fulltest: testfixture$(EXE) sqlite3$(EXE)
516 ./testfixture$(EXE) $(TOP)/test/all.test
518 soaktest: testfixture$(EXE) sqlite3$(EXE)
519 ./testfixture$(EXE) $(TOP)/test/all.test -soak=1
521 test: testfixture$(EXE) sqlite3$(EXE)
522 ./testfixture$(EXE) $(TOP)/test/veryquick.test
524 sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
525 $(TOP)/tool/spaceanal.tcl
526 sed \
527 -e '/^#/d' \
528 -e 's,\\,\\\\,g' \
529 -e 's,",\\",g' \
530 -e 's,^,",' \
531 -e 's,$$,\\n",' \
532 $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
533 $(TCCX) $(TCL_FLAGS) -DTCLSH=2 $(TESTFIXTURE_FLAGS) \
534 -DSQLITE_TEST=1 -DSQLITE_PRIVATE="" \
535 $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
536 -o sqlite3_analyzer$(EXE) \
537 $(LIBTCL) $(THREADLIB)
539 TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
540 $(TEST_EXTENSION): $(TOP)/src/test_loadext.c
541 $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION)
543 extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
544 ./testfixture$(EXE) $(TOP)/test/loadext.test
547 # Standard install and cleanup targets
549 install: sqlite3 libsqlite3.a sqlite3.h
550 mv sqlite3 /usr/bin
551 mv libsqlite3.a /usr/lib
552 mv sqlite3.h /usr/include
554 clean:
555 rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.*
556 rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
557 rm -f $(PUBLISH)
558 rm -f *.da *.bb *.bbg gmon.out
559 rm -rf tsrc target_source
560 rm -f testloadext.dll libtestloadext.so
561 rm -f sqlite3.c fts?amal.c tclsqlite3.c