2002-08-13 20:45:39 +00:00
|
|
|
###############################################################################
|
|
|
|
# The following macros should be defined before this script is
|
|
|
|
# invoked:
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# TOP The toplevel directory of the source tree. This is the
|
|
|
|
# directory that contains this "Makefile.in" and the
|
|
|
|
# "configure.in" script.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# BCC C Compiler and options for use in building executables that
|
|
|
|
# will run on the platform that is doing the build.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# THREADLIB Specify any extra linker options needed to make the library
|
|
|
|
# thread safe
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# OPTS Extra compiler command-line options.
|
2002-01-15 18:39:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# EXE The suffix to add to executable files. ".exe" for windows
|
|
|
|
# and "" for Unix.
|
2002-01-15 18:39:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# TCC C Compiler and options for use in building executables that
|
|
|
|
# will run on the target platform. This is usually the same
|
|
|
|
# as BCC, unless you are cross-compiling.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# AR Tools used to build a static library.
|
|
|
|
# RANLIB
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# TCL_FLAGS Extra compiler options needed for programs that use the
|
|
|
|
# TCL library.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# LIBTCL Linker options needed to link against the TCL library.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# READLINE_FLAGS Compiler options needed for programs that use the
|
|
|
|
# readline() library.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# LIBREADLINE Linker options needed by programs using readline() must
|
|
|
|
# link against.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2006-01-23 18:06:52 +00:00
|
|
|
# NAWK Nawk compatible awk program. Older (obsolete?) solaris
|
|
|
|
# systems need this to avoid using the original AT&T AWK.
|
2001-09-28 01:34:43 +00:00
|
|
|
#
|
2002-08-13 20:45:39 +00:00
|
|
|
# Once the macros above are defined, the rest of this make script will
|
|
|
|
# build the SQLite library and testing tools.
|
|
|
|
################################################################################
|
2001-09-28 01:34:43 +00:00
|
|
|
|
|
|
|
# This is how we compile
|
|
|
|
#
|
2008-10-14 14:28:35 +00:00
|
|
|
TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP)
|
|
|
|
TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3
|
2009-04-23 14:58:39 +00:00
|
|
|
TCCX += -I$(TOP)/ext/async
|
2001-09-28 01:34:43 +00:00
|
|
|
|
|
|
|
# Object files for the SQLite library.
|
|
|
|
#
|
2008-08-20 16:35:10 +00:00
|
|
|
LIBOBJ+= alter.o analyze.o attach.o auth.o \
|
2009-02-03 16:51:24 +00:00
|
|
|
backup.o bitvec.o btmutex.o btree.o build.o \
|
2009-09-19 17:00:31 +00:00
|
|
|
callback.o complete.o date.o delete.o expr.o fault.o fkey.o \
|
2008-12-17 15:18:17 +00:00
|
|
|
fts3.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
|
2008-10-14 14:28:35 +00:00
|
|
|
fts3_tokenizer.o fts3_tokenizer1.o \
|
|
|
|
func.o global.o hash.o \
|
2008-08-20 16:35:10 +00:00
|
|
|
icu.o insert.o journal.o legacy.o loadext.o \
|
2008-10-28 18:58:20 +00:00
|
|
|
main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
|
2008-10-17 18:51:52 +00:00
|
|
|
memjournal.o \
|
2008-10-07 15:25:48 +00:00
|
|
|
mutex.o mutex_noop.o mutex_os2.o mutex_unix.o mutex_w32.o \
|
2009-03-16 13:19:36 +00:00
|
|
|
notify.o opcodes.o os.o os_os2.o os_unix.o os_win.o \
|
2008-11-13 14:28:28 +00:00
|
|
|
pager.o parse.o pcache.o pcache1.o pragma.o prepare.o printf.o \
|
2009-04-22 02:15:47 +00:00
|
|
|
random.o resolve.o rowset.o rtree.o select.o status.o \
|
2008-08-20 16:35:10 +00:00
|
|
|
table.o tokenize.o trigger.o \
|
2004-06-18 17:10:16 +00:00
|
|
|
update.o util.o vacuum.o \
|
2008-12-04 20:40:10 +00:00
|
|
|
vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o \
|
2008-08-20 16:35:10 +00:00
|
|
|
walker.o where.o utf.o vtab.o
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-06-25 14:28:48 +00:00
|
|
|
|
2008-10-14 14:28:35 +00:00
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
# All of the source code files.
|
|
|
|
#
|
|
|
|
SRC = \
|
2005-02-15 20:47:57 +00:00
|
|
|
$(TOP)/src/alter.c \
|
2005-07-08 12:13:04 +00:00
|
|
|
$(TOP)/src/analyze.c \
|
2003-04-06 21:08:24 +00:00
|
|
|
$(TOP)/src/attach.c \
|
2003-01-12 18:02:16 +00:00
|
|
|
$(TOP)/src/auth.c \
|
2009-02-03 16:51:24 +00:00
|
|
|
$(TOP)/src/backup.c \
|
2008-02-18 14:47:33 +00:00
|
|
|
$(TOP)/src/bitvec.c \
|
2007-08-28 02:27:51 +00:00
|
|
|
$(TOP)/src/btmutex.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/btree.c \
|
|
|
|
$(TOP)/src/btree.h \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/btreeInt.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/build.c \
|
2005-05-24 12:01:00 +00:00
|
|
|
$(TOP)/src/callback.c \
|
2005-08-14 17:53:20 +00:00
|
|
|
$(TOP)/src/complete.c \
|
2003-11-01 01:53:53 +00:00
|
|
|
$(TOP)/src/date.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/delete.c \
|
|
|
|
$(TOP)/src/expr.c \
|
2008-01-22 21:30:53 +00:00
|
|
|
$(TOP)/src/fault.c \
|
2009-09-19 17:59:59 +00:00
|
|
|
$(TOP)/src/fkey.c \
|
2008-08-21 18:49:27 +00:00
|
|
|
$(TOP)/src/func.c \
|
2008-06-13 18:24:27 +00:00
|
|
|
$(TOP)/src/global.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/hash.c \
|
|
|
|
$(TOP)/src/hash.h \
|
2008-05-29 20:22:37 +00:00
|
|
|
$(TOP)/src/hwtime.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/insert.c \
|
2007-08-22 11:22:03 +00:00
|
|
|
$(TOP)/src/journal.c \
|
2004-06-01 01:45:11 +00:00
|
|
|
$(TOP)/src/legacy.c \
|
2006-06-08 15:28:43 +00:00
|
|
|
$(TOP)/src/loadext.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/main.c \
|
2007-05-05 11:48:52 +00:00
|
|
|
$(TOP)/src/malloc.c \
|
2008-10-28 18:58:20 +00:00
|
|
|
$(TOP)/src/mem0.c \
|
2007-08-15 17:07:57 +00:00
|
|
|
$(TOP)/src/mem1.c \
|
|
|
|
$(TOP)/src/mem2.c \
|
2007-10-19 17:47:24 +00:00
|
|
|
$(TOP)/src/mem3.c \
|
2008-02-14 23:26:56 +00:00
|
|
|
$(TOP)/src/mem5.c \
|
2008-10-17 18:51:52 +00:00
|
|
|
$(TOP)/src/memjournal.c \
|
2007-08-15 13:04:54 +00:00
|
|
|
$(TOP)/src/mutex.c \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/mutex.h \
|
2008-10-07 15:25:48 +00:00
|
|
|
$(TOP)/src/mutex_noop.c \
|
2007-08-28 16:34:42 +00:00
|
|
|
$(TOP)/src/mutex_os2.c \
|
|
|
|
$(TOP)/src/mutex_unix.c \
|
|
|
|
$(TOP)/src/mutex_w32.c \
|
2009-03-16 13:19:36 +00:00
|
|
|
$(TOP)/src/notify.c \
|
2005-11-30 03:20:31 +00:00
|
|
|
$(TOP)/src/os.c \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/os.h \
|
|
|
|
$(TOP)/src/os_common.h \
|
2006-06-03 18:02:15 +00:00
|
|
|
$(TOP)/src/os_os2.c \
|
2004-05-22 17:41:58 +00:00
|
|
|
$(TOP)/src/os_unix.c \
|
|
|
|
$(TOP)/src/os_win.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/pager.c \
|
|
|
|
$(TOP)/src/pager.h \
|
|
|
|
$(TOP)/src/parse.y \
|
2008-08-20 16:35:10 +00:00
|
|
|
$(TOP)/src/pcache.c \
|
|
|
|
$(TOP)/src/pcache.h \
|
2008-11-13 14:28:28 +00:00
|
|
|
$(TOP)/src/pcache1.c \
|
2003-04-06 21:08:24 +00:00
|
|
|
$(TOP)/src/pragma.c \
|
2005-05-25 04:11:56 +00:00
|
|
|
$(TOP)/src/prepare.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/printf.c \
|
|
|
|
$(TOP)/src/random.c \
|
2008-08-20 16:35:10 +00:00
|
|
|
$(TOP)/src/resolve.c \
|
2008-12-04 20:40:10 +00:00
|
|
|
$(TOP)/src/rowset.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/select.c \
|
2008-06-19 00:16:08 +00:00
|
|
|
$(TOP)/src/status.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/shell.c \
|
|
|
|
$(TOP)/src/sqlite.h.in \
|
2007-02-23 03:00:44 +00:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/sqliteLimit.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/table.c \
|
|
|
|
$(TOP)/src/tclsqlite.c \
|
|
|
|
$(TOP)/src/tokenize.c \
|
2002-05-15 12:45:43 +00:00
|
|
|
$(TOP)/src/trigger.c \
|
2004-05-11 01:18:24 +00:00
|
|
|
$(TOP)/src/utf.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/update.c \
|
|
|
|
$(TOP)/src/util.c \
|
2003-04-06 20:52:32 +00:00
|
|
|
$(TOP)/src/vacuum.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/vdbe.c \
|
|
|
|
$(TOP)/src/vdbe.h \
|
2004-05-27 01:53:56 +00:00
|
|
|
$(TOP)/src/vdbeapi.c \
|
2003-09-06 20:12:01 +00:00
|
|
|
$(TOP)/src/vdbeaux.c \
|
2007-05-01 17:49:49 +00:00
|
|
|
$(TOP)/src/vdbeblob.c \
|
2004-05-27 01:53:56 +00:00
|
|
|
$(TOP)/src/vdbemem.c \
|
2003-09-06 20:12:01 +00:00
|
|
|
$(TOP)/src/vdbeInt.h \
|
2006-06-11 23:41:55 +00:00
|
|
|
$(TOP)/src/vtab.c \
|
2008-08-20 16:35:10 +00:00
|
|
|
$(TOP)/src/walker.c \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/where.c
|
|
|
|
|
2006-10-03 19:12:32 +00:00
|
|
|
# Source code for extensions
|
|
|
|
#
|
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/fts1/fts1.c \
|
|
|
|
$(TOP)/ext/fts1/fts1.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_hash.c \
|
|
|
|
$(TOP)/ext/fts1/fts1_hash.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_porter.c \
|
|
|
|
$(TOP)/ext/fts1/fts1_tokenizer.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_tokenizer1.c
|
2007-02-23 03:00:44 +00:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/fts2/fts2.c \
|
|
|
|
$(TOP)/ext/fts2/fts2.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_hash.c \
|
|
|
|
$(TOP)/ext/fts2/fts2_hash.h \
|
2007-07-20 13:42:26 +00:00
|
|
|
$(TOP)/ext/fts2/fts2_icu.c \
|
2007-02-23 03:00:44 +00:00
|
|
|
$(TOP)/ext/fts2/fts2_porter.c \
|
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.h \
|
2007-07-20 13:42:26 +00:00
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.c \
|
2007-02-23 03:00:44 +00:00
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer1.c
|
2007-08-20 17:37:47 +00:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/fts3/fts3.c \
|
|
|
|
$(TOP)/ext/fts3/fts3.h \
|
2008-12-17 15:18:17 +00:00
|
|
|
$(TOP)/ext/fts3/fts3_expr.c \
|
|
|
|
$(TOP)/ext/fts3/fts3_expr.h \
|
2007-08-20 17:37:47 +00:00
|
|
|
$(TOP)/ext/fts3/fts3_hash.c \
|
|
|
|
$(TOP)/ext/fts3/fts3_hash.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_icu.c \
|
|
|
|
$(TOP)/ext/fts3/fts3_porter.c \
|
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer.c \
|
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer1.c
|
2007-06-26 10:56:40 +00:00
|
|
|
SRC += \
|
2008-09-08 08:08:09 +00:00
|
|
|
$(TOP)/ext/icu/sqliteicu.h \
|
2009-08-21 02:07:09 +00:00
|
|
|
$(TOP)/ext/icu/icu.c
|
2008-05-26 20:19:25 +00:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/rtree/rtree.h \
|
|
|
|
$(TOP)/ext/rtree/rtree.c
|
2007-02-23 03:00:44 +00:00
|
|
|
|
2007-06-20 08:49:05 +00:00
|
|
|
|
2007-02-23 03:00:44 +00:00
|
|
|
# Generated source code files
|
|
|
|
#
|
|
|
|
SRC += \
|
|
|
|
keywordhash.h \
|
|
|
|
opcodes.c \
|
|
|
|
opcodes.h \
|
|
|
|
parse.c \
|
|
|
|
parse.h \
|
|
|
|
sqlite3.h
|
2006-10-03 19:12:32 +00:00
|
|
|
|
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
# Source code to the test files.
|
|
|
|
#
|
2004-05-14 01:58:11 +00:00
|
|
|
TESTSRC = \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/test1.c \
|
|
|
|
$(TOP)/src/test2.c \
|
|
|
|
$(TOP)/src/test3.c \
|
2003-12-19 02:52:05 +00:00
|
|
|
$(TOP)/src/test4.c \
|
2004-05-08 08:23:19 +00:00
|
|
|
$(TOP)/src/test5.c \
|
2005-11-26 00:25:00 +00:00
|
|
|
$(TOP)/src/test6.c \
|
2006-01-09 23:40:25 +00:00
|
|
|
$(TOP)/src/test7.c \
|
2006-06-11 23:41:55 +00:00
|
|
|
$(TOP)/src/test8.c \
|
2007-03-29 12:19:11 +00:00
|
|
|
$(TOP)/src/test9.c \
|
2006-08-23 20:07:20 +00:00
|
|
|
$(TOP)/src/test_autoext.c \
|
2006-01-09 17:29:52 +00:00
|
|
|
$(TOP)/src/test_async.c \
|
2009-02-03 16:51:24 +00:00
|
|
|
$(TOP)/src/test_backup.c \
|
2007-05-05 18:39:25 +00:00
|
|
|
$(TOP)/src/test_btree.c \
|
2007-05-08 01:08:49 +00:00
|
|
|
$(TOP)/src/test_config.c \
|
2008-01-22 11:50:13 +00:00
|
|
|
$(TOP)/src/test_devsym.c \
|
2008-03-19 16:08:53 +00:00
|
|
|
$(TOP)/src/test_func.c \
|
2007-04-06 15:02:13 +00:00
|
|
|
$(TOP)/src/test_hexio.c \
|
2009-08-17 15:16:19 +00:00
|
|
|
$(TOP)/src/test_init.c \
|
2008-12-20 18:33:59 +00:00
|
|
|
$(TOP)/src/test_journal.c \
|
2007-08-15 19:16:43 +00:00
|
|
|
$(TOP)/src/test_malloc.c \
|
2008-06-18 09:45:56 +00:00
|
|
|
$(TOP)/src/test_mutex.c \
|
2007-09-14 16:19:27 +00:00
|
|
|
$(TOP)/src/test_onefile.c \
|
2008-04-10 14:51:00 +00:00
|
|
|
$(TOP)/src/test_osinst.c \
|
2008-11-19 01:20:26 +00:00
|
|
|
$(TOP)/src/test_pcache.c \
|
2006-06-15 15:59:19 +00:00
|
|
|
$(TOP)/src/test_schema.c \
|
2006-01-25 15:55:37 +00:00
|
|
|
$(TOP)/src/test_server.c \
|
2006-06-13 23:51:34 +00:00
|
|
|
$(TOP)/src/test_tclvar.c \
|
2007-09-07 11:29:25 +00:00
|
|
|
$(TOP)/src/test_thread.c \
|
2009-08-21 02:07:09 +00:00
|
|
|
$(TOP)/src/test_wsd.c
|
2007-08-31 17:42:48 +00:00
|
|
|
|
2007-11-23 17:31:17 +00:00
|
|
|
#TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
|
|
|
|
#TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
TESTSRC2 = \
|
2009-02-03 16:51:24 +00:00
|
|
|
$(TOP)/src/attach.c $(TOP)/src/backup.c $(TOP)/src/btree.c \
|
|
|
|
$(TOP)/src/build.c $(TOP)/src/date.c \
|
2009-09-10 18:17:10 +00:00
|
|
|
$(TOP)/src/expr.c $(TOP)/src/func.c $(TOP)/src/insert.c $(TOP)/src/mem5.c \
|
|
|
|
$(TOP)/src/os.c \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/os_os2.c $(TOP)/src/os_unix.c $(TOP)/src/os_win.c \
|
|
|
|
$(TOP)/src/pager.c $(TOP)/src/pragma.c $(TOP)/src/prepare.c \
|
2008-08-20 14:49:23 +00:00
|
|
|
$(TOP)/src/printf.c $(TOP)/src/random.c $(TOP)/src/pcache.c \
|
2008-11-13 14:28:28 +00:00
|
|
|
$(TOP)/src/pcache1.c $(TOP)/src/select.c $(TOP)/src/tokenize.c \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/utf.c $(TOP)/src/util.c $(TOP)/src/vdbeapi.c $(TOP)/src/vdbeaux.c \
|
2008-10-14 14:56:01 +00:00
|
|
|
$(TOP)/src/vdbe.c $(TOP)/src/vdbemem.c $(TOP)/src/where.c parse.c \
|
2008-12-17 15:18:17 +00:00
|
|
|
$(TOP)/ext/fts3/fts3.c $(TOP)/ext/fts3/fts3_expr.c \
|
2009-04-23 14:58:39 +00:00
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer.c \
|
|
|
|
$(TOP)/ext/async/sqlite3async.c
|
2007-08-31 17:42:48 +00:00
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
# Header files used by all library source files.
|
|
|
|
#
|
|
|
|
HDR = \
|
|
|
|
$(TOP)/src/btree.h \
|
2007-05-05 11:48:52 +00:00
|
|
|
$(TOP)/src/btreeInt.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/hash.h \
|
2008-05-29 20:22:37 +00:00
|
|
|
$(TOP)/src/hwtime.h \
|
2007-08-31 17:42:48 +00:00
|
|
|
keywordhash.h \
|
2007-08-28 16:34:42 +00:00
|
|
|
$(TOP)/src/mutex.h \
|
2002-09-08 00:04:50 +00:00
|
|
|
opcodes.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/os.h \
|
2004-06-01 01:45:11 +00:00
|
|
|
$(TOP)/src/os_common.h \
|
2007-08-31 17:42:48 +00:00
|
|
|
$(TOP)/src/pager.h \
|
2008-08-20 14:49:23 +00:00
|
|
|
$(TOP)/src/pcache.h \
|
2007-08-31 17:42:48 +00:00
|
|
|
parse.h \
|
2007-08-28 16:34:42 +00:00
|
|
|
sqlite3.h \
|
2006-06-08 15:28:43 +00:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2001-09-28 01:34:43 +00:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2007-08-28 16:34:42 +00:00
|
|
|
$(TOP)/src/sqliteLimit.h \
|
2003-09-06 20:12:01 +00:00
|
|
|
$(TOP)/src/vdbe.h \
|
2008-05-07 02:42:01 +00:00
|
|
|
$(TOP)/src/vdbeInt.h
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2006-10-03 19:12:32 +00:00
|
|
|
# Header files used by extensions
|
|
|
|
#
|
2007-02-23 03:00:44 +00:00
|
|
|
EXTHDR += \
|
2006-10-03 19:12:32 +00:00
|
|
|
$(TOP)/ext/fts1/fts1.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_hash.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_tokenizer.h
|
2007-02-23 03:00:44 +00:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/fts2/fts2.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_hash.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.h
|
2007-08-20 17:37:47 +00:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/fts3/fts3.h \
|
2008-12-17 15:18:17 +00:00
|
|
|
$(TOP)/ext/fts3/fts3_expr.h \
|
2007-08-20 17:37:47 +00:00
|
|
|
$(TOP)/ext/fts3/fts3_hash.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer.h
|
2008-05-26 20:19:25 +00:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/rtree/rtree.h
|
2008-09-08 08:08:09 +00:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/icu/sqliteicu.h
|
2006-10-03 19:12:32 +00:00
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
# This is the default Makefile target. The objects listed here
|
|
|
|
# are what get build when you type just "make" with no arguments.
|
|
|
|
#
|
2005-05-24 20:19:57 +00:00
|
|
|
all: sqlite3.h libsqlite3.a sqlite3$(EXE)
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-08-20 22:48:41 +00:00
|
|
|
libsqlite3.a: $(LIBOBJ)
|
|
|
|
$(AR) libsqlite3.a $(LIBOBJ)
|
2004-05-31 18:23:07 +00:00
|
|
|
$(RANLIB) libsqlite3.a
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-12-17 16:20:06 +00:00
|
|
|
sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
|
2007-12-18 11:19:35 +00:00
|
|
|
$(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
|
2007-12-13 18:20:46 +00:00
|
|
|
$(TOP)/src/shell.c \
|
|
|
|
libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
|
|
|
|
|
2004-05-08 08:23:19 +00:00
|
|
|
objects: $(LIBOBJ_ORIG)
|
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
# This target creates a directory named "tsrc" and fills it with
|
|
|
|
# copies of all of the C source code and header files needed to
|
|
|
|
# build on the target system. Some of the C source code and header
|
|
|
|
# files are automatically generated. This target takes care of
|
|
|
|
# all that automatic generation.
|
|
|
|
#
|
2009-06-02 15:21:42 +00:00
|
|
|
target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl
|
2001-09-28 01:34:43 +00:00
|
|
|
rm -rf tsrc
|
|
|
|
mkdir tsrc
|
2007-08-31 17:42:48 +00:00
|
|
|
cp -f $(SRC) tsrc
|
2001-09-28 01:34:43 +00:00
|
|
|
rm tsrc/sqlite.h.in tsrc/parse.y
|
2009-06-02 15:21:42 +00:00
|
|
|
tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new
|
|
|
|
mv vdbe.new tsrc/vdbe.c
|
2007-12-11 19:34:44 +00:00
|
|
|
touch target_source
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-03-31 22:29:05 +00:00
|
|
|
sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
|
|
|
|
tclsh $(TOP)/tool/mksqlite3c.tcl
|
2007-04-05 21:58:33 +00:00
|
|
|
cp sqlite3.c tclsqlite3.c
|
|
|
|
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
|
2007-03-31 22:29:05 +00:00
|
|
|
|
2007-07-20 13:42:26 +00:00
|
|
|
fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
|
|
|
|
tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
|
|
|
|
|
2007-08-20 17:37:47 +00:00
|
|
|
fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
|
|
|
|
tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
|
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
# Rules to build the LEMON compiler generator
|
|
|
|
#
|
2009-07-03 17:09:28 +00:00
|
|
|
lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c
|
2001-09-28 01:34:43 +00:00
|
|
|
$(BCC) -o lemon $(TOP)/tool/lemon.c
|
2009-07-03 17:09:28 +00:00
|
|
|
cp $(TOP)/src/lempar.c .
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
# Rules to build individual *.o files from generated *.c files. This
|
|
|
|
# applies to:
|
|
|
|
#
|
|
|
|
# parse.o
|
|
|
|
# opcodes.o
|
|
|
|
#
|
2008-03-20 02:25:35 +00:00
|
|
|
%.o: %.c $(HDR)
|
|
|
|
$(TCCX) -c $<
|
|
|
|
|
|
|
|
# Rules to build individual *.o files from files in the src directory.
|
|
|
|
#
|
2007-08-31 17:42:48 +00:00
|
|
|
%.o: $(TOP)/src/%.c $(HDR)
|
|
|
|
$(TCCX) -c $<
|
2007-08-28 16:34:42 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
|
|
|
|
$(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
|
2007-08-28 16:34:42 +00:00
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2002-09-08 00:04:50 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
# Rules to build opcodes.c and opcodes.h
|
|
|
|
#
|
2004-10-06 15:03:57 +00:00
|
|
|
opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
|
2006-06-27 20:05:23 +00:00
|
|
|
sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
|
2002-09-08 00:04:50 +00:00
|
|
|
|
2004-10-04 13:19:23 +00:00
|
|
|
opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
|
2008-08-21 18:49:27 +00:00
|
|
|
cat parse.h $(TOP)/src/vdbe.c | \
|
|
|
|
$(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
# Rules to build parse.c and parse.h - the outputs of lemon.
|
|
|
|
#
|
2001-09-28 01:34:43 +00:00
|
|
|
parse.h: parse.c
|
|
|
|
|
2005-11-24 22:22:29 +00:00
|
|
|
parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
|
2001-09-28 01:34:43 +00:00
|
|
|
cp $(TOP)/src/parse.y .
|
2007-10-12 00:23:44 +00:00
|
|
|
rm -f parse.h
|
2004-10-30 20:23:09 +00:00
|
|
|
./lemon $(OPTS) parse.y
|
2005-11-24 22:22:29 +00:00
|
|
|
mv parse.h parse.h.temp
|
|
|
|
awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2009-08-14 16:01:24 +00:00
|
|
|
sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
|
|
|
|
tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2005-01-18 04:00:42 +00:00
|
|
|
keywordhash.h: $(TOP)/tool/mkkeywordhash.c
|
2004-11-03 03:59:57 +00:00
|
|
|
$(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
|
2005-01-18 04:00:42 +00:00
|
|
|
./mkkeywordhash >keywordhash.h
|
2004-11-03 03:59:57 +00:00
|
|
|
|
2004-05-27 01:53:56 +00:00
|
|
|
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-06-25 14:28:48 +00:00
|
|
|
# Rules to build the extension objects.
|
|
|
|
#
|
|
|
|
icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
|
|
|
|
|
|
|
|
fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
|
|
|
|
|
|
|
|
fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
|
|
|
|
|
|
|
|
fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
|
|
|
|
|
|
|
|
fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
|
|
|
|
|
|
|
|
fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
|
|
|
|
|
|
|
|
fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
|
|
|
|
|
2007-08-20 17:37:47 +00:00
|
|
|
fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
|
|
|
|
|
2008-12-17 15:18:17 +00:00
|
|
|
fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
|
|
|
|
|
2007-08-20 17:37:47 +00:00
|
|
|
fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
|
|
|
|
|
|
|
|
fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
|
|
|
|
|
|
|
|
fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
|
|
|
|
|
|
|
|
fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
|
|
|
|
|
|
|
|
fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
|
|
|
|
|
2008-05-26 18:41:54 +00:00
|
|
|
rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
|
|
|
|
|
2007-06-25 14:28:48 +00:00
|
|
|
|
2004-05-22 17:41:58 +00:00
|
|
|
# Rules for building test programs and for running tests
|
|
|
|
#
|
2004-05-31 18:23:07 +00:00
|
|
|
tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
|
|
|
|
$(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
|
2004-06-30 08:20:16 +00:00
|
|
|
$(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
|
|
|
|
# Rules to build the 'testfixture' application.
|
|
|
|
#
|
|
|
|
TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
|
|
|
|
TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
|
|
|
|
|
|
|
|
testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
|
|
|
|
$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \
|
|
|
|
$(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \
|
|
|
|
-o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a
|
|
|
|
|
|
|
|
amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
|
|
|
|
$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \
|
|
|
|
$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
|
|
|
|
-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
|
2004-06-22 11:29:02 +00:00
|
|
|
|
2007-11-23 17:31:17 +00:00
|
|
|
fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
|
|
|
|
$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \
|
|
|
|
-DSQLITE_ENABLE_FTS3=1 \
|
|
|
|
$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \
|
|
|
|
-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
|
|
|
|
|
2005-11-26 00:25:00 +00:00
|
|
|
fulltest: testfixture$(EXE) sqlite3$(EXE)
|
2001-09-28 01:34:43 +00:00
|
|
|
./testfixture$(EXE) $(TOP)/test/all.test
|
|
|
|
|
2007-06-18 12:22:43 +00:00
|
|
|
soaktest: testfixture$(EXE) sqlite3$(EXE)
|
|
|
|
./testfixture$(EXE) $(TOP)/test/all.test -soak 1
|
|
|
|
|
2004-05-31 18:23:07 +00:00
|
|
|
test: testfixture$(EXE) sqlite3$(EXE)
|
2008-06-25 17:54:53 +00:00
|
|
|
./testfixture$(EXE) $(TOP)/test/veryquick.test
|
2001-09-28 01:34:43 +00:00
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
|
2004-07-23 00:01:38 +00:00
|
|
|
$(TOP)/tool/spaceanal.tcl
|
|
|
|
sed \
|
|
|
|
-e '/^#/d' \
|
|
|
|
-e 's,\\,\\\\,g' \
|
|
|
|
-e 's,",\\",g' \
|
|
|
|
-e 's,^,",' \
|
|
|
|
-e 's,$$,\\n",' \
|
|
|
|
$(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
|
2007-11-02 12:52:39 +00:00
|
|
|
$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \
|
2007-08-31 17:42:48 +00:00
|
|
|
-DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_DEBUG=1 -DSQLITE_PRIVATE="" \
|
|
|
|
$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
|
|
|
|
-o sqlite3_analyzer$(EXE) \
|
|
|
|
$(LIBTCL) $(THREADLIB)
|
2004-07-23 00:01:38 +00:00
|
|
|
|
2006-06-14 10:38:02 +00:00
|
|
|
TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
|
|
|
|
$(TEST_EXTENSION): $(TOP)/src/test_loadext.c
|
|
|
|
$(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION)
|
|
|
|
|
|
|
|
extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
|
|
|
|
./testfixture$(EXE) $(TOP)/test/loadext.test
|
|
|
|
|
2007-08-31 17:42:48 +00:00
|
|
|
|
2004-05-22 17:41:58 +00:00
|
|
|
# Standard install and cleanup targets
|
|
|
|
#
|
2004-05-31 18:23:07 +00:00
|
|
|
install: sqlite3 libsqlite3.a sqlite3.h
|
|
|
|
mv sqlite3 /usr/bin
|
|
|
|
mv libsqlite3.a /usr/lib
|
|
|
|
mv sqlite3.h /usr/include
|
2001-09-28 01:34:43 +00:00
|
|
|
|
|
|
|
clean:
|
2005-11-26 00:25:00 +00:00
|
|
|
rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.*
|
2005-01-18 04:00:42 +00:00
|
|
|
rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
|
2001-09-28 01:34:43 +00:00
|
|
|
rm -f $(PUBLISH)
|
|
|
|
rm -f *.da *.bb *.bbg gmon.out
|
2007-12-11 19:34:44 +00:00
|
|
|
rm -rf tsrc target_source
|
2006-09-02 22:14:59 +00:00
|
|
|
rm -f testloadext.dll libtestloadext.so
|
2008-08-21 18:49:27 +00:00
|
|
|
rm -f sqlite3.c fts?amal.c tclsqlite3.c
|