drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 1 | ############################################################################### |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 2 | # The following macros should be defined before this script is |
| 3 | # invoked: |
| 4 | # |
| 5 | # TOP The toplevel directory of the source tree. This is the |
| 6 | # directory that contains this "Makefile.in" and the |
| 7 | # "configure.in" script. |
| 8 | # |
| 9 | # BCC C Compiler and options for use in building executables that |
| 10 | # will run on the platform that is doing the build. |
| 11 | # |
| 12 | # USLEEP If the target operating system supports the "usleep()" system |
| 13 | # call, then define the HAVE_USLEEP macro for all C modules. |
| 14 | # |
| 15 | # THREADSAFE If you want the SQLite library to be safe for use within a |
| 16 | # multi-threaded program, then define the following macro |
| 17 | # appropriately: |
| 18 | # |
| 19 | # THREADLIB Specify any extra linker options needed to make the library |
| 20 | # thread safe |
| 21 | # |
| 22 | # OPTS Extra compiler command-line options. |
| 23 | # |
| 24 | # EXE The suffix to add to executable files. ".exe" for windows |
| 25 | # and "" for Unix. |
| 26 | # |
| 27 | # TCC C Compiler and options for use in building executables that |
| 28 | # will run on the target platform. This is usually the same |
| 29 | # as BCC, unless you are cross-compiling. |
| 30 | # |
| 31 | # AR Tools used to build a static library. |
| 32 | # RANLIB |
| 33 | # |
| 34 | # TCL_FLAGS Extra compiler options needed for programs that use the |
| 35 | # TCL library. |
| 36 | # |
| 37 | # LIBTCL Linker options needed to link against the TCL library. |
| 38 | # |
| 39 | # READLINE_FLAGS Compiler options needed for programs that use the |
| 40 | # readline() library. |
| 41 | # |
| 42 | # LIBREADLINE Linker options needed by programs using readline() must |
| 43 | # link against. |
| 44 | # |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 45 | # NAWK Nawk compatible awk program. Older (obsolete?) solaris |
| 46 | # systems need this to avoid using the original AT&T AWK. |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 47 | # |
| 48 | # Once the macros above are defined, the rest of this make script will |
| 49 | # build the SQLite library and testing tools. |
| 50 | ################################################################################ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 51 | |
| 52 | # This is how we compile |
| 53 | # |
drh | a297b5c | 2002-01-15 18:39:43 +0000 | [diff] [blame] | 54 | TCCX = $(TCC) $(OPTS) $(THREADSAFE) $(USLEEP) -I. -I$(TOP)/src |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 55 | |
| 56 | # Object files for the SQLite library. |
| 57 | # |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 58 | LIBOBJ+= alter.o analyze.o attach.o auth.o btree.o build.o \ |
drh | a2b902d | 2005-08-14 17:53:20 +0000 | [diff] [blame] | 59 | callback.o complete.o date.o delete.o \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 60 | expr.o func.o hash.o insert.o loadext.o \ |
drh | 4c3645c | 2007-08-15 17:07:57 +0000 | [diff] [blame] | 61 | main.o malloc.o mem1.o mem2.o mutex.o \ |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 62 | opcodes.o os.o os_os2.o os_unix.o os_win.o \ |
danielk1977 | fa256a3 | 2005-05-25 04:11:56 +0000 | [diff] [blame] | 63 | pager.o parse.o pragma.o prepare.o printf.o random.o \ |
drh | 38f8271 | 2004-06-18 17:10:16 +0000 | [diff] [blame] | 64 | select.o table.o tclsqlite.o tokenize.o trigger.o \ |
| 65 | update.o util.o vacuum.o \ |
danielk1977 | b4e9af9 | 2007-05-01 17:49:49 +0000 | [diff] [blame] | 66 | vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbefifo.o vdbemem.o \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 67 | where.o utf.o legacy.o vtab.o |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 68 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame^] | 69 | EXTOBJ = icu.o |
| 70 | EXTOBJ += fts1.o \ |
| 71 | fts1_hash.o \ |
| 72 | fts1_tokenizer1.o \ |
| 73 | fts1_porter.o |
| 74 | EXTOBJ += fts2.o \ |
| 75 | fts2_hash.o \ |
| 76 | fts2_icu.o \ |
| 77 | fts2_porter.o \ |
| 78 | fts2_tokenizer.o \ |
| 79 | fts2_tokenizer1.o |
| 80 | EXTOBJ += fts3.o \ |
| 81 | fts3_hash.o \ |
| 82 | fts3_icu.o \ |
| 83 | fts3_porter.o \ |
| 84 | fts3_tokenizer.o \ |
| 85 | fts3_tokenizer1.o |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 86 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 87 | # All of the source code files. |
| 88 | # |
| 89 | SRC = \ |
drh | d0e4a6c | 2005-02-15 20:47:57 +0000 | [diff] [blame] | 90 | $(TOP)/src/alter.c \ |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 91 | $(TOP)/src/analyze.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 92 | $(TOP)/src/attach.c \ |
drh | ed6c867 | 2003-01-12 18:02:16 +0000 | [diff] [blame] | 93 | $(TOP)/src/auth.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 94 | $(TOP)/src/btree.c \ |
| 95 | $(TOP)/src/btree.h \ |
| 96 | $(TOP)/src/build.c \ |
danielk1977 | fd9a0a4 | 2005-05-24 12:01:00 +0000 | [diff] [blame] | 97 | $(TOP)/src/callback.c \ |
drh | a2b902d | 2005-08-14 17:53:20 +0000 | [diff] [blame] | 98 | $(TOP)/src/complete.c \ |
drh | 7014aff | 2003-11-01 01:53:53 +0000 | [diff] [blame] | 99 | $(TOP)/src/date.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 100 | $(TOP)/src/delete.c \ |
| 101 | $(TOP)/src/expr.c \ |
drh | dc04c58 | 2002-02-24 01:55:15 +0000 | [diff] [blame] | 102 | $(TOP)/src/func.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 103 | $(TOP)/src/hash.c \ |
| 104 | $(TOP)/src/hash.h \ |
| 105 | $(TOP)/src/insert.c \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 106 | $(TOP)/src/legacy.c \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 107 | $(TOP)/src/loadext.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 108 | $(TOP)/src/main.c \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 109 | $(TOP)/src/malloc.c \ |
drh | 4c3645c | 2007-08-15 17:07:57 +0000 | [diff] [blame] | 110 | $(TOP)/src/mem1.c \ |
| 111 | $(TOP)/src/mem2.c \ |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 112 | $(TOP)/src/mutex.c \ |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 113 | $(TOP)/src/os.c \ |
drh | 60a1e4b | 2006-06-03 18:02:15 +0000 | [diff] [blame] | 114 | $(TOP)/src/os_os2.c \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 115 | $(TOP)/src/os_unix.c \ |
| 116 | $(TOP)/src/os_win.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 117 | $(TOP)/src/pager.c \ |
| 118 | $(TOP)/src/pager.h \ |
| 119 | $(TOP)/src/parse.y \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 120 | $(TOP)/src/pragma.c \ |
danielk1977 | fa256a3 | 2005-05-25 04:11:56 +0000 | [diff] [blame] | 121 | $(TOP)/src/prepare.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 122 | $(TOP)/src/printf.c \ |
| 123 | $(TOP)/src/random.c \ |
| 124 | $(TOP)/src/select.c \ |
| 125 | $(TOP)/src/shell.c \ |
| 126 | $(TOP)/src/sqlite.h.in \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 127 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 128 | $(TOP)/src/sqliteInt.h \ |
| 129 | $(TOP)/src/table.c \ |
| 130 | $(TOP)/src/tclsqlite.c \ |
| 131 | $(TOP)/src/tokenize.c \ |
drh | dc37945 | 2002-05-15 12:45:43 +0000 | [diff] [blame] | 132 | $(TOP)/src/trigger.c \ |
drh | 1bbf5ee | 2004-05-11 01:18:24 +0000 | [diff] [blame] | 133 | $(TOP)/src/utf.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 134 | $(TOP)/src/update.c \ |
| 135 | $(TOP)/src/util.c \ |
drh | e1051c6 | 2003-04-06 20:52:32 +0000 | [diff] [blame] | 136 | $(TOP)/src/vacuum.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 137 | $(TOP)/src/vdbe.c \ |
| 138 | $(TOP)/src/vdbe.h \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 139 | $(TOP)/src/vdbeapi.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 140 | $(TOP)/src/vdbeaux.c \ |
danielk1977 | b4e9af9 | 2007-05-01 17:49:49 +0000 | [diff] [blame] | 141 | $(TOP)/src/vdbeblob.c \ |
drh | a01f79d | 2005-07-08 13:07:59 +0000 | [diff] [blame] | 142 | $(TOP)/src/vdbefifo.c \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 143 | $(TOP)/src/vdbemem.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 144 | $(TOP)/src/vdbeInt.h \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 145 | $(TOP)/src/vtab.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 146 | $(TOP)/src/where.c |
| 147 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 148 | # Source code for extensions |
| 149 | # |
| 150 | SRC += \ |
| 151 | $(TOP)/ext/fts1/fts1.c \ |
| 152 | $(TOP)/ext/fts1/fts1.h \ |
| 153 | $(TOP)/ext/fts1/fts1_hash.c \ |
| 154 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 155 | $(TOP)/ext/fts1/fts1_porter.c \ |
| 156 | $(TOP)/ext/fts1/fts1_tokenizer.h \ |
| 157 | $(TOP)/ext/fts1/fts1_tokenizer1.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 158 | SRC += \ |
| 159 | $(TOP)/ext/fts2/fts2.c \ |
| 160 | $(TOP)/ext/fts2/fts2.h \ |
| 161 | $(TOP)/ext/fts2/fts2_hash.c \ |
| 162 | $(TOP)/ext/fts2/fts2_hash.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 163 | $(TOP)/ext/fts2/fts2_icu.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 164 | $(TOP)/ext/fts2/fts2_porter.c \ |
| 165 | $(TOP)/ext/fts2/fts2_tokenizer.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 166 | $(TOP)/ext/fts2/fts2_tokenizer.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 167 | $(TOP)/ext/fts2/fts2_tokenizer1.c |
danielk1977 | 08ada51 | 2007-06-26 10:56:40 +0000 | [diff] [blame] | 168 | SRC += \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame^] | 169 | $(TOP)/ext/fts3/fts3.c \ |
| 170 | $(TOP)/ext/fts3/fts3.h \ |
| 171 | $(TOP)/ext/fts3/fts3_hash.c \ |
| 172 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 173 | $(TOP)/ext/fts3/fts3_icu.c \ |
| 174 | $(TOP)/ext/fts3/fts3_porter.c \ |
| 175 | $(TOP)/ext/fts3/fts3_tokenizer.h \ |
| 176 | $(TOP)/ext/fts3/fts3_tokenizer.c \ |
| 177 | $(TOP)/ext/fts3/fts3_tokenizer1.c |
| 178 | SRC += \ |
danielk1977 | 08ada51 | 2007-06-26 10:56:40 +0000 | [diff] [blame] | 179 | $(TOP)/ext/icu/icu.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 180 | |
danielk1977 | 77b03a2 | 2007-06-20 08:49:05 +0000 | [diff] [blame] | 181 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 182 | # Generated source code files |
| 183 | # |
| 184 | SRC += \ |
| 185 | keywordhash.h \ |
| 186 | opcodes.c \ |
| 187 | opcodes.h \ |
| 188 | parse.c \ |
| 189 | parse.h \ |
| 190 | sqlite3.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 191 | |
| 192 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 193 | # Source code to the test files. |
| 194 | # |
drh | b6f4148 | 2004-05-14 01:58:11 +0000 | [diff] [blame] | 195 | TESTSRC = \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 196 | $(TOP)/src/btree.c \ |
drh | 6c62608 | 2004-11-14 21:56:29 +0000 | [diff] [blame] | 197 | $(TOP)/src/date.c \ |
drh | 74587e5 | 2002-08-13 00:01:16 +0000 | [diff] [blame] | 198 | $(TOP)/src/func.c \ |
danielk1977 | b4622b6 | 2007-03-02 06:24:19 +0000 | [diff] [blame] | 199 | $(TOP)/src/insert.c \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 200 | $(TOP)/src/malloc.c \ |
danielk1977 | 161fb79 | 2006-01-24 10:58:21 +0000 | [diff] [blame] | 201 | $(TOP)/src/os.c \ |
drh | 60a1e4b | 2006-06-03 18:02:15 +0000 | [diff] [blame] | 202 | $(TOP)/src/os_os2.c \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 203 | $(TOP)/src/os_unix.c \ |
| 204 | $(TOP)/src/os_win.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 205 | $(TOP)/src/pager.c \ |
drh | 998da3a | 2004-06-19 15:22:56 +0000 | [diff] [blame] | 206 | $(TOP)/src/pragma.c \ |
drh | 38f8271 | 2004-06-18 17:10:16 +0000 | [diff] [blame] | 207 | $(TOP)/src/printf.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 208 | $(TOP)/src/test1.c \ |
| 209 | $(TOP)/src/test2.c \ |
| 210 | $(TOP)/src/test3.c \ |
drh | a6064dc | 2003-12-19 02:52:05 +0000 | [diff] [blame] | 211 | $(TOP)/src/test4.c \ |
danielk1977 | 4adee20 | 2004-05-08 08:23:19 +0000 | [diff] [blame] | 212 | $(TOP)/src/test5.c \ |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 213 | $(TOP)/src/test6.c \ |
drh | 29c636b | 2006-01-09 23:40:25 +0000 | [diff] [blame] | 214 | $(TOP)/src/test7.c \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 215 | $(TOP)/src/test8.c \ |
danielk1977 | a713f2c | 2007-03-29 12:19:11 +0000 | [diff] [blame] | 216 | $(TOP)/src/test9.c \ |
drh | 1409be6 | 2006-08-23 20:07:20 +0000 | [diff] [blame] | 217 | $(TOP)/src/test_autoext.c \ |
drh | 2366940 | 2006-01-09 17:29:52 +0000 | [diff] [blame] | 218 | $(TOP)/src/test_async.c \ |
drh | 16a9b83 | 2007-05-05 18:39:25 +0000 | [diff] [blame] | 219 | $(TOP)/src/test_btree.c \ |
drh | c797d4d | 2007-05-08 01:08:49 +0000 | [diff] [blame] | 220 | $(TOP)/src/test_config.c \ |
drh | 1592659 | 2007-04-06 15:02:13 +0000 | [diff] [blame] | 221 | $(TOP)/src/test_hexio.c \ |
drh | 2f999a6 | 2007-08-15 19:16:43 +0000 | [diff] [blame] | 222 | $(TOP)/src/test_malloc.c \ |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 223 | $(TOP)/src/test_md5.c \ |
danielk1977 | 954ce99 | 2006-06-15 15:59:19 +0000 | [diff] [blame] | 224 | $(TOP)/src/test_schema.c \ |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 225 | $(TOP)/src/test_server.c \ |
drh | 4be8b51 | 2006-06-13 23:51:34 +0000 | [diff] [blame] | 226 | $(TOP)/src/test_tclvar.c \ |
drh | 38f8271 | 2004-06-18 17:10:16 +0000 | [diff] [blame] | 227 | $(TOP)/src/utf.c \ |
drh | ed6b3eb | 2004-09-08 21:12:50 +0000 | [diff] [blame] | 228 | $(TOP)/src/util.c \ |
drh | f603871 | 2004-02-08 18:07:34 +0000 | [diff] [blame] | 229 | $(TOP)/src/vdbe.c \ |
drh | 29a0138 | 2006-08-13 19:04:18 +0000 | [diff] [blame] | 230 | $(TOP)/src/vdbeaux.c \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame^] | 231 | $(TOP)/src/where.c |
| 232 | TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c |
| 233 | TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 234 | |
| 235 | # Header files used by all library source files. |
| 236 | # |
| 237 | HDR = \ |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 238 | sqlite3.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 239 | $(TOP)/src/btree.h \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 240 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 241 | $(TOP)/src/hash.h \ |
drh | c551dd8 | 2007-06-19 15:23:48 +0000 | [diff] [blame] | 242 | $(TOP)/src/sqliteLimit.h \ |
drh | 8f619cc | 2002-09-08 00:04:50 +0000 | [diff] [blame] | 243 | opcodes.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 244 | $(TOP)/src/os.h \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 245 | $(TOP)/src/os_common.h \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 246 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 247 | $(TOP)/src/sqliteInt.h \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 248 | $(TOP)/src/vdbe.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 249 | parse.h |
| 250 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 251 | # Header files used by extensions |
| 252 | # |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 253 | EXTHDR += \ |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 254 | $(TOP)/ext/fts1/fts1.h \ |
| 255 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 256 | $(TOP)/ext/fts1/fts1_tokenizer.h |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 257 | EXTHDR += \ |
| 258 | $(TOP)/ext/fts2/fts2.h \ |
| 259 | $(TOP)/ext/fts2/fts2_hash.h \ |
| 260 | $(TOP)/ext/fts2/fts2_tokenizer.h |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame^] | 261 | EXTHDR += \ |
| 262 | $(TOP)/ext/fts3/fts3.h \ |
| 263 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 264 | $(TOP)/ext/fts3/fts3_tokenizer.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 265 | |
| 266 | |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 267 | # Header files used by the VDBE submodule |
| 268 | # |
| 269 | VDBEHDR = \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 270 | $(TOP)/src/vdbeInt.h |
| 271 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 272 | # This is the default Makefile target. The objects listed here |
| 273 | # are what get build when you type just "make" with no arguments. |
| 274 | # |
drh | 97903fe | 2005-05-24 20:19:57 +0000 | [diff] [blame] | 275 | all: sqlite3.h libsqlite3.a sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 276 | |
| 277 | # Generate the file "last_change" which contains the date of change |
| 278 | # of the most recently modified source code file |
| 279 | # |
| 280 | last_change: $(SRC) |
drh | 0c07fb9 | 2006-06-27 20:05:23 +0000 | [diff] [blame] | 281 | cat $(SRC) | grep '$$Id: ' | sort -k 5 | tail -1 \ |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 282 | | $(NAWK) '{print $$5,$$6}' >last_change |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 283 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 284 | libsqlite3.a: $(LIBOBJ) $(EXTOBJ) |
| 285 | $(AR) libsqlite3.a $(LIBOBJ) $(EXTOBJ) |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 286 | $(RANLIB) libsqlite3.a |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 287 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 288 | sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h |
danielk1977 | 77b03a2 | 2007-06-20 08:49:05 +0000 | [diff] [blame] | 289 | $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \ |
danielk1977 | 08ada51 | 2007-06-26 10:56:40 +0000 | [diff] [blame] | 290 | $(TOP)/src/shell.c \ |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 291 | libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 292 | |
danielk1977 | 4adee20 | 2004-05-08 08:23:19 +0000 | [diff] [blame] | 293 | objects: $(LIBOBJ_ORIG) |
| 294 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 295 | # This target creates a directory named "tsrc" and fills it with |
| 296 | # copies of all of the C source code and header files needed to |
| 297 | # build on the target system. Some of the C source code and header |
| 298 | # files are automatically generated. This target takes care of |
| 299 | # all that automatic generation. |
| 300 | # |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 301 | target_source: $(SRC) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 302 | rm -rf tsrc |
| 303 | mkdir tsrc |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 304 | cp -f $(SRC) $(TOP)/src/*.h tsrc 2>/dev/null |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 305 | rm tsrc/sqlite.h.in tsrc/parse.y |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 306 | |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 307 | sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl |
| 308 | tclsh $(TOP)/tool/mksqlite3c.tcl |
drh | bd08af4 | 2007-04-05 21:58:33 +0000 | [diff] [blame] | 309 | cp sqlite3.c tclsqlite3.c |
| 310 | cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c |
| 311 | tclsh $(TOP)/tool/mksqlite3internalh.tcl |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 312 | |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 313 | fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl |
| 314 | tclsh $(TOP)/ext/fts2/mkfts2amal.tcl |
| 315 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame^] | 316 | fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl |
| 317 | tclsh $(TOP)/ext/fts3/mkfts3amal.tcl |
| 318 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 319 | # Rules to build the LEMON compiler generator |
| 320 | # |
| 321 | lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c |
| 322 | $(BCC) -o lemon $(TOP)/tool/lemon.c |
| 323 | cp $(TOP)/tool/lempar.c . |
| 324 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 325 | # Rules to build individual files |
| 326 | # |
drh | d0e4a6c | 2005-02-15 20:47:57 +0000 | [diff] [blame] | 327 | alter.o: $(TOP)/src/alter.c $(HDR) |
| 328 | $(TCCX) -c $(TOP)/src/alter.c |
| 329 | |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 330 | analyze.o: $(TOP)/src/analyze.c $(HDR) |
| 331 | $(TCCX) -c $(TOP)/src/analyze.c |
| 332 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 333 | attach.o: $(TOP)/src/attach.c $(HDR) |
| 334 | $(TCCX) -c $(TOP)/src/attach.c |
| 335 | |
| 336 | auth.o: $(TOP)/src/auth.c $(HDR) |
| 337 | $(TCCX) -c $(TOP)/src/auth.c |
| 338 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 339 | btree.o: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h |
| 340 | $(TCCX) -c $(TOP)/src/btree.c |
| 341 | |
| 342 | build.o: $(TOP)/src/build.c $(HDR) |
| 343 | $(TCCX) -c $(TOP)/src/build.c |
| 344 | |
danielk1977 | fd9a0a4 | 2005-05-24 12:01:00 +0000 | [diff] [blame] | 345 | callback.o: $(TOP)/src/callback.c $(HDR) |
| 346 | $(TCCX) -c $(TOP)/src/callback.c |
| 347 | |
drh | a2b902d | 2005-08-14 17:53:20 +0000 | [diff] [blame] | 348 | complete.o: $(TOP)/src/complete.c $(HDR) |
| 349 | $(TCCX) -c $(TOP)/src/complete.c |
| 350 | |
drh | 7014aff | 2003-11-01 01:53:53 +0000 | [diff] [blame] | 351 | date.o: $(TOP)/src/date.c $(HDR) |
| 352 | $(TCCX) -c $(TOP)/src/date.c |
| 353 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 354 | delete.o: $(TOP)/src/delete.c $(HDR) |
| 355 | $(TCCX) -c $(TOP)/src/delete.c |
| 356 | |
| 357 | expr.o: $(TOP)/src/expr.c $(HDR) |
| 358 | $(TCCX) -c $(TOP)/src/expr.c |
| 359 | |
drh | dc04c58 | 2002-02-24 01:55:15 +0000 | [diff] [blame] | 360 | func.o: $(TOP)/src/func.c $(HDR) |
| 361 | $(TCCX) -c $(TOP)/src/func.c |
| 362 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 363 | hash.o: $(TOP)/src/hash.c $(HDR) |
| 364 | $(TCCX) -c $(TOP)/src/hash.c |
| 365 | |
| 366 | insert.o: $(TOP)/src/insert.c $(HDR) |
| 367 | $(TCCX) -c $(TOP)/src/insert.c |
| 368 | |
danielk1977 | 22322fd | 2004-05-25 23:35:17 +0000 | [diff] [blame] | 369 | legacy.o: $(TOP)/src/legacy.c $(HDR) |
| 370 | $(TCCX) -c $(TOP)/src/legacy.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 371 | |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 372 | loadext.o: $(TOP)/src/loadext.c $(HDR) |
| 373 | $(TCCX) -c $(TOP)/src/loadext.c |
| 374 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 375 | main.o: $(TOP)/src/main.c $(HDR) |
| 376 | $(TCCX) -c $(TOP)/src/main.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 377 | |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 378 | malloc.o: $(TOP)/src/malloc.c $(HDR) |
| 379 | $(TCCX) -c $(TOP)/src/malloc.c |
| 380 | |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 381 | mem1.o: $(TOP)/src/mem1.c $(HDR) |
| 382 | $(TCCX) -c $(TOP)/src/mem1.c |
| 383 | |
drh | 4c3645c | 2007-08-15 17:07:57 +0000 | [diff] [blame] | 384 | mem2.o: $(TOP)/src/mem2.c $(HDR) |
| 385 | $(TCCX) -c $(TOP)/src/mem2.c |
| 386 | |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 387 | mutex.o: $(TOP)/src/mutex.c $(HDR) |
| 388 | $(TCCX) -c $(TOP)/src/mutex.c |
| 389 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 390 | pager.o: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h |
| 391 | $(TCCX) -c $(TOP)/src/pager.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 392 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 393 | opcodes.o: opcodes.c |
| 394 | $(TCCX) -c opcodes.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 395 | |
drh | b327f77 | 2004-10-06 15:03:57 +0000 | [diff] [blame] | 396 | opcodes.c: opcodes.h $(TOP)/mkopcodec.awk |
drh | 0c07fb9 | 2006-06-27 20:05:23 +0000 | [diff] [blame] | 397 | sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 398 | |
drh | f2bc013 | 2004-10-04 13:19:23 +0000 | [diff] [blame] | 399 | opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 400 | cat parse.h $(TOP)/src/vdbe.c | $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 401 | |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 402 | os.o: $(TOP)/src/os.c $(HDR) |
| 403 | $(TCCX) -c $(TOP)/src/os.c |
| 404 | |
drh | 60a1e4b | 2006-06-03 18:02:15 +0000 | [diff] [blame] | 405 | os_os2.o: $(TOP)/src/os_os2.c $(HDR) |
| 406 | $(TCCX) -c $(TOP)/src/os_os2.c |
| 407 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 408 | os_unix.o: $(TOP)/src/os_unix.c $(HDR) |
| 409 | $(TCCX) -c $(TOP)/src/os_unix.c |
| 410 | |
| 411 | os_win.o: $(TOP)/src/os_win.c $(HDR) |
| 412 | $(TCCX) -c $(TOP)/src/os_win.c |
| 413 | |
| 414 | parse.o: parse.c $(HDR) |
| 415 | $(TCCX) -c parse.c |
| 416 | |
| 417 | parse.h: parse.c |
| 418 | |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 419 | parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 420 | cp $(TOP)/src/parse.y . |
drh | 27d258a | 2004-10-30 20:23:09 +0000 | [diff] [blame] | 421 | ./lemon $(OPTS) parse.y |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 422 | mv parse.h parse.h.temp |
| 423 | awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 424 | |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 425 | pragma.o: $(TOP)/src/pragma.c $(HDR) |
| 426 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/pragma.c |
| 427 | |
danielk1977 | fa256a3 | 2005-05-25 04:11:56 +0000 | [diff] [blame] | 428 | prepare.o: $(TOP)/src/prepare.c $(HDR) |
| 429 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/prepare.c |
| 430 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 431 | printf.o: $(TOP)/src/printf.c $(HDR) |
| 432 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/printf.c |
| 433 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 434 | random.o: $(TOP)/src/random.c $(HDR) |
| 435 | $(TCCX) -c $(TOP)/src/random.c |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 436 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 437 | select.o: $(TOP)/src/select.c $(HDR) |
| 438 | $(TCCX) -c $(TOP)/src/select.c |
drh | ed6c867 | 2003-01-12 18:02:16 +0000 | [diff] [blame] | 439 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 440 | sqlite3.h: $(TOP)/src/sqlite.h.in |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 441 | sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 442 | -e s/--VERSION-NUMBER--/`cat ${TOP}/VERSION | sed 's/[^0-9]/ /g' | $(NAWK) '{printf "%d%03d%03d",$$1,$$2,$$3}'`/ \ |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 443 | $(TOP)/src/sqlite.h.in >sqlite3.h |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 444 | |
| 445 | table.o: $(TOP)/src/table.c $(HDR) |
| 446 | $(TCCX) -c $(TOP)/src/table.c |
| 447 | |
| 448 | tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) |
| 449 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c |
| 450 | |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 451 | tokenize.o: $(TOP)/src/tokenize.c keywordhash.h $(HDR) |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 452 | $(TCCX) -c $(TOP)/src/tokenize.c |
| 453 | |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 454 | keywordhash.h: $(TOP)/tool/mkkeywordhash.c |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 455 | $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 456 | ./mkkeywordhash >keywordhash.h |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 457 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 458 | trigger.o: $(TOP)/src/trigger.c $(HDR) |
| 459 | $(TCCX) -c $(TOP)/src/trigger.c |
| 460 | |
| 461 | update.o: $(TOP)/src/update.c $(HDR) |
| 462 | $(TCCX) -c $(TOP)/src/update.c |
| 463 | |
| 464 | utf.o: $(TOP)/src/utf.c $(HDR) |
| 465 | $(TCCX) -c $(TOP)/src/utf.c |
| 466 | |
| 467 | util.o: $(TOP)/src/util.c $(HDR) |
| 468 | $(TCCX) -c $(TOP)/src/util.c |
| 469 | |
| 470 | vacuum.o: $(TOP)/src/vacuum.c $(HDR) |
| 471 | $(TCCX) -c $(TOP)/src/vacuum.c |
| 472 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 473 | vdbe.o: $(TOP)/src/vdbe.c $(VDBEHDR) $(HDR) |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 474 | $(TCCX) -c $(TOP)/src/vdbe.c |
| 475 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 476 | vdbeapi.o: $(TOP)/src/vdbeapi.c $(VDBEHDR) $(HDR) |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 477 | $(TCCX) -c $(TOP)/src/vdbeapi.c |
| 478 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 479 | vdbeaux.o: $(TOP)/src/vdbeaux.c $(VDBEHDR) $(HDR) |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 480 | $(TCCX) -c $(TOP)/src/vdbeaux.c |
| 481 | |
danielk1977 | b4e9af9 | 2007-05-01 17:49:49 +0000 | [diff] [blame] | 482 | vdbeblob.o: $(TOP)/src/vdbeblob.c $(VDBEHDR) $(HDR) |
| 483 | $(TCCX) -c $(TOP)/src/vdbeblob.c |
| 484 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 485 | vdbefifo.o: $(TOP)/src/vdbefifo.c $(VDBEHDR) $(HDR) |
drh | a01f79d | 2005-07-08 13:07:59 +0000 | [diff] [blame] | 486 | $(TCCX) -c $(TOP)/src/vdbefifo.c |
| 487 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 488 | vdbemem.o: $(TOP)/src/vdbemem.c $(VDBEHDR) $(HDR) |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 489 | $(TCCX) -c $(TOP)/src/vdbemem.c |
| 490 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 491 | vtab.o: $(TOP)/src/vtab.c $(VDBEHDR) $(HDR) |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 492 | $(TCCX) -c $(TOP)/src/vtab.c |
| 493 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 494 | where.o: $(TOP)/src/where.c $(HDR) |
| 495 | $(TCCX) -c $(TOP)/src/where.c |
| 496 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 497 | # Rules to build the extension objects. |
| 498 | # |
| 499 | icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR) |
| 500 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c |
| 501 | |
| 502 | fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR) |
| 503 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c |
| 504 | |
| 505 | fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR) |
| 506 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c |
| 507 | |
| 508 | fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR) |
| 509 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c |
| 510 | |
| 511 | fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR) |
| 512 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c |
| 513 | |
| 514 | fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR) |
| 515 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c |
| 516 | |
| 517 | fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR) |
| 518 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c |
| 519 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame^] | 520 | fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR) |
| 521 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c |
| 522 | |
| 523 | fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR) |
| 524 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c |
| 525 | |
| 526 | fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR) |
| 527 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c |
| 528 | |
| 529 | fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR) |
| 530 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c |
| 531 | |
| 532 | fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR) |
| 533 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c |
| 534 | |
| 535 | fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR) |
| 536 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c |
| 537 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 538 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 539 | # Rules for building test programs and for running tests |
| 540 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 541 | tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a |
| 542 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \ |
danielk1977 | bc6ada4 | 2004-06-30 08:20:16 +0000 | [diff] [blame] | 543 | $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 544 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 545 | testfixture$(EXE): $(TOP)/src/tclsqlite.c libsqlite3.a $(TESTSRC) |
drh | 66560ad | 2006-01-06 14:32:19 +0000 | [diff] [blame] | 546 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \ |
drh | 29c636b | 2006-01-09 23:40:25 +0000 | [diff] [blame] | 547 | -DSQLITE_SERVER=1 -o testfixture$(EXE) \ |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 548 | -DSQLITE_CORE $(TESTSRC) $(TOP)/src/tclsqlite.c \ |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 549 | libsqlite3.a $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 550 | |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 551 | fulltest: testfixture$(EXE) sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 552 | ./testfixture$(EXE) $(TOP)/test/all.test |
| 553 | |
drh | 44548ec | 2007-06-18 12:22:43 +0000 | [diff] [blame] | 554 | soaktest: testfixture$(EXE) sqlite3$(EXE) |
| 555 | ./testfixture$(EXE) $(TOP)/test/all.test -soak 1 |
| 556 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 557 | test: testfixture$(EXE) sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 558 | ./testfixture$(EXE) $(TOP)/test/quick.test |
| 559 | |
drh | 3e27c02 | 2004-07-23 00:01:38 +0000 | [diff] [blame] | 560 | sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite3.a $(TESTSRC) \ |
| 561 | $(TOP)/tool/spaceanal.tcl |
| 562 | sed \ |
| 563 | -e '/^#/d' \ |
| 564 | -e 's,\\,\\\\,g' \ |
| 565 | -e 's,",\\",g' \ |
| 566 | -e 's,^,",' \ |
| 567 | -e 's,$$,\\n",' \ |
| 568 | $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 569 | $(TCCX) $(TCL_FLAGS) -DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_DEBUG=1 -o \ |
shess | d8c1648 | 2007-07-17 17:22:03 +0000 | [diff] [blame] | 570 | sqlite3_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \ |
drh | 3e27c02 | 2004-07-23 00:01:38 +0000 | [diff] [blame] | 571 | libsqlite3.a $(LIBTCL) $(THREADLIB) |
| 572 | |
danielk1977 | 69e777f | 2006-06-14 10:38:02 +0000 | [diff] [blame] | 573 | TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO) |
| 574 | $(TEST_EXTENSION): $(TOP)/src/test_loadext.c |
| 575 | $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION) |
| 576 | |
| 577 | extensiontest: testfixture$(EXE) $(TEST_EXTENSION) |
| 578 | ./testfixture$(EXE) $(TOP)/test/loadext.test |
| 579 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 580 | # Rules used to build documentation |
| 581 | # |
| 582 | arch.html: $(TOP)/www/arch.tcl |
| 583 | tclsh $(TOP)/www/arch.tcl >arch.html |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 584 | |
drh | f856582 | 2004-11-21 01:02:00 +0000 | [diff] [blame] | 585 | autoinc.html: $(TOP)/www/autoinc.tcl |
| 586 | tclsh $(TOP)/www/autoinc.tcl >autoinc.html |
| 587 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 588 | c_interface.html: $(TOP)/www/c_interface.tcl |
| 589 | tclsh $(TOP)/www/c_interface.tcl >c_interface.html |
| 590 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 591 | capi3.html: $(TOP)/www/capi3.tcl |
| 592 | tclsh $(TOP)/www/capi3.tcl >capi3.html |
| 593 | |
drh | 6ed48bf | 2007-06-14 20:57:18 +0000 | [diff] [blame] | 594 | capi3ref.html: $(TOP)/www/mkapidoc.tcl sqlite3.h |
| 595 | tclsh $(TOP)/www/mkapidoc.tcl <sqlite3.h >capi3ref.html |
drh | 93db69e | 2004-06-01 01:22:37 +0000 | [diff] [blame] | 596 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 597 | changes.html: $(TOP)/www/changes.tcl |
| 598 | tclsh $(TOP)/www/changes.tcl >changes.html |
| 599 | |
drh | f856582 | 2004-11-21 01:02:00 +0000 | [diff] [blame] | 600 | compile.html: $(TOP)/www/compile.tcl |
| 601 | tclsh $(TOP)/www/compile.tcl >compile.html |
| 602 | |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 603 | copyright.html: $(TOP)/www/copyright.tcl |
| 604 | tclsh $(TOP)/www/copyright.tcl >copyright.html |
| 605 | |
| 606 | copyright-release.html: $(TOP)/www/copyright-release.html |
| 607 | cp $(TOP)/www/copyright-release.html . |
| 608 | |
| 609 | copyright-release.pdf: $(TOP)/www/copyright-release.pdf |
| 610 | cp $(TOP)/www/copyright-release.pdf . |
| 611 | |
| 612 | common.tcl: $(TOP)/www/common.tcl |
| 613 | cp $(TOP)/www/common.tcl . |
| 614 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 615 | conflict.html: $(TOP)/www/conflict.tcl |
| 616 | tclsh $(TOP)/www/conflict.tcl >conflict.html |
| 617 | |
| 618 | datatypes.html: $(TOP)/www/datatypes.tcl |
| 619 | tclsh $(TOP)/www/datatypes.tcl >datatypes.html |
| 620 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 621 | datatype3.html: $(TOP)/www/datatype3.tcl |
| 622 | tclsh $(TOP)/www/datatype3.tcl >datatype3.html |
| 623 | |
drh | 9179fd9 | 2005-03-12 15:55:10 +0000 | [diff] [blame] | 624 | different.html: $(TOP)/www/different.tcl |
| 625 | tclsh $(TOP)/www/different.tcl >different.html |
| 626 | |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 627 | docs.html: $(TOP)/www/docs.tcl |
| 628 | tclsh $(TOP)/www/docs.tcl >docs.html |
| 629 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 630 | download.html: $(TOP)/www/download.tcl |
danielk1977 | cf991b3 | 2004-06-24 01:30:44 +0000 | [diff] [blame] | 631 | mkdir -p doc |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 632 | tclsh $(TOP)/www/download.tcl >download.html |
| 633 | |
| 634 | faq.html: $(TOP)/www/faq.tcl |
| 635 | tclsh $(TOP)/www/faq.tcl >faq.html |
| 636 | |
| 637 | fileformat.html: $(TOP)/www/fileformat.tcl |
| 638 | tclsh $(TOP)/www/fileformat.tcl >fileformat.html |
| 639 | |
| 640 | formatchng.html: $(TOP)/www/formatchng.tcl |
| 641 | tclsh $(TOP)/www/formatchng.tcl >formatchng.html |
| 642 | |
| 643 | index.html: $(TOP)/www/index.tcl last_change |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 644 | tclsh $(TOP)/www/index.tcl >index.html |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 645 | |
drh | b0e64f3 | 2007-06-09 09:53:51 +0000 | [diff] [blame] | 646 | limits.html: $(TOP)/www/limits.tcl last_change |
| 647 | tclsh $(TOP)/www/limits.tcl >limits.html |
| 648 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 649 | lang.html: $(TOP)/www/lang.tcl |
danielk1977 | cd45ab2 | 2004-11-19 11:59:23 +0000 | [diff] [blame] | 650 | tclsh $(TOP)/www/lang.tcl doc >lang.html |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 651 | |
danielk1977 | 2a03c3a | 2004-11-10 05:48:57 +0000 | [diff] [blame] | 652 | pragma.html: $(TOP)/www/pragma.tcl |
| 653 | tclsh $(TOP)/www/pragma.tcl >pragma.html |
| 654 | |
drh | 52619df | 2004-06-11 17:48:02 +0000 | [diff] [blame] | 655 | lockingv3.html: $(TOP)/www/lockingv3.tcl |
| 656 | tclsh $(TOP)/www/lockingv3.tcl >lockingv3.html |
| 657 | |
danielk1977 | da18423 | 2006-01-05 11:34:32 +0000 | [diff] [blame] | 658 | sharedcache.html: $(TOP)/www/sharedcache.tcl |
| 659 | tclsh $(TOP)/www/sharedcache.tcl >sharedcache.html |
| 660 | |
drh | 8897f6f | 2005-08-30 22:44:29 +0000 | [diff] [blame] | 661 | mingw.html: $(TOP)/www/mingw.tcl |
| 662 | tclsh $(TOP)/www/mingw.tcl >mingw.html |
| 663 | |
| 664 | nulls.html: $(TOP)/www/nulls.tcl |
| 665 | tclsh $(TOP)/www/nulls.tcl >nulls.html |
| 666 | |
drh | 7b93ed3 | 2004-06-16 03:02:00 +0000 | [diff] [blame] | 667 | oldnews.html: $(TOP)/www/oldnews.tcl |
| 668 | tclsh $(TOP)/www/oldnews.tcl >oldnews.html |
| 669 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 670 | omitted.html: $(TOP)/www/omitted.tcl |
| 671 | tclsh $(TOP)/www/omitted.tcl >omitted.html |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 672 | |
| 673 | opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c |
| 674 | tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html |
| 675 | |
drh | 8897f6f | 2005-08-30 22:44:29 +0000 | [diff] [blame] | 676 | optimizer.html: $(TOP)/www/optimizer.tcl |
| 677 | tclsh $(TOP)/www/optimizer.tcl >optimizer.html |
drh | fbe4375 | 2002-08-14 00:08:12 +0000 | [diff] [blame] | 678 | |
drh | f6ac657 | 2005-08-31 01:49:59 +0000 | [diff] [blame] | 679 | optoverview.html: $(TOP)/www/optoverview.tcl |
| 680 | tclsh $(TOP)/www/optoverview.tcl >optoverview.html |
| 681 | |
drh | c277413 | 2002-08-15 13:45:17 +0000 | [diff] [blame] | 682 | quickstart.html: $(TOP)/www/quickstart.tcl |
| 683 | tclsh $(TOP)/www/quickstart.tcl >quickstart.html |
| 684 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 685 | speed.html: $(TOP)/www/speed.tcl |
| 686 | tclsh $(TOP)/www/speed.tcl >speed.html |
drh | d8acdb3 | 2002-08-18 19:09:22 +0000 | [diff] [blame] | 687 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 688 | sqlite.html: $(TOP)/www/sqlite.tcl |
| 689 | tclsh $(TOP)/www/sqlite.tcl >sqlite.html |
| 690 | |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 691 | support.html: $(TOP)/www/support.tcl |
| 692 | tclsh $(TOP)/www/support.tcl >support.html |
| 693 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 694 | tclsqlite.html: $(TOP)/www/tclsqlite.tcl |
| 695 | tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html |
| 696 | |
| 697 | vdbe.html: $(TOP)/www/vdbe.tcl |
| 698 | tclsh $(TOP)/www/vdbe.tcl >vdbe.html |
drh | 96f4531 | 2002-09-02 14:11:02 +0000 | [diff] [blame] | 699 | |
drh | a285422 | 2004-06-17 19:04:17 +0000 | [diff] [blame] | 700 | version3.html: $(TOP)/www/version3.tcl |
| 701 | tclsh $(TOP)/www/version3.tcl >version3.html |
| 702 | |
drh | e425464 | 2005-01-21 18:19:27 +0000 | [diff] [blame] | 703 | whentouse.html: $(TOP)/www/whentouse.tcl |
| 704 | tclsh $(TOP)/www/whentouse.tcl >whentouse.html |
| 705 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 706 | |
| 707 | # Files to be published on the website. |
| 708 | # |
drh | 90ca975 | 2001-09-28 17:47:14 +0000 | [diff] [blame] | 709 | DOC = \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 710 | arch.html \ |
drh | f856582 | 2004-11-21 01:02:00 +0000 | [diff] [blame] | 711 | autoinc.html \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 712 | c_interface.html \ |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 713 | capi3.html \ |
drh | 93db69e | 2004-06-01 01:22:37 +0000 | [diff] [blame] | 714 | capi3ref.html \ |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 715 | changes.html \ |
drh | f856582 | 2004-11-21 01:02:00 +0000 | [diff] [blame] | 716 | compile.html \ |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 717 | copyright.html \ |
| 718 | copyright-release.html \ |
| 719 | copyright-release.pdf \ |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 720 | conflict.html \ |
drh | c277413 | 2002-08-15 13:45:17 +0000 | [diff] [blame] | 721 | datatypes.html \ |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 722 | datatype3.html \ |
drh | 9179fd9 | 2005-03-12 15:55:10 +0000 | [diff] [blame] | 723 | different.html \ |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 724 | docs.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 725 | download.html \ |
| 726 | faq.html \ |
drh | 96f4531 | 2002-09-02 14:11:02 +0000 | [diff] [blame] | 727 | fileformat.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 728 | formatchng.html \ |
| 729 | index.html \ |
drh | b0e64f3 | 2007-06-09 09:53:51 +0000 | [diff] [blame] | 730 | limits.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 731 | lang.html \ |
drh | 52619df | 2004-06-11 17:48:02 +0000 | [diff] [blame] | 732 | lockingv3.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 733 | mingw.html \ |
| 734 | nulls.html \ |
drh | 7b93ed3 | 2004-06-16 03:02:00 +0000 | [diff] [blame] | 735 | oldnews.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 736 | omitted.html \ |
| 737 | opcode.html \ |
drh | 8897f6f | 2005-08-30 22:44:29 +0000 | [diff] [blame] | 738 | optimizer.html \ |
drh | f6ac657 | 2005-08-31 01:49:59 +0000 | [diff] [blame] | 739 | optoverview.html \ |
danielk1977 | 2a03c3a | 2004-11-10 05:48:57 +0000 | [diff] [blame] | 740 | pragma.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 741 | quickstart.html \ |
danielk1977 | da18423 | 2006-01-05 11:34:32 +0000 | [diff] [blame] | 742 | sharedcache.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 743 | speed.html \ |
| 744 | sqlite.html \ |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 745 | support.html \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 746 | tclsqlite.html \ |
drh | a285422 | 2004-06-17 19:04:17 +0000 | [diff] [blame] | 747 | vdbe.html \ |
drh | e425464 | 2005-01-21 18:19:27 +0000 | [diff] [blame] | 748 | version3.html \ |
| 749 | whentouse.html |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 750 | |
drh | d4acf19 | 2004-05-31 16:04:08 +0000 | [diff] [blame] | 751 | doc: common.tcl $(DOC) |
drh | 90ca975 | 2001-09-28 17:47:14 +0000 | [diff] [blame] | 752 | mkdir -p doc |
| 753 | mv $(DOC) doc |
drh | 8897f6f | 2005-08-30 22:44:29 +0000 | [diff] [blame] | 754 | cp $(TOP)/www/*.gif $(TOP)/art/*.gif doc |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 755 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 756 | # Standard install and cleanup targets |
| 757 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 758 | install: sqlite3 libsqlite3.a sqlite3.h |
| 759 | mv sqlite3 /usr/bin |
| 760 | mv libsqlite3.a /usr/lib |
| 761 | mv sqlite3.h /usr/include |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 762 | |
| 763 | clean: |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 764 | rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.* |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 765 | rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 766 | rm -f $(PUBLISH) |
| 767 | rm -f *.da *.bb *.bbg gmon.out |
| 768 | rm -rf tsrc |
drh | f80ad49 | 2006-09-02 22:14:59 +0000 | [diff] [blame] | 769 | rm -f testloadext.dll libtestloadext.so |