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