2002-08-13 22:45:39 +02:00
|
|
|
###############################################################################
|
|
|
|
# The following macros should be defined before this script is
|
|
|
|
# invoked:
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02: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 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02: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 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# THREADLIB Specify any extra linker options needed to make the library
|
|
|
|
# thread safe
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# OPTS Extra compiler command-line options.
|
2002-01-15 19:39:43 +01:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# EXE The suffix to add to executable files. ".exe" for windows
|
|
|
|
# and "" for Unix.
|
2002-01-15 19:39:43 +01:00
|
|
|
#
|
2002-08-13 22:45:39 +02: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 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# AR Tools used to build a static library.
|
|
|
|
# RANLIB
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# TCL_FLAGS Extra compiler options needed for programs that use the
|
|
|
|
# TCL library.
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# LIBTCL Linker options needed to link against the TCL library.
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# READLINE_FLAGS Compiler options needed for programs that use the
|
|
|
|
# readline() library.
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# LIBREADLINE Linker options needed by programs using readline() must
|
|
|
|
# link against.
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2006-01-23 19:06:52 +01:00
|
|
|
# NAWK Nawk compatible awk program. Older (obsolete?) solaris
|
|
|
|
# systems need this to avoid using the original AT&T AWK.
|
2001-09-28 03:34:43 +02:00
|
|
|
#
|
2002-08-13 22:45:39 +02:00
|
|
|
# Once the macros above are defined, the rest of this make script will
|
|
|
|
# build the SQLite library and testing tools.
|
|
|
|
################################################################################
|
2001-09-28 03:34:43 +02:00
|
|
|
|
|
|
|
# This is how we compile
|
|
|
|
#
|
2008-06-23 17:55:52 +02:00
|
|
|
TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) -I$(TOP)/ext/rtree
|
2001-09-28 03:34:43 +02:00
|
|
|
|
|
|
|
# Object files for the SQLite library.
|
|
|
|
#
|
2008-02-18 15:47:33 +01:00
|
|
|
LIBOBJ+= alter.o analyze.o attach.o auth.o bitvec.o btmutex.o btree.o build.o \
|
2005-08-14 19:53:20 +02:00
|
|
|
callback.o complete.o date.o delete.o \
|
2008-06-13 20:24:27 +02:00
|
|
|
expr.o fault.o func.o global.o hash.o insert.o journal.o loadext.o \
|
2008-07-24 10:20:40 +02:00
|
|
|
main.o malloc.o mem1.o mem2.o mem3.o mem4.o mem5.o mem6.o \
|
2008-02-15 00:26:56 +01:00
|
|
|
mutex.o mutex_os2.o mutex_unix.o mutex_w32.o \
|
2007-08-15 15:04:54 +02:00
|
|
|
opcodes.o os.o os_os2.o os_unix.o os_win.o \
|
2005-05-25 06:11:56 +02:00
|
|
|
pager.o parse.o pragma.o prepare.o printf.o random.o \
|
2008-06-19 02:16:08 +02:00
|
|
|
select.o status.o table.o $(TCLOBJ) tokenize.o trigger.o \
|
2004-06-18 19:10:16 +02:00
|
|
|
update.o util.o vacuum.o \
|
2007-05-01 19:49:49 +02:00
|
|
|
vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbefifo.o vdbemem.o \
|
2008-08-04 13:49:20 +02:00
|
|
|
where.o utf.o legacy.o vtab.o rtree.o icu.o
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-08-20 19:37:47 +02:00
|
|
|
EXTOBJ = icu.o
|
|
|
|
EXTOBJ += fts1.o \
|
|
|
|
fts1_hash.o \
|
|
|
|
fts1_tokenizer1.o \
|
|
|
|
fts1_porter.o
|
|
|
|
EXTOBJ += fts2.o \
|
|
|
|
fts2_hash.o \
|
|
|
|
fts2_icu.o \
|
|
|
|
fts2_porter.o \
|
|
|
|
fts2_tokenizer.o \
|
|
|
|
fts2_tokenizer1.o
|
|
|
|
EXTOBJ += fts3.o \
|
|
|
|
fts3_hash.o \
|
|
|
|
fts3_icu.o \
|
|
|
|
fts3_porter.o \
|
|
|
|
fts3_tokenizer.o \
|
|
|
|
fts3_tokenizer1.o
|
2008-05-26 22:19:25 +02:00
|
|
|
EXTOBJ += rtree.o
|
2007-06-25 16:28:48 +02:00
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
# All of the source code files.
|
|
|
|
#
|
|
|
|
SRC = \
|
2005-02-15 21:47:57 +01:00
|
|
|
$(TOP)/src/alter.c \
|
2005-07-08 14:13:04 +02:00
|
|
|
$(TOP)/src/analyze.c \
|
2003-04-06 23:08:24 +02:00
|
|
|
$(TOP)/src/attach.c \
|
2003-01-12 19:02:16 +01:00
|
|
|
$(TOP)/src/auth.c \
|
2008-02-18 15:47:33 +01:00
|
|
|
$(TOP)/src/bitvec.c \
|
2007-08-28 04:27:51 +02:00
|
|
|
$(TOP)/src/btmutex.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/btree.c \
|
|
|
|
$(TOP)/src/btree.h \
|
2007-08-31 19:42:48 +02:00
|
|
|
$(TOP)/src/btreeInt.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/build.c \
|
2005-05-24 14:01:00 +02:00
|
|
|
$(TOP)/src/callback.c \
|
2005-08-14 19:53:20 +02:00
|
|
|
$(TOP)/src/complete.c \
|
2003-11-01 02:53:53 +01:00
|
|
|
$(TOP)/src/date.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/delete.c \
|
|
|
|
$(TOP)/src/expr.c \
|
2008-01-22 22:30:53 +01:00
|
|
|
$(TOP)/src/fault.c \
|
2002-02-24 02:55:15 +01:00
|
|
|
$(TOP)/src/func.c \
|
2008-06-13 20:24:27 +02:00
|
|
|
$(TOP)/src/global.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/hash.c \
|
|
|
|
$(TOP)/src/hash.h \
|
2008-05-29 22:22:37 +02:00
|
|
|
$(TOP)/src/hwtime.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/insert.c \
|
2007-08-22 13:22:03 +02:00
|
|
|
$(TOP)/src/journal.c \
|
2004-06-01 03:45:11 +02:00
|
|
|
$(TOP)/src/legacy.c \
|
2006-06-08 17:28:43 +02:00
|
|
|
$(TOP)/src/loadext.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/main.c \
|
2007-05-05 13:48:52 +02:00
|
|
|
$(TOP)/src/malloc.c \
|
2007-08-15 19:07:57 +02:00
|
|
|
$(TOP)/src/mem1.c \
|
|
|
|
$(TOP)/src/mem2.c \
|
2007-10-19 19:47:24 +02:00
|
|
|
$(TOP)/src/mem3.c \
|
2007-11-29 19:36:49 +01:00
|
|
|
$(TOP)/src/mem4.c \
|
2008-02-15 00:26:56 +01:00
|
|
|
$(TOP)/src/mem5.c \
|
2008-07-24 10:20:40 +02:00
|
|
|
$(TOP)/src/mem6.c \
|
2007-08-15 15:04:54 +02:00
|
|
|
$(TOP)/src/mutex.c \
|
2007-08-31 19:42:48 +02:00
|
|
|
$(TOP)/src/mutex.h \
|
2007-08-28 18:34:42 +02:00
|
|
|
$(TOP)/src/mutex_os2.c \
|
|
|
|
$(TOP)/src/mutex_unix.c \
|
|
|
|
$(TOP)/src/mutex_w32.c \
|
2005-11-30 04:20:31 +01:00
|
|
|
$(TOP)/src/os.c \
|
2007-08-31 19:42:48 +02:00
|
|
|
$(TOP)/src/os.h \
|
|
|
|
$(TOP)/src/os_common.h \
|
2006-06-03 20:02:15 +02:00
|
|
|
$(TOP)/src/os_os2.c \
|
2004-05-22 19:41:58 +02:00
|
|
|
$(TOP)/src/os_unix.c \
|
|
|
|
$(TOP)/src/os_win.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/pager.c \
|
|
|
|
$(TOP)/src/pager.h \
|
|
|
|
$(TOP)/src/parse.y \
|
2003-04-06 23:08:24 +02:00
|
|
|
$(TOP)/src/pragma.c \
|
2005-05-25 06:11:56 +02:00
|
|
|
$(TOP)/src/prepare.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/printf.c \
|
|
|
|
$(TOP)/src/random.c \
|
|
|
|
$(TOP)/src/select.c \
|
2008-06-19 02:16:08 +02:00
|
|
|
$(TOP)/src/status.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/shell.c \
|
|
|
|
$(TOP)/src/sqlite.h.in \
|
2007-02-23 04:00:44 +01:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2007-08-31 19:42:48 +02:00
|
|
|
$(TOP)/src/sqliteLimit.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/table.c \
|
|
|
|
$(TOP)/src/tclsqlite.c \
|
|
|
|
$(TOP)/src/tokenize.c \
|
2002-05-15 14:45:43 +02:00
|
|
|
$(TOP)/src/trigger.c \
|
2004-05-11 03:18:24 +02:00
|
|
|
$(TOP)/src/utf.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/update.c \
|
|
|
|
$(TOP)/src/util.c \
|
2003-04-06 22:52:32 +02:00
|
|
|
$(TOP)/src/vacuum.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/vdbe.c \
|
|
|
|
$(TOP)/src/vdbe.h \
|
2004-05-27 03:53:56 +02:00
|
|
|
$(TOP)/src/vdbeapi.c \
|
2003-09-06 22:12:01 +02:00
|
|
|
$(TOP)/src/vdbeaux.c \
|
2007-05-01 19:49:49 +02:00
|
|
|
$(TOP)/src/vdbeblob.c \
|
2005-07-08 15:07:59 +02:00
|
|
|
$(TOP)/src/vdbefifo.c \
|
2004-05-27 03:53:56 +02:00
|
|
|
$(TOP)/src/vdbemem.c \
|
2003-09-06 22:12:01 +02:00
|
|
|
$(TOP)/src/vdbeInt.h \
|
2006-06-12 01:41:55 +02:00
|
|
|
$(TOP)/src/vtab.c \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/where.c
|
|
|
|
|
2006-10-03 21:12:32 +02: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 04:00:44 +01: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 15:42:26 +02:00
|
|
|
$(TOP)/ext/fts2/fts2_icu.c \
|
2007-02-23 04:00:44 +01:00
|
|
|
$(TOP)/ext/fts2/fts2_porter.c \
|
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.h \
|
2007-07-20 15:42:26 +02:00
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.c \
|
2007-02-23 04:00:44 +01:00
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer1.c
|
2007-08-20 19:37:47 +02:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/fts3/fts3.c \
|
|
|
|
$(TOP)/ext/fts3/fts3.h \
|
|
|
|
$(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 12:56:40 +02:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/icu/icu.c
|
2008-05-26 22:19:25 +02:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/rtree/rtree.h \
|
|
|
|
$(TOP)/ext/rtree/rtree.c
|
2007-02-23 04:00:44 +01:00
|
|
|
|
2007-06-20 10:49:05 +02:00
|
|
|
|
2007-02-23 04:00:44 +01:00
|
|
|
# Generated source code files
|
|
|
|
#
|
|
|
|
SRC += \
|
|
|
|
keywordhash.h \
|
|
|
|
opcodes.c \
|
|
|
|
opcodes.h \
|
|
|
|
parse.c \
|
|
|
|
parse.h \
|
|
|
|
sqlite3.h
|
2006-10-03 21:12:32 +02:00
|
|
|
|
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
# Source code to the test files.
|
|
|
|
#
|
2004-05-14 03:58:11 +02:00
|
|
|
TESTSRC = \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/test1.c \
|
|
|
|
$(TOP)/src/test2.c \
|
|
|
|
$(TOP)/src/test3.c \
|
2003-12-19 03:52:05 +01:00
|
|
|
$(TOP)/src/test4.c \
|
2004-05-08 10:23:19 +02:00
|
|
|
$(TOP)/src/test5.c \
|
2005-11-26 01:25:00 +01:00
|
|
|
$(TOP)/src/test6.c \
|
2006-01-10 00:40:25 +01:00
|
|
|
$(TOP)/src/test7.c \
|
2006-06-12 01:41:55 +02:00
|
|
|
$(TOP)/src/test8.c \
|
2007-03-29 14:19:11 +02:00
|
|
|
$(TOP)/src/test9.c \
|
2006-08-23 22:07:20 +02:00
|
|
|
$(TOP)/src/test_autoext.c \
|
2006-01-09 18:29:52 +01:00
|
|
|
$(TOP)/src/test_async.c \
|
2007-05-05 20:39:25 +02:00
|
|
|
$(TOP)/src/test_btree.c \
|
2007-05-08 03:08:49 +02:00
|
|
|
$(TOP)/src/test_config.c \
|
2008-01-22 12:50:13 +01:00
|
|
|
$(TOP)/src/test_devsym.c \
|
2008-03-19 17:08:53 +01:00
|
|
|
$(TOP)/src/test_func.c \
|
2007-04-06 17:02:13 +02:00
|
|
|
$(TOP)/src/test_hexio.c \
|
2007-08-15 21:16:43 +02:00
|
|
|
$(TOP)/src/test_malloc.c \
|
2006-01-25 16:55:37 +01:00
|
|
|
$(TOP)/src/test_md5.c \
|
2008-06-18 11:45:56 +02:00
|
|
|
$(TOP)/src/test_mutex.c \
|
2007-09-14 18:19:27 +02:00
|
|
|
$(TOP)/src/test_onefile.c \
|
2008-04-10 16:51:00 +02:00
|
|
|
$(TOP)/src/test_osinst.c \
|
2006-06-15 17:59:19 +02:00
|
|
|
$(TOP)/src/test_schema.c \
|
2006-01-25 16:55:37 +01:00
|
|
|
$(TOP)/src/test_server.c \
|
2006-06-14 01:51:34 +02:00
|
|
|
$(TOP)/src/test_tclvar.c \
|
2007-09-07 13:29:25 +02:00
|
|
|
$(TOP)/src/test_thread.c \
|
2007-08-31 19:42:48 +02:00
|
|
|
|
2007-11-23 18:31:17 +01:00
|
|
|
#TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
|
|
|
|
#TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-08-31 19:42:48 +02:00
|
|
|
TESTSRC2 = \
|
|
|
|
$(TOP)/src/attach.c $(TOP)/src/btree.c $(TOP)/src/build.c $(TOP)/src/date.c \
|
|
|
|
$(TOP)/src/expr.c $(TOP)/src/func.c $(TOP)/src/insert.c $(TOP)/src/os.c \
|
|
|
|
$(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-01-16 18:46:38 +01:00
|
|
|
$(TOP)/src/printf.c $(TOP)/src/random.c \
|
|
|
|
$(TOP)/src/select.c $(TOP)/src/tokenize.c \
|
2007-08-31 19:42:48 +02:00
|
|
|
$(TOP)/src/utf.c $(TOP)/src/util.c $(TOP)/src/vdbeapi.c $(TOP)/src/vdbeaux.c \
|
|
|
|
$(TOP)/src/vdbe.c $(TOP)/src/vdbemem.c $(TOP)/src/where.c parse.c
|
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
# Header files used by all library source files.
|
|
|
|
#
|
|
|
|
HDR = \
|
|
|
|
$(TOP)/src/btree.h \
|
2007-05-05 13:48:52 +02:00
|
|
|
$(TOP)/src/btreeInt.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/hash.h \
|
2008-05-29 22:22:37 +02:00
|
|
|
$(TOP)/src/hwtime.h \
|
2007-08-31 19:42:48 +02:00
|
|
|
keywordhash.h \
|
2007-08-28 18:34:42 +02:00
|
|
|
$(TOP)/src/mutex.h \
|
2002-09-08 02:04:50 +02:00
|
|
|
opcodes.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/os.h \
|
2004-06-01 03:45:11 +02:00
|
|
|
$(TOP)/src/os_common.h \
|
2007-08-31 19:42:48 +02:00
|
|
|
$(TOP)/src/pager.h \
|
|
|
|
parse.h \
|
2007-08-28 18:34:42 +02:00
|
|
|
sqlite3.h \
|
2006-06-08 17:28:43 +02:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2001-09-28 03:34:43 +02:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2007-08-28 18:34:42 +02:00
|
|
|
$(TOP)/src/sqliteLimit.h \
|
2003-09-06 22:12:01 +02:00
|
|
|
$(TOP)/src/vdbe.h \
|
2008-05-07 04:42:01 +02:00
|
|
|
$(TOP)/src/vdbeInt.h
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2006-10-03 21:12:32 +02:00
|
|
|
# Header files used by extensions
|
|
|
|
#
|
2007-02-23 04:00:44 +01:00
|
|
|
EXTHDR += \
|
2006-10-03 21:12:32 +02:00
|
|
|
$(TOP)/ext/fts1/fts1.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_hash.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_tokenizer.h
|
2007-02-23 04:00:44 +01:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/fts2/fts2.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_hash.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.h
|
2007-08-20 19:37:47 +02:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/fts3/fts3.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_hash.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer.h
|
2008-05-26 22:19:25 +02:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/rtree/rtree.h
|
2006-10-03 21:12:32 +02:00
|
|
|
|
2001-09-28 03:34:43 +02: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 22:19:57 +02:00
|
|
|
all: sqlite3.h libsqlite3.a sqlite3$(EXE)
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-08-21 00:48:41 +02:00
|
|
|
libsqlite3.a: $(LIBOBJ)
|
|
|
|
$(AR) libsqlite3.a $(LIBOBJ)
|
2004-05-31 20:23:07 +02:00
|
|
|
$(RANLIB) libsqlite3.a
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-12-17 17:20:06 +01:00
|
|
|
sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
|
2007-12-18 12:19:35 +01:00
|
|
|
$(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
|
2007-12-13 19:20:46 +01:00
|
|
|
$(TOP)/src/shell.c \
|
|
|
|
libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
|
|
|
|
|
2004-05-08 10:23:19 +02:00
|
|
|
objects: $(LIBOBJ_ORIG)
|
|
|
|
|
2001-09-28 03:34:43 +02: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.
|
|
|
|
#
|
2007-02-23 04:00:44 +01:00
|
|
|
target_source: $(SRC)
|
2001-09-28 03:34:43 +02:00
|
|
|
rm -rf tsrc
|
|
|
|
mkdir tsrc
|
2007-08-31 19:42:48 +02:00
|
|
|
cp -f $(SRC) tsrc
|
2001-09-28 03:34:43 +02:00
|
|
|
rm tsrc/sqlite.h.in tsrc/parse.y
|
2007-12-11 20:34:44 +01:00
|
|
|
touch target_source
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-04-01 00:29:05 +02:00
|
|
|
sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
|
|
|
|
tclsh $(TOP)/tool/mksqlite3c.tcl
|
2007-04-05 23:58:33 +02:00
|
|
|
cp sqlite3.c tclsqlite3.c
|
|
|
|
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
|
2007-04-01 00:29:05 +02:00
|
|
|
|
2007-07-20 15:42:26 +02:00
|
|
|
fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
|
|
|
|
tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
|
|
|
|
|
2007-08-20 19:37:47 +02:00
|
|
|
fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
|
|
|
|
tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
|
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
# Rules to build the LEMON compiler generator
|
|
|
|
#
|
|
|
|
lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
|
|
|
|
$(BCC) -o lemon $(TOP)/tool/lemon.c
|
|
|
|
cp $(TOP)/tool/lempar.c .
|
|
|
|
|
2007-08-31 19:42:48 +02:00
|
|
|
# Rules to build individual *.o files from generated *.c files. This
|
|
|
|
# applies to:
|
|
|
|
#
|
|
|
|
# parse.o
|
|
|
|
# opcodes.o
|
|
|
|
#
|
2008-03-20 03:25:35 +01:00
|
|
|
%.o: %.c $(HDR)
|
|
|
|
$(TCCX) -c $<
|
|
|
|
|
|
|
|
# Rules to build individual *.o files from files in the src directory.
|
|
|
|
#
|
2007-08-31 19:42:48 +02:00
|
|
|
%.o: $(TOP)/src/%.c $(HDR)
|
|
|
|
$(TCCX) -c $<
|
2007-08-28 18:34:42 +02:00
|
|
|
|
2007-08-31 19:42:48 +02:00
|
|
|
tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
|
|
|
|
$(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
|
2007-08-28 18:34:42 +02:00
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2002-09-08 02:04:50 +02:00
|
|
|
|
2007-08-31 19:42:48 +02:00
|
|
|
# Rules to build opcodes.c and opcodes.h
|
|
|
|
#
|
2004-10-06 17:03:57 +02:00
|
|
|
opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
|
2006-06-27 22:05:23 +02:00
|
|
|
sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
|
2002-09-08 02:04:50 +02:00
|
|
|
|
2004-10-04 15:19:23 +02:00
|
|
|
opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
|
2007-08-31 19:42:48 +02:00
|
|
|
cat parse.h $(TOP)/src/vdbe.c |$(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
|
2006-06-03 20:02:15 +02:00
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-08-31 19:42:48 +02:00
|
|
|
# Rules to build parse.c and parse.h - the outputs of lemon.
|
|
|
|
#
|
2001-09-28 03:34:43 +02:00
|
|
|
parse.h: parse.c
|
|
|
|
|
2005-11-24 23:22:29 +01:00
|
|
|
parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
|
2001-09-28 03:34:43 +02:00
|
|
|
cp $(TOP)/src/parse.y .
|
2007-10-12 02:23:44 +02:00
|
|
|
rm -f parse.h
|
2004-10-30 22:23:09 +02:00
|
|
|
./lemon $(OPTS) parse.y
|
2005-11-24 23:22:29 +01:00
|
|
|
mv parse.h parse.h.temp
|
|
|
|
awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2004-05-31 20:23:07 +02:00
|
|
|
sqlite3.h: $(TOP)/src/sqlite.h.in
|
2001-09-28 03:34:43 +02:00
|
|
|
sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
|
2006-01-23 19:06:52 +01:00
|
|
|
-e s/--VERSION-NUMBER--/`cat ${TOP}/VERSION | sed 's/[^0-9]/ /g' | $(NAWK) '{printf "%d%03d%03d",$$1,$$2,$$3}'`/ \
|
2004-05-31 20:23:07 +02:00
|
|
|
$(TOP)/src/sqlite.h.in >sqlite3.h
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2005-01-18 05:00:42 +01:00
|
|
|
keywordhash.h: $(TOP)/tool/mkkeywordhash.c
|
2004-11-03 04:59:57 +01:00
|
|
|
$(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
|
2005-01-18 05:00:42 +01:00
|
|
|
./mkkeywordhash >keywordhash.h
|
2004-11-03 04:59:57 +01:00
|
|
|
|
2004-05-27 03:53:56 +02:00
|
|
|
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-06-25 16:28:48 +02: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 19:37:47 +02:00
|
|
|
fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
|
|
|
|
|
|
|
|
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 20:41:54 +02:00
|
|
|
rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
|
|
|
|
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
|
|
|
|
|
2007-06-25 16:28:48 +02:00
|
|
|
|
2004-05-22 19:41:58 +02:00
|
|
|
# Rules for building test programs and for running tests
|
|
|
|
#
|
2004-05-31 20:23:07 +02:00
|
|
|
tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
|
|
|
|
$(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
|
2004-06-30 10:20:16 +02:00
|
|
|
$(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-08-31 19:42:48 +02: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 13:29:02 +02:00
|
|
|
|
2007-11-23 18:31:17 +01: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 01:25:00 +01:00
|
|
|
fulltest: testfixture$(EXE) sqlite3$(EXE)
|
2001-09-28 03:34:43 +02:00
|
|
|
./testfixture$(EXE) $(TOP)/test/all.test
|
|
|
|
|
2007-06-18 14:22:43 +02:00
|
|
|
soaktest: testfixture$(EXE) sqlite3$(EXE)
|
|
|
|
./testfixture$(EXE) $(TOP)/test/all.test -soak 1
|
|
|
|
|
2004-05-31 20:23:07 +02:00
|
|
|
test: testfixture$(EXE) sqlite3$(EXE)
|
2008-06-25 19:54:53 +02:00
|
|
|
./testfixture$(EXE) $(TOP)/test/veryquick.test
|
2001-09-28 03:34:43 +02:00
|
|
|
|
2007-08-31 19:42:48 +02:00
|
|
|
sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
|
2004-07-23 02:01:38 +02: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 13:52:39 +01:00
|
|
|
$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \
|
2007-08-31 19:42:48 +02: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 02:01:38 +02:00
|
|
|
|
2006-06-14 12:38:02 +02: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 19:42:48 +02:00
|
|
|
|
2004-05-22 19:41:58 +02:00
|
|
|
# Standard install and cleanup targets
|
|
|
|
#
|
2004-05-31 20:23:07 +02:00
|
|
|
install: sqlite3 libsqlite3.a sqlite3.h
|
|
|
|
mv sqlite3 /usr/bin
|
|
|
|
mv libsqlite3.a /usr/lib
|
|
|
|
mv sqlite3.h /usr/include
|
2001-09-28 03:34:43 +02:00
|
|
|
|
|
|
|
clean:
|
2005-11-26 01:25:00 +01:00
|
|
|
rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.*
|
2005-01-18 05:00:42 +01:00
|
|
|
rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
|
2001-09-28 03:34:43 +02:00
|
|
|
rm -f $(PUBLISH)
|
|
|
|
rm -f *.da *.bb *.bbg gmon.out
|
2007-12-11 20:34:44 +01:00
|
|
|
rm -rf tsrc target_source
|
2006-09-03 00:14:59 +02:00
|
|
|
rm -f testloadext.dll libtestloadext.so
|
2007-11-23 18:31:17 +01:00
|
|
|
rm -f sqlite3.c fts?amal.c
|