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@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
LIBTOOL = ./libtool
|
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@
|
|
|
|
|
|
|
|
# You should not have to change anything below this line
|
|
|
|
###############################################################################
|
|
|
|
|
2000-05-29 18:26:00 +04:00
|
|
|
# Object files for the SQLite library.
|
|
|
|
#
|
2001-09-28 05:34:43 +04:00
|
|
|
LIBOBJ = btree.lo build.lo delete.lo expr.lo hash.lo insert.lo \
|
|
|
|
main.lo os.lo pager.lo parse.lo printf.lo random.lo select.lo \
|
|
|
|
table.lo tokenize.lo update.lo util.lo vdbe.lo where.lo
|
2000-05-29 18:26:00 +04:00
|
|
|
|
2000-06-02 17:27:59 +04:00
|
|
|
# All of the source code files.
|
|
|
|
#
|
|
|
|
SRC = \
|
2001-08-20 04:33:58 +04:00
|
|
|
$(TOP)/src/btree.c \
|
2001-09-13 18:46:09 +04:00
|
|
|
$(TOP)/src/btree.h \
|
2000-06-02 17:27:59 +04:00
|
|
|
$(TOP)/src/build.c \
|
|
|
|
$(TOP)/src/delete.c \
|
|
|
|
$(TOP)/src/expr.c \
|
2001-09-22 22:12:08 +04:00
|
|
|
$(TOP)/src/hash.c \
|
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 \
|
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 \
|
|
|
|
$(TOP)/src/update.c \
|
|
|
|
$(TOP)/src/util.c \
|
|
|
|
$(TOP)/src/vdbe.c \
|
|
|
|
$(TOP)/src/vdbe.h \
|
|
|
|
$(TOP)/src/where.c
|
|
|
|
|
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 \
|
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 \
|
2001-07-02 02:12:01 +04:00
|
|
|
$(TOP)/src/md5.c
|
2001-04-15 04:37:09 +04:00
|
|
|
|
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.
|
|
|
|
#
|
2001-09-28 05:34:43 +04:00
|
|
|
all: sqlite.h libsqlite.la sqlite
|
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)
|
|
|
|
$(LIBTOOL) $(TCC) -o libsqlite.la $(LIBOBJ) -rpath $(prefix)/lib
|
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 \
|
|
|
|
libsqlite.la $(LIBTCL) -rpath $(prefix)/lib
|
2001-09-28 05:34:43 +04:00
|
|
|
|
|
|
|
sqlite: $(TOP)/src/shell.c libsqlite.la sqlite.h
|
|
|
|
$(LIBTOOL) $(TCC) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \
|
|
|
|
libsqlite.la $(LIBREADLINE)
|
2000-05-29 18:26:00 +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 .
|
|
|
|
|
|
|
|
# Header files used by all library source files.
|
|
|
|
#
|
|
|
|
HDR = \
|
2000-08-17 14:22:34 +04:00
|
|
|
sqlite.h \
|
2001-09-13 18:46:09 +04:00
|
|
|
$(TOP)/src/btree.h \
|
2001-09-19 17:22:39 +04:00
|
|
|
$(TOP)/src/os.h \
|
2000-05-29 18:26:00 +04:00
|
|
|
$(TOP)/src/sqliteInt.h \
|
|
|
|
$(TOP)/src/vdbe.h \
|
|
|
|
parse.h
|
|
|
|
|
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
|
|
|
|
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)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(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
|
|
|
|
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
|
|
|
|
|
|
|
|
parse.c: $(TOP)/src/parse.y lemon
|
|
|
|
cp $(TOP)/src/parse.y .
|
|
|
|
./lemon parse.y
|
|
|
|
|
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
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
vdbe.lo: $(TOP)/src/vdbe.c $(HDR)
|
|
|
|
$(LIBTOOL) $(TCC) -c $(TOP)/src/vdbe.c
|
2000-05-29 18:26:00 +04:00
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
2002-01-07 22:04:21 +03:00
|
|
|
testfixture: $(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
|
|
|
|
2001-09-16 04:13:26 +04:00
|
|
|
fulltest: testfixture sqlite
|
2001-04-28 20:52:40 +04:00
|
|
|
./testfixture $(TOP)/test/all.test
|
2000-05-30 00:41:49 +04:00
|
|
|
|
2001-09-16 04:13:26 +04:00
|
|
|
test: testfixture sqlite
|
|
|
|
./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
|
|
|
crosscompile.html: $(TOP)/www/crosscompile.tcl
|
|
|
|
tclsh $(TOP)/www/crosscompile.tcl >crosscompile.html
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2001-09-28 21:47:14 +04:00
|
|
|
download.html: $(TOP)/www/download.tcl
|
|
|
|
tclsh $(TOP)/www/download.tcl >download.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 \
|
|
|
|
crosscompile.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 \
|
|
|
|
faq.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
|
|
|
|
2001-09-28 05:34:43 +04:00
|
|
|
install: sqlite libsqlite.la sqlite.h
|
|
|
|
$(LIBTOOL) $(INSTALL) libsqlite.la $(prefix)/lib
|
|
|
|
$(LIBTOOL) $(INSTALL) sqlite $(prefix)/bin
|
|
|
|
$(INSTALL) sqlite.h $(prefix)/include
|
2000-08-22 17:47:56 +04:00
|
|
|
|
2000-05-29 18:26:00 +04:00
|
|
|
clean:
|
2001-09-28 05:34:43 +04:00
|
|
|
rm -f *.lo *.la *.o sqlite libsqlite.la sqlite.h
|
|
|
|
rm -rf .libs .deps
|
2001-09-28 21:47:14 +04:00
|
|
|
rm -f lemon 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
|
2001-09-28 05:34:43 +04:00
|
|
|
rm -f testfixture test.db
|