2004-06-30 13:41:55 +02:00
|
|
|
#!/usr/make
|
|
|
|
#
|
|
|
|
# Makefile for SQLITE
|
|
|
|
#
|
|
|
|
# This makefile is suppose to be configured automatically using the
|
|
|
|
# autoconf. But if that does not work for you, you can configure
|
|
|
|
# the makefile manually. Just set the parameters below to values that
|
|
|
|
# work well for your system.
|
|
|
|
#
|
|
|
|
# If the configure script does not work out-of-the-box, you might
|
|
|
|
# be able to get it to work by giving it some hints. See the comment
|
|
|
|
# at the beginning of configure.in for additional information.
|
|
|
|
#
|
|
|
|
|
|
|
|
# The toplevel directory of the source tree. This is the directory
|
|
|
|
# that contains this "Makefile.in" and the "configure.in" script.
|
|
|
|
#
|
|
|
|
TOP = @srcdir@
|
|
|
|
|
|
|
|
# C Compiler and options for use in building executables that
|
|
|
|
# will run on the platform that is doing the build.
|
|
|
|
#
|
|
|
|
BCC = @BUILD_CC@ @BUILD_CFLAGS@
|
|
|
|
|
|
|
|
# C Compile and options for use in building executables that
|
|
|
|
# will run on the target platform. (BCC and TCC are usually the
|
|
|
|
# same unless your are cross-compiling.)
|
|
|
|
#
|
2005-01-03 22:28:56 +01:00
|
|
|
TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src
|
|
|
|
|
|
|
|
# Define -DNDEBUG to compile without debugging (i.e., for production usage)
|
|
|
|
# Omitting the define will cause extra debugging code to be inserted and
|
|
|
|
# includes extra comments when "EXPLAIN stmt" is used.
|
|
|
|
#
|
2005-11-25 00:14:00 +01:00
|
|
|
TCC += @TARGET_DEBUG@ @XTHREADCONNECT@
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
# Compiler options needed for programs that use the TCL library.
|
|
|
|
#
|
2004-12-10 04:08:12 +01:00
|
|
|
TCC += @TCL_INCLUDE_SPEC@
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
# The library that programs using TCL must link against.
|
|
|
|
#
|
2004-11-25 14:50:01 +01:00
|
|
|
LIBTCL = @TCL_LIB_SPEC@ @TCL_LIBS@
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
# Compiler options needed for programs that use the readline() library.
|
|
|
|
#
|
|
|
|
READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
|
|
|
|
|
|
|
|
# The library that programs using readline() must link against.
|
|
|
|
#
|
|
|
|
LIBREADLINE = @TARGET_READLINE_LIBS@
|
|
|
|
|
|
|
|
# Should the database engine be compiled threadsafe
|
|
|
|
#
|
2005-08-24 20:04:51 +02:00
|
|
|
TCC += -DTHREADSAFE=@THREADSAFE@
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2004-09-20 16:57:23 +02:00
|
|
|
# The pthreads library if needed
|
|
|
|
#
|
|
|
|
LIBPTHREAD=@TARGET_THREAD_LIB@
|
|
|
|
|
2006-02-01 02:55:17 +01:00
|
|
|
# Do threads override each others locks by default (1), or do we test (-1)
|
|
|
|
#
|
|
|
|
TCC += -DSQLITE_THREAD_OVERRIDE_LOCK=@THREADSOVERRIDELOCKS@
|
|
|
|
|
2006-01-23 19:06:52 +01:00
|
|
|
# The fdatasync library
|
|
|
|
TLIBS = @TARGET_LIBS@
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
# Flags controlling use of the in memory btree implementation
|
|
|
|
#
|
|
|
|
# TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
|
|
|
|
# default to file, 2 to default to memory, and 3 to force temporary
|
|
|
|
# tables to always be in memory.
|
|
|
|
#
|
|
|
|
TEMP_STORE = -DTEMP_STORE=@TEMP_STORE@
|
|
|
|
|
2004-11-27 16:52:16 +01:00
|
|
|
# Version numbers and release number for the SQLite being compiled.
|
|
|
|
#
|
|
|
|
VERSION = @VERSION@
|
2005-02-05 08:33:34 +01:00
|
|
|
VERSION_NUMBER = @VERSION_NUMBER@
|
2004-11-27 16:52:16 +01:00
|
|
|
RELEASE = @RELEASE@
|
|
|
|
|
2004-11-25 14:50:01 +01:00
|
|
|
# Filename extensions
|
|
|
|
#
|
|
|
|
BEXE = @BUILD_EXEEXT@
|
|
|
|
TEXE = @TARGET_EXEEXT@
|
|
|
|
|
2004-11-27 16:52:16 +01:00
|
|
|
# The following variable is "1" if the configure script was able to locate
|
|
|
|
# the tclConfig.sh file. It is an empty string otherwise. When this
|
|
|
|
# variable is "1", the TCL extension library (libtclsqlite3.so) is built
|
|
|
|
# and installed.
|
2004-11-25 14:50:01 +01:00
|
|
|
#
|
|
|
|
HAVE_TCL = @HAVE_TCL@
|
|
|
|
|
2004-11-27 16:52:16 +01:00
|
|
|
# The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
|
|
|
|
#
|
|
|
|
SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
|
|
|
|
|
|
|
|
# The directory into which to store package information for
|
|
|
|
|
|
|
|
# Some standard variables and programs
|
|
|
|
#
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
libdir = @libdir@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
LIBTOOL = ./libtool
|
|
|
|
ALLOWRELEASE = @ALLOWRELEASE@
|
|
|
|
|
|
|
|
# libtool compile/link/install
|
|
|
|
LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC)
|
|
|
|
LTLINK = $(LIBTOOL) --mode=link $(TCC)
|
|
|
|
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
|
|
|
|
|
2006-01-23 19:06:52 +01:00
|
|
|
# nawk compatible awk.
|
|
|
|
NAWK = @AWK@
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
# You should not have to change anything below this line
|
|
|
|
###############################################################################
|
2005-11-25 00:14:00 +01:00
|
|
|
OPTS =
|
2004-11-27 16:52:16 +01:00
|
|
|
OPTS += -DSQLITE_OMIT_CURSOR # Cursors do not work at this time
|
|
|
|
TCC += -DSQLITE_OMIT_CURSOR
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
# Object files for the SQLite library.
|
|
|
|
#
|
2005-07-08 14:13:04 +02:00
|
|
|
LIBOBJ = alter.lo analyze.lo attach.lo auth.lo btree.lo build.lo \
|
2005-08-14 19:53:20 +02:00
|
|
|
callback.lo complete.lo date.lo \
|
2006-06-08 17:28:43 +02:00
|
|
|
delete.lo expr.lo func.lo hash.lo insert.lo loadext.lo \
|
2006-06-03 20:02:15 +02:00
|
|
|
main.lo opcodes.lo os.lo os_unix.lo os_win.lo os_os2.lo \
|
2005-05-25 06:11:56 +02:00
|
|
|
pager.lo parse.lo pragma.lo prepare.lo printf.lo random.lo \
|
2004-11-25 14:50:01 +01:00
|
|
|
select.lo table.lo tokenize.lo trigger.lo update.lo \
|
2005-07-08 15:07:59 +02:00
|
|
|
util.lo vacuum.lo \
|
|
|
|
vdbe.lo vdbeapi.lo vdbeaux.lo vdbefifo.lo vdbemem.lo \
|
2006-06-12 01:41:55 +02:00
|
|
|
where.lo utf.lo legacy.lo vtab.lo
|
2004-06-30 13:41:55 +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 \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/attach.c \
|
|
|
|
$(TOP)/src/auth.c \
|
|
|
|
$(TOP)/src/btree.c \
|
|
|
|
$(TOP)/src/btree.h \
|
|
|
|
$(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 \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/date.c \
|
|
|
|
$(TOP)/src/delete.c \
|
|
|
|
$(TOP)/src/expr.c \
|
|
|
|
$(TOP)/src/func.c \
|
|
|
|
$(TOP)/src/hash.c \
|
|
|
|
$(TOP)/src/hash.h \
|
|
|
|
$(TOP)/src/insert.c \
|
|
|
|
$(TOP)/src/legacy.c \
|
2006-06-08 17:28:43 +02:00
|
|
|
$(TOP)/src/loadext.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/main.c \
|
2005-11-30 04:20:31 +01:00
|
|
|
$(TOP)/src/os.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/os_unix.c \
|
|
|
|
$(TOP)/src/os_win.c \
|
2006-06-03 20:02:15 +02:00
|
|
|
$(TOP)/src/os_os2.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/pager.c \
|
|
|
|
$(TOP)/src/pager.h \
|
|
|
|
$(TOP)/src/parse.y \
|
|
|
|
$(TOP)/src/pragma.c \
|
2005-05-25 06:11:56 +02:00
|
|
|
$(TOP)/src/prepare.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/printf.c \
|
|
|
|
$(TOP)/src/random.c \
|
|
|
|
$(TOP)/src/select.c \
|
|
|
|
$(TOP)/src/shell.c \
|
|
|
|
$(TOP)/src/sqlite.h.in \
|
|
|
|
$(TOP)/src/sqliteInt.h \
|
|
|
|
$(TOP)/src/table.c \
|
|
|
|
$(TOP)/src/tclsqlite.c \
|
|
|
|
$(TOP)/src/tokenize.c \
|
|
|
|
$(TOP)/src/trigger.c \
|
|
|
|
$(TOP)/src/utf.c \
|
|
|
|
$(TOP)/src/update.c \
|
|
|
|
$(TOP)/src/util.c \
|
|
|
|
$(TOP)/src/vacuum.c \
|
|
|
|
$(TOP)/src/vdbe.c \
|
|
|
|
$(TOP)/src/vdbe.h \
|
|
|
|
$(TOP)/src/vdbeapi.c \
|
|
|
|
$(TOP)/src/vdbeaux.c \
|
2005-07-08 15:07:59 +02:00
|
|
|
$(TOP)/src/vdbefifo.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/vdbemem.c \
|
|
|
|
$(TOP)/src/vdbeInt.h \
|
2006-06-12 01:41:55 +02:00
|
|
|
$(TOP)/src/vtab.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/where.c
|
|
|
|
|
|
|
|
# Source code to the test files.
|
|
|
|
#
|
|
|
|
TESTSRC = \
|
|
|
|
$(TOP)/src/btree.c \
|
2004-11-14 22:56:29 +01:00
|
|
|
$(TOP)/src/date.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/func.c \
|
2006-02-01 02:55:17 +01:00
|
|
|
$(TOP)/src/os.c \
|
2006-08-13 23:49:07 +02:00
|
|
|
$(TOP)/src/os_os2.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/os_unix.c \
|
|
|
|
$(TOP)/src/os_win.c \
|
|
|
|
$(TOP)/src/pager.c \
|
|
|
|
$(TOP)/src/pragma.c \
|
|
|
|
$(TOP)/src/printf.c \
|
|
|
|
$(TOP)/src/test1.c \
|
|
|
|
$(TOP)/src/test2.c \
|
|
|
|
$(TOP)/src/test3.c \
|
|
|
|
$(TOP)/src/test4.c \
|
|
|
|
$(TOP)/src/test5.c \
|
2005-11-26 01:25:00 +01:00
|
|
|
$(TOP)/src/test6.c \
|
2006-01-10 00:50:11 +01:00
|
|
|
$(TOP)/src/test7.c \
|
2006-06-12 01:41:55 +02:00
|
|
|
$(TOP)/src/test8.c \
|
2006-01-10 00:50:11 +01:00
|
|
|
$(TOP)/src/test_async.c \
|
2006-01-25 16:55:37 +01:00
|
|
|
$(TOP)/src/test_md5.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 \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/utf.c \
|
2004-09-08 23:12:50 +02:00
|
|
|
$(TOP)/src/util.c \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/vdbe.c \
|
2006-08-13 23:49:07 +02:00
|
|
|
$(TOP)/src/vdbeaux.c \
|
2005-08-14 19:53:20 +02:00
|
|
|
$(TOP)/src/where.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
# Header files used by all library source files.
|
|
|
|
#
|
|
|
|
HDR = \
|
|
|
|
sqlite3.h \
|
|
|
|
$(TOP)/src/btree.h \
|
|
|
|
$(TOP)/src/hash.h \
|
|
|
|
opcodes.h \
|
|
|
|
$(TOP)/src/os.h \
|
|
|
|
$(TOP)/src/os_common.h \
|
2006-06-08 17:28:43 +02:00
|
|
|
$(TOP)/src/sqlite3ext.h \
|
2004-06-30 13:41:55 +02:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
|
|
|
$(TOP)/src/vdbe.h \
|
|
|
|
parse.h
|
|
|
|
|
|
|
|
# Header files used by the VDBE submodule
|
|
|
|
#
|
|
|
|
VDBEHDR = \
|
|
|
|
$(HDR) \
|
|
|
|
$(TOP)/src/vdbeInt.h
|
|
|
|
|
|
|
|
# This is the default Makefile target. The objects listed here
|
|
|
|
# are what get build when you type just "make" with no arguments.
|
|
|
|
#
|
2004-11-25 14:50:01 +01:00
|
|
|
all: sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
Makefile: $(TOP)/Makefile.in
|
|
|
|
./config.status
|
|
|
|
|
|
|
|
# Generate the file "last_change" which contains the date of change
|
|
|
|
# of the most recently modified source code file
|
|
|
|
#
|
|
|
|
last_change: $(SRC)
|
2006-06-27 22:05:23 +02:00
|
|
|
cat $(SRC) | grep '$$Id: ' | sort -k 5 | tail -1 \
|
2006-01-23 19:06:52 +01:00
|
|
|
| $(NAWK) '{print $$5,$$6}' >last_change
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
libsqlite3.la: $(LIBOBJ)
|
2004-09-17 23:35:30 +02:00
|
|
|
$(LTLINK) -o libsqlite3.la $(LIBOBJ) $(LIBPTHREAD) \
|
2004-11-27 16:52:16 +01:00
|
|
|
${ALLOWRELEASE} -rpath $(libdir) -version-info "8:6:8"
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
|
|
|
$(LTLINK) -o libtclsqlite3.la tclsqlite.lo \
|
2004-11-27 16:52:16 +01:00
|
|
|
$(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(LIBPTHREAD) \
|
2004-11-25 14:50:01 +01:00
|
|
|
-rpath $(libdir)/sqlite \
|
2004-06-30 13:41:55 +02:00
|
|
|
-version-info "8:6:8"
|
|
|
|
|
2004-11-25 14:50:01 +01:00
|
|
|
sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
|
2004-09-17 23:35:30 +02:00
|
|
|
$(LTLINK) $(READLINE_FLAGS) $(LIBPTHREAD) \
|
2006-06-03 20:02:15 +02:00
|
|
|
-o $@ $(TOP)/src/shell.c libsqlite3.la \
|
2006-01-23 19:06:52 +01:00
|
|
|
$(LIBREADLINE) $(TLIBS)
|
2004-06-30 13:41:55 +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.
|
|
|
|
#
|
2005-01-18 05:00:42 +01:00
|
|
|
target_source: $(SRC) parse.c opcodes.c keywordhash.h $(VDBEHDR)
|
2004-06-30 13:41:55 +02:00
|
|
|
rm -rf tsrc
|
2004-09-17 22:47:16 +02:00
|
|
|
mkdir -p tsrc
|
2004-06-30 13:41:55 +02:00
|
|
|
cp $(SRC) $(VDBEHDR) tsrc
|
|
|
|
rm tsrc/sqlite.h.in tsrc/parse.y
|
2005-01-18 05:00:42 +01:00
|
|
|
cp parse.c opcodes.c keywordhash.h tsrc
|
2004-08-28 18:19:00 +02:00
|
|
|
cp $(TOP)/sqlite3.def tsrc
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
# Rules to build the LEMON compiler generator
|
|
|
|
#
|
2004-11-03 04:59:57 +01:00
|
|
|
lemon$(BEXE): $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
|
2004-06-30 13:41:55 +02:00
|
|
|
$(BCC) -o lemon $(TOP)/tool/lemon.c
|
|
|
|
cp $(TOP)/tool/lempar.c .
|
|
|
|
|
|
|
|
|
|
|
|
# Rules to build individual files
|
|
|
|
#
|
2005-02-15 21:47:57 +01:00
|
|
|
alter.lo: $(TOP)/src/alter.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/alter.c
|
|
|
|
|
2005-07-08 14:13:04 +02:00
|
|
|
analyze.lo: $(TOP)/src/analyze.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/analyze.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
attach.lo: $(TOP)/src/attach.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/attach.c
|
|
|
|
|
|
|
|
auth.lo: $(TOP)/src/auth.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/auth.c
|
|
|
|
|
|
|
|
btree.lo: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/btree.c
|
|
|
|
|
|
|
|
build.lo: $(TOP)/src/build.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/build.c
|
|
|
|
|
2005-05-24 14:01:00 +02:00
|
|
|
callback.lo: $(TOP)/src/callback.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/callback.c
|
|
|
|
|
2005-08-14 19:53:20 +02:00
|
|
|
complete.lo: $(TOP)/src/complete.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/complete.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
date.lo: $(TOP)/src/date.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/date.c
|
|
|
|
|
|
|
|
delete.lo: $(TOP)/src/delete.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/delete.c
|
|
|
|
|
|
|
|
expr.lo: $(TOP)/src/expr.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/expr.c
|
|
|
|
|
|
|
|
func.lo: $(TOP)/src/func.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/func.c
|
|
|
|
|
|
|
|
hash.lo: $(TOP)/src/hash.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/hash.c
|
|
|
|
|
|
|
|
insert.lo: $(TOP)/src/insert.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/insert.c
|
|
|
|
|
|
|
|
legacy.lo: $(TOP)/src/legacy.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/legacy.c
|
|
|
|
|
2006-06-08 17:28:43 +02:00
|
|
|
loadext.lo: $(TOP)/src/loadext.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/loadext.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
main.lo: $(TOP)/src/main.c $(HDR)
|
|
|
|
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/main.c
|
|
|
|
|
|
|
|
pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/pager.c
|
|
|
|
|
|
|
|
opcodes.lo: opcodes.c
|
|
|
|
$(LTCOMPILE) -c opcodes.c
|
|
|
|
|
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
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2004-10-04 15:19:23 +02:00
|
|
|
opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
|
2006-01-23 19:06:52 +01:00
|
|
|
cat parse.h $(TOP)/src/vdbe.c | $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2005-11-30 04:20:31 +01:00
|
|
|
os.lo: $(TOP)/src/os.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/os.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
os_unix.lo: $(TOP)/src/os_unix.c $(HDR)
|
2005-06-16 20:47:38 +02:00
|
|
|
$(LTCOMPILE) -c $(TOP)/src/os_unix.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
os_win.lo: $(TOP)/src/os_win.c $(HDR)
|
2005-06-16 20:47:38 +02:00
|
|
|
$(LTCOMPILE) -c $(TOP)/src/os_win.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2006-06-03 20:02:15 +02:00
|
|
|
os_os2.lo: $(TOP)/src/os_os2.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/os_os2.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
parse.lo: parse.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c parse.c
|
|
|
|
|
|
|
|
parse.h: parse.c
|
|
|
|
|
2005-11-24 23:22:29 +01:00
|
|
|
parse.c: $(TOP)/src/parse.y lemon$(BEXE) $(TOP)/addopcodes.awk
|
2004-06-30 13:41:55 +02:00
|
|
|
cp $(TOP)/src/parse.y .
|
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
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
pragma.lo: $(TOP)/src/pragma.c $(HDR)
|
2004-11-25 14:50:01 +01:00
|
|
|
$(LTCOMPILE) -c $(TOP)/src/pragma.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2005-05-25 06:11:56 +02:00
|
|
|
prepare.lo: $(TOP)/src/prepare.c $(HDR)
|
|
|
|
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/prepare.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
printf.lo: $(TOP)/src/printf.c $(HDR)
|
2004-11-25 14:50:01 +01:00
|
|
|
$(LTCOMPILE) -c $(TOP)/src/printf.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
random.lo: $(TOP)/src/random.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/random.c
|
|
|
|
|
|
|
|
select.lo: $(TOP)/src/select.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/select.c
|
|
|
|
|
|
|
|
sqlite3.h: $(TOP)/src/sqlite.h.in
|
2005-02-05 08:33:34 +01:00
|
|
|
sed -e s/--VERS--/$(RELEASE)/ $(TOP)/src/sqlite.h.in | \
|
|
|
|
sed -e s/--VERSION-NUMBER--/$(VERSION_NUMBER)/ >sqlite3.h
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
table.lo: $(TOP)/src/table.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/table.c
|
|
|
|
|
|
|
|
tclsqlite.lo: $(TOP)/src/tclsqlite.c $(HDR)
|
2004-11-25 14:50:01 +01:00
|
|
|
$(LTCOMPILE) -c $(TOP)/src/tclsqlite.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2005-01-18 05:00:42 +01:00
|
|
|
tokenize.lo: $(TOP)/src/tokenize.c keywordhash.h $(HDR)
|
2004-06-30 13:41:55 +02:00
|
|
|
$(LTCOMPILE) -c $(TOP)/src/tokenize.c
|
|
|
|
|
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$(BEXE) $(OPTS) $(TOP)/tool/mkkeywordhash.c
|
2005-01-18 05:00:42 +01:00
|
|
|
./mkkeywordhash$(BEXE) >keywordhash.h
|
2004-11-03 04:59:57 +01:00
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
trigger.lo: $(TOP)/src/trigger.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/trigger.c
|
|
|
|
|
|
|
|
update.lo: $(TOP)/src/update.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/update.c
|
|
|
|
|
|
|
|
utf.lo: $(TOP)/src/utf.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/utf.c
|
|
|
|
|
|
|
|
util.lo: $(TOP)/src/util.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/util.c
|
|
|
|
|
|
|
|
vacuum.lo: $(TOP)/src/vacuum.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vacuum.c
|
|
|
|
|
|
|
|
vdbe.lo: $(TOP)/src/vdbe.c $(VDBEHDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vdbe.c
|
|
|
|
|
|
|
|
vdbeapi.lo: $(TOP)/src/vdbeapi.c $(VDBEHDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vdbeapi.c
|
|
|
|
|
|
|
|
vdbeaux.lo: $(TOP)/src/vdbeaux.c $(VDBEHDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vdbeaux.c
|
|
|
|
|
2005-07-08 15:07:59 +02:00
|
|
|
vdbefifo.lo: $(TOP)/src/vdbefifo.c $(VDBEHDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vdbefifo.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
vdbemem.lo: $(TOP)/src/vdbemem.c $(VDBEHDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vdbemem.c
|
|
|
|
|
2006-06-12 01:41:55 +02:00
|
|
|
vtab.lo: $(TOP)/src/vtab.c $(VDBEHDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/vtab.c
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
where.lo: $(TOP)/src/where.c $(HDR)
|
|
|
|
$(LTCOMPILE) -c $(TOP)/src/where.c
|
|
|
|
|
2004-11-25 14:50:01 +01:00
|
|
|
tclsqlite-shell.lo: $(TOP)/src/tclsqlite.c $(HDR)
|
|
|
|
$(LTCOMPILE) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c
|
|
|
|
|
|
|
|
tclsqlite-stubs.lo: $(TOP)/src/tclsqlite.c $(HDR)
|
|
|
|
$(LTCOMPILE) -DTCL_USE_STUBS=1 -o $@ -c $(TOP)/src/tclsqlite.c
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2004-11-25 14:50:01 +01:00
|
|
|
tclsqlite3: tclsqlite-shell.lo libsqlite3.la
|
|
|
|
$(LTLINK) -o tclsqlite3 tclsqlite-shell.lo \
|
2004-06-30 13:41:55 +02:00
|
|
|
libsqlite3.la $(LIBTCL)
|
|
|
|
|
2005-08-27 11:07:14 +02:00
|
|
|
testfixture$(TEXE): $(TOP)/src/tclsqlite.c libsqlite3.la $(TESTSRC)
|
2006-01-06 15:32:19 +01:00
|
|
|
$(LTLINK) -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \
|
2006-08-13 23:49:07 +02:00
|
|
|
-DSQLITE_NO_SYNC=1 $(TEMP_STORE) \
|
|
|
|
-o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
|
2005-08-27 11:07:14 +02:00
|
|
|
libsqlite3.la $(LIBTCL)
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
|
2005-11-26 01:25:00 +01:00
|
|
|
fulltest: testfixture$(TEXE) sqlite3$(TEXE)
|
2004-06-30 13:41:55 +02:00
|
|
|
./testfixture $(TOP)/test/all.test
|
|
|
|
|
2004-11-25 14:50:01 +01:00
|
|
|
test: testfixture$(TEXE) sqlite3$(TEXE)
|
2004-06-30 13:41:55 +02:00
|
|
|
./testfixture $(TOP)/test/quick.test
|
|
|
|
|
2004-12-02 21:17:00 +01:00
|
|
|
sqlite3_analyzer$(TEXE): $(TOP)/src/tclsqlite.c libtclsqlite3.la \
|
|
|
|
$(TESTSRC) $(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
|
2005-06-16 20:47:38 +02:00
|
|
|
$(LTLINK) -DTCLSH=2 -DSQLITE_TEST=1 $(TEMP_STORE)\
|
2004-12-02 21:17:00 +01:00
|
|
|
-o sqlite3_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \
|
|
|
|
libtclsqlite3.la $(LIBTCL)
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
# Rules used to build documentation
|
|
|
|
#
|
|
|
|
arch.html: $(TOP)/www/arch.tcl
|
|
|
|
tclsh $(TOP)/www/arch.tcl >arch.html
|
|
|
|
|
|
|
|
arch2.gif: $(TOP)/www/arch2.gif
|
|
|
|
cp $(TOP)/www/arch2.gif .
|
|
|
|
|
2004-11-21 02:02:00 +01:00
|
|
|
autoinc.html: $(TOP)/www/autoinc.tcl
|
|
|
|
tclsh $(TOP)/www/autoinc.tcl >autoinc.html
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
c_interface.html: $(TOP)/www/c_interface.tcl
|
|
|
|
tclsh $(TOP)/www/c_interface.tcl >c_interface.html
|
|
|
|
|
|
|
|
capi3.html: $(TOP)/www/capi3.tcl
|
|
|
|
tclsh $(TOP)/www/capi3.tcl >capi3.html
|
|
|
|
|
|
|
|
capi3ref.html: $(TOP)/www/capi3ref.tcl
|
|
|
|
tclsh $(TOP)/www/capi3ref.tcl >capi3ref.html
|
|
|
|
|
|
|
|
changes.html: $(TOP)/www/changes.tcl
|
|
|
|
tclsh $(TOP)/www/changes.tcl >changes.html
|
|
|
|
|
2004-11-21 02:02:00 +01:00
|
|
|
compile.html: $(TOP)/www/compile.tcl
|
|
|
|
tclsh $(TOP)/www/compile.tcl >compile.html
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
copyright.html: $(TOP)/www/copyright.tcl
|
|
|
|
tclsh $(TOP)/www/copyright.tcl >copyright.html
|
|
|
|
|
|
|
|
copyright-release.html: $(TOP)/www/copyright-release.html
|
|
|
|
cp $(TOP)/www/copyright-release.html .
|
|
|
|
|
|
|
|
copyright-release.pdf: $(TOP)/www/copyright-release.pdf
|
|
|
|
cp $(TOP)/www/copyright-release.pdf .
|
|
|
|
|
|
|
|
common.tcl: $(TOP)/www/common.tcl
|
|
|
|
cp $(TOP)/www/common.tcl .
|
|
|
|
|
|
|
|
conflict.html: $(TOP)/www/conflict.tcl
|
|
|
|
tclsh $(TOP)/www/conflict.tcl >conflict.html
|
|
|
|
|
|
|
|
datatypes.html: $(TOP)/www/datatypes.tcl
|
|
|
|
tclsh $(TOP)/www/datatypes.tcl >datatypes.html
|
|
|
|
|
|
|
|
datatype3.html: $(TOP)/www/datatype3.tcl
|
|
|
|
tclsh $(TOP)/www/datatype3.tcl >datatype3.html
|
|
|
|
|
|
|
|
docs.html: $(TOP)/www/docs.tcl
|
|
|
|
tclsh $(TOP)/www/docs.tcl >docs.html
|
|
|
|
|
|
|
|
download.html: $(TOP)/www/download.tcl
|
2004-09-17 22:47:16 +02:00
|
|
|
mkdir -p doc
|
2004-06-30 13:41:55 +02:00
|
|
|
tclsh $(TOP)/www/download.tcl >download.html
|
|
|
|
|
|
|
|
faq.html: $(TOP)/www/faq.tcl
|
|
|
|
tclsh $(TOP)/www/faq.tcl >faq.html
|
|
|
|
|
|
|
|
fileformat.html: $(TOP)/www/fileformat.tcl
|
|
|
|
tclsh $(TOP)/www/fileformat.tcl >fileformat.html
|
|
|
|
|
|
|
|
formatchng.html: $(TOP)/www/formatchng.tcl
|
|
|
|
tclsh $(TOP)/www/formatchng.tcl >formatchng.html
|
|
|
|
|
|
|
|
index.html: $(TOP)/www/index.tcl last_change
|
|
|
|
tclsh $(TOP)/www/index.tcl >index.html
|
|
|
|
|
|
|
|
lang.html: $(TOP)/www/lang.tcl
|
|
|
|
tclsh $(TOP)/www/lang.tcl >lang.html
|
|
|
|
|
2004-12-20 20:01:32 +01:00
|
|
|
pragma.html: $(TOP)/www/pragma.tcl
|
|
|
|
tclsh $(TOP)/www/pragma.tcl >pragma.html
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
lockingv3.html: $(TOP)/www/lockingv3.tcl
|
|
|
|
tclsh $(TOP)/www/lockingv3.tcl >lockingv3.html
|
|
|
|
|
|
|
|
oldnews.html: $(TOP)/www/oldnews.tcl
|
|
|
|
tclsh $(TOP)/www/oldnews.tcl >oldnews.html
|
|
|
|
|
|
|
|
omitted.html: $(TOP)/www/omitted.tcl
|
|
|
|
tclsh $(TOP)/www/omitted.tcl >omitted.html
|
|
|
|
|
|
|
|
opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
|
|
|
|
tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
|
|
|
|
|
|
|
|
mingw.html: $(TOP)/www/mingw.tcl
|
|
|
|
tclsh $(TOP)/www/mingw.tcl >mingw.html
|
|
|
|
|
|
|
|
nulls.html: $(TOP)/www/nulls.tcl
|
|
|
|
tclsh $(TOP)/www/nulls.tcl >nulls.html
|
|
|
|
|
|
|
|
quickstart.html: $(TOP)/www/quickstart.tcl
|
|
|
|
tclsh $(TOP)/www/quickstart.tcl >quickstart.html
|
|
|
|
|
|
|
|
speed.html: $(TOP)/www/speed.tcl
|
|
|
|
tclsh $(TOP)/www/speed.tcl >speed.html
|
|
|
|
|
|
|
|
sqlite.gif: $(TOP)/art/SQLite.gif
|
|
|
|
cp $(TOP)/art/SQLite.gif sqlite.gif
|
|
|
|
|
|
|
|
sqlite.html: $(TOP)/www/sqlite.tcl
|
|
|
|
tclsh $(TOP)/www/sqlite.tcl >sqlite.html
|
|
|
|
|
|
|
|
support.html: $(TOP)/www/support.tcl
|
|
|
|
tclsh $(TOP)/www/support.tcl >support.html
|
|
|
|
|
|
|
|
tclsqlite.html: $(TOP)/www/tclsqlite.tcl
|
|
|
|
tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
|
|
|
|
|
|
|
|
vdbe.html: $(TOP)/www/vdbe.tcl
|
|
|
|
tclsh $(TOP)/www/vdbe.tcl >vdbe.html
|
|
|
|
|
|
|
|
version3.html: $(TOP)/www/version3.tcl
|
|
|
|
tclsh $(TOP)/www/version3.tcl >version3.html
|
|
|
|
|
|
|
|
|
|
|
|
# Files to be published on the website.
|
|
|
|
#
|
|
|
|
DOC = \
|
|
|
|
arch.html \
|
2005-06-15 20:07:39 +02:00
|
|
|
arch2.gif \
|
2004-11-21 02:02:00 +01:00
|
|
|
autoinc.html \
|
2004-06-30 13:41:55 +02:00
|
|
|
c_interface.html \
|
|
|
|
capi3.html \
|
|
|
|
capi3ref.html \
|
|
|
|
changes.html \
|
2004-11-21 02:02:00 +01:00
|
|
|
compile.html \
|
2004-06-30 13:41:55 +02:00
|
|
|
copyright.html \
|
|
|
|
copyright-release.html \
|
|
|
|
copyright-release.pdf \
|
|
|
|
conflict.html \
|
|
|
|
datatypes.html \
|
|
|
|
datatype3.html \
|
|
|
|
docs.html \
|
|
|
|
download.html \
|
|
|
|
faq.html \
|
|
|
|
fileformat.html \
|
|
|
|
formatchng.html \
|
|
|
|
index.html \
|
|
|
|
lang.html \
|
|
|
|
lockingv3.html \
|
|
|
|
mingw.html \
|
|
|
|
nulls.html \
|
|
|
|
oldnews.html \
|
|
|
|
omitted.html \
|
|
|
|
opcode.html \
|
2004-11-21 02:02:00 +01:00
|
|
|
pragma.html \
|
2004-06-30 13:41:55 +02:00
|
|
|
quickstart.html \
|
|
|
|
speed.html \
|
|
|
|
sqlite.gif \
|
|
|
|
sqlite.html \
|
|
|
|
support.html \
|
|
|
|
tclsqlite.html \
|
|
|
|
vdbe.html \
|
2004-11-21 02:02:00 +01:00
|
|
|
version3.html
|
2004-06-30 13:41:55 +02:00
|
|
|
|
|
|
|
doc: common.tcl $(DOC)
|
|
|
|
mkdir -p doc
|
|
|
|
mv $(DOC) doc
|
|
|
|
|
2004-11-27 16:52:16 +01:00
|
|
|
install: sqlite3 libsqlite3.la sqlite3.h ${HAVE_TCL:1=tcl_install}
|
2004-09-17 23:07:34 +02:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(libdir)
|
|
|
|
$(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
|
2004-06-30 13:41:55 +02:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
|
|
|
|
$(LTINSTALL) sqlite3 $(DESTDIR)$(exec_prefix)/bin
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(prefix)/include
|
|
|
|
$(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(prefix)/include
|
2004-09-17 23:07:34 +02:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig;
|
|
|
|
$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(libdir)/pkgconfig;
|
2004-06-30 13:41:55 +02:00
|
|
|
|
2004-11-27 16:52:16 +01:00
|
|
|
tcl_install: libtclsqlite3.la
|
|
|
|
tclsh $(TOP)/tclinstaller.tcl $(VERSION)
|
|
|
|
|
2004-06-30 13:41:55 +02:00
|
|
|
clean:
|
2004-11-25 14:50:01 +01:00
|
|
|
rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la
|
2004-06-30 13:41:55 +02:00
|
|
|
rm -f sqlite3.h opcodes.*
|
|
|
|
rm -rf .libs .deps
|
2004-11-03 04:59:57 +01:00
|
|
|
rm -f lemon$(BEXE) lempar.c parse.* sqlite*.tar.gz
|
2005-01-18 05:00:42 +01:00
|
|
|
rm -f mkkeywordhash$(BEXE) keywordhash.h
|
2004-06-30 13:41:55 +02:00
|
|
|
rm -f $(PUBLISH)
|
|
|
|
rm -f *.da *.bb *.bbg gmon.out
|
2004-11-25 14:50:01 +01:00
|
|
|
rm -f testfixture$(TEXE) test.db
|
2004-06-30 13:41:55 +02:00
|
|
|
rm -rf doc
|
|
|
|
rm -f common.tcl
|
|
|
|
rm -f sqlite3.dll sqlite3.lib
|
|
|
|
|
|
|
|
#
|
|
|
|
# Windows section; all this funky .dll stuff ;-)
|
|
|
|
#
|
|
|
|
dll: sqlite3.dll
|
|
|
|
|
|
|
|
REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
|
|
|
|
|
|
|
|
sqlite3.dll: $(LIBOBJ) $(TOP)/sqlite3.def
|
|
|
|
dllwrap --dllname sqlite3.dll --def $(TOP)/sqlite3.def $(REAL_LIBOBJ)
|
|
|
|
strip sqlite3.dll
|
|
|
|
|
|
|
|
#target for dll import libraries
|
|
|
|
implib: sqlite3.lib
|
|
|
|
|
|
|
|
#make Borland C++ and/or Microsoft VC import library for the dll
|
|
|
|
# ignore any errors (usually due to missing programs)
|
|
|
|
sqlite3.lib: sqlite3.dll
|
2005-06-16 18:51:15 +02:00
|
|
|
-impdef -a sqlite3.def sqlite3.dll
|
|
|
|
-implib sqlite3.lib sqlite3.def
|
2004-06-30 13:41:55 +02:00
|
|
|
-lib /machine:i386 /def:$(TOP)/sqlite3.def
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f config.log config.status libtool Makefile config.h
|