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