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