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 |
danielk1977 | a3f0659 | 2009-04-23 14:58:39 +0000 | [diff] [blame] | 49 | TCCX += -I$(TOP)/ext/async |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 50 | |
| 51 | # Object files for the SQLite library. |
| 52 | # |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 53 | LIBOBJ+= alter.o analyze.o attach.o auth.o \ |
danielk1977 | 0410302 | 2009-02-03 16:51:24 +0000 | [diff] [blame] | 54 | backup.o bitvec.o btmutex.o btree.o build.o \ |
drh | 380083c | 2010-02-23 20:32:15 +0000 | [diff] [blame] | 55 | callback.o complete.o ctime.o date.o delete.o expr.o fault.o fkey.o \ |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 56 | fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \ |
dan | 807d0fc | 2011-05-17 14:41:36 +0000 | [diff] [blame] | 57 | fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \ |
drh | 79d0e1c | 2011-05-13 17:11:20 +0000 | [diff] [blame] | 58 | fts3_write.o func.o global.o hash.o \ |
drh | c438efd | 2010-04-26 00:19:45 +0000 | [diff] [blame] | 59 | icu.o insert.o journal.o legacy.o loadext.o \ |
drh | d1370b6 | 2008-10-28 18:58:20 +0000 | [diff] [blame] | 60 | 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] | 61 | memjournal.o \ |
drh | 18472fa | 2008-10-07 15:25:48 +0000 | [diff] [blame] | 62 | mutex.o mutex_noop.o mutex_os2.o mutex_unix.o mutex_w32.o \ |
danielk1977 | 404ca07 | 2009-03-16 13:19:36 +0000 | [diff] [blame] | 63 | notify.o opcodes.o os.o os_os2.o os_unix.o os_win.o \ |
danielk1977 | bc2ca9e | 2008-11-13 14:28:28 +0000 | [diff] [blame] | 64 | pager.o parse.o pcache.o pcache1.o pragma.o prepare.o printf.o \ |
drh | 1b26c7c | 2009-04-22 02:15:47 +0000 | [diff] [blame] | 65 | random.o resolve.o rowset.o rtree.o select.o status.o \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 66 | table.o tokenize.o trigger.o \ |
drh | 38f8271 | 2004-06-18 17:10:16 +0000 | [diff] [blame] | 67 | update.o util.o vacuum.o \ |
drh | c7bc4fd | 2009-11-25 18:03:42 +0000 | [diff] [blame] | 68 | vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbetrace.o \ |
drh | c438efd | 2010-04-26 00:19:45 +0000 | [diff] [blame] | 69 | wal.o walker.o where.o utf.o vtab.o |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 70 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 71 | |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 72 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 73 | # All of the source code files. |
| 74 | # |
| 75 | SRC = \ |
drh | d0e4a6c | 2005-02-15 20:47:57 +0000 | [diff] [blame] | 76 | $(TOP)/src/alter.c \ |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 77 | $(TOP)/src/analyze.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 78 | $(TOP)/src/attach.c \ |
drh | ed6c867 | 2003-01-12 18:02:16 +0000 | [diff] [blame] | 79 | $(TOP)/src/auth.c \ |
danielk1977 | 0410302 | 2009-02-03 16:51:24 +0000 | [diff] [blame] | 80 | $(TOP)/src/backup.c \ |
drh | f5e7bb5 | 2008-02-18 14:47:33 +0000 | [diff] [blame] | 81 | $(TOP)/src/bitvec.c \ |
drh | 900b31e | 2007-08-28 02:27:51 +0000 | [diff] [blame] | 82 | $(TOP)/src/btmutex.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 83 | $(TOP)/src/btree.c \ |
| 84 | $(TOP)/src/btree.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 85 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 86 | $(TOP)/src/build.c \ |
danielk1977 | fd9a0a4 | 2005-05-24 12:01:00 +0000 | [diff] [blame] | 87 | $(TOP)/src/callback.c \ |
drh | a2b902d | 2005-08-14 17:53:20 +0000 | [diff] [blame] | 88 | $(TOP)/src/complete.c \ |
shaneh | dc97a8c | 2010-02-23 20:08:35 +0000 | [diff] [blame] | 89 | $(TOP)/src/ctime.c \ |
drh | 7014aff | 2003-11-01 01:53:53 +0000 | [diff] [blame] | 90 | $(TOP)/src/date.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 91 | $(TOP)/src/delete.c \ |
| 92 | $(TOP)/src/expr.c \ |
drh | 643167f | 2008-01-22 21:30:53 +0000 | [diff] [blame] | 93 | $(TOP)/src/fault.c \ |
dan | 3be7d6e | 2009-09-19 17:59:59 +0000 | [diff] [blame] | 94 | $(TOP)/src/fkey.c \ |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 95 | $(TOP)/src/func.c \ |
drh | 40257ff | 2008-06-13 18:24:27 +0000 | [diff] [blame] | 96 | $(TOP)/src/global.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 97 | $(TOP)/src/hash.c \ |
| 98 | $(TOP)/src/hash.h \ |
shane | 9bcbdad | 2008-05-29 20:22:37 +0000 | [diff] [blame] | 99 | $(TOP)/src/hwtime.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 100 | $(TOP)/src/insert.c \ |
danielk1977 | c7b6017 | 2007-08-22 11:22:03 +0000 | [diff] [blame] | 101 | $(TOP)/src/journal.c \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 102 | $(TOP)/src/legacy.c \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 103 | $(TOP)/src/loadext.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 104 | $(TOP)/src/main.c \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 105 | $(TOP)/src/malloc.c \ |
drh | d1370b6 | 2008-10-28 18:58:20 +0000 | [diff] [blame] | 106 | $(TOP)/src/mem0.c \ |
drh | 4c3645c | 2007-08-15 17:07:57 +0000 | [diff] [blame] | 107 | $(TOP)/src/mem1.c \ |
| 108 | $(TOP)/src/mem2.c \ |
drh | 9c7a60d | 2007-10-19 17:47:24 +0000 | [diff] [blame] | 109 | $(TOP)/src/mem3.c \ |
drh | 0d18020 | 2008-02-14 23:26:56 +0000 | [diff] [blame] | 110 | $(TOP)/src/mem5.c \ |
danielk1977 | b317538 | 2008-10-17 18:51:52 +0000 | [diff] [blame] | 111 | $(TOP)/src/memjournal.c \ |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 112 | $(TOP)/src/mutex.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 113 | $(TOP)/src/mutex.h \ |
drh | 18472fa | 2008-10-07 15:25:48 +0000 | [diff] [blame] | 114 | $(TOP)/src/mutex_noop.c \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 115 | $(TOP)/src/mutex_os2.c \ |
| 116 | $(TOP)/src/mutex_unix.c \ |
| 117 | $(TOP)/src/mutex_w32.c \ |
danielk1977 | 404ca07 | 2009-03-16 13:19:36 +0000 | [diff] [blame] | 118 | $(TOP)/src/notify.c \ |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 119 | $(TOP)/src/os.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 120 | $(TOP)/src/os.h \ |
| 121 | $(TOP)/src/os_common.h \ |
drh | 60a1e4b | 2006-06-03 18:02:15 +0000 | [diff] [blame] | 122 | $(TOP)/src/os_os2.c \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 123 | $(TOP)/src/os_unix.c \ |
| 124 | $(TOP)/src/os_win.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 125 | $(TOP)/src/pager.c \ |
| 126 | $(TOP)/src/pager.h \ |
| 127 | $(TOP)/src/parse.y \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 128 | $(TOP)/src/pcache.c \ |
| 129 | $(TOP)/src/pcache.h \ |
danielk1977 | bc2ca9e | 2008-11-13 14:28:28 +0000 | [diff] [blame] | 130 | $(TOP)/src/pcache1.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 131 | $(TOP)/src/pragma.c \ |
danielk1977 | fa256a3 | 2005-05-25 04:11:56 +0000 | [diff] [blame] | 132 | $(TOP)/src/prepare.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 133 | $(TOP)/src/printf.c \ |
| 134 | $(TOP)/src/random.c \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 135 | $(TOP)/src/resolve.c \ |
drh | 3d4501e | 2008-12-04 20:40:10 +0000 | [diff] [blame] | 136 | $(TOP)/src/rowset.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 137 | $(TOP)/src/select.c \ |
drh | f714199 | 2008-06-19 00:16:08 +0000 | [diff] [blame] | 138 | $(TOP)/src/status.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 139 | $(TOP)/src/shell.c \ |
| 140 | $(TOP)/src/sqlite.h.in \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 141 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 142 | $(TOP)/src/sqliteInt.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 143 | $(TOP)/src/sqliteLimit.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 144 | $(TOP)/src/table.c \ |
| 145 | $(TOP)/src/tclsqlite.c \ |
| 146 | $(TOP)/src/tokenize.c \ |
drh | dc37945 | 2002-05-15 12:45:43 +0000 | [diff] [blame] | 147 | $(TOP)/src/trigger.c \ |
drh | 1bbf5ee | 2004-05-11 01:18:24 +0000 | [diff] [blame] | 148 | $(TOP)/src/utf.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 149 | $(TOP)/src/update.c \ |
| 150 | $(TOP)/src/util.c \ |
drh | e1051c6 | 2003-04-06 20:52:32 +0000 | [diff] [blame] | 151 | $(TOP)/src/vacuum.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 152 | $(TOP)/src/vdbe.c \ |
| 153 | $(TOP)/src/vdbe.h \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 154 | $(TOP)/src/vdbeapi.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 155 | $(TOP)/src/vdbeaux.c \ |
danielk1977 | b4e9af9 | 2007-05-01 17:49:49 +0000 | [diff] [blame] | 156 | $(TOP)/src/vdbeblob.c \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 157 | $(TOP)/src/vdbemem.c \ |
drh | c7bc4fd | 2009-11-25 18:03:42 +0000 | [diff] [blame] | 158 | $(TOP)/src/vdbetrace.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 159 | $(TOP)/src/vdbeInt.h \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 160 | $(TOP)/src/vtab.c \ |
drh | c438efd | 2010-04-26 00:19:45 +0000 | [diff] [blame] | 161 | $(TOP)/src/wal.c \ |
| 162 | $(TOP)/src/wal.h \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 163 | $(TOP)/src/walker.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 164 | $(TOP)/src/where.c |
| 165 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 166 | # Source code for extensions |
| 167 | # |
| 168 | SRC += \ |
| 169 | $(TOP)/ext/fts1/fts1.c \ |
| 170 | $(TOP)/ext/fts1/fts1.h \ |
| 171 | $(TOP)/ext/fts1/fts1_hash.c \ |
| 172 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 173 | $(TOP)/ext/fts1/fts1_porter.c \ |
| 174 | $(TOP)/ext/fts1/fts1_tokenizer.h \ |
| 175 | $(TOP)/ext/fts1/fts1_tokenizer1.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 176 | SRC += \ |
| 177 | $(TOP)/ext/fts2/fts2.c \ |
| 178 | $(TOP)/ext/fts2/fts2.h \ |
| 179 | $(TOP)/ext/fts2/fts2_hash.c \ |
| 180 | $(TOP)/ext/fts2/fts2_hash.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 181 | $(TOP)/ext/fts2/fts2_icu.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 182 | $(TOP)/ext/fts2/fts2_porter.c \ |
| 183 | $(TOP)/ext/fts2/fts2_tokenizer.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 184 | $(TOP)/ext/fts2/fts2_tokenizer.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 185 | $(TOP)/ext/fts2/fts2_tokenizer1.c |
danielk1977 | 08ada51 | 2007-06-26 10:56:40 +0000 | [diff] [blame] | 186 | SRC += \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 187 | $(TOP)/ext/fts3/fts3.c \ |
| 188 | $(TOP)/ext/fts3/fts3.h \ |
drh | f7829ad | 2009-11-25 22:42:22 +0000 | [diff] [blame] | 189 | $(TOP)/ext/fts3/fts3Int.h \ |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 190 | $(TOP)/ext/fts3/fts3_aux.c \ |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 191 | $(TOP)/ext/fts3/fts3_expr.c \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 192 | $(TOP)/ext/fts3/fts3_hash.c \ |
| 193 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 194 | $(TOP)/ext/fts3/fts3_icu.c \ |
| 195 | $(TOP)/ext/fts3/fts3_porter.c \ |
dan | 16708c4 | 2009-11-19 15:25:25 +0000 | [diff] [blame] | 196 | $(TOP)/ext/fts3/fts3_snippet.c \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 197 | $(TOP)/ext/fts3/fts3_tokenizer.h \ |
| 198 | $(TOP)/ext/fts3/fts3_tokenizer.c \ |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 199 | $(TOP)/ext/fts3/fts3_tokenizer1.c \ |
| 200 | $(TOP)/ext/fts3/fts3_write.c |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 201 | SRC += \ |
danielk1977 | 1c82665 | 2008-09-08 08:08:09 +0000 | [diff] [blame] | 202 | $(TOP)/ext/icu/sqliteicu.h \ |
shane | 8e28379 | 2009-08-21 02:07:09 +0000 | [diff] [blame] | 203 | $(TOP)/ext/icu/icu.c |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 204 | SRC += \ |
| 205 | $(TOP)/ext/rtree/rtree.h \ |
| 206 | $(TOP)/ext/rtree/rtree.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 207 | |
danielk1977 | 77b03a2 | 2007-06-20 08:49:05 +0000 | [diff] [blame] | 208 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 209 | # Generated source code files |
| 210 | # |
| 211 | SRC += \ |
| 212 | keywordhash.h \ |
| 213 | opcodes.c \ |
| 214 | opcodes.h \ |
| 215 | parse.c \ |
| 216 | parse.h \ |
| 217 | sqlite3.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 218 | |
| 219 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 220 | # Source code to the test files. |
| 221 | # |
drh | b6f4148 | 2004-05-14 01:58:11 +0000 | [diff] [blame] | 222 | TESTSRC = \ |
dan | 188829b | 2011-06-21 15:24:30 +0000 | [diff] [blame] | 223 | $(TOP)/ext/fts3/fts3_term.c \ |
dan | 99ebad9 | 2011-06-13 09:11:01 +0000 | [diff] [blame] | 224 | $(TOP)/ext/fts3/fts3_test.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 225 | $(TOP)/src/test1.c \ |
| 226 | $(TOP)/src/test2.c \ |
| 227 | $(TOP)/src/test3.c \ |
drh | a6064dc | 2003-12-19 02:52:05 +0000 | [diff] [blame] | 228 | $(TOP)/src/test4.c \ |
danielk1977 | 4adee20 | 2004-05-08 08:23:19 +0000 | [diff] [blame] | 229 | $(TOP)/src/test5.c \ |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 230 | $(TOP)/src/test6.c \ |
drh | 29c636b | 2006-01-09 23:40:25 +0000 | [diff] [blame] | 231 | $(TOP)/src/test7.c \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 232 | $(TOP)/src/test8.c \ |
danielk1977 | a713f2c | 2007-03-29 12:19:11 +0000 | [diff] [blame] | 233 | $(TOP)/src/test9.c \ |
drh | 1409be6 | 2006-08-23 20:07:20 +0000 | [diff] [blame] | 234 | $(TOP)/src/test_autoext.c \ |
drh | 2366940 | 2006-01-09 17:29:52 +0000 | [diff] [blame] | 235 | $(TOP)/src/test_async.c \ |
danielk1977 | 0410302 | 2009-02-03 16:51:24 +0000 | [diff] [blame] | 236 | $(TOP)/src/test_backup.c \ |
drh | 16a9b83 | 2007-05-05 18:39:25 +0000 | [diff] [blame] | 237 | $(TOP)/src/test_btree.c \ |
drh | c797d4d | 2007-05-08 01:08:49 +0000 | [diff] [blame] | 238 | $(TOP)/src/test_config.c \ |
dan | 0a7a915 | 2010-04-07 07:57:38 +0000 | [diff] [blame] | 239 | $(TOP)/src/test_demovfs.c \ |
danielk1977 | bf26097 | 2008-01-22 11:50:13 +0000 | [diff] [blame] | 240 | $(TOP)/src/test_devsym.c \ |
drh | 984bfaa | 2008-03-19 16:08:53 +0000 | [diff] [blame] | 241 | $(TOP)/src/test_func.c \ |
drh | 326a67d | 2011-03-26 15:05:27 +0000 | [diff] [blame] | 242 | $(TOP)/src/test_fuzzer.c \ |
drh | 1592659 | 2007-04-06 15:02:13 +0000 | [diff] [blame] | 243 | $(TOP)/src/test_hexio.c \ |
dan | e1ab219 | 2009-08-17 15:16:19 +0000 | [diff] [blame] | 244 | $(TOP)/src/test_init.c \ |
drh | 522efc6 | 2009-11-10 17:24:37 +0000 | [diff] [blame] | 245 | $(TOP)/src/test_intarray.c \ |
danielk1977 | a0fc729 | 2008-12-20 18:33:59 +0000 | [diff] [blame] | 246 | $(TOP)/src/test_journal.c \ |
drh | 2f999a6 | 2007-08-15 19:16:43 +0000 | [diff] [blame] | 247 | $(TOP)/src/test_malloc.c \ |
drh | 5a092e9 | 2010-11-04 21:03:47 +0000 | [diff] [blame] | 248 | $(TOP)/src/test_multiplex.c \ |
danielk1977 | 1a9ed0b | 2008-06-18 09:45:56 +0000 | [diff] [blame] | 249 | $(TOP)/src/test_mutex.c \ |
danielk1977 | b61c16d | 2007-09-14 16:19:27 +0000 | [diff] [blame] | 250 | $(TOP)/src/test_onefile.c \ |
danielk1977 | 5d1f5aa | 2008-04-10 14:51:00 +0000 | [diff] [blame] | 251 | $(TOP)/src/test_osinst.c \ |
drh | b232c23 | 2008-11-19 01:20:26 +0000 | [diff] [blame] | 252 | $(TOP)/src/test_pcache.c \ |
dan | 8cf35eb | 2010-09-01 11:40:05 +0000 | [diff] [blame] | 253 | $(TOP)/src/test_quota.c \ |
dan | 9508daa | 2010-08-28 18:58:00 +0000 | [diff] [blame] | 254 | $(TOP)/src/test_rtree.c \ |
danielk1977 | 954ce99 | 2006-06-15 15:59:19 +0000 | [diff] [blame] | 255 | $(TOP)/src/test_schema.c \ |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 256 | $(TOP)/src/test_server.c \ |
dan | 599e9d2 | 2010-07-12 08:39:37 +0000 | [diff] [blame] | 257 | $(TOP)/src/test_stat.c \ |
dan | e336b00 | 2010-11-19 18:20:09 +0000 | [diff] [blame] | 258 | $(TOP)/src/test_superlock.c \ |
dan | 213ca0a | 2011-03-28 19:10:06 +0000 | [diff] [blame] | 259 | $(TOP)/src/test_syscall.c \ |
drh | 4be8b51 | 2006-06-13 23:51:34 +0000 | [diff] [blame] | 260 | $(TOP)/src/test_tclvar.c \ |
danielk1977 | 44918fa | 2007-09-07 11:29:25 +0000 | [diff] [blame] | 261 | $(TOP)/src/test_thread.c \ |
dan | c7991bd | 2010-05-05 19:04:59 +0000 | [diff] [blame] | 262 | $(TOP)/src/test_vfs.c \ |
drh | 70586be | 2011-04-01 23:49:44 +0000 | [diff] [blame] | 263 | $(TOP)/src/test_wholenumber.c \ |
shane | 8e28379 | 2009-08-21 02:07:09 +0000 | [diff] [blame] | 264 | $(TOP)/src/test_wsd.c |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 265 | |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 266 | #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c |
| 267 | #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 268 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 269 | TESTSRC2 = \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 270 | $(TOP)/src/attach.c \ |
| 271 | $(TOP)/src/backup.c \ |
| 272 | $(TOP)/src/btree.c \ |
| 273 | $(TOP)/src/build.c \ |
| 274 | $(TOP)/src/date.c \ |
| 275 | $(TOP)/src/expr.c \ |
| 276 | $(TOP)/src/func.c \ |
| 277 | $(TOP)/src/insert.c \ |
| 278 | $(TOP)/src/wal.c \ |
| 279 | $(TOP)/src/mem5.c \ |
| 280 | $(TOP)/src/os.c \ |
| 281 | $(TOP)/src/os_os2.c \ |
| 282 | $(TOP)/src/os_unix.c \ |
| 283 | $(TOP)/src/os_win.c \ |
| 284 | $(TOP)/src/pager.c \ |
| 285 | $(TOP)/src/pragma.c \ |
| 286 | $(TOP)/src/prepare.c \ |
| 287 | $(TOP)/src/printf.c \ |
| 288 | $(TOP)/src/random.c \ |
| 289 | $(TOP)/src/pcache.c \ |
| 290 | $(TOP)/src/pcache1.c \ |
| 291 | $(TOP)/src/select.c \ |
| 292 | $(TOP)/src/tokenize.c \ |
| 293 | $(TOP)/src/utf.c \ |
| 294 | $(TOP)/src/util.c \ |
| 295 | $(TOP)/src/vdbeapi.c \ |
| 296 | $(TOP)/src/vdbeaux.c \ |
| 297 | $(TOP)/src/vdbe.c \ |
| 298 | $(TOP)/src/vdbemem.c \ |
| 299 | $(TOP)/src/where.c \ |
| 300 | parse.c \ |
| 301 | $(TOP)/ext/fts3/fts3.c \ |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 302 | $(TOP)/ext/fts3/fts3_aux.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 303 | $(TOP)/ext/fts3/fts3_expr.c \ |
| 304 | $(TOP)/ext/fts3/fts3_tokenizer.c \ |
| 305 | $(TOP)/ext/fts3/fts3_write.c \ |
danielk1977 | a3f0659 | 2009-04-23 14:58:39 +0000 | [diff] [blame] | 306 | $(TOP)/ext/async/sqlite3async.c |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 307 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 308 | # Header files used by all library source files. |
| 309 | # |
| 310 | HDR = \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 311 | $(TOP)/src/btree.h \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 312 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 313 | $(TOP)/src/hash.h \ |
shane | 9bcbdad | 2008-05-29 20:22:37 +0000 | [diff] [blame] | 314 | $(TOP)/src/hwtime.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 315 | keywordhash.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 316 | $(TOP)/src/mutex.h \ |
drh | 8f619cc | 2002-09-08 00:04:50 +0000 | [diff] [blame] | 317 | opcodes.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 318 | $(TOP)/src/os.h \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 319 | $(TOP)/src/os_common.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 320 | $(TOP)/src/pager.h \ |
danielk1977 | 8c0a791 | 2008-08-20 14:49:23 +0000 | [diff] [blame] | 321 | $(TOP)/src/pcache.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 322 | parse.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 323 | sqlite3.h \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 324 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 325 | $(TOP)/src/sqliteInt.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 326 | $(TOP)/src/sqliteLimit.h \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 327 | $(TOP)/src/vdbe.h \ |
mlcreech | 1e12d43 | 2008-05-07 02:42:01 +0000 | [diff] [blame] | 328 | $(TOP)/src/vdbeInt.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 329 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 330 | # Header files used by extensions |
| 331 | # |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 332 | EXTHDR += \ |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 333 | $(TOP)/ext/fts1/fts1.h \ |
| 334 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 335 | $(TOP)/ext/fts1/fts1_tokenizer.h |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 336 | EXTHDR += \ |
| 337 | $(TOP)/ext/fts2/fts2.h \ |
| 338 | $(TOP)/ext/fts2/fts2_hash.h \ |
| 339 | $(TOP)/ext/fts2/fts2_tokenizer.h |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 340 | EXTHDR += \ |
| 341 | $(TOP)/ext/fts3/fts3.h \ |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 342 | $(TOP)/ext/fts3/fts3Int.h \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 343 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 344 | $(TOP)/ext/fts3/fts3_tokenizer.h |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 345 | EXTHDR += \ |
| 346 | $(TOP)/ext/rtree/rtree.h |
danielk1977 | 1c82665 | 2008-09-08 08:08:09 +0000 | [diff] [blame] | 347 | EXTHDR += \ |
| 348 | $(TOP)/ext/icu/sqliteicu.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 349 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 350 | # This is the default Makefile target. The objects listed here |
| 351 | # are what get build when you type just "make" with no arguments. |
| 352 | # |
drh | 97903fe | 2005-05-24 20:19:57 +0000 | [diff] [blame] | 353 | all: sqlite3.h libsqlite3.a sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 354 | |
drh | d677b3d | 2007-08-20 22:48:41 +0000 | [diff] [blame] | 355 | libsqlite3.a: $(LIBOBJ) |
| 356 | $(AR) libsqlite3.a $(LIBOBJ) |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 357 | $(RANLIB) libsqlite3.a |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 358 | |
drh | cbd2da9 | 2007-12-17 16:20:06 +0000 | [diff] [blame] | 359 | sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h |
danielk1977 | 315e669 | 2007-12-18 11:19:35 +0000 | [diff] [blame] | 360 | $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \ |
drh | c9a67a8 | 2007-12-13 18:20:46 +0000 | [diff] [blame] | 361 | $(TOP)/src/shell.c \ |
| 362 | libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) |
| 363 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 364 | # This target creates a directory named "tsrc" and fills it with |
| 365 | # copies of all of the C source code and header files needed to |
| 366 | # build on the target system. Some of the C source code and header |
| 367 | # files are automatically generated. This target takes care of |
| 368 | # all that automatic generation. |
| 369 | # |
drh | 856c103 | 2009-06-02 15:21:42 +0000 | [diff] [blame] | 370 | target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 371 | rm -rf tsrc |
| 372 | mkdir tsrc |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 373 | cp -f $(SRC) tsrc |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 374 | rm tsrc/sqlite.h.in tsrc/parse.y |
drh | 856c103 | 2009-06-02 15:21:42 +0000 | [diff] [blame] | 375 | tclsh $(TOP)/tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new |
| 376 | mv vdbe.new tsrc/vdbe.c |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 377 | touch target_source |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 378 | |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 379 | sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl |
| 380 | tclsh $(TOP)/tool/mksqlite3c.tcl |
drh | aa1cf5a | 2010-10-01 17:23:46 +0000 | [diff] [blame] | 381 | echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c |
| 382 | cat sqlite3.c >>tclsqlite3.c |
| 383 | echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c |
drh | bd08af4 | 2007-04-05 21:58:33 +0000 | [diff] [blame] | 384 | cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 385 | |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 386 | fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl |
| 387 | tclsh $(TOP)/ext/fts2/mkfts2amal.tcl |
| 388 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 389 | fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl |
| 390 | tclsh $(TOP)/ext/fts3/mkfts3amal.tcl |
| 391 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 392 | # Rules to build the LEMON compiler generator |
| 393 | # |
drh | 53bc21b | 2009-07-03 17:09:28 +0000 | [diff] [blame] | 394 | lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 395 | $(BCC) -o lemon $(TOP)/tool/lemon.c |
drh | 53bc21b | 2009-07-03 17:09:28 +0000 | [diff] [blame] | 396 | cp $(TOP)/src/lempar.c . |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 397 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 398 | # Rules to build individual *.o files from generated *.c files. This |
| 399 | # applies to: |
| 400 | # |
| 401 | # parse.o |
| 402 | # opcodes.o |
| 403 | # |
mlcreech | 2379706 | 2008-03-20 02:25:35 +0000 | [diff] [blame] | 404 | %.o: %.c $(HDR) |
| 405 | $(TCCX) -c $< |
| 406 | |
| 407 | # Rules to build individual *.o files from files in the src directory. |
| 408 | # |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 409 | %.o: $(TOP)/src/%.c $(HDR) |
| 410 | $(TCCX) -c $< |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 411 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 412 | tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) |
| 413 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 414 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 415 | |
drh | 900b31e | 2007-08-28 02:27:51 +0000 | [diff] [blame] | 416 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 417 | # Rules to build opcodes.c and opcodes.h |
| 418 | # |
drh | b327f77 | 2004-10-06 15:03:57 +0000 | [diff] [blame] | 419 | opcodes.c: opcodes.h $(TOP)/mkopcodec.awk |
drh | 0c07fb9 | 2006-06-27 20:05:23 +0000 | [diff] [blame] | 420 | 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] | 421 | |
drh | f2bc013 | 2004-10-04 13:19:23 +0000 | [diff] [blame] | 422 | opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 423 | cat parse.h $(TOP)/src/vdbe.c | \ |
| 424 | $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 425 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 426 | # Rules to build parse.c and parse.h - the outputs of lemon. |
| 427 | # |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 428 | parse.h: parse.c |
| 429 | |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 430 | parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 431 | cp $(TOP)/src/parse.y . |
drh | 36bc402 | 2007-10-12 00:23:44 +0000 | [diff] [blame] | 432 | rm -f parse.h |
drh | 27d258a | 2004-10-30 20:23:09 +0000 | [diff] [blame] | 433 | ./lemon $(OPTS) parse.y |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 434 | mv parse.h parse.h.temp |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 435 | $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 436 | |
drh | 47baebc | 2009-08-14 16:01:24 +0000 | [diff] [blame] | 437 | sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION |
| 438 | tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 439 | |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 440 | keywordhash.h: $(TOP)/tool/mkkeywordhash.c |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 441 | $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 442 | ./mkkeywordhash >keywordhash.h |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 443 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 444 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 445 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 446 | # Rules to build the extension objects. |
| 447 | # |
| 448 | icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR) |
| 449 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c |
| 450 | |
| 451 | fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR) |
| 452 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c |
| 453 | |
| 454 | fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR) |
| 455 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c |
| 456 | |
| 457 | fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR) |
| 458 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c |
| 459 | |
| 460 | fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR) |
| 461 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c |
| 462 | |
| 463 | fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR) |
| 464 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c |
| 465 | |
| 466 | fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR) |
| 467 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c |
| 468 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 469 | fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR) |
| 470 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c |
| 471 | |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 472 | fts3_aux.o: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR) |
| 473 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c |
| 474 | |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 475 | fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR) |
| 476 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c |
| 477 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 478 | fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR) |
| 479 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c |
| 480 | |
| 481 | fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR) |
| 482 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c |
| 483 | |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 484 | fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR) |
| 485 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c |
| 486 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 487 | fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR) |
| 488 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c |
| 489 | |
| 490 | fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR) |
| 491 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c |
| 492 | |
| 493 | fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR) |
| 494 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c |
| 495 | |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 496 | fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR) |
| 497 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c |
| 498 | |
danielk1977 | ebaecc1 | 2008-05-26 18:41:54 +0000 | [diff] [blame] | 499 | rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) |
| 500 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c |
| 501 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 502 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 503 | # Rules for building test programs and for running tests |
| 504 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 505 | tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a |
| 506 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \ |
danielk1977 | bc6ada4 | 2004-06-30 08:20:16 +0000 | [diff] [blame] | 507 | $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 508 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 509 | |
| 510 | # Rules to build the 'testfixture' application. |
| 511 | # |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 512 | TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 513 | TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE |
| 514 | |
| 515 | testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 516 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 517 | $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ |
| 518 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a |
| 519 | |
| 520 | amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 521 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 522 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ |
| 523 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 524 | |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 525 | fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 526 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 527 | -DSQLITE_ENABLE_FTS3=1 \ |
| 528 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \ |
| 529 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) |
| 530 | |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 531 | fulltest: testfixture$(EXE) sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 532 | ./testfixture$(EXE) $(TOP)/test/all.test |
| 533 | |
drh | 44548ec | 2007-06-18 12:22:43 +0000 | [diff] [blame] | 534 | soaktest: testfixture$(EXE) sqlite3$(EXE) |
dan | 0626dfc | 2010-06-15 06:56:37 +0000 | [diff] [blame] | 535 | ./testfixture$(EXE) $(TOP)/test/all.test -soak=1 |
drh | 44548ec | 2007-06-18 12:22:43 +0000 | [diff] [blame] | 536 | |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 537 | test: testfixture$(EXE) sqlite3$(EXE) |
danielk1977 | ff3c898 | 2008-06-25 17:54:53 +0000 | [diff] [blame] | 538 | ./testfixture$(EXE) $(TOP)/test/veryquick.test |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 539 | |
dan | d38bc1b | 2010-09-13 12:15:36 +0000 | [diff] [blame] | 540 | # The next two rules are used to support the "threadtest" target. Building |
| 541 | # threadtest runs a few thread-safety tests that are implemented in C. This |
| 542 | # target is invoked by the releasetest.tcl script. |
| 543 | # |
dan | 24cd616 | 2010-11-19 09:58:11 +0000 | [diff] [blame] | 544 | threadtest3$(EXE): sqlite3.o $(TOP)/test/threadtest3.c $(TOP)/test/tt3_checkpoint.c |
| 545 | $(TCCX) -O2 sqlite3.o $(TOP)/test/threadtest3.c \ |
dan | d38bc1b | 2010-09-13 12:15:36 +0000 | [diff] [blame] | 546 | -o threadtest3$(EXE) $(THREADLIB) |
| 547 | |
| 548 | threadtest: threadtest3$(EXE) |
| 549 | ./threadtest3$(EXE) |
| 550 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 551 | sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \ |
drh | 3e27c02 | 2004-07-23 00:01:38 +0000 | [diff] [blame] | 552 | $(TOP)/tool/spaceanal.tcl |
drh | 3dcf39a | 2011-06-21 03:36:06 +0000 | [diff] [blame] | 553 | $(NAWK) -f $(TOP)/tool/tostr.awk $(TOP)/tool/spaceanal.tcl \ |
| 554 | >spaceanal_tcl.h |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 555 | $(TCCX) $(TCL_FLAGS) -DTCLSH=2 $(TESTFIXTURE_FLAGS) \ |
| 556 | -DSQLITE_TEST=1 -DSQLITE_PRIVATE="" \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 557 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ |
| 558 | -o sqlite3_analyzer$(EXE) \ |
| 559 | $(LIBTCL) $(THREADLIB) |
drh | 3e27c02 | 2004-07-23 00:01:38 +0000 | [diff] [blame] | 560 | |
danielk1977 | 69e777f | 2006-06-14 10:38:02 +0000 | [diff] [blame] | 561 | TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO) |
| 562 | $(TEST_EXTENSION): $(TOP)/src/test_loadext.c |
| 563 | $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION) |
| 564 | |
| 565 | extensiontest: testfixture$(EXE) $(TEST_EXTENSION) |
| 566 | ./testfixture$(EXE) $(TOP)/test/loadext.test |
| 567 | |
dan | e7152dc | 2011-07-07 08:19:16 +0000 | [diff] [blame] | 568 | # This target will fail if the SQLite amalgamation contains any exported |
| 569 | # symbols that do not begin with "sqlite3_". It is run as part of the |
| 570 | # releasetest.tcl script. |
| 571 | # |
| 572 | checksymbols: sqlite3.o |
| 573 | nm -g --defined-only sqlite3.o | grep -v " sqlite3_" ; test $$? -ne 0 |
| 574 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 575 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 576 | # Standard install and cleanup targets |
| 577 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 578 | install: sqlite3 libsqlite3.a sqlite3.h |
| 579 | mv sqlite3 /usr/bin |
| 580 | mv libsqlite3.a /usr/lib |
| 581 | mv sqlite3.h /usr/include |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 582 | |
| 583 | clean: |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 584 | rm -f *.o sqlite3 libsqlite3.a sqlite3.h opcodes.* |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 585 | rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 586 | rm -f $(PUBLISH) |
| 587 | rm -f *.da *.bb *.bbg gmon.out |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 588 | rm -rf tsrc target_source |
drh | f80ad49 | 2006-09-02 22:14:59 +0000 | [diff] [blame] | 589 | rm -f testloadext.dll libtestloadext.so |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 590 | rm -f sqlite3.c fts?amal.c tclsqlite3.c |