17c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 27c478bd9Sstevel@tonic-gate# 37c478bd9Sstevel@tonic-gate############################################################################### 47c478bd9Sstevel@tonic-gate# The following macros should be defined before this script is 57c478bd9Sstevel@tonic-gate# invoked: 67c478bd9Sstevel@tonic-gate# 77c478bd9Sstevel@tonic-gate# TOP The toplevel directory of the source tree. This is the 87c478bd9Sstevel@tonic-gate# directory that contains this "Makefile.in" and the 97c478bd9Sstevel@tonic-gate# "configure.in" script. 107c478bd9Sstevel@tonic-gate# 117c478bd9Sstevel@tonic-gate# BCC C Compiler and options for use in building executables that 127c478bd9Sstevel@tonic-gate# will run on the platform that is doing the build. 137c478bd9Sstevel@tonic-gate# 147c478bd9Sstevel@tonic-gate# USLEEP If the target operating system supports the "usleep()" system 157c478bd9Sstevel@tonic-gate# call, then define the HAVE_USLEEP macro for all C modules. 167c478bd9Sstevel@tonic-gate# 177c478bd9Sstevel@tonic-gate# THREADSAFE If you want the SQLite library to be safe for use within a 187c478bd9Sstevel@tonic-gate# multi-threaded program, then define the following macro 197c478bd9Sstevel@tonic-gate# appropriately: 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# THREADLIB Specify any extra linker options needed to make the library 227c478bd9Sstevel@tonic-gate# thread safe 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate# OPTS Extra compiler command-line options. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate# EXE The suffix to add to executable files. ".exe" for windows 277c478bd9Sstevel@tonic-gate# and "" for Unix. 287c478bd9Sstevel@tonic-gate# 297c478bd9Sstevel@tonic-gate# TCC C Compiler and options for use in building executables that 307c478bd9Sstevel@tonic-gate# will run on the target platform. This is usually the same 317c478bd9Sstevel@tonic-gate# as BCC, unless you are cross-compiling. 327c478bd9Sstevel@tonic-gate# 337c478bd9Sstevel@tonic-gate# AR Tools used to build a static library. 347c478bd9Sstevel@tonic-gate# RANLIB 357c478bd9Sstevel@tonic-gate# 367c478bd9Sstevel@tonic-gate# TCL_FLAGS Extra compiler options needed for programs that use the 377c478bd9Sstevel@tonic-gate# TCL library. 387c478bd9Sstevel@tonic-gate# 397c478bd9Sstevel@tonic-gate# LIBTCL Linker options needed to link against the TCL library. 407c478bd9Sstevel@tonic-gate# 417c478bd9Sstevel@tonic-gate# READLINE_FLAGS Compiler options needed for programs that use the 427c478bd9Sstevel@tonic-gate# readline() library. 437c478bd9Sstevel@tonic-gate# 447c478bd9Sstevel@tonic-gate# LIBREADLINE Linker options needed by programs using readline() must 457c478bd9Sstevel@tonic-gate# link against. 467c478bd9Sstevel@tonic-gate# 477c478bd9Sstevel@tonic-gate# ENCODING "UTF8" or "ISO8859" 487c478bd9Sstevel@tonic-gate# 497c478bd9Sstevel@tonic-gate# Once the macros above are defined, the rest of this make script will 507c478bd9Sstevel@tonic-gate# build the SQLite library and testing tools. 517c478bd9Sstevel@tonic-gate################################################################################ 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate# This is how we compile 547c478bd9Sstevel@tonic-gate# 557c478bd9Sstevel@tonic-gateTCCX = $(TCC) $(OPTS) $(THREADSAFE) $(USLEEP) -I. -I$(TOP)/src 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate# Object files for the SQLite library. 587c478bd9Sstevel@tonic-gate# 597c478bd9Sstevel@tonic-gateLIBOBJ = attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \ 607c478bd9Sstevel@tonic-gate expr.o func.o hash.o insert.o \ 617c478bd9Sstevel@tonic-gate main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \ 627c478bd9Sstevel@tonic-gate select.o table.o tokenize.o trigger.o update.o util.o \ 637c478bd9Sstevel@tonic-gate vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate# All of the source code files. 667c478bd9Sstevel@tonic-gate# 677c478bd9Sstevel@tonic-gateSRC = \ 687c478bd9Sstevel@tonic-gate $(TOP)/src/attach.c \ 697c478bd9Sstevel@tonic-gate $(TOP)/src/auth.c \ 707c478bd9Sstevel@tonic-gate $(TOP)/src/btree.c \ 717c478bd9Sstevel@tonic-gate $(TOP)/src/btree.h \ 727c478bd9Sstevel@tonic-gate $(TOP)/src/btree_rb.c \ 737c478bd9Sstevel@tonic-gate $(TOP)/src/build.c \ 747c478bd9Sstevel@tonic-gate $(TOP)/src/copy.c \ 757c478bd9Sstevel@tonic-gate $(TOP)/src/date.c \ 767c478bd9Sstevel@tonic-gate $(TOP)/src/delete.c \ 777c478bd9Sstevel@tonic-gate $(TOP)/src/encode.c \ 787c478bd9Sstevel@tonic-gate $(TOP)/src/expr.c \ 797c478bd9Sstevel@tonic-gate $(TOP)/src/func.c \ 807c478bd9Sstevel@tonic-gate $(TOP)/src/hash.c \ 817c478bd9Sstevel@tonic-gate $(TOP)/src/hash.h \ 827c478bd9Sstevel@tonic-gate $(TOP)/src/insert.c \ 837c478bd9Sstevel@tonic-gate $(TOP)/src/main.c \ 847c478bd9Sstevel@tonic-gate $(TOP)/src/os.c \ 857c478bd9Sstevel@tonic-gate $(TOP)/src/pager.c \ 867c478bd9Sstevel@tonic-gate $(TOP)/src/pager.h \ 877c478bd9Sstevel@tonic-gate $(TOP)/src/parse.y \ 887c478bd9Sstevel@tonic-gate $(TOP)/src/pragma.c \ 897c478bd9Sstevel@tonic-gate $(TOP)/src/printf.c \ 907c478bd9Sstevel@tonic-gate $(TOP)/src/random.c \ 917c478bd9Sstevel@tonic-gate $(TOP)/src/select.c \ 927c478bd9Sstevel@tonic-gate $(TOP)/src/shell.c \ 937c478bd9Sstevel@tonic-gate $(TOP)/src/sqlite.h.in \ 947c478bd9Sstevel@tonic-gate $(TOP)/src/sqliteInt.h \ 957c478bd9Sstevel@tonic-gate $(TOP)/src/table.c \ 967c478bd9Sstevel@tonic-gate $(TOP)/src/tclsqlite.c \ 977c478bd9Sstevel@tonic-gate $(TOP)/src/tokenize.c \ 987c478bd9Sstevel@tonic-gate $(TOP)/src/trigger.c \ 997c478bd9Sstevel@tonic-gate $(TOP)/src/update.c \ 1007c478bd9Sstevel@tonic-gate $(TOP)/src/util.c \ 1017c478bd9Sstevel@tonic-gate $(TOP)/src/vacuum.c \ 1027c478bd9Sstevel@tonic-gate $(TOP)/src/vdbe.c \ 1037c478bd9Sstevel@tonic-gate $(TOP)/src/vdbe.h \ 1047c478bd9Sstevel@tonic-gate $(TOP)/src/vdbeaux.c \ 1057c478bd9Sstevel@tonic-gate $(TOP)/src/vdbeInt.h \ 1067c478bd9Sstevel@tonic-gate $(TOP)/src/where.c 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate# Source code to the test files. 1097c478bd9Sstevel@tonic-gate# 1107c478bd9Sstevel@tonic-gateTESTSRC = \ 1117c478bd9Sstevel@tonic-gate $(TOP)/src/btree.c \ 1127c478bd9Sstevel@tonic-gate $(TOP)/src/func.c \ 1137c478bd9Sstevel@tonic-gate $(TOP)/src/os.c \ 1147c478bd9Sstevel@tonic-gate $(TOP)/src/pager.c \ 1157c478bd9Sstevel@tonic-gate $(TOP)/src/test1.c \ 1167c478bd9Sstevel@tonic-gate $(TOP)/src/test2.c \ 1177c478bd9Sstevel@tonic-gate $(TOP)/src/test3.c \ 1187c478bd9Sstevel@tonic-gate $(TOP)/src/test4.c \ 1197c478bd9Sstevel@tonic-gate $(TOP)/src/vdbe.c \ 1207c478bd9Sstevel@tonic-gate $(TOP)/src/md5.c 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate# Header files used by all library source files. 1237c478bd9Sstevel@tonic-gate# 1247c478bd9Sstevel@tonic-gateHDR = \ 1257c478bd9Sstevel@tonic-gate sqlite.h \ 1267c478bd9Sstevel@tonic-gate $(TOP)/src/btree.h \ 1277c478bd9Sstevel@tonic-gate config.h \ 1287c478bd9Sstevel@tonic-gate $(TOP)/src/hash.h \ 1297c478bd9Sstevel@tonic-gate opcodes.h \ 1307c478bd9Sstevel@tonic-gate $(TOP)/src/os.h \ 1317c478bd9Sstevel@tonic-gate $(TOP)/src/sqliteInt.h \ 1327c478bd9Sstevel@tonic-gate $(TOP)/src/vdbe.h \ 1337c478bd9Sstevel@tonic-gate parse.h 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate# Header files used by the VDBE submodule 1367c478bd9Sstevel@tonic-gate# 1377c478bd9Sstevel@tonic-gateVDBEHDR = \ 1387c478bd9Sstevel@tonic-gate $(HDR) \ 1397c478bd9Sstevel@tonic-gate $(TOP)/src/vdbeInt.h 1407c478bd9Sstevel@tonic-gate 1417c478bd9Sstevel@tonic-gate# This is the default Makefile target. The objects listed here 1427c478bd9Sstevel@tonic-gate# are what get build when you type just "make" with no arguments. 1437c478bd9Sstevel@tonic-gate# 1447c478bd9Sstevel@tonic-gateall: sqlite.h config.h libsqlite.a sqlite$(EXE) 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate# Generate the file "last_change" which contains the date of change 1477c478bd9Sstevel@tonic-gate# of the most recently modified source code file 1487c478bd9Sstevel@tonic-gate# 1497c478bd9Sstevel@tonic-gatelast_change: $(SRC) 1507c478bd9Sstevel@tonic-gate cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \ 1517c478bd9Sstevel@tonic-gate | awk '{print $$5,$$6}' >last_change 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gatelibsqlite.a: $(LIBOBJ) 1547c478bd9Sstevel@tonic-gate $(AR) libsqlite.a $(LIBOBJ) 1557c478bd9Sstevel@tonic-gate $(RANLIB) libsqlite.a 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gatesqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h 1587c478bd9Sstevel@tonic-gate $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ 1597c478bd9Sstevel@tonic-gate libsqlite.a $(LIBREADLINE) $(THREADLIB) 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gatesqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \ 1627c478bd9Sstevel@tonic-gate $(TOP)/tool/spaceanal.tcl 1637c478bd9Sstevel@tonic-gate sed \ 1647c478bd9Sstevel@tonic-gate -e '/^#/d' \ 1657c478bd9Sstevel@tonic-gate -e 's,\\,\\\\,g' \ 1667c478bd9Sstevel@tonic-gate -e 's,",\\",g' \ 1677c478bd9Sstevel@tonic-gate -e 's,^,",' \ 1687c478bd9Sstevel@tonic-gate -e 's,$$,\\n",' \ 1697c478bd9Sstevel@tonic-gate $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h 1707c478bd9Sstevel@tonic-gate $(TCCX) $(TCL_FLAGS) -DTCLSH=2 -DSQLITE_TEST=1 -static -o \ 1717c478bd9Sstevel@tonic-gate sqlite_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \ 1727c478bd9Sstevel@tonic-gate libsqlite.a $(LIBTCL) 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate# This target creates a directory named "tsrc" and fills it with 1767c478bd9Sstevel@tonic-gate# copies of all of the C source code and header files needed to 1777c478bd9Sstevel@tonic-gate# build on the target system. Some of the C source code and header 1787c478bd9Sstevel@tonic-gate# files are automatically generated. This target takes care of 1797c478bd9Sstevel@tonic-gate# all that automatic generation. 1807c478bd9Sstevel@tonic-gate# 1817c478bd9Sstevel@tonic-gatetarget_source: $(SRC) $(VDBEHDR) opcodes.c 1827c478bd9Sstevel@tonic-gate rm -rf tsrc 1837c478bd9Sstevel@tonic-gate mkdir tsrc 1847c478bd9Sstevel@tonic-gate cp $(SRC) $(VDBEHDR) tsrc 1857c478bd9Sstevel@tonic-gate rm tsrc/sqlite.h.in tsrc/parse.y 1867c478bd9Sstevel@tonic-gate cp parse.c opcodes.c tsrc 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate# Rules to build the LEMON compiler generator 1897c478bd9Sstevel@tonic-gate# 1907c478bd9Sstevel@tonic-gatelemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c 1917c478bd9Sstevel@tonic-gate $(BCC) -o lemon $(TOP)/tool/lemon.c 1927c478bd9Sstevel@tonic-gate cp $(TOP)/tool/lempar.c . 1937c478bd9Sstevel@tonic-gate 1947c478bd9Sstevel@tonic-gatebtree.o: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h 1957c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/btree.c 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gatebtree_rb.o: $(TOP)/src/btree_rb.c $(HDR) 1987c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/btree_rb.c 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gatebuild.o: $(TOP)/src/build.c $(HDR) 2017c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/build.c 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gatemain.o: $(TOP)/src/main.c $(HDR) 2047c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/main.c 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gatepager.o: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h 2077c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/pager.c 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gateopcodes.o: opcodes.c 2107c478bd9Sstevel@tonic-gate $(TCCX) -c opcodes.c 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gateopcodes.c: $(TOP)/src/vdbe.c 2137c478bd9Sstevel@tonic-gate echo '/* Automatically generated file. Do not edit */' >opcodes.c 2147c478bd9Sstevel@tonic-gate echo 'char *sqliteOpcodeNames[] = { "???", ' >>opcodes.c 2157c478bd9Sstevel@tonic-gate grep '^case OP_' $(TOP)/src/vdbe.c | \ 2167c478bd9Sstevel@tonic-gate sed -e 's/^.*OP_/ "/' -e 's/:.*$$/", /' >>opcodes.c 2177c478bd9Sstevel@tonic-gate echo '};' >>opcodes.c 2187c478bd9Sstevel@tonic-gate 2197c478bd9Sstevel@tonic-gateopcodes.h: $(TOP)/src/vdbe.h 2207c478bd9Sstevel@tonic-gate echo '/* Automatically generated file. Do not edit */' >opcodes.h 2217c478bd9Sstevel@tonic-gate grep '^case OP_' $(TOP)/src/vdbe.c | \ 2227c478bd9Sstevel@tonic-gate sed -e 's/://' | \ 2237c478bd9Sstevel@tonic-gate awk '{printf "#define %-30s %3d\n", $$2, ++cnt}' >>opcodes.h 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gateos.o: $(TOP)/src/os.c $(HDR) 2267c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/os.c 2277c478bd9Sstevel@tonic-gate 2287c478bd9Sstevel@tonic-gateparse.o: parse.c $(HDR) 2297c478bd9Sstevel@tonic-gate $(TCCX) -c parse.c 2307c478bd9Sstevel@tonic-gate 2317c478bd9Sstevel@tonic-gateparse.h: parse.c 2327c478bd9Sstevel@tonic-gate 2337c478bd9Sstevel@tonic-gateparse.c: $(TOP)/src/parse.y lemon 2347c478bd9Sstevel@tonic-gate cp $(TOP)/src/parse.y . 2357c478bd9Sstevel@tonic-gate ./lemon parse.y 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gate# The config.h file will contain a single #define that tells us how 2387c478bd9Sstevel@tonic-gate# many bytes are in a pointer. This only works if a pointer is the 2397c478bd9Sstevel@tonic-gate# same size on the host as it is on the target. If you are cross-compiling 2407c478bd9Sstevel@tonic-gate# to a target with a different pointer size, you'll need to manually 2417c478bd9Sstevel@tonic-gate# configure the config.h file. 2427c478bd9Sstevel@tonic-gate# 2437c478bd9Sstevel@tonic-gateconfig.h: 2447c478bd9Sstevel@tonic-gate echo '#include <stdio.h>' >temp.c 2457c478bd9Sstevel@tonic-gate echo 'int main(){printf(' >>temp.c 2467c478bd9Sstevel@tonic-gate echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c 2477c478bd9Sstevel@tonic-gate echo 'exit(0);}' >>temp.c 2487c478bd9Sstevel@tonic-gate $(BCC) -o temp temp.c 2497c478bd9Sstevel@tonic-gate ./temp >config.h 2507c478bd9Sstevel@tonic-gate echo >>config.h 2517c478bd9Sstevel@tonic-gate rm -f temp.c temp 2527c478bd9Sstevel@tonic-gate 2537c478bd9Sstevel@tonic-gatesqlite.h: $(TOP)/src/sqlite.h.in 2547c478bd9Sstevel@tonic-gate sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ 2557c478bd9Sstevel@tonic-gate -e s/--ENCODING--/$(ENCODING)/ \ 2567c478bd9Sstevel@tonic-gate $(TOP)/src/sqlite.h.in >sqlite.h 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gatetokenize.o: $(TOP)/src/tokenize.c $(HDR) 2597c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/tokenize.c 2607c478bd9Sstevel@tonic-gate 2617c478bd9Sstevel@tonic-gatetrigger.o: $(TOP)/src/trigger.c $(HDR) 2627c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/trigger.c 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gateutil.o: $(TOP)/src/util.c $(HDR) 2657c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/util.c 2667c478bd9Sstevel@tonic-gate 2677c478bd9Sstevel@tonic-gatevacuum.o: $(TOP)/src/vacuum.c $(HDR) 2687c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/vacuum.c 2697c478bd9Sstevel@tonic-gate 2707c478bd9Sstevel@tonic-gatevdbe.o: $(TOP)/src/vdbe.c $(VDBEHDR) 2717c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/vdbe.c 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gatevdbeaux.o: $(TOP)/src/vdbeaux.c $(VDBEHDR) 2747c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/vdbeaux.c 2757c478bd9Sstevel@tonic-gate 2767c478bd9Sstevel@tonic-gatewhere.o: $(TOP)/src/where.c $(HDR) 2777c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/where.c 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gatecopy.o: $(TOP)/src/copy.c $(HDR) 2807c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/copy.c 2817c478bd9Sstevel@tonic-gate 2827c478bd9Sstevel@tonic-gatedate.o: $(TOP)/src/date.c $(HDR) 2837c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/date.c 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gatedelete.o: $(TOP)/src/delete.c $(HDR) 2867c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/delete.c 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gateencode.o: $(TOP)/src/encode.c 2897c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/encode.c 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gateexpr.o: $(TOP)/src/expr.c $(HDR) 2927c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/expr.c 2937c478bd9Sstevel@tonic-gate 2947c478bd9Sstevel@tonic-gatefunc.o: $(TOP)/src/func.c $(HDR) 2957c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/func.c 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gatehash.o: $(TOP)/src/hash.c $(HDR) 2987c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/hash.c 2997c478bd9Sstevel@tonic-gate 3007c478bd9Sstevel@tonic-gateinsert.o: $(TOP)/src/insert.c $(HDR) 3017c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/insert.c 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gaterandom.o: $(TOP)/src/random.c $(HDR) 3047c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/random.c 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gateselect.o: $(TOP)/src/select.c $(HDR) 3077c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/select.c 3087c478bd9Sstevel@tonic-gate 3097c478bd9Sstevel@tonic-gatetable.o: $(TOP)/src/table.c $(HDR) 3107c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/table.c 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gateupdate.o: $(TOP)/src/update.c $(HDR) 3137c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/update.c 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gatetclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) 3167c478bd9Sstevel@tonic-gate $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c 3177c478bd9Sstevel@tonic-gate 3187c478bd9Sstevel@tonic-gatepragma.o: $(TOP)/src/pragma.c $(HDR) 3197c478bd9Sstevel@tonic-gate $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/pragma.c 3207c478bd9Sstevel@tonic-gate 3217c478bd9Sstevel@tonic-gateprintf.o: $(TOP)/src/printf.c $(HDR) 3227c478bd9Sstevel@tonic-gate $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/printf.c 3237c478bd9Sstevel@tonic-gate 3247c478bd9Sstevel@tonic-gateattach.o: $(TOP)/src/attach.c $(HDR) 3257c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/attach.c 3267c478bd9Sstevel@tonic-gate 3277c478bd9Sstevel@tonic-gateauth.o: $(TOP)/src/auth.c $(HDR) 3287c478bd9Sstevel@tonic-gate $(TCCX) -c $(TOP)/src/auth.c 3297c478bd9Sstevel@tonic-gate 3307c478bd9Sstevel@tonic-gatetclsqlite: $(TOP)/src/tclsqlite.c libsqlite.a 3317c478bd9Sstevel@tonic-gate $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite \ 3327c478bd9Sstevel@tonic-gate $(TOP)/src/tclsqlite.c libsqlite.a $(LIBTCL) 3337c478bd9Sstevel@tonic-gate 3347c478bd9Sstevel@tonic-gatetestfixture$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) 3357c478bd9Sstevel@tonic-gate $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1 -o testfixture$(EXE) \ 3367c478bd9Sstevel@tonic-gate $(TESTSRC) $(TOP)/src/tclsqlite.c \ 3377c478bd9Sstevel@tonic-gate libsqlite.a $(LIBTCL) $(THREADLIB) 3387c478bd9Sstevel@tonic-gate 3397c478bd9Sstevel@tonic-gatefulltest: testfixture$(EXE) sqlite$(EXE) 3407c478bd9Sstevel@tonic-gate ./testfixture$(EXE) $(TOP)/test/all.test 3417c478bd9Sstevel@tonic-gate 3427c478bd9Sstevel@tonic-gatetest: testfixture$(EXE) sqlite$(EXE) 3437c478bd9Sstevel@tonic-gate ./testfixture$(EXE) $(TOP)/test/quick.test 3447c478bd9Sstevel@tonic-gate 3457c478bd9Sstevel@tonic-gateindex.html: $(TOP)/www/index.tcl last_change 3467c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/index.tcl `cat $(TOP)/VERSION` >index.html 3477c478bd9Sstevel@tonic-gate 3487c478bd9Sstevel@tonic-gatesqlite.html: $(TOP)/www/sqlite.tcl 3497c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/sqlite.tcl >sqlite.html 3507c478bd9Sstevel@tonic-gate 3517c478bd9Sstevel@tonic-gatec_interface.html: $(TOP)/www/c_interface.tcl 3527c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/c_interface.tcl >c_interface.html 3537c478bd9Sstevel@tonic-gate 3547c478bd9Sstevel@tonic-gatechanges.html: $(TOP)/www/changes.tcl 3557c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/changes.tcl >changes.html 3567c478bd9Sstevel@tonic-gate 3577c478bd9Sstevel@tonic-gatelang.html: $(TOP)/www/lang.tcl 3587c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/lang.tcl >lang.html 3597c478bd9Sstevel@tonic-gate 3607c478bd9Sstevel@tonic-gatevdbe.html: $(TOP)/www/vdbe.tcl 3617c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/vdbe.tcl >vdbe.html 3627c478bd9Sstevel@tonic-gate 3637c478bd9Sstevel@tonic-gatearch.html: $(TOP)/www/arch.tcl 3647c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/arch.tcl >arch.html 3657c478bd9Sstevel@tonic-gate 3667c478bd9Sstevel@tonic-gatearch.png: $(TOP)/www/arch.png 3677c478bd9Sstevel@tonic-gate cp $(TOP)/www/arch.png . 3687c478bd9Sstevel@tonic-gate 3697c478bd9Sstevel@tonic-gateopcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c 3707c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gatemingw.html: $(TOP)/www/mingw.tcl 3737c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/mingw.tcl >mingw.html 3747c478bd9Sstevel@tonic-gate 3757c478bd9Sstevel@tonic-gatetclsqlite.html: $(TOP)/www/tclsqlite.tcl 3767c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html 3777c478bd9Sstevel@tonic-gate 3787c478bd9Sstevel@tonic-gatespeed.html: $(TOP)/www/speed.tcl 3797c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/speed.tcl >speed.html 3807c478bd9Sstevel@tonic-gate 3817c478bd9Sstevel@tonic-gatefaq.html: $(TOP)/www/faq.tcl 3827c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/faq.tcl >faq.html 3837c478bd9Sstevel@tonic-gate 3847c478bd9Sstevel@tonic-gateformatchng.html: $(TOP)/www/formatchng.tcl 3857c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/formatchng.tcl >formatchng.html 3867c478bd9Sstevel@tonic-gate 3877c478bd9Sstevel@tonic-gateconflict.html: $(TOP)/www/conflict.tcl 3887c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/conflict.tcl >conflict.html 3897c478bd9Sstevel@tonic-gate 3907c478bd9Sstevel@tonic-gatedownload.html: $(TOP)/www/download.tcl 3917c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/download.tcl >download.html 3927c478bd9Sstevel@tonic-gate 3937c478bd9Sstevel@tonic-gateomitted.html: $(TOP)/www/omitted.tcl 3947c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/omitted.tcl >omitted.html 3957c478bd9Sstevel@tonic-gate 3967c478bd9Sstevel@tonic-gatedatatypes.html: $(TOP)/www/datatypes.tcl 3977c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/datatypes.tcl >datatypes.html 3987c478bd9Sstevel@tonic-gate 3997c478bd9Sstevel@tonic-gatequickstart.html: $(TOP)/www/quickstart.tcl 4007c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/quickstart.tcl >quickstart.html 4017c478bd9Sstevel@tonic-gate 4027c478bd9Sstevel@tonic-gatefileformat.html: $(TOP)/www/fileformat.tcl 4037c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/fileformat.tcl >fileformat.html 4047c478bd9Sstevel@tonic-gate 4057c478bd9Sstevel@tonic-gatenulls.html: $(TOP)/www/nulls.tcl 4067c478bd9Sstevel@tonic-gate tclsh $(TOP)/www/nulls.tcl >nulls.html 4077c478bd9Sstevel@tonic-gate 4087c478bd9Sstevel@tonic-gate 4097c478bd9Sstevel@tonic-gate# Files to be published on the website. 4107c478bd9Sstevel@tonic-gate# 4117c478bd9Sstevel@tonic-gateDOC = \ 4127c478bd9Sstevel@tonic-gate index.html \ 4137c478bd9Sstevel@tonic-gate sqlite.html \ 4147c478bd9Sstevel@tonic-gate changes.html \ 4157c478bd9Sstevel@tonic-gate lang.html \ 4167c478bd9Sstevel@tonic-gate opcode.html \ 4177c478bd9Sstevel@tonic-gate arch.html \ 4187c478bd9Sstevel@tonic-gate arch.png \ 4197c478bd9Sstevel@tonic-gate vdbe.html \ 4207c478bd9Sstevel@tonic-gate c_interface.html \ 4217c478bd9Sstevel@tonic-gate mingw.html \ 4227c478bd9Sstevel@tonic-gate tclsqlite.html \ 4237c478bd9Sstevel@tonic-gate download.html \ 4247c478bd9Sstevel@tonic-gate speed.html \ 4257c478bd9Sstevel@tonic-gate faq.html \ 4267c478bd9Sstevel@tonic-gate formatchng.html \ 4277c478bd9Sstevel@tonic-gate conflict.html \ 4287c478bd9Sstevel@tonic-gate omitted.html \ 4297c478bd9Sstevel@tonic-gate datatypes.html \ 4307c478bd9Sstevel@tonic-gate quickstart.html \ 4317c478bd9Sstevel@tonic-gate fileformat.html \ 4327c478bd9Sstevel@tonic-gate nulls.html 4337c478bd9Sstevel@tonic-gate 4347c478bd9Sstevel@tonic-gatedoc: $(DOC) 4357c478bd9Sstevel@tonic-gate mkdir -p doc 4367c478bd9Sstevel@tonic-gate mv $(DOC) doc 4377c478bd9Sstevel@tonic-gate 4387c478bd9Sstevel@tonic-gateinstall: sqlite libsqlite.a sqlite.h 4397c478bd9Sstevel@tonic-gate mv sqlite /usr/bin 4407c478bd9Sstevel@tonic-gate mv libsqlite.a /usr/lib 4417c478bd9Sstevel@tonic-gate mv sqlite.h /usr/include 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gateclean: 4447c478bd9Sstevel@tonic-gate rm -f *.o sqlite libsqlite.a sqlite.h opcodes.* 4457c478bd9Sstevel@tonic-gate rm -f lemon lempar.c parse.* sqlite*.tar.gz 4467c478bd9Sstevel@tonic-gate rm -f $(PUBLISH) 4477c478bd9Sstevel@tonic-gate rm -f *.da *.bb *.bbg gmon.out 4487c478bd9Sstevel@tonic-gate rm -rf tsrc 449