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 | # |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 12 | # THREADLIB Specify any extra linker options needed to make the library |
| 13 | # thread safe |
| 14 | # |
| 15 | # OPTS Extra compiler command-line options. |
| 16 | # |
| 17 | # EXE The suffix to add to executable files. ".exe" for windows |
| 18 | # and "" for Unix. |
| 19 | # |
| 20 | # TCC C Compiler and options for use in building executables that |
| 21 | # will run on the target platform. This is usually the same |
| 22 | # as BCC, unless you are cross-compiling. |
| 23 | # |
| 24 | # AR Tools used to build a static library. |
| 25 | # RANLIB |
| 26 | # |
| 27 | # TCL_FLAGS Extra compiler options needed for programs that use the |
| 28 | # TCL library. |
| 29 | # |
| 30 | # LIBTCL Linker options needed to link against the TCL library. |
| 31 | # |
| 32 | # READLINE_FLAGS Compiler options needed for programs that use the |
| 33 | # readline() library. |
| 34 | # |
| 35 | # LIBREADLINE Linker options needed by programs using readline() must |
| 36 | # link against. |
| 37 | # |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 38 | # NAWK Nawk compatible awk program. Older (obsolete?) solaris |
| 39 | # systems need this to avoid using the original AT&T AWK. |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 40 | # |
| 41 | # Once the macros above are defined, the rest of this make script will |
| 42 | # build the SQLite library and testing tools. |
| 43 | ################################################################################ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 44 | |
| 45 | # This is how we compile |
| 46 | # |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 47 | TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) |
| 48 | TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3 |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 49 | |
| 50 | # Object files for the SQLite library. |
| 51 | # |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 52 | LIBOBJ+= alter.o analyze.o attach.o auth.o \ |
| 53 | bitvec.o btmutex.o btree.o build.o \ |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 54 | callback.o complete.o date.o delete.o expr.o fault.o \ |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 55 | fts3.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \ |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 56 | fts3_tokenizer.o fts3_tokenizer1.o \ |
| 57 | func.o global.o hash.o \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 58 | icu.o insert.o journal.o legacy.o loadext.o \ |
drh | d1370b6 | 2008-10-28 18:58:20 +0000 | [diff] [blame] | 59 | main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \ |
danielk1977 | b317538 | 2008-10-17 18:51:52 +0000 | [diff] [blame] | 60 | memjournal.o \ |
drh | 18472fa | 2008-10-07 15:25:48 +0000 | [diff] [blame] | 61 | mutex.o mutex_noop.o mutex_os2.o mutex_unix.o mutex_w32.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 | bc2ca9e | 2008-11-13 14:28:28 +0000 | [diff] [blame] | 63 | pager.o parse.o pcache.o pcache1.o pragma.o prepare.o printf.o \ |
drh | 3d4501e | 2008-12-04 20:40:10 +0000 | [diff] [blame] | 64 | random.o resolve.o rowset.o rtree.o select.o status.o \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 65 | table.o tokenize.o trigger.o \ |
drh | 38f8271 | 2004-06-18 17:10:16 +0000 | [diff] [blame] | 66 | update.o util.o vacuum.o \ |
drh | 3d4501e | 2008-12-04 20:40:10 +0000 | [diff] [blame] | 67 | vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 68 | walker.o where.o utf.o vtab.o |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 69 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 70 | |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 71 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 72 | # All of the source code files. |
| 73 | # |
| 74 | SRC = \ |
drh | d0e4a6c | 2005-02-15 20:47:57 +0000 | [diff] [blame] | 75 | $(TOP)/src/alter.c \ |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 76 | $(TOP)/src/analyze.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 77 | $(TOP)/src/attach.c \ |
drh | ed6c867 | 2003-01-12 18:02:16 +0000 | [diff] [blame] | 78 | $(TOP)/src/auth.c \ |
drh | f5e7bb5 | 2008-02-18 14:47:33 +0000 | [diff] [blame] | 79 | $(TOP)/src/bitvec.c \ |
drh | 900b31e | 2007-08-28 02:27:51 +0000 | [diff] [blame] | 80 | $(TOP)/src/btmutex.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 81 | $(TOP)/src/btree.c \ |
| 82 | $(TOP)/src/btree.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 83 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 84 | $(TOP)/src/build.c \ |
danielk1977 | fd9a0a4 | 2005-05-24 12:01:00 +0000 | [diff] [blame] | 85 | $(TOP)/src/callback.c \ |
drh | a2b902d | 2005-08-14 17:53:20 +0000 | [diff] [blame] | 86 | $(TOP)/src/complete.c \ |
drh | 7014aff | 2003-11-01 01:53:53 +0000 | [diff] [blame] | 87 | $(TOP)/src/date.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 88 | $(TOP)/src/delete.c \ |
| 89 | $(TOP)/src/expr.c \ |
drh | 643167f | 2008-01-22 21:30:53 +0000 | [diff] [blame] | 90 | $(TOP)/src/fault.c \ |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 91 | $(TOP)/src/func.c \ |
drh | 40257ff | 2008-06-13 18:24:27 +0000 | [diff] [blame] | 92 | $(TOP)/src/global.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 93 | $(TOP)/src/hash.c \ |
| 94 | $(TOP)/src/hash.h \ |
shane | 9bcbdad | 2008-05-29 20:22:37 +0000 | [diff] [blame] | 95 | $(TOP)/src/hwtime.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 96 | $(TOP)/src/insert.c \ |
danielk1977 | c7b6017 | 2007-08-22 11:22:03 +0000 | [diff] [blame] | 97 | $(TOP)/src/journal.c \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 98 | $(TOP)/src/legacy.c \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 99 | $(TOP)/src/loadext.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 100 | $(TOP)/src/main.c \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 101 | $(TOP)/src/malloc.c \ |
drh | d1370b6 | 2008-10-28 18:58:20 +0000 | [diff] [blame] | 102 | $(TOP)/src/mem0.c \ |
drh | 4c3645c | 2007-08-15 17:07:57 +0000 | [diff] [blame] | 103 | $(TOP)/src/mem1.c \ |
| 104 | $(TOP)/src/mem2.c \ |
drh | 9c7a60d | 2007-10-19 17:47:24 +0000 | [diff] [blame] | 105 | $(TOP)/src/mem3.c \ |
drh | 0d18020 | 2008-02-14 23:26:56 +0000 | [diff] [blame] | 106 | $(TOP)/src/mem5.c \ |
danielk1977 | b317538 | 2008-10-17 18:51:52 +0000 | [diff] [blame] | 107 | $(TOP)/src/memjournal.c \ |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 108 | $(TOP)/src/mutex.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 109 | $(TOP)/src/mutex.h \ |
drh | 18472fa | 2008-10-07 15:25:48 +0000 | [diff] [blame] | 110 | $(TOP)/src/mutex_noop.c \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 111 | $(TOP)/src/mutex_os2.c \ |
| 112 | $(TOP)/src/mutex_unix.c \ |
| 113 | $(TOP)/src/mutex_w32.c \ |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 114 | $(TOP)/src/os.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 115 | $(TOP)/src/os.h \ |
| 116 | $(TOP)/src/os_common.h \ |
drh | 60a1e4b | 2006-06-03 18:02:15 +0000 | [diff] [blame] | 117 | $(TOP)/src/os_os2.c \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 118 | $(TOP)/src/os_unix.c \ |
| 119 | $(TOP)/src/os_win.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 120 | $(TOP)/src/pager.c \ |
| 121 | $(TOP)/src/pager.h \ |
| 122 | $(TOP)/src/parse.y \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 123 | $(TOP)/src/pcache.c \ |
| 124 | $(TOP)/src/pcache.h \ |
danielk1977 | bc2ca9e | 2008-11-13 14:28:28 +0000 | [diff] [blame] | 125 | $(TOP)/src/pcache1.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 126 | $(TOP)/src/pragma.c \ |
danielk1977 | fa256a3 | 2005-05-25 04:11:56 +0000 | [diff] [blame] | 127 | $(TOP)/src/prepare.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 128 | $(TOP)/src/printf.c \ |
| 129 | $(TOP)/src/random.c \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 130 | $(TOP)/src/resolve.c \ |
drh | 3d4501e | 2008-12-04 20:40:10 +0000 | [diff] [blame] | 131 | $(TOP)/src/rowset.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 132 | $(TOP)/src/select.c \ |
drh | f714199 | 2008-06-19 00:16:08 +0000 | [diff] [blame] | 133 | $(TOP)/src/status.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 134 | $(TOP)/src/shell.c \ |
| 135 | $(TOP)/src/sqlite.h.in \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 136 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 137 | $(TOP)/src/sqliteInt.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 138 | $(TOP)/src/sqliteLimit.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 139 | $(TOP)/src/table.c \ |
| 140 | $(TOP)/src/tclsqlite.c \ |
| 141 | $(TOP)/src/tokenize.c \ |
drh | dc37945 | 2002-05-15 12:45:43 +0000 | [diff] [blame] | 142 | $(TOP)/src/trigger.c \ |
drh | 1bbf5ee | 2004-05-11 01:18:24 +0000 | [diff] [blame] | 143 | $(TOP)/src/utf.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 144 | $(TOP)/src/update.c \ |
| 145 | $(TOP)/src/util.c \ |
drh | e1051c6 | 2003-04-06 20:52:32 +0000 | [diff] [blame] | 146 | $(TOP)/src/vacuum.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 147 | $(TOP)/src/vdbe.c \ |
| 148 | $(TOP)/src/vdbe.h \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 149 | $(TOP)/src/vdbeapi.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 150 | $(TOP)/src/vdbeaux.c \ |
danielk1977 | b4e9af9 | 2007-05-01 17:49:49 +0000 | [diff] [blame] | 151 | $(TOP)/src/vdbeblob.c \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 152 | $(TOP)/src/vdbemem.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 153 | $(TOP)/src/vdbeInt.h \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 154 | $(TOP)/src/vtab.c \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 155 | $(TOP)/src/walker.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 156 | $(TOP)/src/where.c |
| 157 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 158 | # Source code for extensions |
| 159 | # |
| 160 | SRC += \ |
| 161 | $(TOP)/ext/fts1/fts1.c \ |
| 162 | $(TOP)/ext/fts1/fts1.h \ |
| 163 | $(TOP)/ext/fts1/fts1_hash.c \ |
| 164 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 165 | $(TOP)/ext/fts1/fts1_porter.c \ |
| 166 | $(TOP)/ext/fts1/fts1_tokenizer.h \ |
| 167 | $(TOP)/ext/fts1/fts1_tokenizer1.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 168 | SRC += \ |
| 169 | $(TOP)/ext/fts2/fts2.c \ |
| 170 | $(TOP)/ext/fts2/fts2.h \ |
| 171 | $(TOP)/ext/fts2/fts2_hash.c \ |
| 172 | $(TOP)/ext/fts2/fts2_hash.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 173 | $(TOP)/ext/fts2/fts2_icu.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 174 | $(TOP)/ext/fts2/fts2_porter.c \ |
| 175 | $(TOP)/ext/fts2/fts2_tokenizer.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 176 | $(TOP)/ext/fts2/fts2_tokenizer.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 177 | $(TOP)/ext/fts2/fts2_tokenizer1.c |
danielk1977 | 08ada51 | 2007-06-26 10:56:40 +0000 | [diff] [blame] | 178 | SRC += \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 179 | $(TOP)/ext/fts3/fts3.c \ |
| 180 | $(TOP)/ext/fts3/fts3.h \ |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 181 | $(TOP)/ext/fts3/fts3_expr.c \ |
| 182 | $(TOP)/ext/fts3/fts3_expr.h \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 183 | $(TOP)/ext/fts3/fts3_hash.c \ |
| 184 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 185 | $(TOP)/ext/fts3/fts3_icu.c \ |
| 186 | $(TOP)/ext/fts3/fts3_porter.c \ |
| 187 | $(TOP)/ext/fts3/fts3_tokenizer.h \ |
| 188 | $(TOP)/ext/fts3/fts3_tokenizer.c \ |
| 189 | $(TOP)/ext/fts3/fts3_tokenizer1.c |
| 190 | SRC += \ |
danielk1977 | 1c82665 | 2008-09-08 08:08:09 +0000 | [diff] [blame] | 191 | $(TOP)/ext/icu/sqliteicu.h \ |
| 192 | $(TOP)/ext/icu/icu.c |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 193 | SRC += \ |
| 194 | $(TOP)/ext/rtree/rtree.h \ |
| 195 | $(TOP)/ext/rtree/rtree.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 196 | |
danielk1977 | 77b03a2 | 2007-06-20 08:49:05 +0000 | [diff] [blame] | 197 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 198 | # Generated source code files |
| 199 | # |
| 200 | SRC += \ |
| 201 | keywordhash.h \ |
| 202 | opcodes.c \ |
| 203 | opcodes.h \ |
| 204 | parse.c \ |
| 205 | parse.h \ |
| 206 | sqlite3.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 207 | |
| 208 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 209 | # Source code to the test files. |
| 210 | # |
drh | b6f4148 | 2004-05-14 01:58:11 +0000 | [diff] [blame] | 211 | TESTSRC = \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 212 | $(TOP)/src/test1.c \ |
| 213 | $(TOP)/src/test2.c \ |
| 214 | $(TOP)/src/test3.c \ |
drh | a6064dc | 2003-12-19 02:52:05 +0000 | [diff] [blame] | 215 | $(TOP)/src/test4.c \ |
danielk1977 | 4adee20 | 2004-05-08 08:23:19 +0000 | [diff] [blame] | 216 | $(TOP)/src/test5.c \ |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 217 | $(TOP)/src/test6.c \ |
drh | 29c636b | 2006-01-09 23:40:25 +0000 | [diff] [blame] | 218 | $(TOP)/src/test7.c \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 219 | $(TOP)/src/test8.c \ |
danielk1977 | a713f2c | 2007-03-29 12:19:11 +0000 | [diff] [blame] | 220 | $(TOP)/src/test9.c \ |
drh | 1409be6 | 2006-08-23 20:07:20 +0000 | [diff] [blame] | 221 | $(TOP)/src/test_autoext.c \ |
drh | 2366940 | 2006-01-09 17:29:52 +0000 | [diff] [blame] | 222 | $(TOP)/src/test_async.c \ |
drh | 16a9b83 | 2007-05-05 18:39:25 +0000 | [diff] [blame] | 223 | $(TOP)/src/test_btree.c \ |
drh | c797d4d | 2007-05-08 01:08:49 +0000 | [diff] [blame] | 224 | $(TOP)/src/test_config.c \ |
danielk1977 | bf26097 | 2008-01-22 11:50:13 +0000 | [diff] [blame] | 225 | $(TOP)/src/test_devsym.c \ |
drh | 984bfaa | 2008-03-19 16:08:53 +0000 | [diff] [blame] | 226 | $(TOP)/src/test_func.c \ |
drh | 1592659 | 2007-04-06 15:02:13 +0000 | [diff] [blame] | 227 | $(TOP)/src/test_hexio.c \ |
drh | 2f999a6 | 2007-08-15 19:16:43 +0000 | [diff] [blame] | 228 | $(TOP)/src/test_malloc.c \ |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 229 | $(TOP)/src/test_md5.c \ |
danielk1977 | 1a9ed0b | 2008-06-18 09:45:56 +0000 | [diff] [blame] | 230 | $(TOP)/src/test_mutex.c \ |
danielk1977 | b61c16d | 2007-09-14 16:19:27 +0000 | [diff] [blame] | 231 | $(TOP)/src/test_onefile.c \ |
danielk1977 | 5d1f5aa | 2008-04-10 14:51:00 +0000 | [diff] [blame] | 232 | $(TOP)/src/test_osinst.c \ |
drh | b232c23 | 2008-11-19 01:20:26 +0000 | [diff] [blame] | 233 | $(TOP)/src/test_pcache.c \ |
danielk1977 | 954ce99 | 2006-06-15 15:59:19 +0000 | [diff] [blame] | 234 | $(TOP)/src/test_schema.c \ |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 235 | $(TOP)/src/test_server.c \ |
drh | 4be8b51 | 2006-06-13 23:51:34 +0000 | [diff] [blame] | 236 | $(TOP)/src/test_tclvar.c \ |
danielk1977 | 44918fa | 2007-09-07 11:29:25 +0000 | [diff] [blame] | 237 | $(TOP)/src/test_thread.c \ |
danielk1977 | 075c23a | 2008-09-01 18:34:20 +0000 | [diff] [blame] | 238 | $(TOP)/src/test_wsd.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 239 | |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 240 | #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c |
| 241 | #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 242 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 243 | TESTSRC2 = \ |
| 244 | $(TOP)/src/attach.c $(TOP)/src/btree.c $(TOP)/src/build.c $(TOP)/src/date.c \ |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 245 | $(TOP)/src/expr.c $(TOP)/src/func.c $(TOP)/src/insert.c $(TOP)/src/os.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 246 | $(TOP)/src/os_os2.c $(TOP)/src/os_unix.c $(TOP)/src/os_win.c \ |
| 247 | $(TOP)/src/pager.c $(TOP)/src/pragma.c $(TOP)/src/prepare.c \ |
danielk1977 | 8c0a791 | 2008-08-20 14:49:23 +0000 | [diff] [blame] | 248 | $(TOP)/src/printf.c $(TOP)/src/random.c $(TOP)/src/pcache.c \ |
danielk1977 | bc2ca9e | 2008-11-13 14:28:28 +0000 | [diff] [blame] | 249 | $(TOP)/src/pcache1.c $(TOP)/src/select.c $(TOP)/src/tokenize.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 250 | $(TOP)/src/utf.c $(TOP)/src/util.c $(TOP)/src/vdbeapi.c $(TOP)/src/vdbeaux.c \ |
danielk1977 | a0042db | 2008-10-14 14:56:01 +0000 | [diff] [blame] | 251 | $(TOP)/src/vdbe.c $(TOP)/src/vdbemem.c $(TOP)/src/where.c parse.c \ |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 252 | $(TOP)/ext/fts3/fts3.c $(TOP)/ext/fts3/fts3_expr.c \ |
| 253 | $(TOP)/ext/fts3/fts3_tokenizer.c |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 254 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 255 | # Header files used by all library source files. |
| 256 | # |
| 257 | HDR = \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 258 | $(TOP)/src/btree.h \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 259 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 260 | $(TOP)/src/hash.h \ |
shane | 9bcbdad | 2008-05-29 20:22:37 +0000 | [diff] [blame] | 261 | $(TOP)/src/hwtime.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 262 | keywordhash.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 263 | $(TOP)/src/mutex.h \ |
drh | 8f619cc | 2002-09-08 00:04:50 +0000 | [diff] [blame] | 264 | opcodes.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 265 | $(TOP)/src/os.h \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 266 | $(TOP)/src/os_common.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 267 | $(TOP)/src/pager.h \ |
danielk1977 | 8c0a791 | 2008-08-20 14:49:23 +0000 | [diff] [blame] | 268 | $(TOP)/src/pcache.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 269 | parse.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 270 | sqlite3.h \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 271 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 272 | $(TOP)/src/sqliteInt.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 273 | $(TOP)/src/sqliteLimit.h \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 274 | $(TOP)/src/vdbe.h \ |
mlcreech | 1e12d43 | 2008-05-07 02:42:01 +0000 | [diff] [blame] | 275 | $(TOP)/src/vdbeInt.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 276 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 277 | # Header files used by extensions |
| 278 | # |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 279 | EXTHDR += \ |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 280 | $(TOP)/ext/fts1/fts1.h \ |
| 281 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 282 | $(TOP)/ext/fts1/fts1_tokenizer.h |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 283 | EXTHDR += \ |
| 284 | $(TOP)/ext/fts2/fts2.h \ |
| 285 | $(TOP)/ext/fts2/fts2_hash.h \ |
| 286 | $(TOP)/ext/fts2/fts2_tokenizer.h |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 287 | EXTHDR += \ |
| 288 | $(TOP)/ext/fts3/fts3.h \ |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 289 | $(TOP)/ext/fts3/fts3_expr.h \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 290 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 291 | $(TOP)/ext/fts3/fts3_tokenizer.h |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 292 | EXTHDR += \ |
| 293 | $(TOP)/ext/rtree/rtree.h |
danielk1977 | 1c82665 | 2008-09-08 08:08:09 +0000 | [diff] [blame] | 294 | EXTHDR += \ |
| 295 | $(TOP)/ext/icu/sqliteicu.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 296 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 297 | # This is the default Makefile target. The objects listed here |
| 298 | # are what get build when you type just "make" with no arguments. |
| 299 | # |
drh | 97903fe | 2005-05-24 20:19:57 +0000 | [diff] [blame] | 300 | all: sqlite3.h libsqlite3.a sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 301 | |
drh | d677b3d | 2007-08-20 22:48:41 +0000 | [diff] [blame] | 302 | libsqlite3.a: $(LIBOBJ) |
| 303 | $(AR) libsqlite3.a $(LIBOBJ) |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 304 | $(RANLIB) libsqlite3.a |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 305 | |
drh | cbd2da9 | 2007-12-17 16:20:06 +0000 | [diff] [blame] | 306 | sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h |
danielk1977 | 315e669 | 2007-12-18 11:19:35 +0000 | [diff] [blame] | 307 | $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \ |
drh | c9a67a8 | 2007-12-13 18:20:46 +0000 | [diff] [blame] | 308 | $(TOP)/src/shell.c \ |
| 309 | libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) |
| 310 | |
danielk1977 | 4adee20 | 2004-05-08 08:23:19 +0000 | [diff] [blame] | 311 | objects: $(LIBOBJ_ORIG) |
| 312 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 313 | # This target creates a directory named "tsrc" and fills it with |
| 314 | # copies of all of the C source code and header files needed to |
| 315 | # build on the target system. Some of the C source code and header |
| 316 | # files are automatically generated. This target takes care of |
| 317 | # all that automatic generation. |
| 318 | # |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 319 | target_source: $(SRC) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 320 | rm -rf tsrc |
| 321 | mkdir tsrc |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 322 | cp -f $(SRC) tsrc |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 323 | rm tsrc/sqlite.h.in tsrc/parse.y |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 324 | touch target_source |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 325 | |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 326 | sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl |
| 327 | tclsh $(TOP)/tool/mksqlite3c.tcl |
drh | bd08af4 | 2007-04-05 21:58:33 +0000 | [diff] [blame] | 328 | cp sqlite3.c tclsqlite3.c |
| 329 | cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 330 | |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 331 | fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl |
| 332 | tclsh $(TOP)/ext/fts2/mkfts2amal.tcl |
| 333 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 334 | fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl |
| 335 | tclsh $(TOP)/ext/fts3/mkfts3amal.tcl |
| 336 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 337 | # Rules to build the LEMON compiler generator |
| 338 | # |
| 339 | lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c |
| 340 | $(BCC) -o lemon $(TOP)/tool/lemon.c |
| 341 | cp $(TOP)/tool/lempar.c . |
| 342 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 343 | # Rules to build individual *.o files from generated *.c files. This |
| 344 | # applies to: |
| 345 | # |
| 346 | # parse.o |
| 347 | # opcodes.o |
| 348 | # |
mlcreech | 2379706 | 2008-03-20 02:25:35 +0000 | [diff] [blame] | 349 | %.o: %.c $(HDR) |
| 350 | $(TCCX) -c $< |
| 351 | |
| 352 | # Rules to build individual *.o files from files in the src directory. |
| 353 | # |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 354 | %.o: $(TOP)/src/%.c $(HDR) |
| 355 | $(TCCX) -c $< |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 356 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 357 | tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) |
| 358 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 359 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 360 | |
drh | 900b31e | 2007-08-28 02:27:51 +0000 | [diff] [blame] | 361 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 362 | # Rules to build opcodes.c and opcodes.h |
| 363 | # |
drh | b327f77 | 2004-10-06 15:03:57 +0000 | [diff] [blame] | 364 | opcodes.c: opcodes.h $(TOP)/mkopcodec.awk |
drh | 0c07fb9 | 2006-06-27 20:05:23 +0000 | [diff] [blame] | 365 | 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] | 366 | |
drh | f2bc013 | 2004-10-04 13:19:23 +0000 | [diff] [blame] | 367 | opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 368 | cat parse.h $(TOP)/src/vdbe.c | \ |
| 369 | $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 370 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 371 | # Rules to build parse.c and parse.h - the outputs of lemon. |
| 372 | # |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 373 | parse.h: parse.c |
| 374 | |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 375 | parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 376 | cp $(TOP)/src/parse.y . |
drh | 36bc402 | 2007-10-12 00:23:44 +0000 | [diff] [blame] | 377 | rm -f parse.h |
drh | 27d258a | 2004-10-30 20:23:09 +0000 | [diff] [blame] | 378 | ./lemon $(OPTS) parse.y |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 379 | mv parse.h parse.h.temp |
| 380 | awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 381 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 382 | sqlite3.h: $(TOP)/src/sqlite.h.in |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 383 | sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ |
drh | f1878b4 | 2006-01-23 18:06:52 +0000 | [diff] [blame] | 384 | -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] | 385 | $(TOP)/src/sqlite.h.in >sqlite3.h |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 386 | |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 387 | keywordhash.h: $(TOP)/tool/mkkeywordhash.c |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 388 | $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 389 | ./mkkeywordhash >keywordhash.h |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 390 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 391 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 392 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 393 | # Rules to build the extension objects. |
| 394 | # |
| 395 | icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR) |
| 396 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c |
| 397 | |
| 398 | fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR) |
| 399 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c |
| 400 | |
| 401 | fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR) |
| 402 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c |
| 403 | |
| 404 | fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR) |
| 405 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c |
| 406 | |
| 407 | fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR) |
| 408 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c |
| 409 | |
| 410 | fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR) |
| 411 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c |
| 412 | |
| 413 | fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR) |
| 414 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c |
| 415 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 416 | fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR) |
| 417 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c |
| 418 | |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 419 | fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR) |
| 420 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c |
| 421 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 422 | fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR) |
| 423 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c |
| 424 | |
| 425 | fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR) |
| 426 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c |
| 427 | |
| 428 | fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR) |
| 429 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c |
| 430 | |
| 431 | fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR) |
| 432 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c |
| 433 | |
| 434 | fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR) |
| 435 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c |
| 436 | |
danielk1977 | ebaecc1 | 2008-05-26 18:41:54 +0000 | [diff] [blame] | 437 | rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) |
| 438 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c |
| 439 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 440 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 441 | # Rules for building test programs and for running tests |
| 442 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 443 | tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a |
| 444 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \ |
danielk1977 | bc6ada4 | 2004-06-30 08:20:16 +0000 | [diff] [blame] | 445 | $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 446 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 447 | |
| 448 | # Rules to build the 'testfixture' application. |
| 449 | # |
| 450 | TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 |
| 451 | TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE |
| 452 | |
| 453 | testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c |
| 454 | $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ |
| 455 | $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ |
| 456 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a |
| 457 | |
| 458 | amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c |
| 459 | $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ |
| 460 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ |
| 461 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 462 | |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 463 | fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c |
| 464 | $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ |
| 465 | -DSQLITE_ENABLE_FTS3=1 \ |
| 466 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \ |
| 467 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) |
| 468 | |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 469 | fulltest: testfixture$(EXE) sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 470 | ./testfixture$(EXE) $(TOP)/test/all.test |
| 471 | |
drh | 44548ec | 2007-06-18 12:22:43 +0000 | [diff] [blame] | 472 | soaktest: testfixture$(EXE) sqlite3$(EXE) |
| 473 | ./testfixture$(EXE) $(TOP)/test/all.test -soak 1 |
| 474 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 475 | test: testfixture$(EXE) sqlite3$(EXE) |
danielk1977 | ff3c898 | 2008-06-25 17:54:53 +0000 | [diff] [blame] | 476 | ./testfixture$(EXE) $(TOP)/test/veryquick.test |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 477 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 478 | sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \ |
drh | 3e27c02 | 2004-07-23 00:01:38 +0000 | [diff] [blame] | 479 | $(TOP)/tool/spaceanal.tcl |
| 480 | sed \ |
| 481 | -e '/^#/d' \ |
| 482 | -e 's,\\,\\\\,g' \ |
| 483 | -e 's,",\\",g' \ |
| 484 | -e 's,^,",' \ |
| 485 | -e 's,$$,\\n",' \ |
| 486 | $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h |
drh | 7b12d46 | 2007-11-02 12:52:39 +0000 | [diff] [blame] | 487 | $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 488 | -DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_DEBUG=1 -DSQLITE_PRIVATE="" \ |
| 489 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ |
| 490 | -o sqlite3_analyzer$(EXE) \ |
| 491 | $(LIBTCL) $(THREADLIB) |
drh | 3e27c02 | 2004-07-23 00:01:38 +0000 | [diff] [blame] | 492 | |
danielk1977 | 69e777f | 2006-06-14 10:38:02 +0000 | [diff] [blame] | 493 | TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO) |
| 494 | $(TEST_EXTENSION): $(TOP)/src/test_loadext.c |
| 495 | $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION) |
| 496 | |
| 497 | extensiontest: testfixture$(EXE) $(TEST_EXTENSION) |
| 498 | ./testfixture$(EXE) $(TOP)/test/loadext.test |
| 499 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 500 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 501 | # Standard install and cleanup targets |
| 502 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 503 | install: sqlite3 libsqlite3.a sqlite3.h |
| 504 | mv sqlite3 /usr/bin |
| 505 | mv libsqlite3.a /usr/lib |
| 506 | mv sqlite3.h /usr/include |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 507 | |
| 508 | clean: |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 509 | rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.* |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 510 | rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 511 | rm -f $(PUBLISH) |
| 512 | rm -f *.da *.bb *.bbg gmon.out |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 513 | rm -rf tsrc target_source |
drh | f80ad49 | 2006-09-02 22:14:59 +0000 | [diff] [blame] | 514 | rm -f testloadext.dll libtestloadext.so |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 515 | rm -f sqlite3.c fts?amal.c tclsqlite3.c |