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 | # |
drh | 45fac88 | 2015-10-09 01:42:49 +0000 | [diff] [blame] | 15 | # LIBS Extra libraries options |
| 16 | # |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 17 | # OPTS Extra compiler command-line options. |
| 18 | # |
| 19 | # EXE The suffix to add to executable files. ".exe" for windows |
| 20 | # and "" for Unix. |
| 21 | # |
| 22 | # TCC C Compiler and options for use in building executables that |
| 23 | # will run on the target platform. This is usually the same |
| 24 | # as BCC, unless you are cross-compiling. |
| 25 | # |
| 26 | # AR Tools used to build a static library. |
| 27 | # RANLIB |
| 28 | # |
| 29 | # TCL_FLAGS Extra compiler options needed for programs that use the |
| 30 | # TCL library. |
| 31 | # |
| 32 | # LIBTCL Linker options needed to link against the TCL library. |
| 33 | # |
| 34 | # READLINE_FLAGS Compiler options needed for programs that use the |
| 35 | # readline() library. |
| 36 | # |
| 37 | # LIBREADLINE Linker options needed by programs using readline() must |
| 38 | # link against. |
| 39 | # |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 40 | # Once the macros above are defined, the rest of this make script will |
| 41 | # build the SQLite library and testing tools. |
| 42 | ################################################################################ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 43 | |
| 44 | # This is how we compile |
| 45 | # |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 46 | TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) |
| 47 | TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3 |
drh | f442e33 | 2014-09-10 19:01:14 +0000 | [diff] [blame] | 48 | TCCX += -I$(TOP)/ext/async -I$(TOP)/ext/userauth |
dan | 4fccf43 | 2011-03-08 19:22:50 +0000 | [diff] [blame] | 49 | TCCX += -I$(TOP)/ext/session |
dan | bea34fc | 2015-09-02 17:34:22 +0000 | [diff] [blame] | 50 | TCCX += -I$(TOP)/ext/fts5 |
drh | 45fac88 | 2015-10-09 01:42:49 +0000 | [diff] [blame] | 51 | THREADLIB += $(LIBS) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 52 | |
| 53 | # Object files for the SQLite library. |
| 54 | # |
drh | 30a6837 | 2013-07-29 13:51:54 +0000 | [diff] [blame] | 55 | LIBOBJ+= vdbe.o parse.o \ |
| 56 | alter.o analyze.o attach.o auth.o \ |
danielk1977 | 0410302 | 2009-02-03 16:51:24 +0000 | [diff] [blame] | 57 | backup.o bitvec.o btmutex.o btree.o build.o \ |
dan | 0008ce7 | 2015-10-09 11:09:47 +0000 | [diff] [blame] | 58 | callback.o complete.o ctime.o date.o dbstat.o delete.o expr.o \ |
| 59 | fault.o fkey.o \ |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 60 | 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] | 61 | fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \ |
dan | d7a959c | 2013-04-22 15:30:37 +0000 | [diff] [blame] | 62 | fts3_tokenize_vtab.o \ |
dan | 3d403c7 | 2012-05-25 17:50:19 +0000 | [diff] [blame] | 63 | fts3_unicode.o fts3_unicode2.o \ |
drh | 45fac88 | 2015-10-09 01:42:49 +0000 | [diff] [blame] | 64 | fts3_write.o fts5.o func.o global.o hash.o \ |
drh | c2f18ad | 2016-03-05 15:35:09 +0000 | [diff] [blame] | 65 | icu.o insert.o json1.o legacy.o loadext.o \ |
drh | d1370b6 | 2008-10-28 18:58:20 +0000 | [diff] [blame] | 66 | 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] | 67 | memjournal.o \ |
drh | 83905c9 | 2012-06-21 13:00:37 +0000 | [diff] [blame] | 68 | mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \ |
| 69 | notify.o opcodes.o os.o os_unix.o os_win.o \ |
drh | 30a6837 | 2013-07-29 13:51:54 +0000 | [diff] [blame] | 70 | pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \ |
drh | f00f530 | 2017-06-28 15:47:29 +0000 | [diff] [blame] | 71 | random.o resolve.o rowset.o rtree.o \ |
drh | c6603af | 2017-06-29 14:33:51 +0000 | [diff] [blame] | 72 | select.o sqlite3rbu.o status.o stmt.o \ |
drh | 38b4149 | 2015-06-08 15:08:15 +0000 | [diff] [blame] | 73 | table.o threads.o tokenize.o treeview.o trigger.o \ |
drh | e933b83 | 2014-09-10 17:34:28 +0000 | [diff] [blame] | 74 | update.o userauth.o util.o vacuum.o \ |
drh | 30a6837 | 2013-07-29 13:51:54 +0000 | [diff] [blame] | 75 | vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \ |
drh | 6c1f4ef | 2015-06-08 14:23:15 +0000 | [diff] [blame] | 76 | vdbetrace.o wal.o walker.o where.o wherecode.o whereexpr.o \ |
| 77 | utf.o vtab.o |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 78 | |
drh | e622961 | 2014-08-18 15:08:26 +0000 | [diff] [blame] | 79 | LIBOBJ += sqlite3session.o |
danielk1977 | 3766875 | 2008-10-14 14:28:35 +0000 | [diff] [blame] | 80 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 81 | # All of the source code files. |
| 82 | # |
| 83 | SRC = \ |
drh | d0e4a6c | 2005-02-15 20:47:57 +0000 | [diff] [blame] | 84 | $(TOP)/src/alter.c \ |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 85 | $(TOP)/src/analyze.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 86 | $(TOP)/src/attach.c \ |
drh | ed6c867 | 2003-01-12 18:02:16 +0000 | [diff] [blame] | 87 | $(TOP)/src/auth.c \ |
danielk1977 | 0410302 | 2009-02-03 16:51:24 +0000 | [diff] [blame] | 88 | $(TOP)/src/backup.c \ |
drh | f5e7bb5 | 2008-02-18 14:47:33 +0000 | [diff] [blame] | 89 | $(TOP)/src/bitvec.c \ |
drh | 900b31e | 2007-08-28 02:27:51 +0000 | [diff] [blame] | 90 | $(TOP)/src/btmutex.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 91 | $(TOP)/src/btree.c \ |
| 92 | $(TOP)/src/btree.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 93 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 94 | $(TOP)/src/build.c \ |
danielk1977 | fd9a0a4 | 2005-05-24 12:01:00 +0000 | [diff] [blame] | 95 | $(TOP)/src/callback.c \ |
drh | a2b902d | 2005-08-14 17:53:20 +0000 | [diff] [blame] | 96 | $(TOP)/src/complete.c \ |
shaneh | dc97a8c | 2010-02-23 20:08:35 +0000 | [diff] [blame] | 97 | $(TOP)/src/ctime.c \ |
drh | 7014aff | 2003-11-01 01:53:53 +0000 | [diff] [blame] | 98 | $(TOP)/src/date.c \ |
drh | 1a4a680 | 2015-05-04 18:31:09 +0000 | [diff] [blame] | 99 | $(TOP)/src/dbstat.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 100 | $(TOP)/src/delete.c \ |
| 101 | $(TOP)/src/expr.c \ |
drh | 643167f | 2008-01-22 21:30:53 +0000 | [diff] [blame] | 102 | $(TOP)/src/fault.c \ |
dan | 3be7d6e | 2009-09-19 17:59:59 +0000 | [diff] [blame] | 103 | $(TOP)/src/fkey.c \ |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 104 | $(TOP)/src/func.c \ |
drh | 40257ff | 2008-06-13 18:24:27 +0000 | [diff] [blame] | 105 | $(TOP)/src/global.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 106 | $(TOP)/src/hash.c \ |
| 107 | $(TOP)/src/hash.h \ |
shane | 9bcbdad | 2008-05-29 20:22:37 +0000 | [diff] [blame] | 108 | $(TOP)/src/hwtime.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 109 | $(TOP)/src/insert.c \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 110 | $(TOP)/src/legacy.c \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 111 | $(TOP)/src/loadext.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 112 | $(TOP)/src/main.c \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 113 | $(TOP)/src/malloc.c \ |
drh | d1370b6 | 2008-10-28 18:58:20 +0000 | [diff] [blame] | 114 | $(TOP)/src/mem0.c \ |
drh | 4c3645c | 2007-08-15 17:07:57 +0000 | [diff] [blame] | 115 | $(TOP)/src/mem1.c \ |
| 116 | $(TOP)/src/mem2.c \ |
drh | 9c7a60d | 2007-10-19 17:47:24 +0000 | [diff] [blame] | 117 | $(TOP)/src/mem3.c \ |
drh | 0d18020 | 2008-02-14 23:26:56 +0000 | [diff] [blame] | 118 | $(TOP)/src/mem5.c \ |
danielk1977 | b317538 | 2008-10-17 18:51:52 +0000 | [diff] [blame] | 119 | $(TOP)/src/memjournal.c \ |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 120 | $(TOP)/src/msvc.h \ |
drh | 90f6a5b | 2007-08-15 13:04:54 +0000 | [diff] [blame] | 121 | $(TOP)/src/mutex.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 122 | $(TOP)/src/mutex.h \ |
drh | 18472fa | 2008-10-07 15:25:48 +0000 | [diff] [blame] | 123 | $(TOP)/src/mutex_noop.c \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 124 | $(TOP)/src/mutex_unix.c \ |
| 125 | $(TOP)/src/mutex_w32.c \ |
danielk1977 | 404ca07 | 2009-03-16 13:19:36 +0000 | [diff] [blame] | 126 | $(TOP)/src/notify.c \ |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 127 | $(TOP)/src/os.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 128 | $(TOP)/src/os.h \ |
| 129 | $(TOP)/src/os_common.h \ |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 130 | $(TOP)/src/os_setup.h \ |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 131 | $(TOP)/src/os_unix.c \ |
| 132 | $(TOP)/src/os_win.c \ |
mistachkin | 8bc5262 | 2013-11-25 09:36:07 +0000 | [diff] [blame] | 133 | $(TOP)/src/os_win.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 134 | $(TOP)/src/pager.c \ |
| 135 | $(TOP)/src/pager.h \ |
| 136 | $(TOP)/src/parse.y \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 137 | $(TOP)/src/pcache.c \ |
| 138 | $(TOP)/src/pcache.h \ |
danielk1977 | bc2ca9e | 2008-11-13 14:28:28 +0000 | [diff] [blame] | 139 | $(TOP)/src/pcache1.c \ |
drh | c11d4f9 | 2003-04-06 21:08:24 +0000 | [diff] [blame] | 140 | $(TOP)/src/pragma.c \ |
drh | 67e65e5 | 2015-02-02 21:34:54 +0000 | [diff] [blame] | 141 | $(TOP)/src/pragma.h \ |
danielk1977 | fa256a3 | 2005-05-25 04:11:56 +0000 | [diff] [blame] | 142 | $(TOP)/src/prepare.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 143 | $(TOP)/src/printf.c \ |
| 144 | $(TOP)/src/random.c \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 145 | $(TOP)/src/resolve.c \ |
drh | 3d4501e | 2008-12-04 20:40:10 +0000 | [diff] [blame] | 146 | $(TOP)/src/rowset.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 147 | $(TOP)/src/select.c \ |
drh | f714199 | 2008-06-19 00:16:08 +0000 | [diff] [blame] | 148 | $(TOP)/src/status.c \ |
drh | aa62d2e | 2017-10-12 13:47:48 +0000 | [diff] [blame] | 149 | $(TOP)/src/shell.c.in \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 150 | $(TOP)/src/sqlite.h.in \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 151 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 152 | $(TOP)/src/sqliteInt.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 153 | $(TOP)/src/sqliteLimit.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 154 | $(TOP)/src/table.c \ |
| 155 | $(TOP)/src/tclsqlite.c \ |
drh | f51446a | 2012-07-21 19:40:42 +0000 | [diff] [blame] | 156 | $(TOP)/src/threads.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 157 | $(TOP)/src/tokenize.c \ |
drh | 38b4149 | 2015-06-08 15:08:15 +0000 | [diff] [blame] | 158 | $(TOP)/src/treeview.c \ |
drh | dc37945 | 2002-05-15 12:45:43 +0000 | [diff] [blame] | 159 | $(TOP)/src/trigger.c \ |
drh | 1bbf5ee | 2004-05-11 01:18:24 +0000 | [diff] [blame] | 160 | $(TOP)/src/utf.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 161 | $(TOP)/src/update.c \ |
| 162 | $(TOP)/src/util.c \ |
drh | e1051c6 | 2003-04-06 20:52:32 +0000 | [diff] [blame] | 163 | $(TOP)/src/vacuum.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 164 | $(TOP)/src/vdbe.c \ |
| 165 | $(TOP)/src/vdbe.h \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 166 | $(TOP)/src/vdbeapi.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 167 | $(TOP)/src/vdbeaux.c \ |
danielk1977 | b4e9af9 | 2007-05-01 17:49:49 +0000 | [diff] [blame] | 168 | $(TOP)/src/vdbeblob.c \ |
drh | eb2e176 | 2004-05-27 01:53:56 +0000 | [diff] [blame] | 169 | $(TOP)/src/vdbemem.c \ |
dan | a20fde6 | 2011-07-12 14:28:05 +0000 | [diff] [blame] | 170 | $(TOP)/src/vdbesort.c \ |
drh | c7bc4fd | 2009-11-25 18:03:42 +0000 | [diff] [blame] | 171 | $(TOP)/src/vdbetrace.c \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 172 | $(TOP)/src/vdbeInt.h \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 173 | $(TOP)/src/vtab.c \ |
drh | 8cd5b25 | 2015-03-02 22:06:43 +0000 | [diff] [blame] | 174 | $(TOP)/src/vxworks.h \ |
drh | c438efd | 2010-04-26 00:19:45 +0000 | [diff] [blame] | 175 | $(TOP)/src/wal.c \ |
| 176 | $(TOP)/src/wal.h \ |
drh | 7d10d5a | 2008-08-20 16:35:10 +0000 | [diff] [blame] | 177 | $(TOP)/src/walker.c \ |
drh | e54df42 | 2013-11-12 18:37:25 +0000 | [diff] [blame] | 178 | $(TOP)/src/where.c \ |
drh | 6f82e85 | 2015-06-06 20:12:09 +0000 | [diff] [blame] | 179 | $(TOP)/src/wherecode.c \ |
drh | 6c1f4ef | 2015-06-08 14:23:15 +0000 | [diff] [blame] | 180 | $(TOP)/src/whereexpr.c \ |
drh | e54df42 | 2013-11-12 18:37:25 +0000 | [diff] [blame] | 181 | $(TOP)/src/whereInt.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 182 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 183 | # Source code for extensions |
| 184 | # |
| 185 | SRC += \ |
| 186 | $(TOP)/ext/fts1/fts1.c \ |
| 187 | $(TOP)/ext/fts1/fts1.h \ |
| 188 | $(TOP)/ext/fts1/fts1_hash.c \ |
| 189 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 190 | $(TOP)/ext/fts1/fts1_porter.c \ |
| 191 | $(TOP)/ext/fts1/fts1_tokenizer.h \ |
| 192 | $(TOP)/ext/fts1/fts1_tokenizer1.c |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 193 | SRC += \ |
| 194 | $(TOP)/ext/fts2/fts2.c \ |
| 195 | $(TOP)/ext/fts2/fts2.h \ |
| 196 | $(TOP)/ext/fts2/fts2_hash.c \ |
| 197 | $(TOP)/ext/fts2/fts2_hash.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 198 | $(TOP)/ext/fts2/fts2_icu.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 199 | $(TOP)/ext/fts2/fts2_porter.c \ |
| 200 | $(TOP)/ext/fts2/fts2_tokenizer.h \ |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 201 | $(TOP)/ext/fts2/fts2_tokenizer.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 202 | $(TOP)/ext/fts2/fts2_tokenizer1.c |
danielk1977 | 08ada51 | 2007-06-26 10:56:40 +0000 | [diff] [blame] | 203 | SRC += \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 204 | $(TOP)/ext/fts3/fts3.c \ |
| 205 | $(TOP)/ext/fts3/fts3.h \ |
drh | f7829ad | 2009-11-25 22:42:22 +0000 | [diff] [blame] | 206 | $(TOP)/ext/fts3/fts3Int.h \ |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 207 | $(TOP)/ext/fts3/fts3_aux.c \ |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 208 | $(TOP)/ext/fts3/fts3_expr.c \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 209 | $(TOP)/ext/fts3/fts3_hash.c \ |
| 210 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 211 | $(TOP)/ext/fts3/fts3_icu.c \ |
| 212 | $(TOP)/ext/fts3/fts3_porter.c \ |
dan | 16708c4 | 2009-11-19 15:25:25 +0000 | [diff] [blame] | 213 | $(TOP)/ext/fts3/fts3_snippet.c \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 214 | $(TOP)/ext/fts3/fts3_tokenizer.h \ |
| 215 | $(TOP)/ext/fts3/fts3_tokenizer.c \ |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 216 | $(TOP)/ext/fts3/fts3_tokenizer1.c \ |
dan | d7a959c | 2013-04-22 15:30:37 +0000 | [diff] [blame] | 217 | $(TOP)/ext/fts3/fts3_tokenize_vtab.c \ |
dan | 3d403c7 | 2012-05-25 17:50:19 +0000 | [diff] [blame] | 218 | $(TOP)/ext/fts3/fts3_unicode.c \ |
| 219 | $(TOP)/ext/fts3/fts3_unicode2.c \ |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 220 | $(TOP)/ext/fts3/fts3_write.c |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 221 | SRC += \ |
danielk1977 | 1c82665 | 2008-09-08 08:08:09 +0000 | [diff] [blame] | 222 | $(TOP)/ext/icu/sqliteicu.h \ |
shane | 8e28379 | 2009-08-21 02:07:09 +0000 | [diff] [blame] | 223 | $(TOP)/ext/icu/icu.c |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 224 | SRC += \ |
drh | 2e7be08 | 2014-05-07 21:16:56 +0000 | [diff] [blame] | 225 | $(TOP)/ext/rtree/sqlite3rtree.h \ |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 226 | $(TOP)/ext/rtree/rtree.h \ |
| 227 | $(TOP)/ext/rtree/rtree.c |
drh | e933b83 | 2014-09-10 17:34:28 +0000 | [diff] [blame] | 228 | SRC += \ |
drh | 8ce2b09 | 2013-03-13 12:20:15 +0000 | [diff] [blame] | 229 | $(TOP)/ext/session/sqlite3session.c \ |
| 230 | $(TOP)/ext/session/sqlite3session.h |
drh | 6b011d8 | 2014-09-21 22:49:20 +0000 | [diff] [blame] | 231 | SRC += \ |
drh | e933b83 | 2014-09-10 17:34:28 +0000 | [diff] [blame] | 232 | $(TOP)/ext/userauth/userauth.c \ |
dan | ed2589f | 2015-06-25 20:10:24 +0000 | [diff] [blame] | 233 | $(TOP)/ext/userauth/sqlite3userauth.h |
dan | 92e497e | 2014-07-28 20:14:02 +0000 | [diff] [blame] | 234 | SRC += \ |
drh | cfb8f8d | 2015-07-23 20:44:49 +0000 | [diff] [blame] | 235 | $(TOP)/ext/rbu/sqlite3rbu.c \ |
| 236 | $(TOP)/ext/rbu/sqlite3rbu.h |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 237 | SRC += \ |
drh | f00f530 | 2017-06-28 15:47:29 +0000 | [diff] [blame] | 238 | $(TOP)/ext/misc/json1.c \ |
drh | c6603af | 2017-06-29 14:33:51 +0000 | [diff] [blame] | 239 | $(TOP)/ext/misc/stmt.c |
dan | 92e497e | 2014-07-28 20:14:02 +0000 | [diff] [blame] | 240 | |
danielk1977 | 77b03a2 | 2007-06-20 08:49:05 +0000 | [diff] [blame] | 241 | |
dan | bea34fc | 2015-09-02 17:34:22 +0000 | [diff] [blame] | 242 | # FTS5 things |
| 243 | # |
| 244 | FTS5_HDR = \ |
| 245 | $(TOP)/ext/fts5/fts5.h \ |
| 246 | $(TOP)/ext/fts5/fts5Int.h \ |
| 247 | fts5parse.h |
| 248 | |
| 249 | FTS5_SRC = \ |
| 250 | $(TOP)/ext/fts5/fts5_aux.c \ |
| 251 | $(TOP)/ext/fts5/fts5_buffer.c \ |
| 252 | $(TOP)/ext/fts5/fts5_main.c \ |
| 253 | $(TOP)/ext/fts5/fts5_config.c \ |
| 254 | $(TOP)/ext/fts5/fts5_expr.c \ |
| 255 | $(TOP)/ext/fts5/fts5_hash.c \ |
| 256 | $(TOP)/ext/fts5/fts5_index.c \ |
| 257 | fts5parse.c \ |
| 258 | $(TOP)/ext/fts5/fts5_storage.c \ |
| 259 | $(TOP)/ext/fts5/fts5_tokenize.c \ |
| 260 | $(TOP)/ext/fts5/fts5_unicode2.c \ |
| 261 | $(TOP)/ext/fts5/fts5_varint.c \ |
| 262 | $(TOP)/ext/fts5/fts5_vocab.c \ |
| 263 | |
| 264 | |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 265 | # Generated source code files |
| 266 | # |
| 267 | SRC += \ |
| 268 | keywordhash.h \ |
| 269 | opcodes.c \ |
| 270 | opcodes.h \ |
| 271 | parse.c \ |
| 272 | parse.h \ |
drh | aa62d2e | 2017-10-12 13:47:48 +0000 | [diff] [blame] | 273 | shell.c \ |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 274 | sqlite3.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 275 | |
| 276 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 277 | # Source code to the test files. |
| 278 | # |
drh | b6f4148 | 2004-05-14 01:58:11 +0000 | [diff] [blame] | 279 | TESTSRC = \ |
dan | cd84474 | 2017-04-10 16:13:20 +0000 | [diff] [blame] | 280 | $(TOP)/ext/expert/sqlite3expert.c \ |
| 281 | $(TOP)/ext/expert/test_expert.c \ |
dan | 188829b | 2011-06-21 15:24:30 +0000 | [diff] [blame] | 282 | $(TOP)/ext/fts3/fts3_term.c \ |
dan | 99ebad9 | 2011-06-13 09:11:01 +0000 | [diff] [blame] | 283 | $(TOP)/ext/fts3/fts3_test.c \ |
drh | cfb8f8d | 2015-07-23 20:44:49 +0000 | [diff] [blame] | 284 | $(TOP)/ext/rbu/test_rbu.c \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 285 | $(TOP)/src/test1.c \ |
| 286 | $(TOP)/src/test2.c \ |
| 287 | $(TOP)/src/test3.c \ |
drh | a6064dc | 2003-12-19 02:52:05 +0000 | [diff] [blame] | 288 | $(TOP)/src/test4.c \ |
danielk1977 | 4adee20 | 2004-05-08 08:23:19 +0000 | [diff] [blame] | 289 | $(TOP)/src/test5.c \ |
drh | 9c06c95 | 2005-11-26 00:25:00 +0000 | [diff] [blame] | 290 | $(TOP)/src/test6.c \ |
drh | 29c636b | 2006-01-09 23:40:25 +0000 | [diff] [blame] | 291 | $(TOP)/src/test7.c \ |
drh | b9bb7c1 | 2006-06-11 23:41:55 +0000 | [diff] [blame] | 292 | $(TOP)/src/test8.c \ |
danielk1977 | a713f2c | 2007-03-29 12:19:11 +0000 | [diff] [blame] | 293 | $(TOP)/src/test9.c \ |
drh | 1409be6 | 2006-08-23 20:07:20 +0000 | [diff] [blame] | 294 | $(TOP)/src/test_autoext.c \ |
drh | 2366940 | 2006-01-09 17:29:52 +0000 | [diff] [blame] | 295 | $(TOP)/src/test_async.c \ |
danielk1977 | 0410302 | 2009-02-03 16:51:24 +0000 | [diff] [blame] | 296 | $(TOP)/src/test_backup.c \ |
dan | 8e4251b | 2016-03-01 18:07:43 +0000 | [diff] [blame] | 297 | $(TOP)/src/test_bestindex.c \ |
dan | b391b94 | 2014-11-07 14:41:11 +0000 | [diff] [blame] | 298 | $(TOP)/src/test_blob.c \ |
drh | 16a9b83 | 2007-05-05 18:39:25 +0000 | [diff] [blame] | 299 | $(TOP)/src/test_btree.c \ |
drh | c797d4d | 2007-05-08 01:08:49 +0000 | [diff] [blame] | 300 | $(TOP)/src/test_config.c \ |
dan | 000f95b | 2016-09-09 20:00:40 +0000 | [diff] [blame] | 301 | $(TOP)/src/test_delete.c \ |
dan | 0a7a915 | 2010-04-07 07:57:38 +0000 | [diff] [blame] | 302 | $(TOP)/src/test_demovfs.c \ |
danielk1977 | bf26097 | 2008-01-22 11:50:13 +0000 | [diff] [blame] | 303 | $(TOP)/src/test_devsym.c \ |
dan | 9f5ff37 | 2013-01-11 09:58:54 +0000 | [diff] [blame] | 304 | $(TOP)/src/test_fs.c \ |
drh | 984bfaa | 2008-03-19 16:08:53 +0000 | [diff] [blame] | 305 | $(TOP)/src/test_func.c \ |
drh | 1592659 | 2007-04-06 15:02:13 +0000 | [diff] [blame] | 306 | $(TOP)/src/test_hexio.c \ |
dan | e1ab219 | 2009-08-17 15:16:19 +0000 | [diff] [blame] | 307 | $(TOP)/src/test_init.c \ |
drh | 522efc6 | 2009-11-10 17:24:37 +0000 | [diff] [blame] | 308 | $(TOP)/src/test_intarray.c \ |
danielk1977 | a0fc729 | 2008-12-20 18:33:59 +0000 | [diff] [blame] | 309 | $(TOP)/src/test_journal.c \ |
drh | 2f999a6 | 2007-08-15 19:16:43 +0000 | [diff] [blame] | 310 | $(TOP)/src/test_malloc.c \ |
drh | 5a092e9 | 2010-11-04 21:03:47 +0000 | [diff] [blame] | 311 | $(TOP)/src/test_multiplex.c \ |
danielk1977 | 1a9ed0b | 2008-06-18 09:45:56 +0000 | [diff] [blame] | 312 | $(TOP)/src/test_mutex.c \ |
danielk1977 | b61c16d | 2007-09-14 16:19:27 +0000 | [diff] [blame] | 313 | $(TOP)/src/test_onefile.c \ |
danielk1977 | 5d1f5aa | 2008-04-10 14:51:00 +0000 | [diff] [blame] | 314 | $(TOP)/src/test_osinst.c \ |
drh | b232c23 | 2008-11-19 01:20:26 +0000 | [diff] [blame] | 315 | $(TOP)/src/test_pcache.c \ |
dan | 8cf35eb | 2010-09-01 11:40:05 +0000 | [diff] [blame] | 316 | $(TOP)/src/test_quota.c \ |
dan | 9508daa | 2010-08-28 18:58:00 +0000 | [diff] [blame] | 317 | $(TOP)/src/test_rtree.c \ |
danielk1977 | 954ce99 | 2006-06-15 15:59:19 +0000 | [diff] [blame] | 318 | $(TOP)/src/test_schema.c \ |
drh | 2d02a67 | 2006-01-25 15:55:37 +0000 | [diff] [blame] | 319 | $(TOP)/src/test_server.c \ |
dan | ac45593 | 2012-11-26 19:50:41 +0000 | [diff] [blame] | 320 | $(TOP)/src/test_sqllog.c \ |
dan | e336b00 | 2010-11-19 18:20:09 +0000 | [diff] [blame] | 321 | $(TOP)/src/test_superlock.c \ |
dan | 213ca0a | 2011-03-28 19:10:06 +0000 | [diff] [blame] | 322 | $(TOP)/src/test_syscall.c \ |
drh | 4be8b51 | 2006-06-13 23:51:34 +0000 | [diff] [blame] | 323 | $(TOP)/src/test_tclvar.c \ |
danielk1977 | 44918fa | 2007-09-07 11:29:25 +0000 | [diff] [blame] | 324 | $(TOP)/src/test_thread.c \ |
dan | c7991bd | 2010-05-05 19:04:59 +0000 | [diff] [blame] | 325 | $(TOP)/src/test_vfs.c \ |
mistachkin | 92af1eb | 2015-11-30 23:29:07 +0000 | [diff] [blame] | 326 | $(TOP)/src/test_windirent.c \ |
shane | 8e28379 | 2009-08-21 02:07:09 +0000 | [diff] [blame] | 327 | $(TOP)/src/test_wsd.c |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 328 | |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 329 | # Extensions to be statically loaded. |
| 330 | # |
| 331 | TESTSRC += \ |
drh | 8416fc7 | 2013-04-25 16:42:55 +0000 | [diff] [blame] | 332 | $(TOP)/ext/misc/amatch.c \ |
drh | 2e3f87a | 2016-07-03 02:35:47 +0000 | [diff] [blame] | 333 | $(TOP)/ext/misc/carray.c \ |
drh | 8416fc7 | 2013-04-25 16:42:55 +0000 | [diff] [blame] | 334 | $(TOP)/ext/misc/closure.c \ |
drh | 35db31b | 2016-06-02 23:13:21 +0000 | [diff] [blame] | 335 | $(TOP)/ext/misc/csv.c \ |
drh | 1728bcb | 2014-11-10 16:49:56 +0000 | [diff] [blame] | 336 | $(TOP)/ext/misc/eval.c \ |
drh | 51ed298 | 2014-06-16 12:44:32 +0000 | [diff] [blame] | 337 | $(TOP)/ext/misc/fileio.c \ |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 338 | $(TOP)/ext/misc/fuzzer.c \ |
drh | 8416fc7 | 2013-04-25 16:42:55 +0000 | [diff] [blame] | 339 | $(TOP)/ext/misc/ieee754.c \ |
dan | 460f1fa | 2017-09-18 16:28:56 +0000 | [diff] [blame] | 340 | $(TOP)/ext/misc/mmapwarm.c \ |
drh | ea41dc4 | 2013-04-25 19:31:33 +0000 | [diff] [blame] | 341 | $(TOP)/ext/misc/nextchar.c \ |
drh | def3367 | 2013-05-28 20:25:54 +0000 | [diff] [blame] | 342 | $(TOP)/ext/misc/percentile.c \ |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 343 | $(TOP)/ext/misc/regexp.c \ |
drh | 6bada27 | 2016-08-09 21:08:42 +0000 | [diff] [blame] | 344 | $(TOP)/ext/misc/remember.c \ |
drh | 398f872 | 2015-08-19 13:54:20 +0000 | [diff] [blame] | 345 | $(TOP)/ext/misc/series.c \ |
drh | b7045ab | 2013-04-25 14:59:01 +0000 | [diff] [blame] | 346 | $(TOP)/ext/misc/spellfix.c \ |
drh | 5f8cdac | 2013-10-14 21:14:42 +0000 | [diff] [blame] | 347 | $(TOP)/ext/misc/totype.c \ |
dan | d8ecefa | 2017-07-15 20:48:30 +0000 | [diff] [blame] | 348 | $(TOP)/ext/misc/unionvtab.c \ |
dan | 30e2f0a | 2013-10-10 13:04:46 +0000 | [diff] [blame] | 349 | $(TOP)/ext/misc/wholenumber.c \ |
dan | 89a8956 | 2014-12-01 20:05:00 +0000 | [diff] [blame] | 350 | $(TOP)/ext/misc/vfslog.c \ |
dan | 3abdc44 | 2015-07-02 18:16:02 +0000 | [diff] [blame] | 351 | $(TOP)/ext/fts5/fts5_tcl.c \ |
dan | 2cfe049 | 2016-01-14 20:05:59 +0000 | [diff] [blame] | 352 | $(TOP)/ext/fts5/fts5_test_mi.c \ |
dan | 3ed7029 | 2016-01-16 21:06:41 +0000 | [diff] [blame] | 353 | $(TOP)/ext/fts5/fts5_test_tok.c |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 354 | |
| 355 | |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 356 | #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c |
| 357 | #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 358 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 359 | TESTSRC2 = \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 360 | $(TOP)/src/attach.c \ |
| 361 | $(TOP)/src/backup.c \ |
| 362 | $(TOP)/src/btree.c \ |
| 363 | $(TOP)/src/build.c \ |
| 364 | $(TOP)/src/date.c \ |
drh | 1a4a680 | 2015-05-04 18:31:09 +0000 | [diff] [blame] | 365 | $(TOP)/src/dbstat.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 366 | $(TOP)/src/expr.c \ |
| 367 | $(TOP)/src/func.c \ |
| 368 | $(TOP)/src/insert.c \ |
| 369 | $(TOP)/src/wal.c \ |
dan | f261414 | 2013-05-15 16:16:25 +0000 | [diff] [blame] | 370 | $(TOP)/src/main.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 371 | $(TOP)/src/mem5.c \ |
| 372 | $(TOP)/src/os.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 373 | $(TOP)/src/os_unix.c \ |
| 374 | $(TOP)/src/os_win.c \ |
| 375 | $(TOP)/src/pager.c \ |
| 376 | $(TOP)/src/pragma.c \ |
| 377 | $(TOP)/src/prepare.c \ |
| 378 | $(TOP)/src/printf.c \ |
| 379 | $(TOP)/src/random.c \ |
| 380 | $(TOP)/src/pcache.c \ |
| 381 | $(TOP)/src/pcache1.c \ |
| 382 | $(TOP)/src/select.c \ |
dan | d94d4ee | 2014-05-05 09:08:54 +0000 | [diff] [blame] | 383 | $(TOP)/src/threads.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 384 | $(TOP)/src/tokenize.c \ |
| 385 | $(TOP)/src/utf.c \ |
| 386 | $(TOP)/src/util.c \ |
| 387 | $(TOP)/src/vdbeapi.c \ |
| 388 | $(TOP)/src/vdbeaux.c \ |
| 389 | $(TOP)/src/vdbe.c \ |
| 390 | $(TOP)/src/vdbemem.c \ |
| 391 | $(TOP)/src/where.c \ |
drh | 6f82e85 | 2015-06-06 20:12:09 +0000 | [diff] [blame] | 392 | $(TOP)/src/wherecode.c \ |
drh | 6c1f4ef | 2015-06-08 14:23:15 +0000 | [diff] [blame] | 393 | $(TOP)/src/whereexpr.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 394 | parse.c \ |
| 395 | $(TOP)/ext/fts3/fts3.c \ |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 396 | $(TOP)/ext/fts3/fts3_aux.c \ |
shaneh | 1860705 | 2010-07-06 20:37:09 +0000 | [diff] [blame] | 397 | $(TOP)/ext/fts3/fts3_expr.c \ |
| 398 | $(TOP)/ext/fts3/fts3_tokenizer.c \ |
| 399 | $(TOP)/ext/fts3/fts3_write.c \ |
dan | 4fccf43 | 2011-03-08 19:22:50 +0000 | [diff] [blame] | 400 | $(TOP)/ext/async/sqlite3async.c \ |
| 401 | $(TOP)/ext/session/sqlite3session.c \ |
dan | 39332fb | 2016-05-06 16:30:34 +0000 | [diff] [blame] | 402 | $(TOP)/ext/session/test_session.c |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 403 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 404 | # Header files used by all library source files. |
| 405 | # |
| 406 | HDR = \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 407 | $(TOP)/src/btree.h \ |
drh | a315289 | 2007-05-05 11:48:52 +0000 | [diff] [blame] | 408 | $(TOP)/src/btreeInt.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 409 | $(TOP)/src/hash.h \ |
shane | 9bcbdad | 2008-05-29 20:22:37 +0000 | [diff] [blame] | 410 | $(TOP)/src/hwtime.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 411 | keywordhash.h \ |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 412 | $(TOP)/src/msvc.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 413 | $(TOP)/src/mutex.h \ |
drh | 8f619cc | 2002-09-08 00:04:50 +0000 | [diff] [blame] | 414 | opcodes.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 415 | $(TOP)/src/os.h \ |
drh | 014ac19 | 2004-06-01 01:45:11 +0000 | [diff] [blame] | 416 | $(TOP)/src/os_common.h \ |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 417 | $(TOP)/src/os_setup.h \ |
mistachkin | 8bc5262 | 2013-11-25 09:36:07 +0000 | [diff] [blame] | 418 | $(TOP)/src/os_win.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 419 | $(TOP)/src/pager.h \ |
danielk1977 | 8c0a791 | 2008-08-20 14:49:23 +0000 | [diff] [blame] | 420 | $(TOP)/src/pcache.h \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 421 | parse.h \ |
drh | 67e65e5 | 2015-02-02 21:34:54 +0000 | [diff] [blame] | 422 | $(TOP)/src/pragma.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 423 | sqlite3.h \ |
drh | 1e397f8 | 2006-06-08 15:28:43 +0000 | [diff] [blame] | 424 | $(TOP)/src/sqlite3ext.h \ |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 425 | $(TOP)/src/sqliteInt.h \ |
drh | 437b901 | 2007-08-28 16:34:42 +0000 | [diff] [blame] | 426 | $(TOP)/src/sqliteLimit.h \ |
drh | 9a32464 | 2003-09-06 20:12:01 +0000 | [diff] [blame] | 427 | $(TOP)/src/vdbe.h \ |
drh | e54df42 | 2013-11-12 18:37:25 +0000 | [diff] [blame] | 428 | $(TOP)/src/vdbeInt.h \ |
drh | 8cd5b25 | 2015-03-02 22:06:43 +0000 | [diff] [blame] | 429 | $(TOP)/src/vxworks.h \ |
drh | e54df42 | 2013-11-12 18:37:25 +0000 | [diff] [blame] | 430 | $(TOP)/src/whereInt.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 431 | |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 432 | # Header files used by extensions |
| 433 | # |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 434 | EXTHDR += \ |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 435 | $(TOP)/ext/fts1/fts1.h \ |
| 436 | $(TOP)/ext/fts1/fts1_hash.h \ |
| 437 | $(TOP)/ext/fts1/fts1_tokenizer.h |
drh | de087bd | 2007-02-23 03:00:44 +0000 | [diff] [blame] | 438 | EXTHDR += \ |
| 439 | $(TOP)/ext/fts2/fts2.h \ |
| 440 | $(TOP)/ext/fts2/fts2_hash.h \ |
| 441 | $(TOP)/ext/fts2/fts2_tokenizer.h |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 442 | EXTHDR += \ |
| 443 | $(TOP)/ext/fts3/fts3.h \ |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 444 | $(TOP)/ext/fts3/fts3Int.h \ |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 445 | $(TOP)/ext/fts3/fts3_hash.h \ |
| 446 | $(TOP)/ext/fts3/fts3_tokenizer.h |
drh | 58f1c8b | 2008-05-26 20:19:25 +0000 | [diff] [blame] | 447 | EXTHDR += \ |
| 448 | $(TOP)/ext/rtree/rtree.h |
danielk1977 | 1c82665 | 2008-09-08 08:08:09 +0000 | [diff] [blame] | 449 | EXTHDR += \ |
| 450 | $(TOP)/ext/icu/sqliteicu.h |
dan | e0fa410 | 2014-06-23 11:33:22 +0000 | [diff] [blame] | 451 | EXTHDR += \ |
dan | 9cfd51f | 2014-07-16 19:15:57 +0000 | [diff] [blame] | 452 | $(TOP)/ext/fts5/fts5Int.h \ |
dan | 601415e | 2015-02-02 11:58:21 +0000 | [diff] [blame] | 453 | fts5parse.h \ |
dan | 9cfd51f | 2014-07-16 19:15:57 +0000 | [diff] [blame] | 454 | $(TOP)/ext/fts5/fts5.h |
dan | 37db72f | 2015-01-01 18:03:49 +0000 | [diff] [blame] | 455 | EXTHDR += \ |
drh | f442e33 | 2014-09-10 19:01:14 +0000 | [diff] [blame] | 456 | $(TOP)/ext/userauth/sqlite3userauth.h |
drh | 0c97940 | 2006-10-03 19:12:32 +0000 | [diff] [blame] | 457 | |
mistachkin | d4ab103 | 2015-05-11 16:27:33 +0000 | [diff] [blame] | 458 | # executables needed for testing |
drh | f437544 | 2015-05-11 12:15:45 +0000 | [diff] [blame] | 459 | # |
| 460 | TESTPROGS = \ |
| 461 | testfixture$(EXE) \ |
| 462 | sqlite3$(EXE) \ |
| 463 | sqlite3_analyzer$(EXE) \ |
drh | 290fcaa | 2016-06-08 01:03:05 +0000 | [diff] [blame] | 464 | sqldiff$(EXE) \ |
| 465 | dbhash$(EXE) |
drh | f437544 | 2015-05-11 12:15:45 +0000 | [diff] [blame] | 466 | |
drh | ea93c70 | 2015-05-26 18:15:08 +0000 | [diff] [blame] | 467 | # Databases containing fuzzer test cases |
| 468 | # |
| 469 | FUZZDATA = \ |
| 470 | $(TOP)/test/fuzzdata1.db \ |
| 471 | $(TOP)/test/fuzzdata2.db \ |
drh | 64ff56f | 2015-09-23 11:59:50 +0000 | [diff] [blame] | 472 | $(TOP)/test/fuzzdata3.db \ |
drh | 362b66f | 2016-11-14 18:27:41 +0000 | [diff] [blame] | 473 | $(TOP)/test/fuzzdata4.db \ |
| 474 | $(TOP)/test/fuzzdata5.db |
drh | ea93c70 | 2015-05-26 18:15:08 +0000 | [diff] [blame] | 475 | |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 476 | # Standard options to testfixture |
| 477 | # |
| 478 | TESTOPTS = --verbose=file --output=test-out.txt |
| 479 | |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 480 | # Extra compiler options for various shell tools |
| 481 | # |
drh | 0db5bfe | 2017-07-06 22:43:41 +0000 | [diff] [blame] | 482 | SHELL_OPT += -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 |
drh | cc15313 | 2016-08-04 12:35:17 +0000 | [diff] [blame] | 483 | SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 484 | SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
drh | c6603af | 2017-06-29 14:33:51 +0000 | [diff] [blame] | 485 | SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 486 | FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 |
drh | 9d4c982 | 2016-01-05 03:39:52 +0000 | [diff] [blame] | 487 | FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5 |
drh | a6bf20b | 2017-03-10 17:03:11 +0000 | [diff] [blame] | 488 | FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000 |
drh | 6918e2f | 2016-12-17 20:27:22 +0000 | [diff] [blame] | 489 | DBFUZZ_OPT = |
drh | d1b2566 | 2017-01-23 19:11:38 +0000 | [diff] [blame] | 490 | KV_OPT = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ |
| 491 | ST_OPT = -DSQLITE_THREADSAFE=0 |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 492 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 493 | # This is the default Makefile target. The objects listed here |
| 494 | # are what get build when you type just "make" with no arguments. |
| 495 | # |
drh | 97903fe | 2005-05-24 20:19:57 +0000 | [diff] [blame] | 496 | all: sqlite3.h libsqlite3.a sqlite3$(EXE) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 497 | |
drh | d677b3d | 2007-08-20 22:48:41 +0000 | [diff] [blame] | 498 | libsqlite3.a: $(LIBOBJ) |
| 499 | $(AR) libsqlite3.a $(LIBOBJ) |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 500 | $(RANLIB) libsqlite3.a |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 501 | |
drh | aa62d2e | 2017-10-12 13:47:48 +0000 | [diff] [blame] | 502 | sqlite3$(EXE): shell.c libsqlite3.a sqlite3.h |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 503 | $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) $(SHELL_OPT) \ |
drh | aa62d2e | 2017-10-12 13:47:48 +0000 | [diff] [blame] | 504 | shell.c libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) |
drh | c9a67a8 | 2007-12-13 18:20:46 +0000 | [diff] [blame] | 505 | |
drh | d62c0f4 | 2015-04-09 13:34:29 +0000 | [diff] [blame] | 506 | sqldiff$(EXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h |
| 507 | $(TCCX) -o sqldiff$(EXE) -DSQLITE_THREADSAFE=0 \ |
mistachkin | 7a94e6b | 2015-05-26 03:24:33 +0000 | [diff] [blame] | 508 | $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) $(THREADLIB) |
drh | d62c0f4 | 2015-04-09 13:34:29 +0000 | [diff] [blame] | 509 | |
drh | 290fcaa | 2016-06-08 01:03:05 +0000 | [diff] [blame] | 510 | dbhash$(EXE): $(TOP)/tool/dbhash.c sqlite3.c sqlite3.h |
| 511 | $(TCCX) -o dbhash$(EXE) -DSQLITE_THREADSAFE=0 \ |
| 512 | $(TOP)/tool/dbhash.c sqlite3.c $(TLIBS) $(THREADLIB) |
| 513 | |
drh | da110bf | 2016-05-05 17:15:23 +0000 | [diff] [blame] | 514 | scrub$(EXE): $(TOP)/ext/misc/scrub.c sqlite3.o |
| 515 | $(TCC) -I. -DSCRUB_STANDALONE -o scrub$(EXE) $(TOP)/ext/misc/scrub.c sqlite3.o $(THREADLIB) |
| 516 | |
drh | cc5f8a4 | 2016-02-06 22:32:06 +0000 | [diff] [blame] | 517 | srcck1$(EXE): $(TOP)/tool/srcck1.c |
| 518 | $(BCC) -o srcck1$(EXE) $(TOP)/tool/srcck1.c |
| 519 | |
| 520 | sourcetest: srcck1$(EXE) sqlite3.c |
| 521 | ./srcck1 sqlite3.c |
| 522 | |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 523 | fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h |
drh | 53e66c3 | 2015-07-24 15:49:23 +0000 | [diff] [blame] | 524 | $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 525 | $(FUZZERSHELL_OPT) $(TOP)/tool/fuzzershell.c sqlite3.c \ |
drh | d7f2bea | 2015-09-19 14:32:51 +0000 | [diff] [blame] | 526 | $(TLIBS) $(THREADLIB) |
drh | 268e72f | 2015-04-17 14:30:49 +0000 | [diff] [blame] | 527 | |
drh | 6918e2f | 2016-12-17 20:27:22 +0000 | [diff] [blame] | 528 | dbfuzz$(EXE): $(TOP)/test/dbfuzz.c sqlite3.c sqlite3.h |
| 529 | $(TCCX) -o dbfuzz$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ |
| 530 | $(DBFUZZ_OPT) $(TOP)/test/dbfuzz.c sqlite3.c \ |
| 531 | $(TLIBS) $(THREADLIB) |
| 532 | |
drh | ea432ba | 2016-11-11 16:33:47 +0000 | [diff] [blame] | 533 | fuzzcheck$(EXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h $(TOP)/test/ossfuzz.c |
drh | 53e66c3 | 2015-07-24 15:49:23 +0000 | [diff] [blame] | 534 | $(TCCX) -o fuzzcheck$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ |
drh | ea432ba | 2016-11-11 16:33:47 +0000 | [diff] [blame] | 535 | -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) -DSQLITE_OSS_FUZZ \ |
| 536 | $(TOP)/test/fuzzcheck.c $(TOP)/test/ossfuzz.c sqlite3.c $(TLIBS) $(THREADLIB) |
drh | bc94dbb | 2013-04-08 14:28:33 +0000 | [diff] [blame] | 537 | |
drh | 55377b4 | 2016-11-14 17:25:57 +0000 | [diff] [blame] | 538 | ossshell$(EXE): $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c sqlite3.h |
| 539 | $(TCCX) -o ossshell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 540 | -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) \ |
drh | 55377b4 | 2016-11-14 17:25:57 +0000 | [diff] [blame] | 541 | $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c $(TLIBS) $(THREADLIB) |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 542 | |
danielk1977 | 77b03a2 | 2007-06-20 08:49:05 +0000 | [diff] [blame] | 543 | mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 544 | $(TCCX) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \ |
| 545 | $(TLIBS) $(THREADLIB) |
| 546 | |
drh | cd42352 | 2016-02-12 17:27:32 +0000 | [diff] [blame] | 547 | MPTEST1=./mptester$(EXE) mptest1.db $(TOP)/mptest/crash01.test --repeat 20 |
| 548 | MPTEST2=./mptester$(EXE) mptest2.db $(TOP)/mptest/multiwrite01.test --repeat 20 |
drh | 4c45196 | 2015-03-31 18:05:49 +0000 | [diff] [blame] | 549 | mptest: mptester$(EXE) |
drh | 4c45196 | 2015-03-31 18:05:49 +0000 | [diff] [blame] | 550 | $(MPTEST1) --journalmode DELETE |
| 551 | $(MPTEST2) --journalmode WAL |
| 552 | $(MPTEST1) --journalmode WAL |
| 553 | $(MPTEST2) --journalmode PERSIST |
| 554 | $(MPTEST1) --journalmode PERSIST |
| 555 | $(MPTEST2) --journalmode TRUNCATE |
| 556 | $(MPTEST1) --journalmode TRUNCATE |
| 557 | $(MPTEST2) --journalmode DELETE |
| 558 | |
drh | 60bdeb2 | 2011-10-20 00:55:54 +0000 | [diff] [blame] | 559 | sqlite3.o: sqlite3.c |
drh | 3312348 | 2013-12-24 12:04:24 +0000 | [diff] [blame] | 560 | $(TCCX) -I. -c sqlite3.c |
drh | 60bdeb2 | 2011-10-20 00:55:54 +0000 | [diff] [blame] | 561 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 562 | # This target creates a directory named "tsrc" and fills it with |
| 563 | # copies of all of the C source code and header files needed to |
| 564 | # build on the target system. Some of the C source code and header |
| 565 | # files are automatically generated. This target takes care of |
| 566 | # all that automatic generation. |
| 567 | # |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 568 | target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 569 | rm -rf tsrc |
| 570 | mkdir tsrc |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 571 | cp -f $(SRC) tsrc |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 572 | rm tsrc/sqlite.h.in tsrc/parse.y |
drh | 2dc0648 | 2013-12-11 00:59:10 +0000 | [diff] [blame] | 573 | tclsh $(TOP)/tool/vdbe-compress.tcl $(OPTS) <tsrc/vdbe.c >vdbe.new |
drh | 856c103 | 2009-06-02 15:21:42 +0000 | [diff] [blame] | 574 | mv vdbe.new tsrc/vdbe.c |
drh | 5006565 | 2015-10-08 19:29:18 +0000 | [diff] [blame] | 575 | cp fts5.c fts5.h tsrc |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 576 | touch target_source |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 577 | |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 578 | sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl |
| 579 | tclsh $(TOP)/tool/mksqlite3c.tcl |
drh | 339d6c6 | 2013-03-19 16:12:40 +0000 | [diff] [blame] | 580 | cp tsrc/shell.c tsrc/sqlite3ext.h . |
drh | e191e2c | 2013-03-19 15:23:18 +0000 | [diff] [blame] | 581 | cp $(TOP)/ext/session/sqlite3session.h . |
drh | aa1cf5a | 2010-10-01 17:23:46 +0000 | [diff] [blame] | 582 | echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c |
| 583 | cat sqlite3.c >>tclsqlite3.c |
| 584 | echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c |
drh | bd08af4 | 2007-04-05 21:58:33 +0000 | [diff] [blame] | 585 | cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c |
drh | 98495b4 | 2007-03-31 22:29:05 +0000 | [diff] [blame] | 586 | |
drh | 2f20e13 | 2015-09-26 17:44:59 +0000 | [diff] [blame] | 587 | sqlite3ext.h: target_source |
| 588 | cp tsrc/sqlite3ext.h . |
| 589 | |
drh | 88caeac | 2011-08-24 15:12:08 +0000 | [diff] [blame] | 590 | sqlite3.c-debug: target_source $(TOP)/tool/mksqlite3c.tcl |
drh | 96e5088 | 2011-08-15 15:27:20 +0000 | [diff] [blame] | 591 | tclsh $(TOP)/tool/mksqlite3c.tcl --linemacros |
| 592 | echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c |
| 593 | cat sqlite3.c >>tclsqlite3.c |
| 594 | echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c |
| 595 | echo '#line 1 "tclsqlite.c"' >>tclsqlite3.c |
| 596 | cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c |
| 597 | |
drh | 07516dd | 2011-07-22 11:16:39 +0000 | [diff] [blame] | 598 | sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl |
| 599 | tclsh $(TOP)/tool/split-sqlite3c.tcl |
| 600 | |
drh | d6e78a2 | 2007-07-20 13:42:26 +0000 | [diff] [blame] | 601 | fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl |
| 602 | tclsh $(TOP)/ext/fts2/mkfts2amal.tcl |
| 603 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 604 | fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl |
| 605 | tclsh $(TOP)/ext/fts3/mkfts3amal.tcl |
| 606 | |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 607 | # Rules to build the LEMON compiler generator |
| 608 | # |
drh | 82415f2 | 2015-11-09 19:33:42 +0000 | [diff] [blame] | 609 | lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 610 | $(BCC) -o lemon $(TOP)/tool/lemon.c |
drh | 82415f2 | 2015-11-09 19:33:42 +0000 | [diff] [blame] | 611 | cp $(TOP)/tool/lempar.c . |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 612 | |
drh | f39e0ed | 2017-08-22 19:19:00 +0000 | [diff] [blame] | 613 | # A tool to generate the source-id |
| 614 | # |
| 615 | mksourceid: $(TOP)/tool/mksourceid.c |
| 616 | $(BCC) -o mksourceid $(TOP)/tool/mksourceid.c |
| 617 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 618 | # Rules to build individual *.o files from generated *.c files. This |
| 619 | # applies to: |
| 620 | # |
| 621 | # parse.o |
| 622 | # opcodes.o |
| 623 | # |
mlcreech | 2379706 | 2008-03-20 02:25:35 +0000 | [diff] [blame] | 624 | %.o: %.c $(HDR) |
| 625 | $(TCCX) -c $< |
| 626 | |
| 627 | # Rules to build individual *.o files from files in the src directory. |
| 628 | # |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 629 | %.o: $(TOP)/src/%.c $(HDR) |
| 630 | $(TCCX) -c $< |
drh | 9f18e8a | 2005-07-08 12:13:04 +0000 | [diff] [blame] | 631 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 632 | tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) |
| 633 | $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 634 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 635 | |
drh | 900b31e | 2007-08-28 02:27:51 +0000 | [diff] [blame] | 636 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 637 | # Rules to build opcodes.c and opcodes.h |
| 638 | # |
drh | 7651e0a | 2015-10-07 12:11:36 +0000 | [diff] [blame] | 639 | opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl |
| 640 | tclsh $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 641 | |
drh | b15393b | 2015-10-07 02:52:09 +0000 | [diff] [blame] | 642 | opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl |
drh | 70a8ca3 | 2008-08-21 18:49:27 +0000 | [diff] [blame] | 643 | cat parse.h $(TOP)/src/vdbe.c | \ |
drh | b15393b | 2015-10-07 02:52:09 +0000 | [diff] [blame] | 644 | tclsh $(TOP)/tool/mkopcodeh.tcl >opcodes.h |
drh | 054889e | 2005-11-30 03:20:31 +0000 | [diff] [blame] | 645 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 646 | # Rules to build parse.c and parse.h - the outputs of lemon. |
| 647 | # |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 648 | parse.h: parse.c |
| 649 | |
drh | 60a15a4 | 2015-10-07 12:21:14 +0000 | [diff] [blame] | 650 | parse.c: $(TOP)/src/parse.y lemon $(TOP)/tool/addopcodes.tcl |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 651 | cp $(TOP)/src/parse.y . |
drh | 36bc402 | 2007-10-12 00:23:44 +0000 | [diff] [blame] | 652 | rm -f parse.h |
drh | 7e698e9 | 2015-09-07 14:22:24 +0000 | [diff] [blame] | 653 | ./lemon -s $(OPTS) parse.y |
drh | fa3b19e | 2005-11-24 22:22:29 +0000 | [diff] [blame] | 654 | mv parse.h parse.h.temp |
drh | 60a15a4 | 2015-10-07 12:21:14 +0000 | [diff] [blame] | 655 | tclsh $(TOP)/tool/addopcodes.tcl parse.h.temp >parse.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 656 | |
drh | f39e0ed | 2017-08-22 19:19:00 +0000 | [diff] [blame] | 657 | sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid $(TOP)/VERSION $(TOP)/ext/rtree/sqlite3rtree.h |
drh | 47baebc | 2009-08-14 16:01:24 +0000 | [diff] [blame] | 658 | tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 659 | |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 660 | keywordhash.h: $(TOP)/tool/mkkeywordhash.c |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 661 | $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c |
drh | 73b211a | 2005-01-18 04:00:42 +0000 | [diff] [blame] | 662 | ./mkkeywordhash >keywordhash.h |
drh | 52fb6d7 | 2004-11-03 03:59:57 +0000 | [diff] [blame] | 663 | |
drh | aa62d2e | 2017-10-12 13:47:48 +0000 | [diff] [blame] | 664 | # Source files that go into making shell.c |
| 665 | SHELL_SRC = \ |
| 666 | $(TOP)/src/shell.c.in \ |
| 667 | $(TOP)/ext/misc/shathree.c \ |
| 668 | $(TOP)/ext/misc/fileio.c \ |
| 669 | $(TOP)/ext/misc/completion.c |
| 670 | |
| 671 | shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl |
| 672 | tclsh $(TOP)/tool/mkshellc.tcl >shell.c |
| 673 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 674 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 675 | |
danielk1977 | 576d3db | 2007-06-25 14:28:48 +0000 | [diff] [blame] | 676 | # Rules to build the extension objects. |
| 677 | # |
| 678 | icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR) |
| 679 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c |
| 680 | |
| 681 | fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR) |
| 682 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c |
| 683 | |
| 684 | fts2_hash.o: $(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR) |
| 685 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c |
| 686 | |
| 687 | fts2_icu.o: $(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR) |
| 688 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c |
| 689 | |
| 690 | fts2_porter.o: $(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR) |
| 691 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c |
| 692 | |
| 693 | fts2_tokenizer.o: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR) |
| 694 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c |
| 695 | |
| 696 | fts2_tokenizer1.o: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR) |
| 697 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c |
| 698 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 699 | fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR) |
| 700 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c |
| 701 | |
dan | a240fd0 | 2011-02-01 16:34:32 +0000 | [diff] [blame] | 702 | fts3_aux.o: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR) |
| 703 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c |
| 704 | |
danielk1977 | 33e8903 | 2008-12-17 15:18:17 +0000 | [diff] [blame] | 705 | fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR) |
| 706 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c |
| 707 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 708 | fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR) |
| 709 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c |
| 710 | |
| 711 | fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR) |
| 712 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c |
| 713 | |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 714 | fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR) |
| 715 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c |
| 716 | |
shess | 69c4ae2 | 2007-08-20 17:37:47 +0000 | [diff] [blame] | 717 | fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR) |
| 718 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c |
| 719 | |
| 720 | fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR) |
| 721 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c |
| 722 | |
| 723 | fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR) |
| 724 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c |
| 725 | |
dan | d7a959c | 2013-04-22 15:30:37 +0000 | [diff] [blame] | 726 | fts3_tokenize_vtab.o: $(TOP)/ext/fts3/fts3_tokenize_vtab.c $(HDR) $(EXTHDR) |
| 727 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenize_vtab.c |
| 728 | |
dan | 3d403c7 | 2012-05-25 17:50:19 +0000 | [diff] [blame] | 729 | fts3_unicode.o: $(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR) |
| 730 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c |
| 731 | |
| 732 | fts3_unicode2.o: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR) |
| 733 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode2.c |
| 734 | |
dan | 09977bb | 2009-11-13 10:36:20 +0000 | [diff] [blame] | 735 | fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR) |
| 736 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c |
| 737 | |
drh | c306e08 | 2015-10-08 23:37:00 +0000 | [diff] [blame] | 738 | fts5.o: fts5.c |
| 739 | $(TCCX) -DSQLITE_CORE -c fts5.c |
| 740 | |
| 741 | json1.o: $(TOP)/ext/misc/json1.c |
| 742 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c |
| 743 | |
drh | c6603af | 2017-06-29 14:33:51 +0000 | [diff] [blame] | 744 | stmt.o: $(TOP)/ext/misc/stmt.c |
| 745 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/stmt.c |
drh | f00f530 | 2017-06-28 15:47:29 +0000 | [diff] [blame] | 746 | |
danielk1977 | ebaecc1 | 2008-05-26 18:41:54 +0000 | [diff] [blame] | 747 | rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) |
| 748 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c |
| 749 | |
drh | c306e08 | 2015-10-08 23:37:00 +0000 | [diff] [blame] | 750 | |
| 751 | |
dan | e0fa410 | 2014-06-23 11:33:22 +0000 | [diff] [blame] | 752 | fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon |
| 753 | cp $(TOP)/ext/fts5/fts5parse.y . |
| 754 | rm -f fts5parse.h |
| 755 | ./lemon $(OPTS) fts5parse.y |
| 756 | |
dan | 9686db7 | 2015-04-24 06:02:29 +0000 | [diff] [blame] | 757 | fts5parse.h: fts5parse.c |
| 758 | |
dan | bea34fc | 2015-09-02 17:34:22 +0000 | [diff] [blame] | 759 | fts5.c: $(FTS5_SRC) $(FTS5_HDR) |
dan | ed2589f | 2015-06-25 20:10:24 +0000 | [diff] [blame] | 760 | tclsh $(TOP)/ext/fts5/tool/mkfts5c.tcl |
dan | a153bbc | 2015-07-02 20:12:34 +0000 | [diff] [blame] | 761 | cp $(TOP)/ext/fts5/fts5.h . |
dan | ed2589f | 2015-06-25 20:10:24 +0000 | [diff] [blame] | 762 | |
drh | e933b83 | 2014-09-10 17:34:28 +0000 | [diff] [blame] | 763 | userauth.o: $(TOP)/ext/userauth/userauth.c $(HDR) $(EXTHDR) |
| 764 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/userauth/userauth.c |
| 765 | |
drh | e622961 | 2014-08-18 15:08:26 +0000 | [diff] [blame] | 766 | sqlite3session.o: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR) |
| 767 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/session/sqlite3session.c |
| 768 | |
drh | cfb8f8d | 2015-07-23 20:44:49 +0000 | [diff] [blame] | 769 | sqlite3rbu.o: $(TOP)/ext/rbu/sqlite3rbu.c $(HDR) $(EXTHDR) |
| 770 | $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rbu/sqlite3rbu.c |
dan | c76c64f | 2015-02-16 06:27:37 +0000 | [diff] [blame] | 771 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 772 | # Rules for building test programs and for running tests |
| 773 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 774 | tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a |
| 775 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \ |
danielk1977 | bc6ada4 | 2004-06-30 08:20:16 +0000 | [diff] [blame] | 776 | $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 777 | |
drh | 1a4a680 | 2015-05-04 18:31:09 +0000 | [diff] [blame] | 778 | sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl |
dan | 0ae479d | 2011-09-21 16:43:07 +0000 | [diff] [blame] | 779 | echo "#define TCLSH 2" > $@ |
drh | 84ab953 | 2015-05-04 17:06:39 +0000 | [diff] [blame] | 780 | echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@ |
| 781 | cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@ |
dan | 0ae479d | 2011-09-21 16:43:07 +0000 | [diff] [blame] | 782 | echo "static const char *tclsh_main_loop(void){" >> $@ |
| 783 | echo "static const char *zMainloop = " >> $@ |
drh | 48cc9a3 | 2015-10-07 12:36:42 +0000 | [diff] [blame] | 784 | tclsh $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@ |
dan | 0ae479d | 2011-09-21 16:43:07 +0000 | [diff] [blame] | 785 | echo "; return zMainloop; }" >> $@ |
| 786 | |
drh | 8d43aa1 | 2011-09-21 18:29:49 +0000 | [diff] [blame] | 787 | sqlite3_analyzer$(EXE): sqlite3_analyzer.c |
dan | 0ae479d | 2011-09-21 16:43:07 +0000 | [diff] [blame] | 788 | $(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB) |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 789 | |
dan | 8e0b8e0 | 2017-04-07 20:14:22 +0000 | [diff] [blame] | 790 | sqlite3_expert$(EXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c |
dan | 2da1504 | 2017-10-13 16:24:32 +0000 | [diff] [blame^] | 791 | $(TCCX) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert$(EXE) $(THREADLIB) |
dan | 8e0b8e0 | 2017-04-07 20:14:22 +0000 | [diff] [blame] | 792 | |
drh | 688633c | 2017-03-13 19:26:34 +0000 | [diff] [blame] | 793 | dbdump$(EXE): $(TOP)/ext/misc/dbdump.c sqlite3.o |
| 794 | $(TCCX) -DDBDUMP_STANDALONE -o dbdump$(EXE) \ |
| 795 | $(TOP)/ext/misc/dbdump.c sqlite3.o $(THREADLIB) |
| 796 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 797 | # Rules to build the 'testfixture' application. |
| 798 | # |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 799 | TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 |
drh | dbc4916 | 2016-03-02 03:28:07 +0000 | [diff] [blame] | 800 | TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE |
| 801 | TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 |
drh | 9878fef | 2016-03-04 03:43:10 +0000 | [diff] [blame] | 802 | TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024 |
drh | c6603af | 2017-06-29 14:33:51 +0000 | [diff] [blame] | 803 | TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTVTAB |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 804 | |
| 805 | testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 806 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 807 | $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ |
drh | 2f10fb3 | 2012-10-18 20:49:26 +0000 | [diff] [blame] | 808 | -o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB) |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 809 | |
drh | 973bc6f | 2015-10-09 15:29:24 +0000 | [diff] [blame] | 810 | amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c \ |
drh | e191e2c | 2013-03-19 15:23:18 +0000 | [diff] [blame] | 811 | $(TOP)/ext/session/test_session.c |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 812 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ |
dan | 0008ce7 | 2015-10-09 11:09:47 +0000 | [diff] [blame] | 813 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ |
drh | e191e2c | 2013-03-19 15:23:18 +0000 | [diff] [blame] | 814 | $(TOP)/ext/session/test_session.c \ |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 815 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 816 | |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 817 | fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c |
drh | 3a0f13f | 2010-07-12 16:47:48 +0000 | [diff] [blame] | 818 | $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ |
drh | 613a0fe | 2007-11-23 17:31:17 +0000 | [diff] [blame] | 819 | -DSQLITE_ENABLE_FTS3=1 \ |
| 820 | $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \ |
| 821 | -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) |
| 822 | |
drh | f437544 | 2015-05-11 12:15:45 +0000 | [diff] [blame] | 823 | fulltest: $(TESTPROGS) fuzztest |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 824 | ./testfixture$(EXE) $(TOP)/test/all.test $(TESTOPTS) |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 825 | |
drh | ea93c70 | 2015-05-26 18:15:08 +0000 | [diff] [blame] | 826 | soaktest: $(TESTPROGS) |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 827 | ./testfixture$(EXE) $(TOP)/test/all.test -soak=1 $(TESTOPTS) |
drh | 44548ec | 2007-06-18 12:22:43 +0000 | [diff] [blame] | 828 | |
drh | f437544 | 2015-05-11 12:15:45 +0000 | [diff] [blame] | 829 | fulltestonly: $(TESTPROGS) fuzztest |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 830 | ./testfixture$(EXE) $(TOP)/test/full.test $(TESTOPTS) |
mistachkin | c60941f | 2012-09-13 01:51:02 +0000 | [diff] [blame] | 831 | |
drh | 93ec45d | 2013-06-17 18:20:48 +0000 | [diff] [blame] | 832 | queryplantest: testfixture$(EXE) sqlite3$(EXE) |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 833 | ./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner $(TESTOPTS) |
drh | 93ec45d | 2013-06-17 18:20:48 +0000 | [diff] [blame] | 834 | |
drh | ea93c70 | 2015-05-26 18:15:08 +0000 | [diff] [blame] | 835 | fuzztest: fuzzcheck$(EXE) $(FUZZDATA) |
drh | a523e31 | 2015-07-24 17:26:13 +0000 | [diff] [blame] | 836 | ./fuzzcheck$(EXE) $(FUZZDATA) |
| 837 | |
| 838 | fastfuzztest: fuzzcheck$(EXE) $(FUZZDATA) |
drh | 53e66c3 | 2015-07-24 15:49:23 +0000 | [diff] [blame] | 839 | ./fuzzcheck$(EXE) --limit-mem 100M $(FUZZDATA) |
drh | f332071 | 2015-04-25 13:39:29 +0000 | [diff] [blame] | 840 | |
drh | d1f2f9b | 2015-06-08 19:15:50 +0000 | [diff] [blame] | 841 | valgrindfuzz: fuzzcheck$(EXE) $(FUZZDATA) |
drh | 25b0c40 | 2015-11-03 23:39:47 +0000 | [diff] [blame] | 842 | valgrind ./fuzzcheck$(EXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA) |
drh | d1f2f9b | 2015-06-08 19:15:50 +0000 | [diff] [blame] | 843 | |
drh | c06e543 | 2016-12-14 11:23:51 +0000 | [diff] [blame] | 844 | # The veryquick.test TCL tests. |
| 845 | # |
| 846 | tcltest: ./testfixture$(EXE) |
| 847 | ./testfixture$(EXE) $(TOP)/test/veryquick.test $(TESTOPTS) |
| 848 | |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 849 | # A very quick test using only testfixture and omitting all the slower |
| 850 | # tests. Designed to run in under 3 minutes on a workstation. |
| 851 | # |
| 852 | quicktest: ./testfixture$(EXE) |
| 853 | ./testfixture$(EXE) $(TOP)/test/extraquick.test $(TESTOPTS) |
| 854 | |
| 855 | # The default test case. Runs most of the faster standard TCL tests, |
| 856 | # and fuzz tests, and sqlite3_analyzer and sqldiff tests. |
drh | c06e543 | 2016-12-14 11:23:51 +0000 | [diff] [blame] | 857 | test: fastfuzztest sourcetest $(TESTPROGS) tcltest |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 858 | |
drh | 8ea5eca | 2015-04-24 16:53:03 +0000 | [diff] [blame] | 859 | # Run a test using valgrind. This can take a really long time |
| 860 | # because valgrind is so much slower than a native machine. |
| 861 | # |
drh | d1f2f9b | 2015-06-08 19:15:50 +0000 | [diff] [blame] | 862 | valgrindtest: $(TESTPROGS) valgrindfuzz |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 863 | OMIT_MISUSE=1 valgrind -v \ |
| 864 | ./testfixture$(EXE) $(TOP)/test/permutations.test valgrind $(TESTOPTS) |
drh | 8ea5eca | 2015-04-24 16:53:03 +0000 | [diff] [blame] | 865 | |
mistachkin | d4ab103 | 2015-05-11 16:27:33 +0000 | [diff] [blame] | 866 | # A very fast test that checks basic sanity. The name comes from |
| 867 | # the 60s-era electronics testing: "Turn it on and see if smoke |
| 868 | # comes out." |
| 869 | # |
drh | ea93c70 | 2015-05-26 18:15:08 +0000 | [diff] [blame] | 870 | smoketest: $(TESTPROGS) fuzzcheck$(EXE) |
drh | 905da63 | 2015-06-10 18:53:09 +0000 | [diff] [blame] | 871 | ./testfixture$(EXE) $(TOP)/test/main.test $(TESTOPTS) |
mistachkin | d4ab103 | 2015-05-11 16:27:33 +0000 | [diff] [blame] | 872 | |
dan | d38bc1b | 2010-09-13 12:15:36 +0000 | [diff] [blame] | 873 | # The next two rules are used to support the "threadtest" target. Building |
| 874 | # threadtest runs a few thread-safety tests that are implemented in C. This |
| 875 | # target is invoked by the releasetest.tcl script. |
| 876 | # |
dan | 0420954 | 2014-12-12 16:39:38 +0000 | [diff] [blame] | 877 | THREADTEST3_SRC = $(TOP)/test/threadtest3.c \ |
| 878 | $(TOP)/test/tt3_checkpoint.c \ |
| 879 | $(TOP)/test/tt3_index.c \ |
| 880 | $(TOP)/test/tt3_vacuum.c \ |
| 881 | $(TOP)/test/tt3_stress.c \ |
| 882 | $(TOP)/test/tt3_lookaside1.c |
| 883 | |
dan | 5fcc1ba | 2015-12-03 12:01:54 +0000 | [diff] [blame] | 884 | threadtest3$(EXE): sqlite3.o $(THREADTEST3_SRC) $(TOP)/src/test_multiplex.c |
| 885 | $(TCCX) $(TOP)/test/threadtest3.c $(TOP)/src/test_multiplex.c sqlite3.o -o $@ $(THREADLIB) |
dan | d38bc1b | 2010-09-13 12:15:36 +0000 | [diff] [blame] | 886 | |
| 887 | threadtest: threadtest3$(EXE) |
| 888 | ./threadtest3$(EXE) |
| 889 | |
danielk1977 | 69e777f | 2006-06-14 10:38:02 +0000 | [diff] [blame] | 890 | TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO) |
| 891 | $(TEST_EXTENSION): $(TOP)/src/test_loadext.c |
| 892 | $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION) |
| 893 | |
| 894 | extensiontest: testfixture$(EXE) $(TEST_EXTENSION) |
| 895 | ./testfixture$(EXE) $(TOP)/test/loadext.test |
| 896 | |
drh | 4bb77ec | 2014-06-30 11:14:26 +0000 | [diff] [blame] | 897 | showdb$(EXE): $(TOP)/tool/showdb.c sqlite3.o |
drh | 9ac3c1e | 2013-11-07 18:37:31 +0000 | [diff] [blame] | 898 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showdb$(EXE) \ |
drh | 4bb77ec | 2014-06-30 11:14:26 +0000 | [diff] [blame] | 899 | $(TOP)/tool/showdb.c sqlite3.o $(THREADLIB) |
| 900 | |
| 901 | showstat4$(EXE): $(TOP)/tool/showstat4.c sqlite3.o |
| 902 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showstat4$(EXE) \ |
| 903 | $(TOP)/tool/showstat4.c sqlite3.o $(THREADLIB) |
| 904 | |
| 905 | showjournal$(EXE): $(TOP)/tool/showjournal.c sqlite3.o |
| 906 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showjournal$(EXE) \ |
| 907 | $(TOP)/tool/showjournal.c sqlite3.o $(THREADLIB) |
| 908 | |
| 909 | showwal$(EXE): $(TOP)/tool/showwal.c sqlite3.o |
| 910 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showwal$(EXE) \ |
| 911 | $(TOP)/tool/showwal.c sqlite3.o $(THREADLIB) |
| 912 | |
drh | 3a67b04 | 2014-08-18 17:56:31 +0000 | [diff] [blame] | 913 | changeset$(EXE): $(TOP)/ext/session/changeset.c sqlite3.o |
| 914 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o changeset$(EXE) \ |
| 915 | $(TOP)/ext/session/changeset.c sqlite3.o $(THREADLIB) |
| 916 | |
drh | 42d3d37 | 2014-07-07 16:07:43 +0000 | [diff] [blame] | 917 | fts3view$(EXE): $(TOP)/ext/fts3/tool/fts3view.c sqlite3.o |
| 918 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o fts3view$(EXE) \ |
| 919 | $(TOP)/ext/fts3/tool/fts3view.c sqlite3.o $(THREADLIB) |
| 920 | |
drh | 4bb77ec | 2014-06-30 11:14:26 +0000 | [diff] [blame] | 921 | rollback-test$(EXE): $(TOP)/tool/rollback-test.c sqlite3.o |
| 922 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o rollback-test$(EXE) \ |
| 923 | $(TOP)/tool/rollback-test.c sqlite3.o $(THREADLIB) |
drh | 7e65c94 | 2013-10-10 17:33:52 +0000 | [diff] [blame] | 924 | |
drh | 267a13f | 2014-06-18 18:10:12 +0000 | [diff] [blame] | 925 | LogEst$(EXE): $(TOP)/tool/logest.c sqlite3.h |
| 926 | $(TCC) -o LogEst$(EXE) $(TOP)/tool/logest.c |
| 927 | |
drh | 9ac3c1e | 2013-11-07 18:37:31 +0000 | [diff] [blame] | 928 | wordcount$(EXE): $(TOP)/test/wordcount.c sqlite3.c |
| 929 | $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o wordcount$(EXE) \ |
| 930 | $(TOP)/test/wordcount.c sqlite3.c |
| 931 | |
drh | d1b2566 | 2017-01-23 19:11:38 +0000 | [diff] [blame] | 932 | speedtest1$(EXE): $(TOP)/test/speedtest1.c sqlite3.c |
| 933 | $(TCCX) -I. $(ST_OPT) -o speedtest1$(EXE) $(TOP)/test/speedtest1.c sqlite3.c $(THREADLIB) |
| 934 | |
| 935 | kvtest$(EXE): $(TOP)/test/kvtest.c sqlite3.c |
drh | b9e9bc1 | 2017-02-07 17:36:12 +0000 | [diff] [blame] | 936 | $(TCCX) -I. $(KV_OPT) -o kvtest$(EXE) $(TOP)/test/kvtest.c sqlite3.c $(THREADLIB) |
drh | ad1ca9a | 2013-11-23 04:16:58 +0000 | [diff] [blame] | 937 | |
drh | cfb8f8d | 2015-07-23 20:44:49 +0000 | [diff] [blame] | 938 | rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.o |
| 939 | $(TCC) -I. -o rbu$(EXE) $(TOP)/ext/rbu/rbu.c sqlite3.o \ |
dan | 98231c0 | 2014-09-03 08:25:09 +0000 | [diff] [blame] | 940 | $(THREADLIB) |
dan | e7152dc | 2011-07-07 08:19:16 +0000 | [diff] [blame] | 941 | |
dan | 92e497e | 2014-07-28 20:14:02 +0000 | [diff] [blame] | 942 | loadfts: $(TOP)/tool/loadfts.c libsqlite3.a |
| 943 | $(TCC) $(TOP)/tool/loadfts.c libsqlite3.a -o loadfts $(THREADLIB) |
| 944 | |
dan | e7152dc | 2011-07-07 08:19:16 +0000 | [diff] [blame] | 945 | # This target will fail if the SQLite amalgamation contains any exported |
| 946 | # symbols that do not begin with "sqlite3_". It is run as part of the |
| 947 | # releasetest.tcl script. |
| 948 | # |
| 949 | checksymbols: sqlite3.o |
| 950 | nm -g --defined-only sqlite3.o | grep -v " sqlite3_" ; test $$? -ne 0 |
| 951 | |
drh | 07f7656 | 2016-02-09 22:39:39 +0000 | [diff] [blame] | 952 | # Build the amalgamation-autoconf package. The amalamgation-tarball target builds |
| 953 | # a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz. |
| 954 | # The snapshot-tarball target builds a tarball named by the SHA1 hash |
dan | 555c939 | 2013-05-27 18:37:33 +0000 | [diff] [blame] | 955 | # |
drh | b43be55 | 2015-01-15 15:47:06 +0000 | [diff] [blame] | 956 | amalgamation-tarball: sqlite3.c |
drh | 07f7656 | 2016-02-09 22:39:39 +0000 | [diff] [blame] | 957 | TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal |
| 958 | |
| 959 | snapshot-tarball: sqlite3.c |
| 960 | TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot |
dan | 555c939 | 2013-05-27 18:37:33 +0000 | [diff] [blame] | 961 | |
danielk1977 | e6a58a4 | 2007-08-31 17:42:48 +0000 | [diff] [blame] | 962 | |
drh | bbd42a6 | 2004-05-22 17:41:58 +0000 | [diff] [blame] | 963 | # Standard install and cleanup targets |
| 964 | # |
drh | 1d482dd | 2004-05-31 18:23:07 +0000 | [diff] [blame] | 965 | install: sqlite3 libsqlite3.a sqlite3.h |
| 966 | mv sqlite3 /usr/bin |
| 967 | mv libsqlite3.a /usr/lib |
| 968 | mv sqlite3.h /usr/include |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 969 | |
| 970 | clean: |
mistachkin | 9a55e31 | 2011-09-22 00:06:44 +0000 | [diff] [blame] | 971 | rm -f *.o sqlite3 sqlite3.exe libsqlite3.a sqlite3.h opcodes.* |
drh | 0edb7ac | 2011-10-13 18:08:04 +0000 | [diff] [blame] | 972 | rm -f lemon lemon.exe lempar.c parse.* sqlite*.tar.gz |
| 973 | rm -f mkkeywordhash mkkeywordhash.exe keywordhash.h |
drh | 71eb93e | 2001-09-28 01:34:43 +0000 | [diff] [blame] | 974 | rm -f $(PUBLISH) |
| 975 | rm -f *.da *.bb *.bbg gmon.out |
drh | d919fe1 | 2007-12-11 19:34:44 +0000 | [diff] [blame] | 976 | rm -rf tsrc target_source |
drh | f80ad49 | 2006-09-02 22:14:59 +0000 | [diff] [blame] | 977 | rm -f testloadext.dll libtestloadext.so |
mistachkin | 9a55e31 | 2011-09-22 00:06:44 +0000 | [diff] [blame] | 978 | rm -f amalgamation-testfixture amalgamation-testfixture.exe |
| 979 | rm -f fts3-testfixture fts3-testfixture.exe |
| 980 | rm -f testfixture testfixture.exe |
| 981 | rm -f threadtest3 threadtest3.exe |
mistachkin | 3a046c6 | 2014-07-18 21:02:54 +0000 | [diff] [blame] | 982 | rm -f LogEst LogEst.exe |
| 983 | rm -f fts3view fts3view.exe |
| 984 | rm -f rollback-test rollback-test.exe |
| 985 | rm -f showdb showdb.exe |
| 986 | rm -f showjournal showjournal.exe |
| 987 | rm -f showstat4 showstat4.exe |
| 988 | rm -f showwal showwal.exe |
drh | 9f674f2 | 2014-08-18 20:23:29 +0000 | [diff] [blame] | 989 | rm -f changeset changeset.exe |
mistachkin | 3a046c6 | 2014-07-18 21:02:54 +0000 | [diff] [blame] | 990 | rm -f speedtest1 speedtest1.exe |
| 991 | rm -f wordcount wordcount.exe |
mistachkin | b5a5a23 | 2016-01-20 18:47:59 +0000 | [diff] [blame] | 992 | rm -f rbu rbu.exe |
mistachkin | 27b6997 | 2016-02-07 20:39:27 +0000 | [diff] [blame] | 993 | rm -f srcck1 srcck1.exe |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 994 | rm -f sqlite3.c sqlite3-*.c fts?amal.c tclsqlite3.c |
mistachkin | fde3b1c7 | 2013-03-29 19:52:04 +0000 | [diff] [blame] | 995 | rm -f sqlite3rc.h |
| 996 | rm -f shell.c sqlite3ext.h |
mistachkin | 9a55e31 | 2011-09-22 00:06:44 +0000 | [diff] [blame] | 997 | rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c |
dan | 8e0b8e0 | 2017-04-07 20:14:22 +0000 | [diff] [blame] | 998 | rm -f sqlite3_expert sqlite3_expert.exe |
mistachkin | 29b75bd | 2012-10-20 09:35:57 +0000 | [diff] [blame] | 999 | rm -f sqlite-*-output.vsix |
mistachkin | 21c9b6b | 2013-04-10 03:06:43 +0000 | [diff] [blame] | 1000 | rm -f mptester mptester.exe |
mistachkin | d4ab103 | 2015-05-11 16:27:33 +0000 | [diff] [blame] | 1001 | rm -f fuzzershell fuzzershell.exe |
mistachkin | 7a94e6b | 2015-05-26 03:24:33 +0000 | [diff] [blame] | 1002 | rm -f fuzzcheck fuzzcheck.exe |
mistachkin | d4ab103 | 2015-05-11 16:27:33 +0000 | [diff] [blame] | 1003 | rm -f sqldiff sqldiff.exe |
mistachkin | bc50bb7 | 2015-07-14 21:56:53 +0000 | [diff] [blame] | 1004 | rm -f fts5.* fts5parse.* |