2000-05-29 18:26:00 +04:00
|
|
|
#!/usr/make
|
|
|
|
#
|
|
|
|
# Makefile for SQLITE
|
2001-09-15 04:57:59 +04:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2001-09-15 04:57:59 +04:00
|
|
|
# The toplevel directory of the source tree. This is the directory
|
|
|
|
# that contains this "Makefile.in" and the "configure.in" script.
|
2000-05-29 18:26:00 +04:00
|
|
|
#
|
|
|
|
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
|
2001-09-15 04:57:59 +04:00
|
|
|
# will run on the target platform. (BCC and TCC are usually the
|
|
|
|
# same unless your are cross-compiling.)
|
2000-05-29 18:26:00 +04:00
|
|
|
#
|
|
|
|
TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
# Some standard variables and programs
|
2000-05-29 18:26:00 +04:00
|
|
|
#
|
2001-09-28 05:34:43 +04:00
|
|
|
prefix = @prefix@
|
2002-08-22 22:18:35 +04:00
|
|
|
exec_prefix = @exec_prefix@
|
2001-09-28 05:34:43 +04:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
LIBTOOL = ./libtool
|
2003-09-23 04:36:50 +04:00
|
|
|
RELEASE = @ALLOWRELEASE@
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2000-05-30 00:41:49 +04:00
|
|
|
# Compiler options needed for programs that use the TCL library.
|
|
|
|
#
|
|
|
|
TCL_FLAGS = @TARGET_TCL_INC@
|
|
|
|
|
|
|
|
# The library that programs using TCL must link against.
|
|
|
|
#
|
|
|
|
LIBTCL = @TARGET_TCL_LIBS@
|
|
|
|
|
2000-05-29 18:26:00 +04: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@
|
|
|
|
|
2001-09-15 04:57:59 +04:00
|
|
|
# Should the database engine assume text is coded as UTF-8 or iso8859?
|
|
|
|
#
|
|
|
|
# ENCODING = UTF8
|
|
|
|
# ENCODING = ISO8859
|
|
|
|
ENCODING = @ENCODING@
|
|
|
|
|
2003-04-13 22:26:49 +04:00
|
|
|
# Flags controlling use of the in memory btree implementation
|
2003-04-15 05:19:47 +04:00
|
|
|
#
|
|
|
|
# SQLITE_OMIT_INMEMORYDB is defined in order to omit the in-memory
|
|
|
|
# red/black tree driver in the file btree_rb.c
|
|
|
|
#
|
|
|
|
# TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
|
2003-04-20 15:46:34 +04:00
|
|
|
# default to file, 2 to default to memory, and 3 to force temporary
|
2003-04-15 05:19:47 +04:00
|
|
|
# tables to always be in memory.
|
|
|
|
#
|
2003-04-20 15:46:34 +04:00
|
|
|
INMEMORYDB = @INMEMORYDB@
|
|
|
|
INCOREFLAGS = -DTEMP_STORE=@TEMP_STORE@
|
|
|
|
|
|
|
|
ifeq (${INMEMORYDB},0)
|
|
|
|
INCOREFLAGS += -DSQLITE_OMIT_INMEMORYDB=1
|
|
|
|
endif
|
2003-04-13 22:26:49 +04:00
|
|
|
|
2001-09-15 04:57:59 +04:00
|
|
|
# You should not have to change anything below this line
|
|
|
|
###############################################################################
|
|
|
|
|
2000-05-29 18:26:00 +04:00
|
|
|
# Object files for the SQLite library.
|
|
|
|
#
|
2003-11-01 04:53:53 +03:00
|
|
|
LIBOBJ = attach.lo auth.lo btree.lo build.lo copy.lo date.lo \
|
2003-04-07 01:08:24 +04:00
|
|
|
delete.lo expr.lo func.lo hash.lo insert.lo \
|
|
|
|
main.lo opcodes.lo os.lo pager.lo parse.lo pragma.lo \
|
|
|
|
printf.lo random.lo select.lo table.lo tokenize.lo \
|
2003-09-07 02:18:07 +04:00
|
|
|
update.lo util.lo vacuum.lo vdbe.lo vdbeaux.lo \
|
2002-09-08 04:04:50 +04:00
|
|
|
where.lo trigger.lo
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2003-04-20 15:46:34 +04:00
|
|
|
# Only build the in-core DB if it is required.
|
|
|
|
ifeq (${INMEMORYDB},1)
|
2003-04-13 22:26:49 +04:00
|
|
|
LIBOBJ += btree_rb.lo
|
|
|
|
endif
|
|
|
|
|
2000-06-02 17:27:59 +04:00
|
|
|
# All of the source code files.
|
|
|
|
#
|
|
|
|
SRC = \
|
2003-04-07 01:08:24 +04:00
|
|
|
$(TOP)/src/attach.c \
|
2003-01-12 21:02:16 +03:00
|
|
|
$(TOP)/src/auth.c \
|
2001-08-20 04:33:58 +04:00
|
|
|
$(TOP)/src/btree.c \
|
2001-09-13 18:46:09 +04:00
|
|
|
$(TOP)/src/btree.h \
|
2003-06-06 20:13:40 +04:00
|
|
|
$(TOP)/src/btree_rb.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/build.c \
|
2003-04-07 01:08:24 +04:00
|
|
|
$(TOP)/src/copy.c \
|
2003-11-01 04:53:53 +03:00
|
|
|
$(TOP)/src/date.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/delete.c \
|
|
|
|
$(TOP)/src/expr.c \
|
2002-02-24 04:55:15 +03:00
|
|
|
$(TOP)/src/func.c \
|
2001-09-22 22:12:08 +04:00
|
|
|
$(TOP)/src/hash.c \
|
2002-09-08 04:04:50 +04:00
|
|
|
$(TOP)/src/hash.h \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/insert.c \
|
|
|
|
$(TOP)/src/main.c \
|
2001-09-18 00:25:58 +04:00
|
|
|
$(TOP)/src/os.c \
|
2001-08-20 04:33:58 +04:00
|
|
|
$(TOP)/src/pager.c \
|
2001-09-13 18:46:09 +04:00
|
|
|
$(TOP)/src/pager.h \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/parse.y \
|
2003-04-07 01:08:24 +04:00
|
|
|
$(TOP)/src/pragma.c \
|
2000-10-09 02:20:57 +04:00
|
|
|
$(TOP)/src/printf.c \
|
2001-01-13 17:34:05 +03:00
|
|
|
$(TOP)/src/random.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/select.c \
|
|
|
|
$(TOP)/src/shell.c \
|
2000-08-17 14:22:34 +04:00
|
|
|
$(TOP)/src/sqlite.h.in \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
2000-09-29 17:30:53 +04:00
|
|
|
$(TOP)/src/table.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/tclsqlite.c \
|
|
|
|
$(TOP)/src/tokenize.c \
|
2002-09-08 04:04:50 +04:00
|
|
|
$(TOP)/src/trigger.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/update.c \
|
|
|
|
$(TOP)/src/util.c \
|
2003-04-07 00:52:32 +04:00
|
|
|
$(TOP)/src/vacuum.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/vdbe.c \
|
2003-09-07 02:18:07 +04:00
|
|
|
$(TOP)/src/vdbeaux.c \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/vdbe.h \
|
2002-09-08 04:04:50 +04:00
|
|
|
$(TOP)/src/where.c
|
2000-06-02 17:27:59 +04:00
|
|
|
|
2001-04-15 04:37:09 +04:00
|
|
|
# Source code to the test files.
|
|
|
|
#
|
|
|
|
TESTSRC = \
|
2001-08-20 04:33:58 +04:00
|
|
|
$(TOP)/src/btree.c \
|
2002-08-31 20:33:25 +04:00
|
|
|
$(TOP)/src/func.c \
|
2001-10-12 21:30:04 +04:00
|
|
|
$(TOP)/src/os.c \
|
2001-08-20 04:33:58 +04:00
|
|
|
$(TOP)/src/pager.c \
|
2001-04-15 04:37:09 +04:00
|
|
|
$(TOP)/src/test1.c \
|
2001-08-20 04:33:58 +04:00
|
|
|
$(TOP)/src/test2.c \
|
|
|
|
$(TOP)/src/test3.c \
|
2003-12-19 15:31:19 +03:00
|
|
|
$(TOP)/src/test4.c \
|
2004-02-08 21:07:34 +03:00
|
|
|
$(TOP)/src/vdbe.c \
|
2001-07-02 02:12:01 +04:00
|
|
|
$(TOP)/src/md5.c
|
2001-04-15 04:37:09 +04:00
|
|
|
|
2002-09-08 04:04:50 +04:00
|
|
|
# Header files used by all library source files.
|
|
|
|
#
|
|
|
|
HDR = \
|
|
|
|
sqlite.h \
|
|
|
|
$(TOP)/src/btree.h \
|
2002-11-20 14:55:18 +03:00
|
|
|
config.h \
|
2002-09-08 04:04:50 +04:00
|
|
|
$(TOP)/src/hash.h \
|
|
|
|
opcodes.h \
|
|
|
|
$(TOP)/src/os.h \
|
|
|
|
$(TOP)/src/sqliteInt.h \
|
|
|
|
$(TOP)/src/vdbe.h \
|
|
|
|
parse.h
|
|
|
|
|
2003-09-07 02:18:07 +04:00
|
|
|
# Header files used by the VDBE submodule
|
|
|
|
#
|
|
|
|
VDBEHDR = \
|
|
|
|
$(HDR) \
|
|
|
|
$(TOP)/src/vdbeInt.h
|
|
|
|
|
2000-05-29 18:26:00 +04:00
|
|
|
# This is the default Makefile target. The objects listed here
|
|
|
|
# are what get build when you type just "make" with no arguments.
|
|
|
|
#
|
2003-12-19 23:09:51 +03:00
|
|
|
all: sqlite.h libsqlite.la sqlite@TARGET_EXEEXT@
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2000-06-02 17:27:59 +04:00
|
|
|
# Generate the file "last_change" which contains the date of change
|
|
|
|
# of the most recently modified source code file
|
|
|
|
#
|
|
|
|
last_change: $(SRC)
|
|
|
|
cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
|
|
|
|
| awk '{print $$5,$$6}' >last_change
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
libsqlite.la: $(LIBOBJ)
|
2003-09-23 04:36:50 +04:00
|
|
|
$(LIBTOOL) $(TCC) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath $(exec_prefix)/lib \
|
2003-08-21 18:36:38 +04:00
|
|
|
-version-info "8:6:8"
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2002-01-07 22:04:21 +03:00
|
|
|
libtclsqlite.la: tclsqlite.lo libsqlite.la
|
|
|
|
$(LIBTOOL) $(TCC) -o libtclsqlite.la tclsqlite.lo \
|
2003-06-14 23:29:08 +04:00
|
|
|
libsqlite.la $(LIBTCL) -rpath $(exec_prefix)/lib \
|
2003-08-21 18:36:38 +04:00
|
|
|
-version-info "8:6:8"
|
2001-09-28 05:34:43 +04:00
|
|
|
|
2003-12-19 23:09:51 +03:00
|
|
|
sqlite@TARGET_EXEEXT@: $(TOP)/src/shell.c libsqlite.la sqlite.h
|
2001-09-28 05:34:43 +04:00
|
|
|
$(LIBTOOL) $(TCC) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \
|
2002-08-22 22:18:35 +04:00
|
|
|
libsqlite.la $(LIBREADLINE) -rpath $(exec_prefix)/lib
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2002-09-08 04:04:50 +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.
|
|
|
|
#
|
2003-09-07 02:18:07 +04:00
|
|
|
target_source: $(SRC) $(VDBEHDR)
|
2002-09-08 04:04:50 +04:00
|
|
|
rm -rf tsrc
|
|
|
|
mkdir tsrc
|
2003-09-07 02:18:07 +04:00
|
|
|
cp $(SRC) $(VDBEHDR) tsrc
|
2002-09-08 04:04:50 +04:00
|
|
|
rm tsrc/sqlite.h.in tsrc/parse.y
|
2003-06-06 20:13:40 +04:00
|
|
|
cp parse.c opcodes.c tsrc
|
2002-09-08 04:04:50 +04:00
|
|
|
|
2000-05-29 18:26:00 +04:00
|
|
|
# Rules to build the LEMON compiler generator
|
|
|
|
#
|
2003-12-19 23:09:51 +03:00
|
|
|
lemon@BUILD_EXEEXT@: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
|
2000-05-29 18:26:00 +04:00
|
|
|
$(BCC) -o lemon $(TOP)/tool/lemon.c
|
|
|
|
cp $(TOP)/tool/lempar.c .
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
btree.lo: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/btree.c
|
2001-08-20 04:33:58 +04:00
|
|
|
|
2003-04-13 22:26:49 +04:00
|
|
|
btree_rb.lo: $(TOP)/src/btree_rb.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/btree_rb.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
build.lo: $(TOP)/src/build.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/build.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
main.lo: $(TOP)/src/main.c $(HDR)
|
2003-04-13 22:26:49 +04:00
|
|
|
$(LIBTOOL) $(TCC) -c ${INCOREFLAGS} $(TOP)/src/main.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/pager.c
|
2001-08-20 04:33:58 +04:00
|
|
|
|
2002-09-08 04:04:50 +04:00
|
|
|
opcodes.lo: opcodes.c
|
|
|
|
$(LIBTOOL) $(TCC) -c opcodes.c
|
|
|
|
|
|
|
|
opcodes.c: $(TOP)/src/vdbe.c
|
|
|
|
echo '/* Automatically generated file. Do not edit */' >opcodes.c
|
|
|
|
echo 'char *sqliteOpcodeNames[] = { "???", ' >>opcodes.c
|
|
|
|
grep '^case OP_' $(TOP)/src/vdbe.c | \
|
|
|
|
sed -e 's/^.*OP_/ "/' -e 's/:.*$$/", /' >>opcodes.c
|
|
|
|
echo '};' >>opcodes.c
|
|
|
|
|
|
|
|
opcodes.h: $(TOP)/src/vdbe.h
|
|
|
|
echo '/* Automatically generated file. Do not edit */' >opcodes.h
|
|
|
|
grep '^case OP_' $(TOP)/src/vdbe.c | \
|
|
|
|
sed -e 's/://' | \
|
|
|
|
awk '{printf "#define %-30s %3d\n", $$2, ++cnt}' >>opcodes.h
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
os.lo: $(TOP)/src/os.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/os.c
|
2001-09-19 17:22:39 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
parse.lo: parse.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c parse.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
|
|
|
parse.h: parse.c
|
|
|
|
|
2003-12-19 23:09:51 +03:00
|
|
|
parse.c: $(TOP)/src/parse.y lemon@BUILD_EXEEXT@
|
2000-05-29 18:26:00 +04:00
|
|
|
cp $(TOP)/src/parse.y .
|
|
|
|
./lemon parse.y
|
|
|
|
|
2002-11-20 14:55:18 +03:00
|
|
|
# The config.h file will contain a single #define that tells us how
|
|
|
|
# many bytes are in a pointer. This only works if a pointer is the
|
|
|
|
# same size on the host as it is on the target. If you are cross-compiling
|
|
|
|
# to a target with a different pointer size, you'll need to manually
|
|
|
|
# configure the config.h file.
|
|
|
|
#
|
|
|
|
config.h:
|
|
|
|
echo '#include <stdio.h>' >temp.c
|
|
|
|
echo 'int main(){printf(' >>temp.c
|
2003-05-17 06:27:21 +04:00
|
|
|
echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
|
2002-11-20 14:55:18 +03:00
|
|
|
echo 'exit(0);}' >>temp.c
|
|
|
|
$(BCC) -o temp temp.c
|
|
|
|
./temp >config.h
|
2003-05-17 06:27:21 +04:00
|
|
|
echo >>config.h
|
2002-11-20 14:55:18 +03:00
|
|
|
rm -f temp.c temp
|
|
|
|
|
2000-08-22 17:40:18 +04:00
|
|
|
sqlite.h: $(TOP)/src/sqlite.h.in
|
2001-04-05 19:57:13 +04:00
|
|
|
sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
|
2001-09-15 04:57:59 +04:00
|
|
|
-e s/--ENCODING--/$(ENCODING)/ \
|
2001-04-05 19:57:13 +04:00
|
|
|
$(TOP)/src/sqlite.h.in >sqlite.h
|
2000-05-29 21:44:25 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
tokenize.lo: $(TOP)/src/tokenize.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/tokenize.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
util.lo: $(TOP)/src/util.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/util.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2003-09-07 02:18:07 +04:00
|
|
|
vdbe.lo: $(TOP)/src/vdbe.c $(VDBEHDR)
|
2001-09-28 05:34:43 +04:00
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/vdbe.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2003-09-07 02:18:07 +04:00
|
|
|
vdbeaux.lo: $(TOP)/src/vdbe.c $(VDBEHDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/vdbeaux.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
where.lo: $(TOP)/src/where.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/where.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2003-04-07 01:08:24 +04:00
|
|
|
copy.lo: $(TOP)/src/copy.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/copy.c
|
|
|
|
|
2003-11-01 04:53:53 +03:00
|
|
|
date.lo: $(TOP)/src/date.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/date.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
delete.lo: $(TOP)/src/delete.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/delete.c
|
2000-05-31 19:34:51 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
expr.lo: $(TOP)/src/expr.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/expr.c
|
2000-05-31 19:34:51 +04:00
|
|
|
|
2002-02-24 04:55:15 +03:00
|
|
|
func.lo: $(TOP)/src/func.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/func.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
hash.lo: $(TOP)/src/hash.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/hash.c
|
2001-09-22 22:12:08 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
insert.lo: $(TOP)/src/insert.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/insert.c
|
2000-05-31 19:34:51 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
random.lo: $(TOP)/src/random.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/random.c
|
2001-01-13 17:34:05 +03:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
select.lo: $(TOP)/src/select.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/select.c
|
2000-05-31 19:34:51 +04:00
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
table.lo: $(TOP)/src/table.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/table.c
|
2000-09-29 17:30:53 +04:00
|
|
|
|
2002-05-15 12:43:10 +04:00
|
|
|
trigger.lo: $(TOP)/src/trigger.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/trigger.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
update.lo: $(TOP)/src/update.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/update.c
|
2000-05-31 19:34:51 +04:00
|
|
|
|
2003-04-07 00:52:32 +04:00
|
|
|
vacuum.lo: $(TOP)/src/vacuum.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/vacuum.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
tclsqlite.lo: $(TOP)/src/tclsqlite.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
|
2000-09-21 17:01:35 +04:00
|
|
|
|
2003-04-07 01:08:24 +04:00
|
|
|
pragma.lo: $(TOP)/src/pragma.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/pragma.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
printf.lo: $(TOP)/src/printf.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/printf.c
|
2000-05-30 00:41:49 +04:00
|
|
|
|
2003-04-07 01:08:24 +04:00
|
|
|
attach.lo: $(TOP)/src/attach.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/attach.c
|
|
|
|
|
2003-01-12 21:02:16 +03:00
|
|
|
auth.lo: $(TOP)/src/auth.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -c $(TOP)/src/auth.c
|
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
tclsqlite: $(TOP)/src/tclsqlite.c libsqlite.la
|
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite \
|
|
|
|
$(TOP)/src/tclsqlite.c libsqlite.la $(LIBTCL)
|
2000-05-30 00:41:49 +04:00
|
|
|
|
2003-12-19 23:09:51 +03:00
|
|
|
testfixture@TARGET_EXEEXT@: $(TOP)/src/tclsqlite.c libtclsqlite.la libsqlite.la $(TESTSRC)
|
2001-09-28 05:34:43 +04:00
|
|
|
$(LIBTOOL) $(TCC) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1\
|
|
|
|
-o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
|
2002-01-07 22:04:21 +03:00
|
|
|
libtclsqlite.la libsqlite.la $(LIBTCL)
|
2001-04-07 19:24:33 +04:00
|
|
|
|
2003-12-19 23:09:51 +03:00
|
|
|
fulltest: testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@
|
2001-04-28 20:52:40 +04:00
|
|
|
./testfixture $(TOP)/test/all.test
|
2000-05-30 00:41:49 +04:00
|
|
|
|
2003-12-19 23:09:51 +03:00
|
|
|
test: testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@
|
2001-09-16 04:13:26 +04:00
|
|
|
./testfixture $(TOP)/test/quick.test
|
|
|
|
|
2001-09-28 21:47:14 +04:00
|
|
|
index.html: $(TOP)/www/index.tcl last_change
|
2000-08-17 14:22:34 +04:00
|
|
|
tclsh $(TOP)/www/index.tcl `cat $(TOP)/VERSION` >index.html
|
2000-05-29 21:44:25 +04:00
|
|
|
|
|
|
|
sqlite.html: $(TOP)/www/sqlite.tcl
|
|
|
|
tclsh $(TOP)/www/sqlite.tcl >sqlite.html
|
|
|
|
|
2000-05-29 22:32:16 +04:00
|
|
|
c_interface.html: $(TOP)/www/c_interface.tcl
|
|
|
|
tclsh $(TOP)/www/c_interface.tcl >c_interface.html
|
|
|
|
|
2000-05-31 06:27:49 +04:00
|
|
|
changes.html: $(TOP)/www/changes.tcl
|
|
|
|
tclsh $(TOP)/www/changes.tcl >changes.html
|
|
|
|
|
2000-06-09 01:53:06 +04:00
|
|
|
lang.html: $(TOP)/www/lang.tcl
|
|
|
|
tclsh $(TOP)/www/lang.tcl >lang.html
|
|
|
|
|
2000-06-23 21:02:08 +04:00
|
|
|
vdbe.html: $(TOP)/www/vdbe.tcl
|
|
|
|
tclsh $(TOP)/www/vdbe.tcl >vdbe.html
|
|
|
|
|
2000-06-09 05:58:35 +04:00
|
|
|
arch.html: $(TOP)/www/arch.tcl
|
|
|
|
tclsh $(TOP)/www/arch.tcl >arch.html
|
|
|
|
|
|
|
|
arch.png: $(TOP)/www/arch.png
|
|
|
|
cp $(TOP)/www/arch.png .
|
|
|
|
|
2000-06-09 18:14:32 +04:00
|
|
|
opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
|
2000-06-09 05:58:35 +04:00
|
|
|
tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
|
|
|
|
|
2000-07-31 22:56:15 +04:00
|
|
|
mingw.html: $(TOP)/www/mingw.tcl
|
|
|
|
tclsh $(TOP)/www/mingw.tcl >mingw.html
|
|
|
|
|
2000-10-01 02:46:05 +04:00
|
|
|
tclsqlite.html: $(TOP)/www/tclsqlite.tcl
|
|
|
|
tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
|
|
|
|
|
2001-09-25 05:50:59 +04:00
|
|
|
speed.html: $(TOP)/www/speed.tcl
|
|
|
|
tclsh $(TOP)/www/speed.tcl >speed.html
|
|
|
|
|
2001-11-24 03:31:46 +03:00
|
|
|
faq.html: $(TOP)/www/faq.tcl
|
|
|
|
tclsh $(TOP)/www/faq.tcl >faq.html
|
|
|
|
|
2002-09-08 04:04:50 +04:00
|
|
|
formatchng.html: $(TOP)/www/formatchng.tcl
|
|
|
|
tclsh $(TOP)/www/formatchng.tcl >formatchng.html
|
|
|
|
|
|
|
|
conflict.html: $(TOP)/www/conflict.tcl
|
|
|
|
tclsh $(TOP)/www/conflict.tcl >conflict.html
|
|
|
|
|
2001-09-28 21:47:14 +04:00
|
|
|
download.html: $(TOP)/www/download.tcl
|
|
|
|
tclsh $(TOP)/www/download.tcl >download.html
|
|
|
|
|
2002-09-08 04:04:50 +04:00
|
|
|
omitted.html: $(TOP)/www/omitted.tcl
|
|
|
|
tclsh $(TOP)/www/omitted.tcl >omitted.html
|
|
|
|
|
|
|
|
datatypes.html: $(TOP)/www/datatypes.tcl
|
|
|
|
tclsh $(TOP)/www/datatypes.tcl >datatypes.html
|
|
|
|
|
|
|
|
quickstart.html: $(TOP)/www/quickstart.tcl
|
|
|
|
tclsh $(TOP)/www/quickstart.tcl >quickstart.html
|
|
|
|
|
|
|
|
fileformat.html: $(TOP)/www/fileformat.tcl
|
|
|
|
tclsh $(TOP)/www/fileformat.tcl >fileformat.html
|
|
|
|
|
|
|
|
nulls.html: $(TOP)/www/nulls.tcl
|
|
|
|
tclsh $(TOP)/www/nulls.tcl >nulls.html
|
|
|
|
|
2000-06-09 05:58:35 +04:00
|
|
|
|
2000-05-29 22:32:16 +04:00
|
|
|
# Files to be published on the website.
|
|
|
|
#
|
2001-09-28 21:47:14 +04:00
|
|
|
DOC = \
|
2000-05-29 22:32:16 +04:00
|
|
|
index.html \
|
|
|
|
sqlite.html \
|
2000-05-31 06:27:49 +04:00
|
|
|
changes.html \
|
2000-06-09 01:53:06 +04:00
|
|
|
lang.html \
|
2000-06-09 05:58:35 +04:00
|
|
|
opcode.html \
|
|
|
|
arch.html \
|
|
|
|
arch.png \
|
2000-06-23 21:02:08 +04:00
|
|
|
vdbe.html \
|
2000-07-31 22:56:15 +04:00
|
|
|
c_interface.html \
|
2000-10-01 02:46:05 +04:00
|
|
|
mingw.html \
|
2001-09-25 05:50:59 +04:00
|
|
|
tclsqlite.html \
|
2001-09-28 21:47:14 +04:00
|
|
|
download.html \
|
2001-11-24 03:31:46 +03:00
|
|
|
speed.html \
|
2002-09-08 04:04:50 +04:00
|
|
|
faq.html \
|
|
|
|
formatchng.html \
|
|
|
|
conflict.html \
|
|
|
|
omitted.html \
|
|
|
|
datatypes.html \
|
|
|
|
quickstart.html \
|
|
|
|
fileformat.html \
|
|
|
|
nulls.html
|
2000-05-29 22:32:16 +04:00
|
|
|
|
2001-09-28 21:47:14 +04:00
|
|
|
doc: $(DOC)
|
|
|
|
mkdir -p doc
|
|
|
|
mv $(DOC) doc
|
2000-05-29 22:32:16 +04:00
|
|
|
|
2003-12-19 23:09:51 +03:00
|
|
|
install: sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h
|
2002-08-22 22:18:35 +04:00
|
|
|
$(INSTALL) -d $(exec_prefix)/lib
|
|
|
|
$(LIBTOOL) $(INSTALL) libsqlite.la $(exec_prefix)/lib
|
|
|
|
$(INSTALL) -d $(exec_prefix)/bin
|
2003-12-19 23:09:51 +03:00
|
|
|
$(LIBTOOL) $(INSTALL) sqlite@TARGET_EXEEXT@ $(exec_prefix)/bin
|
2002-08-22 22:18:35 +04:00
|
|
|
$(INSTALL) -d $(prefix)/include
|
2002-01-09 06:19:59 +03:00
|
|
|
$(INSTALL) -m 0644 sqlite.h $(prefix)/include
|
2003-08-26 14:38:58 +04:00
|
|
|
$(INSTALL) -d $(exec_prefix)/lib/pkgconfig;
|
|
|
|
$(INSTALL) -m 0644 sqlite.pc $(exec_prefix)/lib/pkgconfig;
|
2000-08-22 17:47:56 +04:00
|
|
|
|
2000-05-29 18:26:00 +04:00
|
|
|
clean:
|
2003-12-19 23:09:51 +03:00
|
|
|
rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.*
|
2002-01-09 06:19:59 +03:00
|
|
|
rm -rf .libs .deps
|
2003-12-19 23:09:51 +03:00
|
|
|
rm -f lemon@BUILD_EXEEXT@ lempar.c parse.* sqlite*.tar.gz
|
2000-05-30 00:41:49 +04:00
|
|
|
rm -f $(PUBLISH)
|
2000-06-03 23:19:41 +04:00
|
|
|
rm -f *.da *.bb *.bbg gmon.out
|
2003-12-19 23:09:51 +03:00
|
|
|
rm -f testfixture@TARGET_EXEEXT@ test.db
|
2002-01-09 06:19:59 +03:00
|
|
|
rm -rf doc
|
2003-12-19 23:09:51 +03:00
|
|
|
rm -f sqlite.dll sqlite.lib
|
|
|
|
|
|
|
|
#make windows dll
|
|
|
|
dll: sqlite.dll
|
|
|
|
|
|
|
|
sqlite.dll: $(LIBOBJ) sqlite.def
|
|
|
|
dllwrap --dllname sqlite.dll --def sqlite.def $(LIBOBJ)
|
|
|
|
strip sqlite.dll
|
|
|
|
|
|
|
|
#target for dll import libraries
|
|
|
|
implib: sqlite.lib
|
|
|
|
|
|
|
|
#make Borland C++ import library for the dll
|
|
|
|
sqlite.lib: sqlite.dll
|
|
|
|
-implib -a sqlite.lib sqlite.dll sqlite.def
|
|
|
|
-lib /machine:i386 /def:sqlite.def
|
2002-01-09 06:19:59 +03:00
|
|
|
|
|
|
|
distclean: clean
|
2003-06-14 23:29:08 +04:00
|
|
|
rm -f config.log config.status libtool Makefile config.h
|