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 # OPTS Extra compiler command-line options.
17 # EXE The suffix to add to executable files. ".exe" for windows
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.
27 # TCL_FLAGS Extra compiler options needed for programs that use the
30 # LIBTCL Linker options needed to link against the TCL library.
32 # READLINE_FLAGS Compiler options needed for programs that use the
35 # LIBREADLINE Linker options needed by programs using readline() must
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
-I
$(TOP
)/ext
/userauth
51 # Object files for the SQLite library.
53 LIBOBJ
+= vdbe.o parse.o \
54 alter.o analyze.o attach.o auth.o \
55 backup.o bitvec.o btmutex.o btree.o build.o \
56 callback.o complete.o ctime.o date.o delete.o expr.o fault.o fkey.o \
57 fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
58 fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \
59 fts3_tokenize_vtab.o \
60 fts3_unicode.o fts3_unicode2.o \
61 fts3_write.o func.o global.o hash.o \
62 icu.o insert.o journal.o legacy.o loadext.o \
63 main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
65 mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
66 notify.o opcodes.o os.o os_unix.o os_win.o \
67 pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \
68 random.o recover.o resolve.o rowset.o rtree.o select.o status.o \
69 table.o threads.o tokenize.o trigger.o \
70 update.o userauth.o util.o vacuum.o \
71 vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \
72 vdbetrace.o wal.o walker.o where.o utf.o vtab.o
82 # All of the source code files.
86 $(TOP
)/src
/analyze.c \
91 $(TOP
)/src
/btmutex.c \
94 $(TOP
)/src
/btreeInt.h \
96 $(TOP
)/src
/callback.c \
97 $(TOP
)/src
/complete.c \
100 $(TOP
)/src
/delete.c \
105 $(TOP
)/src
/global.c \
108 $(TOP
)/src
/hwtime.h \
109 $(TOP
)/src
/insert.c \
110 $(TOP
)/src
/journal.c \
111 $(TOP
)/src
/legacy.c \
112 $(TOP
)/src
/loadext.c \
114 $(TOP
)/src
/malloc.c \
120 $(TOP
)/src
/memjournal.c \
123 $(TOP
)/src
/mutex_noop.c \
124 $(TOP
)/src
/mutex_unix.c \
125 $(TOP
)/src
/mutex_w32.c \
126 $(TOP
)/src
/notify.c \
129 $(TOP
)/src
/os_common.h \
130 $(TOP
)/src
/os_setup.h \
131 $(TOP
)/src
/os_unix.c \
132 $(TOP
)/src
/os_win.c \
133 $(TOP
)/src
/os_win.h \
137 $(TOP
)/src
/pcache.c \
138 $(TOP
)/src
/pcache.h \
139 $(TOP
)/src
/pcache1.c \
140 $(TOP
)/src
/pragma.c \
141 $(TOP
)/src
/prepare.c \
142 $(TOP
)/src
/printf.c \
143 $(TOP
)/src
/random.c \
144 $(TOP
)/src
/recover.c \
145 $(TOP
)/src
/resolve.c \
146 $(TOP
)/src
/rowset.c \
147 $(TOP
)/src
/select.c \
148 $(TOP
)/src
/status.c \
150 $(TOP
)/src
/sqlite.h.in \
151 $(TOP
)/src
/sqlite3ext.h \
152 $(TOP
)/src
/sqliteInt.h \
153 $(TOP
)/src
/sqliteLimit.h \
155 $(TOP
)/src
/tclsqlite.c \
156 $(TOP
)/src
/threads.c \
157 $(TOP
)/src
/tokenize.c \
158 $(TOP
)/src
/trigger.c \
160 $(TOP
)/src
/update.c \
162 $(TOP
)/src
/vacuum.c \
165 $(TOP
)/src
/vdbeapi.c \
166 $(TOP
)/src
/vdbeaux.c \
167 $(TOP
)/src
/vdbeblob.c \
168 $(TOP
)/src
/vdbemem.c \
169 $(TOP
)/src
/vdbesort.c \
170 $(TOP
)/src
/vdbetrace.c \
171 $(TOP
)/src
/vdbeInt.h \
175 $(TOP
)/src
/walker.c \
177 $(TOP
)/src
/whereInt.h
179 # Source code for extensions
182 $(TOP
)/ext
/fts1
/fts1.c \
183 $(TOP
)/ext
/fts1
/fts1.h \
184 $(TOP
)/ext
/fts1
/fts1_hash.c \
185 $(TOP
)/ext
/fts1
/fts1_hash.h \
186 $(TOP
)/ext
/fts1
/fts1_porter.c \
187 $(TOP
)/ext
/fts1
/fts1_tokenizer.h \
188 $(TOP
)/ext
/fts1
/fts1_tokenizer1.c
190 $(TOP
)/ext
/fts2
/fts2.c \
191 $(TOP
)/ext
/fts2
/fts2.h \
192 $(TOP
)/ext
/fts2
/fts2_hash.c \
193 $(TOP
)/ext
/fts2
/fts2_hash.h \
194 $(TOP
)/ext
/fts2
/fts2_icu.c \
195 $(TOP
)/ext
/fts2
/fts2_porter.c \
196 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
197 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
198 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
200 $(TOP
)/ext
/fts3
/fts3.c \
201 $(TOP
)/ext
/fts3
/fts3.h \
202 $(TOP
)/ext
/fts3
/fts3Int.h \
203 $(TOP
)/ext
/fts3
/fts3_aux.c \
204 $(TOP
)/ext
/fts3
/fts3_expr.c \
205 $(TOP
)/ext
/fts3
/fts3_hash.c \
206 $(TOP
)/ext
/fts3
/fts3_hash.h \
207 $(TOP
)/ext
/fts3
/fts3_icu.c \
208 $(TOP
)/ext
/fts3
/fts3_porter.c \
209 $(TOP
)/ext
/fts3
/fts3_snippet.c \
210 $(TOP
)/ext
/fts3
/fts3_tokenizer.h \
211 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
212 $(TOP
)/ext
/fts3
/fts3_tokenizer1.c \
213 $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c \
214 $(TOP
)/ext
/fts3
/fts3_unicode.c \
215 $(TOP
)/ext
/fts3
/fts3_unicode2.c \
216 $(TOP
)/ext
/fts3
/fts3_write.c
218 $(TOP
)/ext
/icu
/sqliteicu.h \
221 $(TOP
)/ext
/rtree
/sqlite3rtree.h \
222 $(TOP
)/ext
/rtree
/rtree.h \
223 $(TOP
)/ext
/rtree
/rtree.c
225 $(TOP
)/ext
/userauth
/userauth.c \
226 $(TOP
)/ext
/userauth
/sqlite3userauth.h
228 # Generated source code files
239 # Source code to the test files.
242 $(TOP
)/ext
/fts3
/fts3_term.c \
243 $(TOP
)/ext
/fts3
/fts3_test.c \
253 $(TOP
)/src
/test_autoext.c \
254 $(TOP
)/src
/test_async.c \
255 $(TOP
)/src
/test_backup.c \
256 $(TOP
)/src
/test_btree.c \
257 $(TOP
)/src
/test_config.c \
258 $(TOP
)/src
/test_demovfs.c \
259 $(TOP
)/src
/test_devsym.c \
260 $(TOP
)/src
/test_fs.c \
261 $(TOP
)/src
/test_func.c \
262 $(TOP
)/src
/test_hexio.c \
263 $(TOP
)/src
/test_init.c \
264 $(TOP
)/src
/test_intarray.c \
265 $(TOP
)/src
/test_journal.c \
266 $(TOP
)/src
/test_malloc.c \
267 $(TOP
)/src
/test_multiplex.c \
268 $(TOP
)/src
/test_mutex.c \
269 $(TOP
)/src
/test_onefile.c \
270 $(TOP
)/src
/test_osinst.c \
271 $(TOP
)/src
/test_pcache.c \
272 $(TOP
)/src
/test_quota.c \
273 $(TOP
)/src
/test_rtree.c \
274 $(TOP
)/src
/test_schema.c \
275 $(TOP
)/src
/test_server.c \
276 $(TOP
)/src
/test_stat.c \
277 $(TOP
)/src
/test_sqllog.c \
278 $(TOP
)/src
/test_superlock.c \
279 $(TOP
)/src
/test_syscall.c \
280 $(TOP
)/src
/test_tclvar.c \
281 $(TOP
)/src
/test_thread.c \
282 $(TOP
)/src
/test_vfs.c \
283 $(TOP
)/src
/test_wsd.c
285 # Extensions to be statically loaded.
288 $(TOP
)/ext
/misc
/amatch.c \
289 $(TOP
)/ext
/misc
/closure.c \
290 $(TOP
)/ext
/misc
/fileio.c \
291 $(TOP
)/ext
/misc
/fuzzer.c \
292 $(TOP
)/ext
/misc
/ieee754.c \
293 $(TOP
)/ext
/misc
/nextchar.c \
294 $(TOP
)/ext
/misc
/percentile.c \
295 $(TOP
)/ext
/misc
/regexp.c \
296 $(TOP
)/ext
/misc
/spellfix.c \
297 $(TOP
)/ext
/misc
/totype.c \
298 $(TOP
)/ext
/misc
/wholenumber.c \
299 $(TOP
)/ext
/misc
/vfslog.c
302 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
303 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
306 $(TOP
)/src
/attach.c \
307 $(TOP
)/src
/backup.c \
313 $(TOP
)/src
/insert.c \
318 $(TOP
)/src
/os_unix.c \
319 $(TOP
)/src
/os_win.c \
321 $(TOP
)/src
/pragma.c \
322 $(TOP
)/src
/prepare.c \
323 $(TOP
)/src
/printf.c \
324 $(TOP
)/src
/random.c \
325 $(TOP
)/src
/recover.c \
326 $(TOP
)/src
/pcache.c \
327 $(TOP
)/src
/pcache1.c \
328 $(TOP
)/src
/select.c \
329 $(TOP
)/src
/threads.c \
330 $(TOP
)/src
/tokenize.c \
333 $(TOP
)/src
/vdbeapi.c \
334 $(TOP
)/src
/vdbeaux.c \
336 $(TOP
)/src
/vdbemem.c \
339 $(TOP
)/ext
/fts3
/fts3.c \
340 $(TOP
)/ext
/fts3
/fts3_aux.c \
341 $(TOP
)/ext
/fts3
/fts3_expr.c \
342 $(TOP
)/ext
/fts3
/fts3_tokenizer.c \
343 $(TOP
)/ext
/fts3
/fts3_write.c \
344 $(TOP
)/ext
/async
/sqlite3async.c
347 $(TOP
)/ext
/fts2
/fts2.c \
348 $(TOP
)/ext
/fts2
/fts2.h \
349 $(TOP
)/ext
/fts2
/fts2_hash.c \
350 $(TOP
)/ext
/fts2
/fts2_hash.h \
351 $(TOP
)/ext
/fts2
/fts2_icu.c \
352 $(TOP
)/ext
/fts2
/fts2_porter.c \
353 $(TOP
)/ext
/fts2
/fts2_tokenizer.h \
354 $(TOP
)/ext
/fts2
/fts2_tokenizer.c \
355 $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
357 # Header files used by all library source files.
361 $(TOP
)/src
/btreeInt.h \
363 $(TOP
)/src
/hwtime.h \
368 $(TOP
)/src
/os_common.h \
369 $(TOP
)/src
/os_setup.h \
370 $(TOP
)/src
/os_win.h \
372 $(TOP
)/src
/pcache.h \
375 $(TOP
)/src
/sqlite3ext.h \
376 $(TOP
)/src
/sqliteInt.h \
377 $(TOP
)/src
/sqliteLimit.h \
379 $(TOP
)/src
/vdbeInt.h \
380 $(TOP
)/src
/whereInt.h
382 # Header files used by extensions
385 $(TOP
)/ext
/fts1
/fts1.h \
386 $(TOP
)/ext
/fts1
/fts1_hash.h \
387 $(TOP
)/ext
/fts1
/fts1_tokenizer.h
389 $(TOP
)/ext
/fts2
/fts2.h \
390 $(TOP
)/ext
/fts2
/fts2_hash.h \
391 $(TOP
)/ext
/fts2
/fts2_tokenizer.h
393 $(TOP
)/ext
/fts3
/fts3.h \
394 $(TOP
)/ext
/fts3
/fts3Int.h \
395 $(TOP
)/ext
/fts3
/fts3_hash.h \
396 $(TOP
)/ext
/fts3
/fts3_tokenizer.h
398 $(TOP
)/ext
/rtree
/rtree.h
400 $(TOP
)/ext
/icu
/sqliteicu.h
402 $(TOP
)/ext
/userauth
/sqlite3userauth.h
404 # This is the default Makefile target. The objects listed here
405 # are what get build when you type just "make" with no arguments.
407 all: sqlite3.h libsqlite3.a sqlite3
$(EXE
)
409 libsqlite3.a
: $(LIBOBJ
)
410 $(AR
) libsqlite3.a
$(LIBOBJ
)
411 $(RANLIB
) libsqlite3.a
413 sqlite3
$(EXE
): $(TOP
)/src
/shell.c libsqlite3.a sqlite3.h
414 $(TCCX
) $(READLINE_FLAGS
) -o sqlite3
$(EXE
) \
415 $(TOP
)/src
/shell.c
$(SHELL_ICU
) \
416 libsqlite3.a
$(LIBREADLINE
) $(TLIBS
) $(THREADLIB
)
418 mptester
$(EXE
): sqlite3.c
$(TOP
)/mptest
/mptest.c
419 $(TCCX
) -o
$@
-I.
$(TOP
)/mptest
/mptest.c sqlite3.c \
420 $(TLIBS
) $(THREADLIB
)
423 $(TCCX
) -I.
-c sqlite3.c
425 # This target creates a directory named "tsrc" and fills it with
426 # copies of all of the C source code and header files needed to
427 # build on the target system. Some of the C source code and header
428 # files are automatically generated. This target takes care of
429 # all that automatic generation.
431 target_source
: $(SRC
) $(TOP
)/tool
/vdbe-compress.tcl
435 rm tsrc
/sqlite.h.in tsrc
/parse.y
436 tclsh
$(TOP
)/tool
/vdbe-compress.tcl
$(OPTS
) <tsrc
/vdbe.c
>vdbe.new
437 mv vdbe.new tsrc
/vdbe.c
440 sqlite3.c
: target_source
$(TOP
)/tool
/mksqlite3c.tcl
441 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
442 cp tsrc
/shell.c tsrc
/sqlite3ext.h .
443 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
444 cat sqlite3.c
>>tclsqlite3.c
445 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
446 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
448 sqlite3.c-debug
: target_source
$(TOP
)/tool
/mksqlite3c.tcl
449 tclsh
$(TOP
)/tool
/mksqlite3c.tcl
--linemacros
450 echo
'#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
451 cat sqlite3.c
>>tclsqlite3.c
452 echo
'#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
453 echo
'#line 1 "tclsqlite.c"' >>tclsqlite3.c
454 cat
$(TOP
)/src
/tclsqlite.c
>>tclsqlite3.c
456 sqlite3-all.c
: sqlite3.c
$(TOP
)/tool
/split-sqlite3c.tcl
457 tclsh
$(TOP
)/tool
/split-sqlite3c.tcl
459 fts2amal.c
: target_source
$(TOP
)/ext
/fts2
/mkfts2amal.tcl
460 tclsh
$(TOP
)/ext
/fts2
/mkfts2amal.tcl
462 fts3amal.c
: target_source
$(TOP
)/ext
/fts3
/mkfts3amal.tcl
463 tclsh
$(TOP
)/ext
/fts3
/mkfts3amal.tcl
465 # Rules to build the LEMON compiler generator
467 lemon
: $(TOP
)/tool
/lemon.c
$(TOP
)/src
/lempar.c
468 $(BCC
) -o lemon
$(TOP
)/tool
/lemon.c
469 cp
$(TOP
)/src
/lempar.c .
471 # Rules to build individual *.o files from generated *.c files. This
480 # Rules to build individual *.o files from files in the src directory.
482 %.o
: $(TOP
)/src
/%.c
$(HDR
)
485 tclsqlite.o
: $(TOP
)/src
/tclsqlite.c
$(HDR
)
486 $(TCCX
) $(TCL_FLAGS
) -c
$(TOP
)/src
/tclsqlite.c
490 # Rules to build opcodes.c and opcodes.h
492 opcodes.c
: opcodes.h
$(TOP
)/mkopcodec.awk
493 $(NAWK
) -f
$(TOP
)/mkopcodec.awk opcodes.h
>opcodes.c
495 opcodes.h
: parse.h
$(TOP
)/src
/vdbe.c
$(TOP
)/mkopcodeh.awk
496 cat parse.h
$(TOP
)/src
/vdbe.c | \
497 $(NAWK
) -f
$(TOP
)/mkopcodeh.awk
>opcodes.h
499 # Rules to build parse.c and parse.h - the outputs of lemon.
503 parse.c
: $(TOP
)/src
/parse.y lemon
$(TOP
)/addopcodes.awk
504 cp
$(TOP
)/src
/parse.y .
506 .
/lemon
$(OPTS
) parse.y
507 mv parse.h parse.h.temp
508 $(NAWK
) -f
$(TOP
)/addopcodes.awk parse.h.temp
>parse.h
510 sqlite3.h
: $(TOP
)/src
/sqlite.h.in
$(TOP
)/manifest.uuid
$(TOP
)/VERSION
$(TOP
)/ext
/rtree
/sqlite3rtree.h
511 tclsh
$(TOP
)/tool
/mksqlite3h.tcl
$(TOP
) >sqlite3.h
513 keywordhash.h
: $(TOP
)/tool
/mkkeywordhash.c
514 $(BCC
) -o mkkeywordhash
$(OPTS
) $(TOP
)/tool
/mkkeywordhash.c
515 .
/mkkeywordhash
>keywordhash.h
519 # Rules to build the extension objects.
521 icu.o
: $(TOP
)/ext
/icu
/icu.c
$(HDR
) $(EXTHDR
)
522 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/icu
/icu.c
524 fts2.o
: $(TOP
)/ext
/fts2
/fts2.c
$(HDR
) $(EXTHDR
)
525 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2.c
527 fts2_hash.o
: $(TOP
)/ext
/fts2
/fts2_hash.c
$(HDR
) $(EXTHDR
)
528 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_hash.c
530 fts2_icu.o
: $(TOP
)/ext
/fts2
/fts2_icu.c
$(HDR
) $(EXTHDR
)
531 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_icu.c
533 fts2_porter.o
: $(TOP
)/ext
/fts2
/fts2_porter.c
$(HDR
) $(EXTHDR
)
534 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_porter.c
536 fts2_tokenizer.o
: $(TOP
)/ext
/fts2
/fts2_tokenizer.c
$(HDR
) $(EXTHDR
)
537 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer.c
539 fts2_tokenizer1.o
: $(TOP
)/ext
/fts2
/fts2_tokenizer1.c
$(HDR
) $(EXTHDR
)
540 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts2
/fts2_tokenizer1.c
542 fts3.o
: $(TOP
)/ext
/fts3
/fts3.c
$(HDR
) $(EXTHDR
)
543 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3.c
545 fts3_aux.o
: $(TOP
)/ext
/fts3
/fts3_aux.c
$(HDR
) $(EXTHDR
)
546 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_aux.c
548 fts3_expr.o
: $(TOP
)/ext
/fts3
/fts3_expr.c
$(HDR
) $(EXTHDR
)
549 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_expr.c
551 fts3_hash.o
: $(TOP
)/ext
/fts3
/fts3_hash.c
$(HDR
) $(EXTHDR
)
552 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_hash.c
554 fts3_icu.o
: $(TOP
)/ext
/fts3
/fts3_icu.c
$(HDR
) $(EXTHDR
)
555 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_icu.c
557 fts3_snippet.o
: $(TOP
)/ext
/fts3
/fts3_snippet.c
$(HDR
) $(EXTHDR
)
558 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_snippet.c
560 fts3_porter.o
: $(TOP
)/ext
/fts3
/fts3_porter.c
$(HDR
) $(EXTHDR
)
561 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_porter.c
563 fts3_tokenizer.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer.c
$(HDR
) $(EXTHDR
)
564 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer.c
566 fts3_tokenizer1.o
: $(TOP
)/ext
/fts3
/fts3_tokenizer1.c
$(HDR
) $(EXTHDR
)
567 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenizer1.c
569 fts3_tokenize_vtab.o
: $(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
$(HDR
) $(EXTHDR
)
570 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_tokenize_vtab.c
572 fts3_unicode.o
: $(TOP
)/ext
/fts3
/fts3_unicode.c
$(HDR
) $(EXTHDR
)
573 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode.c
575 fts3_unicode2.o
: $(TOP
)/ext
/fts3
/fts3_unicode2.c
$(HDR
) $(EXTHDR
)
576 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_unicode2.c
578 fts3_write.o
: $(TOP
)/ext
/fts3
/fts3_write.c
$(HDR
) $(EXTHDR
)
579 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/fts3
/fts3_write.c
581 rtree.o
: $(TOP
)/ext
/rtree
/rtree.c
$(HDR
) $(EXTHDR
)
582 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/rtree
/rtree.c
584 userauth.o
: $(TOP
)/ext
/userauth
/userauth.c
$(HDR
) $(EXTHDR
)
585 $(TCCX
) -DSQLITE_CORE
-c
$(TOP
)/ext
/userauth
/userauth.c
588 # Rules for building test programs and for running tests
590 tclsqlite3
: $(TOP
)/src
/tclsqlite.c libsqlite3.a
591 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
=1 -o tclsqlite3 \
592 $(TOP
)/src
/tclsqlite.c libsqlite3.a
$(LIBTCL
) $(THREADLIB
)
594 sqlite3_analyzer.c
: sqlite3.c
$(TOP
)/src
/test_stat.c
$(TOP
)/src
/tclsqlite.c
$(TOP
)/tool
/spaceanal.tcl
595 echo
"#define TCLSH 2" > $@
596 cat sqlite3.c
$(TOP
)/src
/test_stat.c
$(TOP
)/src
/tclsqlite.c
>> $@
597 echo
"static const char *tclsh_main_loop(void){" >> $@
598 echo
"static const char *zMainloop = " >> $@
599 $(NAWK
) -f
$(TOP
)/tool
/tostr.awk
$(TOP
)/tool
/spaceanal.tcl
>> $@
600 echo
"; return zMainloop; }" >> $@
602 sqlite3_analyzer
$(EXE
): sqlite3_analyzer.c
603 $(TCCX
) $(TCL_FLAGS
) sqlite3_analyzer.c
-o
$@
$(LIBTCL
) $(THREADLIB
)
605 # Rules to build the 'testfixture' application.
607 TESTFIXTURE_FLAGS
= -DSQLITE_TEST
=1 -DSQLITE_CRASH_TEST
=1
608 TESTFIXTURE_FLAGS
+= -DSQLITE_SERVER
=1 -DSQLITE_PRIVATE
="" -DSQLITE_CORE
610 testfixture
$(EXE
): $(TESTSRC2
) libsqlite3.a
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
611 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
=1 $(TESTFIXTURE_FLAGS
) \
612 $(TESTSRC
) $(TESTSRC2
) $(TOP
)/src
/tclsqlite.c \
613 $(LIBTCL
) libsqlite3.a
$(THREADLIB
) $(TLIBS
)
614 mv a.out testfixture
$(EXE
)
616 amalgamation-testfixture
$(EXE
): sqlite3.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
617 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
=1 $(TESTFIXTURE_FLAGS
) \
618 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c \
619 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
621 fts3-testfixture
$(EXE
): sqlite3.c fts3amal.c
$(TESTSRC
) $(TOP
)/src
/tclsqlite.c
622 $(TCCX
) $(TCL_FLAGS
) -DTCLSH
=1 $(TESTFIXTURE_FLAGS
) \
623 -DSQLITE_ENABLE_FTS3
=1 \
624 $(TESTSRC
) $(TOP
)/src
/tclsqlite.c sqlite3.c fts3amal.c \
625 -o testfixture
$(EXE
) $(LIBTCL
) $(THREADLIB
)
627 fulltest
: testfixture
$(EXE
) sqlite3
$(EXE
)
628 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test
630 soaktest
: testfixture
$(EXE
) sqlite3
$(EXE
)
631 .
/testfixture
$(EXE
) $(TOP
)/test/all.
test -soak
=1
633 fulltestonly
: testfixture
$(EXE
) sqlite3
$(EXE
)
634 .
/testfixture
$(EXE
) $(TOP
)/test/full.
test
636 queryplantest
: testfixture
$(EXE
) sqlite3
$(EXE
)
637 .
/testfixture
$(EXE
) $(TOP
)/test/permutations.
test queryplanner
639 test: testfixture
$(EXE
) sqlite3
$(EXE
)
640 .
/testfixture
$(EXE
) $(TOP
)/test/veryquick.
test
642 # The next two rules are used to support the "threadtest" target. Building
643 # threadtest runs a few thread-safety tests that are implemented in C. This
644 # target is invoked by the releasetest.tcl script.
646 threadtest3
$(EXE
): sqlite3.o
$(TOP
)/test/threadtest3.c
$(TOP
)/test/tt3_checkpoint.c
647 $(TCCX
) -O2 sqlite3.o
$(TOP
)/test/threadtest3.c \
648 -o threadtest3
$(EXE
) $(THREADLIB
)
650 threadtest
: threadtest3
$(EXE
)
653 TEST_EXTENSION
= $(SHPREFIX
)testloadext.
$(SO
)
654 $(TEST_EXTENSION
): $(TOP
)/src
/test_loadext.c
655 $(MKSHLIB
) $(TOP
)/src
/test_loadext.c
-o
$(TEST_EXTENSION
)
657 extensiontest
: testfixture
$(EXE
) $(TEST_EXTENSION
)
658 .
/testfixture
$(EXE
) $(TOP
)/test/loadext.
test
660 showdb
$(EXE
): $(TOP
)/tool
/showdb.c sqlite3.o
661 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showdb
$(EXE
) \
662 $(TOP
)/tool
/showdb.c sqlite3.o
$(THREADLIB
)
664 showstat4
$(EXE
): $(TOP
)/tool
/showstat4.c sqlite3.o
665 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showstat4
$(EXE
) \
666 $(TOP
)/tool
/showstat4.c sqlite3.o
$(THREADLIB
)
668 showjournal
$(EXE
): $(TOP
)/tool
/showjournal.c sqlite3.o
669 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showjournal
$(EXE
) \
670 $(TOP
)/tool
/showjournal.c sqlite3.o
$(THREADLIB
)
672 showwal
$(EXE
): $(TOP
)/tool
/showwal.c sqlite3.o
673 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o showwal
$(EXE
) \
674 $(TOP
)/tool
/showwal.c sqlite3.o
$(THREADLIB
)
676 fts3view
$(EXE
): $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
677 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o fts3view
$(EXE
) \
678 $(TOP
)/ext
/fts3
/tool
/fts3view.c sqlite3.o
$(THREADLIB
)
680 rollback-test
$(EXE
): $(TOP
)/tool
/rollback-test.c sqlite3.o
681 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o rollback-test
$(EXE
) \
682 $(TOP
)/tool
/rollback-test.c sqlite3.o
$(THREADLIB
)
684 LogEst
$(EXE
): $(TOP
)/tool
/logest.c sqlite3.h
685 $(TCC
) -o LogEst
$(EXE
) $(TOP
)/tool
/logest.c
687 wordcount
$(EXE
): $(TOP
)/test/wordcount.c sqlite3.c
688 $(TCC
) -DSQLITE_THREADSAFE
=0 -DSQLITE_OMIT_LOAD_EXTENSION
-o wordcount
$(EXE
) \
689 $(TOP
)/test/wordcount.c sqlite3.c
691 speedtest1
$(EXE
): $(TOP
)/test/speedtest1.c sqlite3.o
692 $(TCC
) -I.
-o speedtest1
$(EXE
) $(TOP
)/test/speedtest1.c sqlite3.o
$(THREADLIB
)
694 # This target will fail if the SQLite amalgamation contains any exported
695 # symbols that do not begin with "sqlite3_". It is run as part of the
696 # releasetest.tcl script.
698 checksymbols
: sqlite3.o
699 nm
-g
--defined-only sqlite3.o | grep
-v
" sqlite3_" ; test $$?
-ne
0
701 # Build the amalgamation-autoconf package.
704 TOP
=$(TOP
) sh
$(TOP
)/tool
/mkautoconfamal.sh
707 # Standard install and cleanup targets
709 install: sqlite3 libsqlite3.a sqlite3.h
711 mv libsqlite3.a
/usr
/lib
712 mv sqlite3.h
/usr
/include
715 rm -f
*.o sqlite3 sqlite3.exe libsqlite3.a sqlite3.h opcodes.
*
716 rm -f lemon lemon.exe lempar.c parse.
* sqlite
*.
tar.gz
717 rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h
719 rm -f
*.da
*.bb
*.bbg gmon.out
720 rm -rf quota2a quota2b quota2c
721 rm -rf tsrc target_source
722 rm -f testloadext.dll libtestloadext.so
723 rm -f amalgamation-testfixture amalgamation-testfixture.exe
724 rm -f fts3-testfixture fts3-testfixture.exe
725 rm -f testfixture testfixture.exe
726 rm -f threadtest3 threadtest3.exe
727 rm -f LogEst LogEst.exe
728 rm -f fts3view fts3view.exe
729 rm -f rollback-test rollback-test.exe
730 rm -f showdb showdb.exe
731 rm -f showjournal showjournal.exe
732 rm -f showstat4 showstat4.exe
733 rm -f showwal showwal.exe
734 rm -f speedtest1 speedtest1.exe
735 rm -f wordcount wordcount.exe
736 rm -f sqlite3.c sqlite3-
*.c fts?amal.c tclsqlite3.c
738 rm -f
shell.c sqlite3ext.h
739 rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c
740 rm -f sqlite-
*-output.vsix
741 rm -f mptester mptester.exe