2002-08-14 00:45:39 +04:00
|
|
|
###############################################################################
|
|
|
|
# The following macros should be defined before this script is
|
|
|
|
# invoked:
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04: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 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04: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 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# THREADLIB Specify any extra linker options needed to make the library
|
|
|
|
# thread safe
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# OPTS Extra compiler command-line options.
|
2002-01-15 21:39:43 +03:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# EXE The suffix to add to executable files. ".exe" for windows
|
|
|
|
# and "" for Unix.
|
2002-01-15 21:39:43 +03:00
|
|
|
#
|
2002-08-14 00:45:39 +04: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 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# AR Tools used to build a static library.
|
|
|
|
# RANLIB
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# TCL_FLAGS Extra compiler options needed for programs that use the
|
|
|
|
# TCL library.
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# LIBTCL Linker options needed to link against the TCL library.
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# READLINE_FLAGS Compiler options needed for programs that use the
|
|
|
|
# readline() library.
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# LIBREADLINE Linker options needed by programs using readline() must
|
|
|
|
# link against.
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2006-01-23 21:06:52 +03:00
|
|
|
# NAWK Nawk compatible awk program. Older (obsolete?) solaris
|
|
|
|
# systems need this to avoid using the original AT&T AWK.
|
2001-09-28 05:34:43 +04:00
|
|
|
#
|
2002-08-14 00:45:39 +04:00
|
|
|
# Once the macros above are defined, the rest of this make script will
|
|
|
|
# build the SQLite library and testing tools.
|
|
|
|
################################################################################
|
2001-09-28 05:34:43 +04:00
|
|
|
|
|
|
|
# This is how we compile
|
|
|
|
#
|
2007-09-04 02:00:39 +04:00
|
|
|
TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src
|
2001-09-28 05:34:43 +04:00
|
|
|
|
|
|
|
# Object files for the SQLite library.
|
|
|
|
#
|
2007-08-28 06:27:51 +04:00
|
|
|
LIBOBJ+= alter.o analyze.o attach.o auth.o btmutex.o btree.o build.o \
|
2005-08-14 21:53:20 +04:00
|
|
|
callback.o complete.o date.o delete.o \
|
2007-08-22 15:22:03 +04:00
|
|
|
expr.o func.o hash.o insert.o journal.o loadext.o \
|
2007-10-19 21:47:24 +04:00
|
|
|
main.o malloc.o mem1.o mem2.o mem3.o mutex.o mutex_os2.o \
|
2007-08-28 20:34:42 +04:00
|
|
|
mutex_unix.o mutex_w32.o \
|
2007-08-15 17:04:54 +04:00
|
|
|
opcodes.o os.o os_os2.o os_unix.o os_win.o \
|
2005-05-25 08:11:56 +04:00
|
|
|
pager.o parse.o pragma.o prepare.o printf.o random.o \
|
2004-06-18 21:10:16 +04:00
|
|
|
select.o table.o tclsqlite.o tokenize.o trigger.o \
|
|
|
|
update.o util.o vacuum.o \
|
2007-05-01 21:49:49 +04:00
|
|
|
vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbefifo.o vdbemem.o \
|
2006-06-12 03:41:55 +04:00
|
|
|
where.o utf.o legacy.o vtab.o
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-20 21:37:47 +04: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
|
2007-06-25 18:28:48 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
# All of the source code files.
|
|
|
|
#
|
|
|
|
SRC = \
|
2005-02-15 23:47:57 +03:00
|
|
|
$(TOP)/src/alter.c \
|
2005-07-08 16:13:04 +04:00
|
|
|
$(TOP)/src/analyze.c \
|
2003-04-07 01:08:24 +04:00
|
|
|
$(TOP)/src/attach.c \
|
2003-01-12 21:02:16 +03:00
|
|
|
$(TOP)/src/auth.c \
|
2007-08-28 06:27:51 +04:00
|
|
|
$(TOP)/src/btmutex.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/btree.c \
|
|
|
|
$(TOP)/src/btree.h \
|
2007-08-31 21:42:48 +04:00
|
|
|
$(TOP)/src/btreeInt.h \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/build.c \
|
2005-05-24 16:01:00 +04:00
|
|
|
$(TOP)/src/callback.c \
|
2005-08-14 21:53:20 +04:00
|
|
|
$(TOP)/src/complete.c \
|
2003-11-01 04:53:53 +03:00
|
|
|
$(TOP)/src/date.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/delete.c \
|
|
|
|
$(TOP)/src/expr.c \
|
2002-02-24 04:55:15 +03:00
|
|
|
$(TOP)/src/func.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/hash.c \
|
|
|
|
$(TOP)/src/hash.h \
|
|
|
|
$(TOP)/src/insert.c \
|
2007-08-22 15:22:03 +04:00
|
|
|
$(TOP)/src/journal.c \
|
2004-06-01 05:45:11 +04:00
|
|
|
$(TOP)/src/legacy.c \
|
2006-06-08 19:28:43 +04:00
|
|
|
$(TOP)/src/loadext.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/main.c \
|
2007-05-05 15:48:52 +04:00
|
|
|
$(TOP)/src/malloc.c \
|
2007-08-15 21:07:57 +04:00
|
|
|
$(TOP)/src/mem1.c \
|
|
|
|
$(TOP)/src/mem2.c \
|
2007-10-19 21:47:24 +04:00
|
|
|
$(TOP)/src/mem3.c \
|
2007-08-15 17:04:54 +04:00
|
|
|
$(TOP)/src/mutex.c \
|
2007-08-31 21:42:48 +04:00
|
|
|
$(TOP)/src/mutex.h \
|
2007-08-28 20:34:42 +04:00
|
|
|
$(TOP)/src/mutex_os2.c \
|
|
|
|
$(TOP)/src/mutex_unix.c \
|
|
|
|
$(TOP)/src/mutex_w32.c \
|
2005-11-30 06:20:31 +03:00
|
|
|
$(TOP)/src/os.c \
|
2007-08-31 21:42:48 +04:00
|
|
|
$(TOP)/src/os.h \
|
|
|
|
$(TOP)/src/os_common.h \
|
2006-06-03 22:02:15 +04:00
|
|
|
$(TOP)/src/os_os2.c \
|
2004-05-22 21:41:58 +04:00
|
|
|
$(TOP)/src/os_unix.c \
|
|
|
|
$(TOP)/src/os_win.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/pager.c \
|
|
|
|
$(TOP)/src/pager.h \
|
|
|
|
$(TOP)/src/parse.y \
|
2003-04-07 01:08:24 +04:00
|
|
|
$(TOP)/src/pragma.c \
|
2005-05-25 08:11:56 +04:00
|
|
|
$(TOP)/src/prepare.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/printf.c \
|
|
|
|
$(TOP)/src/random.c \
|
|
|
|
$(TOP)/src/select.c \
|
|
|
|
$(TOP)/src/shell.c \
|
|
|
|
$(TOP)/src/sqlite.h.in \
|
2007-02-23 06:00:44 +03:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2007-08-31 21:42:48 +04:00
|
|
|
$(TOP)/src/sqliteLimit.h \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/table.c \
|
|
|
|
$(TOP)/src/tclsqlite.c \
|
|
|
|
$(TOP)/src/tokenize.c \
|
2002-05-15 16:45:43 +04:00
|
|
|
$(TOP)/src/trigger.c \
|
2004-05-11 05:18:24 +04:00
|
|
|
$(TOP)/src/utf.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/update.c \
|
|
|
|
$(TOP)/src/util.c \
|
2003-04-07 00:52:32 +04:00
|
|
|
$(TOP)/src/vacuum.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/vdbe.c \
|
|
|
|
$(TOP)/src/vdbe.h \
|
2004-05-27 05:53:56 +04:00
|
|
|
$(TOP)/src/vdbeapi.c \
|
2003-09-07 00:12:01 +04:00
|
|
|
$(TOP)/src/vdbeaux.c \
|
2007-05-01 21:49:49 +04:00
|
|
|
$(TOP)/src/vdbeblob.c \
|
2005-07-08 17:07:59 +04:00
|
|
|
$(TOP)/src/vdbefifo.c \
|
2004-05-27 05:53:56 +04:00
|
|
|
$(TOP)/src/vdbemem.c \
|
2003-09-07 00:12:01 +04:00
|
|
|
$(TOP)/src/vdbeInt.h \
|
2006-06-12 03:41:55 +04:00
|
|
|
$(TOP)/src/vtab.c \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/where.c
|
|
|
|
|
2006-10-03 23:12:32 +04: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 06:00:44 +03: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 17:42:26 +04:00
|
|
|
$(TOP)/ext/fts2/fts2_icu.c \
|
2007-02-23 06:00:44 +03:00
|
|
|
$(TOP)/ext/fts2/fts2_porter.c \
|
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.h \
|
2007-07-20 17:42:26 +04:00
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.c \
|
2007-02-23 06:00:44 +03:00
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer1.c
|
2007-08-20 21:37:47 +04: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 14:56:40 +04:00
|
|
|
SRC += \
|
|
|
|
$(TOP)/ext/icu/icu.c
|
2007-02-23 06:00:44 +03:00
|
|
|
|
2007-06-20 12:49:05 +04:00
|
|
|
|
2007-02-23 06:00:44 +03:00
|
|
|
# Generated source code files
|
|
|
|
#
|
|
|
|
SRC += \
|
|
|
|
keywordhash.h \
|
|
|
|
opcodes.c \
|
|
|
|
opcodes.h \
|
|
|
|
parse.c \
|
|
|
|
parse.h \
|
|
|
|
sqlite3.h
|
2006-10-03 23:12:32 +04:00
|
|
|
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
# Source code to the test files.
|
|
|
|
#
|
2004-05-14 05:58:11 +04:00
|
|
|
TESTSRC = \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/test1.c \
|
|
|
|
$(TOP)/src/test2.c \
|
|
|
|
$(TOP)/src/test3.c \
|
2003-12-19 05:52:05 +03:00
|
|
|
$(TOP)/src/test4.c \
|
2004-05-08 12:23:19 +04:00
|
|
|
$(TOP)/src/test5.c \
|
2005-11-26 03:25:00 +03:00
|
|
|
$(TOP)/src/test6.c \
|
2006-01-10 02:40:25 +03:00
|
|
|
$(TOP)/src/test7.c \
|
2006-06-12 03:41:55 +04:00
|
|
|
$(TOP)/src/test8.c \
|
2007-03-29 16:19:11 +04:00
|
|
|
$(TOP)/src/test9.c \
|
2006-08-24 00:07:20 +04:00
|
|
|
$(TOP)/src/test_autoext.c \
|
2006-01-09 20:29:52 +03:00
|
|
|
$(TOP)/src/test_async.c \
|
2007-05-05 22:39:25 +04:00
|
|
|
$(TOP)/src/test_btree.c \
|
2007-05-08 05:08:49 +04:00
|
|
|
$(TOP)/src/test_config.c \
|
2007-04-06 19:02:13 +04:00
|
|
|
$(TOP)/src/test_hexio.c \
|
2007-08-15 23:16:43 +04:00
|
|
|
$(TOP)/src/test_malloc.c \
|
2006-01-25 18:55:37 +03:00
|
|
|
$(TOP)/src/test_md5.c \
|
2007-09-14 20:19:27 +04:00
|
|
|
$(TOP)/src/test_onefile.c \
|
2006-06-15 19:59:19 +04:00
|
|
|
$(TOP)/src/test_schema.c \
|
2006-01-25 18:55:37 +03:00
|
|
|
$(TOP)/src/test_server.c \
|
2006-06-14 03:51:34 +04:00
|
|
|
$(TOP)/src/test_tclvar.c \
|
2007-09-07 15:29:25 +04:00
|
|
|
$(TOP)/src/test_thread.c \
|
2007-08-31 21:42:48 +04:00
|
|
|
|
2007-08-20 21:37:47 +04:00
|
|
|
TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
|
|
|
|
TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-31 21:42:48 +04: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 \
|
|
|
|
$(TOP)/src/printf.c $(TOP)/src/select.c $(TOP)/src/tokenize.c \
|
|
|
|
$(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 05:34:43 +04:00
|
|
|
# Header files used by all library source files.
|
|
|
|
#
|
|
|
|
HDR = \
|
|
|
|
$(TOP)/src/btree.h \
|
2007-05-05 15:48:52 +04:00
|
|
|
$(TOP)/src/btreeInt.h \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/hash.h \
|
2007-08-31 21:42:48 +04:00
|
|
|
keywordhash.h \
|
2007-08-28 20:34:42 +04:00
|
|
|
$(TOP)/src/mutex.h \
|
2002-09-08 04:04:50 +04:00
|
|
|
opcodes.h \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/os.h \
|
2004-06-01 05:45:11 +04:00
|
|
|
$(TOP)/src/os_common.h \
|
2007-08-31 21:42:48 +04:00
|
|
|
$(TOP)/src/pager.h \
|
|
|
|
parse.h \
|
2007-08-28 20:34:42 +04:00
|
|
|
sqlite3.h \
|
2006-06-08 19:28:43 +04:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2001-09-28 05:34:43 +04:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2007-08-28 20:34:42 +04:00
|
|
|
$(TOP)/src/sqliteLimit.h \
|
2003-09-07 00:12:01 +04:00
|
|
|
$(TOP)/src/vdbe.h \
|
2007-08-31 21:42:48 +04:00
|
|
|
$(TOP)/src/vdbeInt.h
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2006-10-03 23:12:32 +04:00
|
|
|
# Header files used by extensions
|
|
|
|
#
|
2007-02-23 06:00:44 +03:00
|
|
|
EXTHDR += \
|
2006-10-03 23:12:32 +04:00
|
|
|
$(TOP)/ext/fts1/fts1.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_hash.h \
|
|
|
|
$(TOP)/ext/fts1/fts1_tokenizer.h
|
2007-02-23 06:00:44 +03:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/fts2/fts2.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_hash.h \
|
|
|
|
$(TOP)/ext/fts2/fts2_tokenizer.h
|
2007-08-20 21:37:47 +04:00
|
|
|
EXTHDR += \
|
|
|
|
$(TOP)/ext/fts3/fts3.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_hash.h \
|
|
|
|
$(TOP)/ext/fts3/fts3_tokenizer.h
|
2006-10-03 23:12:32 +04:00
|
|
|
|
2001-09-28 05:34:43 +04: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-25 00:19:57 +04:00
|
|
|
all: sqlite3.h libsqlite3.a sqlite3$(EXE)
|
2001-09-28 05:34:43 +04:00
|
|
|
|
|
|
|
# Generate the file "last_change" which contains the date of change
|
|
|
|
# of the most recently modified source code file
|
|
|
|
#
|
|
|
|
last_change: $(SRC)
|
2006-06-28 00:05:23 +04:00
|
|
|
cat $(SRC) | grep '$$Id: ' | sort -k 5 | tail -1 \
|
2006-01-23 21:06:52 +03:00
|
|
|
| $(NAWK) '{print $$5,$$6}' >last_change
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-21 02:48:41 +04:00
|
|
|
libsqlite3.a: $(LIBOBJ)
|
|
|
|
$(AR) libsqlite3.a $(LIBOBJ)
|
2004-05-31 22:23:07 +04:00
|
|
|
$(RANLIB) libsqlite3.a
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2004-05-31 22:23:07 +04:00
|
|
|
sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
|
2007-06-20 12:49:05 +04:00
|
|
|
$(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
|
2007-06-26 14:56:40 +04:00
|
|
|
$(TOP)/src/shell.c \
|
2006-01-23 21:06:52 +03:00
|
|
|
libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2004-05-08 12:23:19 +04:00
|
|
|
objects: $(LIBOBJ_ORIG)
|
|
|
|
|
2001-09-28 05:34:43 +04: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 06:00:44 +03:00
|
|
|
target_source: $(SRC)
|
2001-09-28 05:34:43 +04:00
|
|
|
rm -rf tsrc
|
|
|
|
mkdir tsrc
|
2007-08-31 21:42:48 +04:00
|
|
|
cp -f $(SRC) tsrc
|
2001-09-28 05:34:43 +04:00
|
|
|
rm tsrc/sqlite.h.in tsrc/parse.y
|
|
|
|
|
2007-04-01 02:29:05 +04:00
|
|
|
sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
|
|
|
|
tclsh $(TOP)/tool/mksqlite3c.tcl
|
2007-04-06 01:58:33 +04:00
|
|
|
cp sqlite3.c tclsqlite3.c
|
|
|
|
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
|
2007-04-01 02:29:05 +04:00
|
|
|
|
2007-07-20 17:42:26 +04:00
|
|
|
fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl
|
|
|
|
tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
|
|
|
|
|
2007-08-20 21:37:47 +04:00
|
|
|
fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
|
|
|
|
tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
|
|
|
|
|
2001-09-28 05:34:43 +04: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 21:42:48 +04:00
|
|
|
# Rules to build individual *.o files from files in the src directory.
|
2004-05-22 21:41:58 +04:00
|
|
|
#
|
2007-08-31 21:42:48 +04:00
|
|
|
%.o: %.c $(HDR)
|
|
|
|
$(TCCX) -c $<
|
2004-05-22 21:41:58 +04:00
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
# Rules to build individual *.o files from generated *.c files. This
|
|
|
|
# applies to:
|
|
|
|
#
|
|
|
|
# parse.o
|
|
|
|
# opcodes.o
|
|
|
|
#
|
|
|
|
%.o: $(TOP)/src/%.c $(HDR)
|
|
|
|
$(TCCX) -c $<
|
2007-08-28 20:34:42 +04:00
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
|
|
|
|
$(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
|
2007-08-28 20:34:42 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2002-09-08 04:04:50 +04:00
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
# Rules to build opcodes.c and opcodes.h
|
|
|
|
#
|
2004-10-06 19:03:57 +04:00
|
|
|
opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
|
2006-06-28 00:05:23 +04:00
|
|
|
sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
|
2002-09-08 04:04:50 +04:00
|
|
|
|
2004-10-04 17:19:23 +04:00
|
|
|
opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
|
2007-08-31 21:42:48 +04:00
|
|
|
cat parse.h $(TOP)/src/vdbe.c |$(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
|
2006-06-03 22:02:15 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
# Rules to build parse.c and parse.h - the outputs of lemon.
|
|
|
|
#
|
2001-09-28 05:34:43 +04:00
|
|
|
parse.h: parse.c
|
|
|
|
|
2005-11-25 01:22:29 +03:00
|
|
|
parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
|
2001-09-28 05:34:43 +04:00
|
|
|
cp $(TOP)/src/parse.y .
|
2007-10-12 04:23:44 +04:00
|
|
|
rm -f parse.h
|
2004-10-31 00:23:09 +04:00
|
|
|
./lemon $(OPTS) parse.y
|
2005-11-25 01:22:29 +03:00
|
|
|
mv parse.h parse.h.temp
|
|
|
|
awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2004-05-31 22:23:07 +04:00
|
|
|
sqlite3.h: $(TOP)/src/sqlite.h.in
|
2001-09-28 05:34:43 +04:00
|
|
|
sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
|
2006-01-23 21:06:52 +03:00
|
|
|
-e s/--VERSION-NUMBER--/`cat ${TOP}/VERSION | sed 's/[^0-9]/ /g' | $(NAWK) '{printf "%d%03d%03d",$$1,$$2,$$3}'`/ \
|
2004-05-31 22:23:07 +04:00
|
|
|
$(TOP)/src/sqlite.h.in >sqlite3.h
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2005-01-18 07:00:42 +03:00
|
|
|
keywordhash.h: $(TOP)/tool/mkkeywordhash.c
|
2004-11-03 06:59:57 +03:00
|
|
|
$(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
|
2005-01-18 07:00:42 +03:00
|
|
|
./mkkeywordhash >keywordhash.h
|
2004-11-03 06:59:57 +03:00
|
|
|
|
2004-05-27 05:53:56 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-06-25 18:28:48 +04: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 21:37:47 +04: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
|
|
|
|
|
2007-06-25 18:28:48 +04:00
|
|
|
|
2004-05-22 21:41:58 +04:00
|
|
|
# Rules for building test programs and for running tests
|
|
|
|
#
|
2004-05-31 22:23:07 +04:00
|
|
|
tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
|
|
|
|
$(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
|
2004-06-30 12:20:16 +04:00
|
|
|
$(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-31 21:42:48 +04: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 15:29:02 +04:00
|
|
|
|
2005-11-26 03:25:00 +03:00
|
|
|
fulltest: testfixture$(EXE) sqlite3$(EXE)
|
2001-09-28 05:34:43 +04:00
|
|
|
./testfixture$(EXE) $(TOP)/test/all.test
|
|
|
|
|
2007-06-18 16:22:43 +04:00
|
|
|
soaktest: testfixture$(EXE) sqlite3$(EXE)
|
|
|
|
./testfixture$(EXE) $(TOP)/test/all.test -soak 1
|
|
|
|
|
2004-05-31 22:23:07 +04:00
|
|
|
test: testfixture$(EXE) sqlite3$(EXE)
|
2001-09-28 05:34:43 +04:00
|
|
|
./testfixture$(EXE) $(TOP)/test/quick.test
|
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
|
2004-07-23 04:01:38 +04: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-08-31 21:42:48 +04:00
|
|
|
$(TCCX) $(TCL_FLAGS) \
|
|
|
|
-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 04:01:38 +04:00
|
|
|
|
2006-06-14 14:38:02 +04: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 21:42:48 +04:00
|
|
|
|
2004-05-22 21:41:58 +04:00
|
|
|
# Rules used to build documentation
|
|
|
|
#
|
2007-08-31 21:42:48 +04:00
|
|
|
%.html: $(TOP)/www/%.tcl docdir last_change common.tcl
|
|
|
|
tclsh $< > $@
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
lang.html: $(TOP)/www/lang.tcl docdir
|
2004-11-19 14:59:23 +03:00
|
|
|
tclsh $(TOP)/www/lang.tcl doc >lang.html
|
2001-09-28 21:47:14 +04:00
|
|
|
|
2004-05-22 21:41:58 +04:00
|
|
|
opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
|
|
|
|
tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
|
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
capi3ref.html: $(TOP)/www/mkapidoc.tcl sqlite3.h
|
|
|
|
tclsh $(TOP)/www/mkapidoc.tcl <sqlite3.h >capi3ref.html
|
2007-08-28 01:10:36 +04:00
|
|
|
|
2007-08-31 22:50:31 +04:00
|
|
|
copyright-release.html: $(TOP)/www/copyright-release.html
|
|
|
|
cp $(TOP)/www/copyright-release.html .
|
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
%: $(TOP)/www/%
|
|
|
|
cp $< $@
|
2001-09-28 05:34:43 +04:00
|
|
|
|
|
|
|
# Files to be published on the website.
|
|
|
|
#
|
2001-09-28 21:47:14 +04:00
|
|
|
DOC = \
|
2001-09-28 05:34:43 +04:00
|
|
|
arch.html \
|
2004-11-21 04:02:00 +03:00
|
|
|
autoinc.html \
|
2001-09-28 05:34:43 +04:00
|
|
|
c_interface.html \
|
2004-05-31 22:23:07 +04:00
|
|
|
capi3.html \
|
2004-06-01 05:22:37 +04:00
|
|
|
capi3ref.html \
|
2004-05-31 22:23:07 +04:00
|
|
|
changes.html \
|
2004-11-21 04:02:00 +03:00
|
|
|
compile.html \
|
2004-05-31 20:04:08 +04:00
|
|
|
copyright.html \
|
|
|
|
copyright-release.html \
|
|
|
|
copyright-release.pdf \
|
2004-05-22 21:41:58 +04:00
|
|
|
conflict.html \
|
|
|
|
datatypes.html \
|
2004-05-31 22:23:07 +04:00
|
|
|
datatype3.html \
|
2005-03-12 18:55:10 +03:00
|
|
|
different.html \
|
2004-05-31 20:04:08 +04:00
|
|
|
docs.html \
|
2001-09-28 21:47:14 +04:00
|
|
|
download.html \
|
2001-12-22 22:27:39 +03:00
|
|
|
faq.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
fileformat.html \
|
2002-01-30 19:17:23 +03:00
|
|
|
formatchng.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
index.html \
|
2007-06-09 13:53:51 +04:00
|
|
|
limits.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
lang.html \
|
2004-06-11 21:48:02 +04:00
|
|
|
lockingv3.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
mingw.html \
|
|
|
|
nulls.html \
|
2004-06-16 07:02:00 +04:00
|
|
|
oldnews.html \
|
2002-08-14 04:08:12 +04:00
|
|
|
omitted.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
opcode.html \
|
2005-08-31 02:44:29 +04:00
|
|
|
optimizer.html \
|
2005-08-31 05:49:59 +04:00
|
|
|
optoverview.html \
|
2004-11-10 08:48:57 +03:00
|
|
|
pragma.html \
|
2002-08-18 23:09:22 +04:00
|
|
|
quickstart.html \
|
2006-01-05 14:34:32 +03:00
|
|
|
sharedcache.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
speed.html \
|
|
|
|
sqlite.html \
|
2004-05-31 20:04:08 +04:00
|
|
|
support.html \
|
2004-05-22 21:41:58 +04:00
|
|
|
tclsqlite.html \
|
2004-06-17 23:04:17 +04:00
|
|
|
vdbe.html \
|
2005-01-21 21:19:27 +03:00
|
|
|
version3.html \
|
2007-08-28 01:10:36 +04:00
|
|
|
whentouse.html \
|
|
|
|
34to35.html
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2007-08-31 21:42:48 +04:00
|
|
|
docdir:
|
2001-09-28 21:47:14 +04:00
|
|
|
mkdir -p doc
|
2007-08-31 21:42:48 +04:00
|
|
|
|
|
|
|
doc: common.tcl $(DOC) docdir
|
2001-09-28 21:47:14 +04:00
|
|
|
mv $(DOC) doc
|
2005-08-31 02:44:29 +04:00
|
|
|
cp $(TOP)/www/*.gif $(TOP)/art/*.gif doc
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2004-05-22 21:41:58 +04:00
|
|
|
# Standard install and cleanup targets
|
|
|
|
#
|
2004-05-31 22:23:07 +04:00
|
|
|
install: sqlite3 libsqlite3.a sqlite3.h
|
|
|
|
mv sqlite3 /usr/bin
|
|
|
|
mv libsqlite3.a /usr/lib
|
|
|
|
mv sqlite3.h /usr/include
|
2001-09-28 05:34:43 +04:00
|
|
|
|
|
|
|
clean:
|
2005-11-26 03:25:00 +03:00
|
|
|
rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.*
|
2005-01-18 07:00:42 +03:00
|
|
|
rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
|
2001-09-28 05:34:43 +04:00
|
|
|
rm -f $(PUBLISH)
|
|
|
|
rm -f *.da *.bb *.bbg gmon.out
|
|
|
|
rm -rf tsrc
|
2006-09-03 02:14:59 +04:00
|
|
|
rm -f testloadext.dll libtestloadext.so
|