shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1 | # |
shaneh | 603e426 | 2011-06-17 18:52:07 +0000 | [diff] [blame] | 2 | # nmake Makefile for SQLite |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 3 | # |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 4 | ############################################################################### |
| 5 | ############################## START OF OPTIONS ############################### |
| 6 | ############################################################################### |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 7 | |
| 8 | # The toplevel directory of the source tree. This is the directory |
| 9 | # that contains this "Makefile.msc". |
| 10 | # |
| 11 | TOP = . |
| 12 | |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 13 | # Set this non-0 to create and use the SQLite amalgamation file. |
| 14 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 15 | !IFNDEF USE_AMALGAMATION |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 16 | USE_AMALGAMATION = 1 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 17 | !ENDIF |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 18 | |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 19 | # Set this non-0 to enable full warnings (-W4, etc) when compiling. |
| 20 | # |
| 21 | !IFNDEF USE_FULLWARN |
| 22 | USE_FULLWARN = 0 |
| 23 | !ENDIF |
| 24 | |
| 25 | # If necessary, create a list of harmless compiler warnings to disable when |
| 26 | # compiling the build tools. For the SQLite source code itself, warnings, |
| 27 | # if any, will be disabled from within it. |
| 28 | # |
| 29 | !IFNDEF NO_WARN |
| 30 | !IF $(USE_FULLWARN)!=0 |
mistachkin | 27b2f05 | 2015-01-12 19:49:46 +0000 | [diff] [blame] | 31 | NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4152 -wd4189 -wd4206 -wd4210 |
mistachkin | 3256250 | 2015-01-12 20:20:26 +0000 | [diff] [blame] | 32 | NO_WARN = $(NO_WARN) -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706 |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 33 | !ENDIF |
| 34 | !ENDIF |
| 35 | |
mistachkin | a5e2b50 | 2014-05-12 22:36:50 +0000 | [diff] [blame] | 36 | # Set this non-0 to use the library paths and other options necessary for |
| 37 | # Windows Phone 8.1. |
mistachkin | d9b3c54 | 2014-05-09 23:31:55 +0000 | [diff] [blame] | 38 | # |
| 39 | !IFNDEF USE_WP81_OPTS |
| 40 | USE_WP81_OPTS = 0 |
| 41 | !ENDIF |
| 42 | |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 43 | # Set this non-0 to split the SQLite amalgamation file into chunks to |
| 44 | # be used for debugging with Visual Studio. |
| 45 | # |
| 46 | !IFNDEF SPLIT_AMALGAMATION |
mistachkin | 0aedc6b | 2013-10-11 23:02:13 +0000 | [diff] [blame] | 47 | SPLIT_AMALGAMATION = 0 |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 48 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 49 | |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 50 | # Set this non-0 to use the International Components for Unicode (ICU). |
| 51 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 52 | !IFNDEF USE_ICU |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 53 | USE_ICU = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 54 | !ENDIF |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 55 | |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 56 | # Set this non-0 to dynamically link to the MSVC runtime library. |
| 57 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 58 | !IFNDEF USE_CRT_DLL |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 59 | USE_CRT_DLL = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 60 | !ENDIF |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 61 | |
mistachkin | e45e0fb | 2015-01-21 00:48:46 +0000 | [diff] [blame] | 62 | # Set this non-0 to link to the RPCRT4 library. |
| 63 | # |
| 64 | !IFNDEF USE_RPCRT4_LIB |
| 65 | USE_RPCRT4_LIB = 0 |
| 66 | !ENDIF |
| 67 | |
mistachkin | 0157e01 | 2013-09-06 21:41:11 +0000 | [diff] [blame] | 68 | # Set this non-0 to generate assembly code listings for the source code |
| 69 | # files. |
| 70 | # |
| 71 | !IFNDEF USE_LISTINGS |
| 72 | USE_LISTINGS = 0 |
| 73 | !ENDIF |
| 74 | |
mistachkin | 52fd8e1 | 2012-08-28 01:44:13 +0000 | [diff] [blame] | 75 | # Set this non-0 to attempt setting the native compiler automatically |
| 76 | # for cross-compiling the command line tools needed during the compilation |
| 77 | # process. |
| 78 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 79 | !IFNDEF XCOMPILE |
mistachkin | 52fd8e1 | 2012-08-28 01:44:13 +0000 | [diff] [blame] | 80 | XCOMPILE = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 81 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 82 | |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 83 | # Set this non-0 to use the native libraries paths for cross-compiling |
| 84 | # the command line tools needed during the compilation process. |
| 85 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 86 | !IFNDEF USE_NATIVE_LIBPATHS |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 87 | USE_NATIVE_LIBPATHS = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 88 | !ENDIF |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 89 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 90 | # Set this 0 to skip the compiling and embedding of version resources. |
| 91 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 92 | !IFNDEF USE_RC |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 93 | USE_RC = 1 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 94 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 95 | |
mistachkin | 46b721a | 2012-03-23 12:28:21 +0000 | [diff] [blame] | 96 | # Set this non-0 to compile binaries suitable for the WinRT environment. |
| 97 | # This setting does not apply to any binaries that require Tcl to operate |
| 98 | # properly (i.e. the text fixture, etc). |
| 99 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 100 | !IFNDEF FOR_WINRT |
mistachkin | 46b721a | 2012-03-23 12:28:21 +0000 | [diff] [blame] | 101 | FOR_WINRT = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 102 | !ENDIF |
mistachkin | 46b721a | 2012-03-23 12:28:21 +0000 | [diff] [blame] | 103 | |
mistachkin | 31856a3 | 2012-07-27 07:13:25 +0000 | [diff] [blame] | 104 | # Set this non-0 to skip attempting to look for and/or link with the Tcl |
| 105 | # runtime library. |
| 106 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 107 | !IFNDEF NO_TCL |
mistachkin | 31856a3 | 2012-07-27 07:13:25 +0000 | [diff] [blame] | 108 | NO_TCL = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 109 | !ENDIF |
mistachkin | 31856a3 | 2012-07-27 07:13:25 +0000 | [diff] [blame] | 110 | |
mistachkin | 4d60be5 | 2011-08-26 05:40:31 +0000 | [diff] [blame] | 111 | # Set this to non-0 to create and use PDBs. |
| 112 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 113 | !IFNDEF SYMBOLS |
mistachkin | 4d60be5 | 2011-08-26 05:40:31 +0000 | [diff] [blame] | 114 | SYMBOLS = 1 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 115 | !ENDIF |
mistachkin | 4d60be5 | 2011-08-26 05:40:31 +0000 | [diff] [blame] | 116 | |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 117 | # Set this to non-0 to use the SQLite debugging heap subsystem. |
| 118 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 119 | !IFNDEF MEMDEBUG |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 120 | MEMDEBUG = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 121 | !ENDIF |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 122 | |
| 123 | # Set this to non-0 to use the Win32 native heap subsystem. |
| 124 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 125 | !IFNDEF WIN32HEAP |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 126 | WIN32HEAP = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 127 | !ENDIF |
mistachkin | f2d25f2 | 2011-08-25 04:09:12 +0000 | [diff] [blame] | 128 | |
| 129 | # Set this to one of the following values to enable various debugging |
| 130 | # features. Each level includes the debugging options from the previous |
| 131 | # levels. Currently, the recognized values for DEBUG are: |
| 132 | # |
| 133 | # 0 == NDEBUG: Disables assert() and other runtime diagnostics. |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 134 | # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API. |
| 135 | # 2 == Disables NDEBUG and all optimizations and then enables PDBs. |
| 136 | # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code. |
| 137 | # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call. |
| 138 | # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros. |
| 139 | # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros. |
mistachkin | f2d25f2 | 2011-08-25 04:09:12 +0000 | [diff] [blame] | 140 | # |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 141 | !IFNDEF DEBUG |
mistachkin | f2d25f2 | 2011-08-25 04:09:12 +0000 | [diff] [blame] | 142 | DEBUG = 0 |
mistachkin | 0ec0744 | 2012-10-12 18:06:07 +0000 | [diff] [blame] | 143 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 144 | |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 145 | # Enable use of available compiler optimizations? Normally, this should be |
| 146 | # non-zero. Setting this to zero, thus disabling all compiler optimizations, |
| 147 | # can be useful for testing. |
| 148 | # |
| 149 | !IFNDEF OPTIMIZATIONS |
| 150 | OPTIMIZATIONS = 2 |
| 151 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 152 | |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 153 | # These are the "standard" SQLite compilation options used when compiling for |
| 154 | # the Windows platform. |
| 155 | # |
| 156 | !IFNDEF OPT_FEATURE_FLAGS |
| 157 | OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1 |
| 158 | OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1 |
| 159 | OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1 |
| 160 | !ENDIF |
| 161 | |
| 162 | ############################################################################### |
| 163 | ############################### END OF OPTIONS ################################ |
| 164 | ############################################################################### |
| 165 | |
mistachkin | d9b3c54 | 2014-05-09 23:31:55 +0000 | [diff] [blame] | 166 | # This assumes that MSVC is always installed in 32-bit Program Files directory |
| 167 | # and sets the variable for use in locating other 32-bit installs accordingly. |
| 168 | # |
| 169 | PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\.. |
| 170 | PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\) |
| 171 | |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 172 | # Check for the predefined command macro CC. This should point to the compiler |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 173 | # binary for the target platform. If it is not defined, simply define it to |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 174 | # the legacy default value 'cl.exe'. |
| 175 | # |
| 176 | !IFNDEF CC |
| 177 | CC = cl.exe |
| 178 | !ENDIF |
| 179 | |
mistachkin | 228aeff | 2012-06-30 19:24:09 +0000 | [diff] [blame] | 180 | # Check for the command macro LD. This should point to the linker binary for |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 181 | # the target platform. If it is not defined, simply define it to the legacy |
mistachkin | 228aeff | 2012-06-30 19:24:09 +0000 | [diff] [blame] | 182 | # default value 'link.exe'. |
| 183 | # |
| 184 | !IFNDEF LD |
| 185 | LD = link.exe |
| 186 | !ENDIF |
| 187 | |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 188 | # Check for the predefined command macro RC. This should point to the resource |
| 189 | # compiler binary for the target platform. If it is not defined, simply define |
| 190 | # it to the legacy default value 'rc.exe'. |
| 191 | # |
| 192 | !IFNDEF RC |
| 193 | RC = rc.exe |
| 194 | !ENDIF |
| 195 | |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 196 | # Check for the MSVC runtime library path macro. Othertise, this value will |
| 197 | # default to the 'lib' directory underneath the MSVC installation directory. |
| 198 | # |
| 199 | !IFNDEF CRTLIBPATH |
| 200 | CRTLIBPATH = $(VCINSTALLDIR)\lib |
| 201 | !ENDIF |
| 202 | |
| 203 | CRTLIBPATH = $(CRTLIBPATH:\\=\) |
| 204 | |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 205 | # Check for the command macro NCC. This should point to the compiler binary |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 206 | # for the platform the compilation process is taking place on. If it is not |
| 207 | # defined, simply define it to have the same value as the CC macro. When |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 208 | # cross-compiling, it is suggested that this macro be modified via the command |
| 209 | # line (since nmake itself does not provide a built-in method to guess it). |
| 210 | # For example, to use the x86 compiler when cross-compiling for x64, a command |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 211 | # line similar to the following could be used (all on one line): |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 212 | # |
mistachkin | 6f92833 | 2012-08-17 11:47:32 +0000 | [diff] [blame] | 213 | # nmake /f Makefile.msc sqlite3.dll |
mistachkin | 52fd8e1 | 2012-08-28 01:44:13 +0000 | [diff] [blame] | 214 | # XCOMPILE=1 USE_NATIVE_LIBPATHS=1 |
| 215 | # |
| 216 | # Alternatively, the full path and file name to the compiler binary for the |
| 217 | # platform the compilation process is taking place may be specified (all on |
| 218 | # one line): |
| 219 | # |
| 220 | # nmake /f Makefile.msc sqlite3.dll |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 221 | # "NCC=""%VCINSTALLDIR%\bin\cl.exe""" |
| 222 | # USE_NATIVE_LIBPATHS=1 |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 223 | # |
mistachkin | fd0ba2a | 2012-07-27 08:21:45 +0000 | [diff] [blame] | 224 | !IFDEF NCC |
| 225 | NCC = $(NCC:\\=\) |
mistachkin | 52fd8e1 | 2012-08-28 01:44:13 +0000 | [diff] [blame] | 226 | !ELSEIF $(XCOMPILE)!=0 |
mistachkin | 5fac420 | 2013-12-03 23:33:29 +0000 | [diff] [blame] | 227 | NCC = "$(VCINSTALLDIR)\bin\$(CC)" |
mistachkin | 52fd8e1 | 2012-08-28 01:44:13 +0000 | [diff] [blame] | 228 | NCC = $(NCC:\\=\) |
mistachkin | fd0ba2a | 2012-07-27 08:21:45 +0000 | [diff] [blame] | 229 | !ELSE |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 230 | NCC = $(CC) |
| 231 | !ENDIF |
| 232 | |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 233 | # Check for the MSVC native runtime library path macro. Othertise, |
| 234 | # this value will default to the 'lib' directory underneath the MSVC |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 235 | # installation directory. |
| 236 | # |
| 237 | !IFNDEF NCRTLIBPATH |
| 238 | NCRTLIBPATH = $(VCINSTALLDIR)\lib |
| 239 | !ENDIF |
| 240 | |
mistachkin | 0b5ae72 | 2012-07-27 23:03:47 +0000 | [diff] [blame] | 241 | NCRTLIBPATH = $(NCRTLIBPATH:\\=\) |
| 242 | |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 243 | # Check for the Platform SDK library path macro. Othertise, this |
| 244 | # value will default to the 'lib' directory underneath the Windows |
| 245 | # SDK installation directory (the environment variable used appears |
| 246 | # to be available when using Visual C++ 2008 or later via the |
| 247 | # command line). |
| 248 | # |
| 249 | !IFNDEF NSDKLIBPATH |
| 250 | NSDKLIBPATH = $(WINDOWSSDKDIR)\lib |
| 251 | !ENDIF |
| 252 | |
mistachkin | 0b5ae72 | 2012-07-27 23:03:47 +0000 | [diff] [blame] | 253 | NSDKLIBPATH = $(NSDKLIBPATH:\\=\) |
| 254 | |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 255 | # C compiler and options for use in building executables that |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 256 | # will run on the platform that is doing the build. |
| 257 | # |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 258 | !IF $(USE_FULLWARN)!=0 |
| 259 | BCC = $(NCC) -W4 |
| 260 | !ELSE |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 261 | BCC = $(NCC) -W3 |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 262 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 263 | |
mistachkin | 0157e01 | 2013-09-06 21:41:11 +0000 | [diff] [blame] | 264 | # Check if assembly code listings should be generated for the source |
| 265 | # code files to be compiled. |
| 266 | # |
| 267 | !IF $(USE_LISTINGS)!=0 |
| 268 | BCC = $(BCC) -FAcs |
| 269 | !ENDIF |
| 270 | |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 271 | # Check if the native library paths should be used when compiling |
| 272 | # the command line tools used during the compilation process. If |
| 273 | # so, set the necessary macro now. |
| 274 | # |
| 275 | !IF $(USE_NATIVE_LIBPATHS)!=0 |
| 276 | NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)" |
| 277 | !ENDIF |
| 278 | |
| 279 | # C compiler and options for use in building executables that |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 280 | # will run on the target platform. (BCC and TCC are usually the |
| 281 | # same unless your are cross-compiling.) |
| 282 | # |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 283 | !IF $(USE_FULLWARN)!=0 |
mistachkin | 27b2f05 | 2015-01-12 19:49:46 +0000 | [diff] [blame] | 284 | TCC = $(CC) -W4 -DINCLUDE_MSVC_H=1 |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 285 | !ELSE |
| 286 | TCC = $(CC) -W3 |
| 287 | !ENDIF |
| 288 | |
| 289 | TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise |
mistachkin | 8ccc6d4 | 2012-09-27 21:03:53 +0000 | [diff] [blame] | 290 | RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 291 | |
mistachkin | 0157e01 | 2013-09-06 21:41:11 +0000 | [diff] [blame] | 292 | # Check if assembly code listings should be generated for the source |
| 293 | # code files to be compiled. |
| 294 | # |
| 295 | !IF $(USE_LISTINGS)!=0 |
| 296 | TCC = $(TCC) -FAcs |
| 297 | !ENDIF |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 298 | |
mistachkin | f39eaf2 | 2012-03-20 02:18:42 +0000 | [diff] [blame] | 299 | # When compiling the library for use in the WinRT environment, |
mistachkin | 46b721a | 2012-03-23 12:28:21 +0000 | [diff] [blame] | 300 | # the following compile-time options must be used as well to |
mistachkin | f39eaf2 | 2012-03-20 02:18:42 +0000 | [diff] [blame] | 301 | # disable use of Win32 APIs that are not available and to enable |
| 302 | # use of Win32 APIs that are specific to Windows 8 and/or WinRT. |
| 303 | # |
mistachkin | 46b721a | 2012-03-23 12:28:21 +0000 | [diff] [blame] | 304 | !IF $(FOR_WINRT)!=0 |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 305 | TCC = $(TCC) -DSQLITE_OS_WINRT=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 306 | RCC = $(RCC) -DSQLITE_OS_WINRT=1 |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 307 | TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP |
| 308 | RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 309 | !ENDIF |
| 310 | |
| 311 | # Also, we need to dynamically link to the correct MSVC runtime |
| 312 | # when compiling for WinRT (e.g. debug or release) OR if the |
| 313 | # USE_CRT_DLL option is set to force dynamically linking to the |
| 314 | # MSVC runtime library. |
| 315 | # |
| 316 | !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0 |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 317 | !IF $(DEBUG)>1 |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 318 | TCC = $(TCC) -MDd |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 319 | BCC = $(BCC) -MDd |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 320 | !ELSE |
| 321 | TCC = $(TCC) -MD |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 322 | BCC = $(BCC) -MD |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 323 | !ENDIF |
| 324 | !ELSE |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 325 | !IF $(DEBUG)>1 |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 326 | TCC = $(TCC) -MTd |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 327 | BCC = $(BCC) -MTd |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 328 | !ELSE |
| 329 | TCC = $(TCC) -MT |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 330 | BCC = $(BCC) -MT |
mistachkin | 8d967a9 | 2012-06-21 04:21:35 +0000 | [diff] [blame] | 331 | !ENDIF |
mistachkin | 46b721a | 2012-03-23 12:28:21 +0000 | [diff] [blame] | 332 | !ENDIF |
mistachkin | f39eaf2 | 2012-03-20 02:18:42 +0000 | [diff] [blame] | 333 | |
| 334 | # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 335 | # any extension header files by default. For non-amalgamation |
| 336 | # builds, we need to make sure the compiler can find these. |
| 337 | # |
| 338 | !IF $(USE_AMALGAMATION)==0 |
| 339 | TCC = $(TCC) -I$(TOP)\ext\fts3 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 340 | RCC = $(RCC) -I$(TOP)\ext\fts3 |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 341 | TCC = $(TCC) -I$(TOP)\ext\rtree |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 342 | RCC = $(RCC) -I$(TOP)\ext\rtree |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 343 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 344 | |
mistachkin | b042751 | 2014-01-30 11:12:52 +0000 | [diff] [blame] | 345 | # The mksqlite3c.tcl script accepts some options on the command |
| 346 | # line. When compiling with debugging enabled, some of these |
| 347 | # options are necessary in order to allow debugging symbols to |
| 348 | # work correctly with Visual Studio when using the amalgamation. |
| 349 | # |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 350 | !IF $(DEBUG)>1 |
mistachkin | b042751 | 2014-01-30 11:12:52 +0000 | [diff] [blame] | 351 | MKSQLITE3C_ARGS = --linemacros |
| 352 | !ELSE |
| 353 | MKSQLITE3C_ARGS = |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 354 | !ENDIF |
| 355 | |
| 356 | # Define -DNDEBUG to compile without debugging (i.e., for production usage) |
| 357 | # Omitting the define will cause extra debugging code to be inserted and |
| 358 | # includes extra comments when "EXPLAIN stmt" is used. |
| 359 | # |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 360 | !IF $(DEBUG)==0 |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 361 | TCC = $(TCC) -DNDEBUG |
mistachkin | fec360a | 2012-04-18 10:29:21 +0000 | [diff] [blame] | 362 | BCC = $(BCC) -DNDEBUG |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 363 | RCC = $(RCC) -DNDEBUG |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 364 | !ENDIF |
| 365 | |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 366 | !IF $(DEBUG)>0 |
| 367 | TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR |
| 368 | RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR |
| 369 | !ENDIF |
| 370 | |
| 371 | !IF $(DEBUG)>2 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 372 | TCC = $(TCC) -DSQLITE_DEBUG |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 373 | RCC = $(RCC) -DSQLITE_DEBUG |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 374 | !ENDIF |
| 375 | |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 376 | !IF $(DEBUG)>4 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 377 | TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 378 | RCC = $(RCC) -DSQLITE_DEBUG_OS_TRACE=1 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 379 | !ENDIF |
| 380 | |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 381 | !IF $(DEBUG)>5 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 382 | TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 383 | RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 384 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 385 | |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 386 | # Prevent warnings about "insecure" MSVC runtime library functions |
| 387 | # being used. |
mistachkin | 176f1b4 | 2011-08-02 23:34:00 +0000 | [diff] [blame] | 388 | # |
| 389 | TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS |
mistachkin | fec360a | 2012-04-18 10:29:21 +0000 | [diff] [blame] | 390 | BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 391 | RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS |
mistachkin | 176f1b4 | 2011-08-02 23:34:00 +0000 | [diff] [blame] | 392 | |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 393 | # Prevent warnings about "deprecated" POSIX functions being used. |
| 394 | # |
| 395 | TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS |
| 396 | BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 397 | RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS |
mistachkin | bd58d5f | 2012-06-30 22:22:34 +0000 | [diff] [blame] | 398 | |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 399 | # Use the SQLite debugging heap subsystem? |
mistachkin | 1b186a9 | 2011-08-24 16:13:57 +0000 | [diff] [blame] | 400 | # |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 401 | !IF $(MEMDEBUG)!=0 |
| 402 | TCC = $(TCC) -DSQLITE_MEMDEBUG=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 403 | RCC = $(RCC) -DSQLITE_MEMDEBUG=1 |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 404 | |
mistachkin | 2f7d5d8 | 2012-08-22 00:39:34 +0000 | [diff] [blame] | 405 | # Use native Win32 heap subsystem instead of malloc/free? |
| 406 | # |
| 407 | !ELSEIF $(WIN32HEAP)!=0 |
| 408 | TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 409 | RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 410 | |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 411 | # Validate the heap on every call into the native Win32 heap subsystem? |
| 412 | # |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 413 | !IF $(DEBUG)>3 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 414 | TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 415 | RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 416 | !ENDIF |
mistachkin | 468690e | 2011-08-24 17:42:22 +0000 | [diff] [blame] | 417 | !ENDIF |
mistachkin | 1b186a9 | 2011-08-24 16:13:57 +0000 | [diff] [blame] | 418 | |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 419 | # The locations of the Tcl header and library files. Also, the library that |
| 420 | # non-stubs enabled programs using Tcl must link against. These variables |
| 421 | # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment |
| 422 | # prior to running nmake in order to match the actual installed location and |
| 423 | # version on this machine. |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 424 | # |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 425 | !IFNDEF TCLINCDIR |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 426 | TCLINCDIR = c:\tcl\include |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 427 | !ENDIF |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 428 | |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 429 | !IFNDEF TCLLIBDIR |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 430 | TCLLIBDIR = c:\tcl\lib |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 431 | !ENDIF |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 432 | |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 433 | !IFNDEF LIBTCL |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 434 | LIBTCL = tcl85.lib |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 435 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 436 | |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 437 | # The locations of the ICU header and library files. These variables |
| 438 | # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment |
| 439 | # prior to running nmake in order to match the actual installed location on |
| 440 | # this machine. |
| 441 | # |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 442 | !IFNDEF ICUINCDIR |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 443 | ICUINCDIR = c:\icu\include |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 444 | !ENDIF |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 445 | |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 446 | !IFNDEF ICULIBDIR |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 447 | ICULIBDIR = c:\icu\lib |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 448 | !ENDIF |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 449 | |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 450 | !IFNDEF LIBICU |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 451 | LIBICU = icuuc.lib icuin.lib |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 452 | !ENDIF |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 453 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 454 | # This is the command to use for tclsh - normally just "tclsh", but we may |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 455 | # know the specific version we want to use. This variable (TCLSH_CMD) may be |
| 456 | # overridden via the environment prior to running nmake in order to select a |
| 457 | # specific Tcl shell to use. |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 458 | # |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 459 | !IFNDEF TCLSH_CMD |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 460 | TCLSH_CMD = tclsh85 |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 461 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 462 | |
| 463 | # Compiler options needed for programs that use the readline() library. |
| 464 | # |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 465 | !IFNDEF READLINE_FLAGS |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 466 | READLINE_FLAGS = -DHAVE_READLINE=0 |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 467 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 468 | |
| 469 | # The library that programs using readline() must link against. |
| 470 | # |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 471 | !IFNDEF LIBREADLINE |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 472 | LIBREADLINE = |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 473 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 474 | |
| 475 | # Should the database engine be compiled threadsafe |
| 476 | # |
| 477 | TCC = $(TCC) -DSQLITE_THREADSAFE=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 478 | RCC = $(RCC) -DSQLITE_THREADSAFE=1 |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 479 | |
| 480 | # Do threads override each others locks by default (1), or do we test (-1) |
| 481 | # |
| 482 | TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 483 | RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1 |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 484 | |
| 485 | # Any target libraries which libsqlite must be linked against |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 486 | # |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 487 | !IFNDEF TLIBS |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 488 | TLIBS = |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 489 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 490 | |
| 491 | # Flags controlling use of the in memory btree implementation |
| 492 | # |
| 493 | # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to |
| 494 | # default to file, 2 to default to memory, and 3 to force temporary |
| 495 | # tables to always be in memory. |
| 496 | # |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 497 | TCC = $(TCC) -DSQLITE_TEMP_STORE=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 498 | RCC = $(RCC) -DSQLITE_TEMP_STORE=1 |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 499 | |
| 500 | # Enable/disable loadable extensions, and other optional features |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 501 | # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). |
| 502 | # The same set of OMIT and ENABLE flags should be passed to the |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 503 | # LEMON parser generator and the mkkeywordhash tool as well. |
| 504 | |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 505 | # These are the required SQLite compilation options used when compiling for |
| 506 | # the Windows platform. |
| 507 | # |
| 508 | REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100 |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 509 | |
mistachkin | e45e0fb | 2015-01-21 00:48:46 +0000 | [diff] [blame] | 510 | # If we are linking to the RPCRT4 library, enable features that need it. |
| 511 | # |
| 512 | !IF $(USE_RPCRT4_LIB)!=0 |
| 513 | REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1 |
| 514 | !ENDIF |
| 515 | |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 516 | # Add the required and optional SQLite compilation options into the command |
| 517 | # lines used to invoke the MSVC code and resource compilers. |
| 518 | # |
| 519 | TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) |
| 520 | RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 521 | |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 522 | # Add in any optional parameters specified on the commane line, e.g. |
| 523 | # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1" |
| 524 | # |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 525 | TCC = $(TCC) $(OPTS) |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 526 | RCC = $(RCC) $(OPTS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 527 | |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 528 | # If compiling for debugging, add some defines. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 529 | # |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 530 | !IF $(DEBUG)>1 |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 531 | TCC = $(TCC) -D_DEBUG |
| 532 | BCC = $(BCC) -D_DEBUG |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 533 | RCC = $(RCC) -D_DEBUG |
mistachkin | 4d60be5 | 2011-08-26 05:40:31 +0000 | [diff] [blame] | 534 | !ENDIF |
| 535 | |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 536 | # If optimizations are enabled or disabled (either implicitly or |
| 537 | # explicitly), add the necessary flags. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 538 | # |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 539 | !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0 |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 540 | TCC = $(TCC) -Od |
| 541 | BCC = $(BCC) -Od |
| 542 | !ELSEIF $(OPTIMIZATIONS)>=3 |
| 543 | TCC = $(TCC) -Ox |
| 544 | BCC = $(BCC) -Ox |
| 545 | !ELSEIF $(OPTIMIZATIONS)==2 |
| 546 | TCC = $(TCC) -O2 |
| 547 | BCC = $(BCC) -O2 |
| 548 | !ELSEIF $(OPTIMIZATIONS)==1 |
| 549 | TCC = $(TCC) -O1 |
| 550 | BCC = $(BCC) -O1 |
| 551 | !ENDIF |
| 552 | |
| 553 | # If symbols are enabled (or compiling for debugging), enable PDBs. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 554 | # |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 555 | !IF $(DEBUG)>1 || $(SYMBOLS)!=0 |
mistachkin | 4d60be5 | 2011-08-26 05:40:31 +0000 | [diff] [blame] | 556 | TCC = $(TCC) -Zi |
mistachkin | fec360a | 2012-04-18 10:29:21 +0000 | [diff] [blame] | 557 | BCC = $(BCC) -Zi |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 558 | !ENDIF |
| 559 | |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 560 | # If ICU support is enabled, add the compiler options for it. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 561 | # |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 562 | !IF $(USE_ICU)!=0 |
| 563 | TCC = $(TCC) -DSQLITE_ENABLE_ICU=1 |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 564 | RCC = $(RCC) -DSQLITE_ENABLE_ICU=1 |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 565 | TCC = $(TCC) -I$(TOP)\ext\icu |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 566 | RCC = $(RCC) -I$(TOP)\ext\icu |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 567 | TCC = $(TCC) -I$(ICUINCDIR) |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 568 | RCC = $(RCC) -I$(ICUINCDIR) |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 569 | !ENDIF |
| 570 | |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 571 | # Command line prefixes for compiling code, compiling resources, |
| 572 | # linking, etc. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 573 | # |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 574 | LTCOMPILE = $(TCC) -Fo$@ |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 575 | LTRCOMPILE = $(RCC) -r |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 576 | LTLIB = lib.exe |
shaneh | 2a0b9ef | 2011-06-20 20:52:32 +0000 | [diff] [blame] | 577 | LTLINK = $(TCC) -Fe$@ |
| 578 | |
mistachkin | e45e0fb | 2015-01-21 00:48:46 +0000 | [diff] [blame] | 579 | # If requested, link to the RPCRT4 library. |
| 580 | # |
| 581 | !IF $(USE_RPCRT4_LIB)!=0 |
| 582 | LTLINK = $(LTLINK) rpcrt4.lib |
| 583 | !ENDIF |
| 584 | |
shaneh | 2a0b9ef | 2011-06-20 20:52:32 +0000 | [diff] [blame] | 585 | # If a platform was set, force the linker to target that. |
| 586 | # Note that the vcvars*.bat family of batch files typically |
| 587 | # set this for you. Otherwise, the linker will attempt |
| 588 | # to deduce the binary type based on the object files. |
mistachkin | e37f99c | 2012-06-30 16:22:05 +0000 | [diff] [blame] | 589 | !IFDEF PLATFORM |
shaneh | 2a0b9ef | 2011-06-20 20:52:32 +0000 | [diff] [blame] | 590 | LTLINKOPTS = /MACHINE:$(PLATFORM) |
shaneh | 29ebea8 | 2011-06-21 18:12:07 +0000 | [diff] [blame] | 591 | LTLIBOPTS = /MACHINE:$(PLATFORM) |
shaneh | 2a0b9ef | 2011-06-20 20:52:32 +0000 | [diff] [blame] | 592 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 593 | |
mistachkin | a6ff857 | 2012-04-17 21:00:12 +0000 | [diff] [blame] | 594 | # When compiling for use in the WinRT environment, the following |
| 595 | # linker option must be used to mark the executable as runnable |
| 596 | # only in the context of an application container. |
| 597 | # |
| 598 | !IF $(FOR_WINRT)!=0 |
| 599 | LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER |
mistachkin | 60bdad7 | 2013-07-11 03:09:45 +0000 | [diff] [blame] | 600 | !IF "$(VISUALSTUDIOVERSION)"=="12.0" |
mistachkin | f6a2342 | 2014-05-05 20:24:34 +0000 | [diff] [blame] | 601 | !IFNDEF STORELIBPATH |
mistachkin | da5b1cd | 2013-07-10 19:39:02 +0000 | [diff] [blame] | 602 | !IF "$(PLATFORM)"=="x86" |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 603 | STORELIBPATH = $(CRTLIBPATH)\store |
mistachkin | da5b1cd | 2013-07-10 19:39:02 +0000 | [diff] [blame] | 604 | !ELSEIF "$(PLATFORM)"=="x64" |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 605 | STORELIBPATH = $(CRTLIBPATH)\store\amd64 |
mistachkin | 4eaa129 | 2013-07-10 21:33:25 +0000 | [diff] [blame] | 606 | !ELSEIF "$(PLATFORM)"=="ARM" |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 607 | STORELIBPATH = $(CRTLIBPATH)\store\arm |
mistachkin | 4eaa129 | 2013-07-10 21:33:25 +0000 | [diff] [blame] | 608 | !ELSE |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 609 | STORELIBPATH = $(CRTLIBPATH)\store |
mistachkin | da5b1cd | 2013-07-10 19:39:02 +0000 | [diff] [blame] | 610 | !ENDIF |
| 611 | !ENDIF |
mistachkin | f6a2342 | 2014-05-05 20:24:34 +0000 | [diff] [blame] | 612 | STORELIBPATH = $(STORELIBPATH:\\=\) |
| 613 | LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)" |
| 614 | !ENDIF |
mistachkin | a6ff857 | 2012-04-17 21:00:12 +0000 | [diff] [blame] | 615 | !ENDIF |
| 616 | |
mistachkin | d9b3c54 | 2014-05-09 23:31:55 +0000 | [diff] [blame] | 617 | # When compiling for Windows Phone 8.1, an extra library path is |
| 618 | # required. |
| 619 | # |
| 620 | !IF $(USE_WP81_OPTS)!=0 |
| 621 | !IFNDEF WP81LIBPATH |
| 622 | !IF "$(PLATFORM)"=="x86" |
| 623 | WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 |
| 624 | !ELSEIF "$(PLATFORM)"=="ARM" |
| 625 | WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM |
| 626 | !ELSE |
| 627 | WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 |
| 628 | !ENDIF |
| 629 | !ENDIF |
| 630 | !ENDIF |
| 631 | |
| 632 | # When compiling for Windows Phone 8.1, some extra linker options |
| 633 | # are also required. |
| 634 | # |
| 635 | !IF $(USE_WP81_OPTS)!=0 |
| 636 | !IFDEF WP81LIBPATH |
| 637 | LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" |
| 638 | !ENDIF |
| 639 | LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE |
| 640 | LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib |
| 641 | LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib |
| 642 | !ENDIF |
| 643 | |
mistachkin | fec360a | 2012-04-18 10:29:21 +0000 | [diff] [blame] | 644 | # If either debugging or symbols are enabled, enable PDBs. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 645 | # |
mistachkin | cd54bab | 2014-12-20 21:14:14 +0000 | [diff] [blame] | 646 | !IF $(DEBUG)>1 || $(SYMBOLS)!=0 |
mistachkin | 228aeff | 2012-06-30 19:24:09 +0000 | [diff] [blame] | 647 | LDFLAGS = /DEBUG |
mistachkin | 753c544 | 2011-08-25 02:02:25 +0000 | [diff] [blame] | 648 | !ENDIF |
| 649 | |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 650 | # Start with the Tcl related linker options. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 651 | # |
mistachkin | 31856a3 | 2012-07-27 07:13:25 +0000 | [diff] [blame] | 652 | !IF $(NO_TCL)==0 |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 653 | LTLIBPATHS = /LIBPATH:$(TCLLIBDIR) |
| 654 | LTLIBS = $(LIBTCL) |
mistachkin | 31856a3 | 2012-07-27 07:13:25 +0000 | [diff] [blame] | 655 | !ENDIF |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 656 | |
| 657 | # If ICU support is enabled, add the linker options for it. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 658 | # |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 659 | !IF $(USE_ICU)!=0 |
| 660 | LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR) |
| 661 | LTLIBS = $(LTLIBS) $(LIBICU) |
| 662 | !ENDIF |
| 663 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 664 | # nawk compatible awk. |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 665 | # |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 666 | !IFNDEF NAWK |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 667 | NAWK = gawk.exe |
mistachkin | 8bcd3fa | 2013-08-29 01:03:38 +0000 | [diff] [blame] | 668 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 669 | |
| 670 | # You should not have to change anything below this line |
| 671 | ############################################################################### |
| 672 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 673 | # Object files for the SQLite library (non-amalgamation). |
| 674 | # |
mistachkin | f67feef | 2013-07-29 19:03:20 +0000 | [diff] [blame] | 675 | LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 676 | backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ |
| 677 | callback.lo complete.lo ctime.lo date.lo delete.lo \ |
| 678 | expr.lo fault.lo fkey.lo \ |
drh | 391d4ba | 2012-05-28 20:22:16 +0000 | [diff] [blame] | 679 | fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ |
| 680 | fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \ |
drh | 4d648c7 | 2013-04-22 17:07:56 +0000 | [diff] [blame] | 681 | fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 682 | func.lo global.lo hash.lo \ |
| 683 | icu.lo insert.lo journal.lo legacy.lo loadext.lo \ |
| 684 | main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \ |
| 685 | memjournal.lo \ |
mistachkin | f1c6bc5 | 2012-06-21 15:09:20 +0000 | [diff] [blame] | 686 | mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \ |
| 687 | notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \ |
mistachkin | f67feef | 2013-07-29 19:03:20 +0000 | [diff] [blame] | 688 | pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 689 | random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \ |
mistachkin | e500747 | 2014-05-02 19:12:37 +0000 | [diff] [blame] | 690 | table.lo threads.lo tokenize.lo trigger.lo \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 691 | update.lo util.lo vacuum.lo \ |
mistachkin | f67feef | 2013-07-29 19:03:20 +0000 | [diff] [blame] | 692 | vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \ |
mistachkin | 81c428a | 2011-08-17 02:19:54 +0000 | [diff] [blame] | 693 | vdbetrace.lo wal.lo walker.lo where.lo utf.lo vtab.lo |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 694 | |
| 695 | # Object files for the amalgamation. |
| 696 | # |
| 697 | LIBOBJS1 = sqlite3.lo |
| 698 | |
| 699 | # Determine the real value of LIBOBJ based on the 'configure' script |
| 700 | # |
| 701 | !IF $(USE_AMALGAMATION)==0 |
| 702 | LIBOBJ = $(LIBOBJS0) |
| 703 | !ELSE |
| 704 | LIBOBJ = $(LIBOBJS1) |
| 705 | !ENDIF |
| 706 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 707 | # Determine if embedded resource compilation and usage are enabled. |
| 708 | # |
| 709 | !IF $(USE_RC)!=0 |
| 710 | LIBRESOBJS = sqlite3res.lo |
| 711 | !ELSE |
| 712 | LIBRESOBJS = |
| 713 | !ENDIF |
| 714 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 715 | # All of the source code files. |
| 716 | # |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 717 | SRC1 = \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 718 | $(TOP)\src\alter.c \ |
| 719 | $(TOP)\src\analyze.c \ |
| 720 | $(TOP)\src\attach.c \ |
| 721 | $(TOP)\src\auth.c \ |
| 722 | $(TOP)\src\backup.c \ |
| 723 | $(TOP)\src\bitvec.c \ |
| 724 | $(TOP)\src\btmutex.c \ |
| 725 | $(TOP)\src\btree.c \ |
| 726 | $(TOP)\src\btree.h \ |
| 727 | $(TOP)\src\btreeInt.h \ |
| 728 | $(TOP)\src\build.c \ |
| 729 | $(TOP)\src\callback.c \ |
| 730 | $(TOP)\src\complete.c \ |
| 731 | $(TOP)\src\ctime.c \ |
| 732 | $(TOP)\src\date.c \ |
| 733 | $(TOP)\src\delete.c \ |
| 734 | $(TOP)\src\expr.c \ |
| 735 | $(TOP)\src\fault.c \ |
| 736 | $(TOP)\src\fkey.c \ |
| 737 | $(TOP)\src\func.c \ |
| 738 | $(TOP)\src\global.c \ |
| 739 | $(TOP)\src\hash.c \ |
| 740 | $(TOP)\src\hash.h \ |
| 741 | $(TOP)\src\hwtime.h \ |
| 742 | $(TOP)\src\insert.c \ |
| 743 | $(TOP)\src\journal.c \ |
| 744 | $(TOP)\src\legacy.c \ |
| 745 | $(TOP)\src\loadext.c \ |
| 746 | $(TOP)\src\main.c \ |
| 747 | $(TOP)\src\malloc.c \ |
| 748 | $(TOP)\src\mem0.c \ |
| 749 | $(TOP)\src\mem1.c \ |
| 750 | $(TOP)\src\mem2.c \ |
| 751 | $(TOP)\src\mem3.c \ |
| 752 | $(TOP)\src\mem5.c \ |
| 753 | $(TOP)\src\memjournal.c \ |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 754 | $(TOP)\src\msvc.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 755 | $(TOP)\src\mutex.c \ |
| 756 | $(TOP)\src\mutex.h \ |
| 757 | $(TOP)\src\mutex_noop.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 758 | $(TOP)\src\mutex_unix.c \ |
| 759 | $(TOP)\src\mutex_w32.c \ |
| 760 | $(TOP)\src\notify.c \ |
| 761 | $(TOP)\src\os.c \ |
| 762 | $(TOP)\src\os.h \ |
| 763 | $(TOP)\src\os_common.h \ |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 764 | $(TOP)\src\os_setup.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 765 | $(TOP)\src\os_unix.c \ |
| 766 | $(TOP)\src\os_win.c \ |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 767 | $(TOP)\src\os_win.h |
| 768 | SRC2 = \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 769 | $(TOP)\src\pager.c \ |
| 770 | $(TOP)\src\pager.h \ |
| 771 | $(TOP)\src\parse.y \ |
| 772 | $(TOP)\src\pcache.c \ |
| 773 | $(TOP)\src\pcache.h \ |
| 774 | $(TOP)\src\pcache1.c \ |
| 775 | $(TOP)\src\pragma.c \ |
drh | 67e65e5 | 2015-02-02 21:34:54 +0000 | [diff] [blame] | 776 | $(TOP)\src\pragma.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 777 | $(TOP)\src\prepare.c \ |
| 778 | $(TOP)\src\printf.c \ |
| 779 | $(TOP)\src\random.c \ |
| 780 | $(TOP)\src\resolve.c \ |
| 781 | $(TOP)\src\rowset.c \ |
| 782 | $(TOP)\src\select.c \ |
| 783 | $(TOP)\src\status.c \ |
| 784 | $(TOP)\src\shell.c \ |
| 785 | $(TOP)\src\sqlite.h.in \ |
| 786 | $(TOP)\src\sqlite3ext.h \ |
| 787 | $(TOP)\src\sqliteInt.h \ |
| 788 | $(TOP)\src\sqliteLimit.h \ |
| 789 | $(TOP)\src\table.c \ |
drh | f51446a | 2012-07-21 19:40:42 +0000 | [diff] [blame] | 790 | $(TOP)\src\threads.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 791 | $(TOP)\src\tclsqlite.c \ |
| 792 | $(TOP)\src\tokenize.c \ |
| 793 | $(TOP)\src\trigger.c \ |
| 794 | $(TOP)\src\utf.c \ |
| 795 | $(TOP)\src\update.c \ |
| 796 | $(TOP)\src\util.c \ |
| 797 | $(TOP)\src\vacuum.c \ |
| 798 | $(TOP)\src\vdbe.c \ |
| 799 | $(TOP)\src\vdbe.h \ |
| 800 | $(TOP)\src\vdbeapi.c \ |
| 801 | $(TOP)\src\vdbeaux.c \ |
| 802 | $(TOP)\src\vdbeblob.c \ |
| 803 | $(TOP)\src\vdbemem.c \ |
mistachkin | 81c428a | 2011-08-17 02:19:54 +0000 | [diff] [blame] | 804 | $(TOP)\src\vdbesort.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 805 | $(TOP)\src\vdbetrace.c \ |
| 806 | $(TOP)\src\vdbeInt.h \ |
| 807 | $(TOP)\src\vtab.c \ |
| 808 | $(TOP)\src\wal.c \ |
| 809 | $(TOP)\src\wal.h \ |
| 810 | $(TOP)\src\walker.c \ |
drh | e54df42 | 2013-11-12 18:37:25 +0000 | [diff] [blame] | 811 | $(TOP)\src\where.c \ |
| 812 | $(TOP)\src\whereInt.h |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 813 | |
| 814 | # Source code for extensions |
| 815 | # |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 816 | SRC3 = \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 817 | $(TOP)\ext\fts1\fts1.c \ |
| 818 | $(TOP)\ext\fts1\fts1.h \ |
| 819 | $(TOP)\ext\fts1\fts1_hash.c \ |
| 820 | $(TOP)\ext\fts1\fts1_hash.h \ |
| 821 | $(TOP)\ext\fts1\fts1_porter.c \ |
| 822 | $(TOP)\ext\fts1\fts1_tokenizer.h \ |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 823 | $(TOP)\ext\fts1\fts1_tokenizer1.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 824 | $(TOP)\ext\fts2\fts2.c \ |
| 825 | $(TOP)\ext\fts2\fts2.h \ |
| 826 | $(TOP)\ext\fts2\fts2_hash.c \ |
| 827 | $(TOP)\ext\fts2\fts2_hash.h \ |
| 828 | $(TOP)\ext\fts2\fts2_icu.c \ |
| 829 | $(TOP)\ext\fts2\fts2_porter.c \ |
| 830 | $(TOP)\ext\fts2\fts2_tokenizer.h \ |
| 831 | $(TOP)\ext\fts2\fts2_tokenizer.c \ |
| 832 | $(TOP)\ext\fts2\fts2_tokenizer1.c |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 833 | SRC4 = \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 834 | $(TOP)\ext\fts3\fts3.c \ |
| 835 | $(TOP)\ext\fts3\fts3.h \ |
| 836 | $(TOP)\ext\fts3\fts3Int.h \ |
| 837 | $(TOP)\ext\fts3\fts3_aux.c \ |
| 838 | $(TOP)\ext\fts3\fts3_expr.c \ |
| 839 | $(TOP)\ext\fts3\fts3_hash.c \ |
| 840 | $(TOP)\ext\fts3\fts3_hash.h \ |
| 841 | $(TOP)\ext\fts3\fts3_icu.c \ |
| 842 | $(TOP)\ext\fts3\fts3_porter.c \ |
| 843 | $(TOP)\ext\fts3\fts3_snippet.c \ |
| 844 | $(TOP)\ext\fts3\fts3_tokenizer.h \ |
| 845 | $(TOP)\ext\fts3\fts3_tokenizer.c \ |
| 846 | $(TOP)\ext\fts3\fts3_tokenizer1.c \ |
drh | 4d648c7 | 2013-04-22 17:07:56 +0000 | [diff] [blame] | 847 | $(TOP)\ext\fts3\fts3_tokenize_vtab.c \ |
drh | 391d4ba | 2012-05-28 20:22:16 +0000 | [diff] [blame] | 848 | $(TOP)\ext\fts3\fts3_unicode.c \ |
| 849 | $(TOP)\ext\fts3\fts3_unicode2.c \ |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 850 | $(TOP)\ext\fts3\fts3_write.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 851 | $(TOP)\ext\icu\sqliteicu.h \ |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 852 | $(TOP)\ext\icu\icu.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 853 | $(TOP)\ext\rtree\rtree.h \ |
| 854 | $(TOP)\ext\rtree\rtree.c |
| 855 | |
| 856 | |
| 857 | # Generated source code files |
| 858 | # |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 859 | SRC5 = \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 860 | keywordhash.h \ |
| 861 | opcodes.c \ |
| 862 | opcodes.h \ |
| 863 | parse.c \ |
| 864 | parse.h \ |
| 865 | sqlite3.h |
| 866 | |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 867 | # All source code files. |
| 868 | # |
| 869 | SRC = $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) |
| 870 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 871 | # Source code to the test files. |
| 872 | # |
| 873 | TESTSRC = \ |
| 874 | $(TOP)\src\test1.c \ |
| 875 | $(TOP)\src\test2.c \ |
| 876 | $(TOP)\src\test3.c \ |
| 877 | $(TOP)\src\test4.c \ |
| 878 | $(TOP)\src\test5.c \ |
| 879 | $(TOP)\src\test6.c \ |
| 880 | $(TOP)\src\test7.c \ |
| 881 | $(TOP)\src\test8.c \ |
| 882 | $(TOP)\src\test9.c \ |
| 883 | $(TOP)\src\test_autoext.c \ |
| 884 | $(TOP)\src\test_async.c \ |
| 885 | $(TOP)\src\test_backup.c \ |
drh | 5de7d96 | 2014-12-05 00:17:39 +0000 | [diff] [blame] | 886 | $(TOP)\src\test_blob.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 887 | $(TOP)\src\test_btree.c \ |
| 888 | $(TOP)\src\test_config.c \ |
| 889 | $(TOP)\src\test_demovfs.c \ |
| 890 | $(TOP)\src\test_devsym.c \ |
mistachkin | 413c63b | 2013-01-17 03:18:14 +0000 | [diff] [blame] | 891 | $(TOP)\src\test_fs.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 892 | $(TOP)\src\test_func.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 893 | $(TOP)\src\test_hexio.c \ |
| 894 | $(TOP)\src\test_init.c \ |
| 895 | $(TOP)\src\test_intarray.c \ |
| 896 | $(TOP)\src\test_journal.c \ |
| 897 | $(TOP)\src\test_malloc.c \ |
| 898 | $(TOP)\src\test_multiplex.c \ |
| 899 | $(TOP)\src\test_mutex.c \ |
| 900 | $(TOP)\src\test_onefile.c \ |
| 901 | $(TOP)\src\test_osinst.c \ |
| 902 | $(TOP)\src\test_pcache.c \ |
| 903 | $(TOP)\src\test_quota.c \ |
| 904 | $(TOP)\src\test_rtree.c \ |
| 905 | $(TOP)\src\test_schema.c \ |
| 906 | $(TOP)\src\test_server.c \ |
| 907 | $(TOP)\src\test_superlock.c \ |
| 908 | $(TOP)\src\test_syscall.c \ |
| 909 | $(TOP)\src\test_stat.c \ |
| 910 | $(TOP)\src\test_tclvar.c \ |
| 911 | $(TOP)\src\test_thread.c \ |
| 912 | $(TOP)\src\test_vfs.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 913 | $(TOP)\src\test_wsd.c \ |
| 914 | $(TOP)\ext\fts3\fts3_term.c \ |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 915 | $(TOP)\ext\fts3\fts3_test.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 916 | |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 917 | # Statically linked extensions |
| 918 | # |
drh | 1fb64af | 2013-04-25 14:36:28 +0000 | [diff] [blame] | 919 | TESTEXT = \ |
drh | 8416fc7 | 2013-04-25 16:42:55 +0000 | [diff] [blame] | 920 | $(TOP)\ext\misc\amatch.c \ |
| 921 | $(TOP)\ext\misc\closure.c \ |
drh | 1728bcb | 2014-11-10 16:49:56 +0000 | [diff] [blame] | 922 | $(TOP)\ext\misc\eval.c \ |
drh | 51ed298 | 2014-06-16 12:44:32 +0000 | [diff] [blame] | 923 | $(TOP)\ext\misc\fileio.c \ |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 924 | $(TOP)\ext\misc\fuzzer.c \ |
drh | 8416fc7 | 2013-04-25 16:42:55 +0000 | [diff] [blame] | 925 | $(TOP)\ext\misc\ieee754.c \ |
drh | ea41dc4 | 2013-04-25 19:31:33 +0000 | [diff] [blame] | 926 | $(TOP)\ext\misc\nextchar.c \ |
drh | def3367 | 2013-05-28 20:25:54 +0000 | [diff] [blame] | 927 | $(TOP)\ext\misc\percentile.c \ |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 928 | $(TOP)\ext\misc\regexp.c \ |
drh | b7045ab | 2013-04-25 14:59:01 +0000 | [diff] [blame] | 929 | $(TOP)\ext\misc\spellfix.c \ |
drh | 5f8cdac | 2013-10-14 21:14:42 +0000 | [diff] [blame] | 930 | $(TOP)\ext\misc\totype.c \ |
drh | e50db1c | 2013-04-25 14:31:46 +0000 | [diff] [blame] | 931 | $(TOP)\ext\misc\wholenumber.c |
| 932 | |
| 933 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 934 | # Source code to the library files needed by the test fixture |
| 935 | # |
| 936 | TESTSRC2 = \ |
| 937 | $(TOP)\src\attach.c \ |
| 938 | $(TOP)\src\backup.c \ |
| 939 | $(TOP)\src\bitvec.c \ |
| 940 | $(TOP)\src\btree.c \ |
| 941 | $(TOP)\src\build.c \ |
| 942 | $(TOP)\src\ctime.c \ |
| 943 | $(TOP)\src\date.c \ |
| 944 | $(TOP)\src\expr.c \ |
| 945 | $(TOP)\src\func.c \ |
| 946 | $(TOP)\src\insert.c \ |
| 947 | $(TOP)\src\wal.c \ |
mistachkin | 0600663 | 2013-05-15 20:35:13 +0000 | [diff] [blame] | 948 | $(TOP)\src\main.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 949 | $(TOP)\src\mem5.c \ |
| 950 | $(TOP)\src\os.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 951 | $(TOP)\src\os_unix.c \ |
| 952 | $(TOP)\src\os_win.c \ |
| 953 | $(TOP)\src\pager.c \ |
| 954 | $(TOP)\src\pragma.c \ |
| 955 | $(TOP)\src\prepare.c \ |
| 956 | $(TOP)\src\printf.c \ |
| 957 | $(TOP)\src\random.c \ |
| 958 | $(TOP)\src\pcache.c \ |
| 959 | $(TOP)\src\pcache1.c \ |
| 960 | $(TOP)\src\select.c \ |
| 961 | $(TOP)\src\tokenize.c \ |
| 962 | $(TOP)\src\utf.c \ |
| 963 | $(TOP)\src\util.c \ |
| 964 | $(TOP)\src\vdbeapi.c \ |
| 965 | $(TOP)\src\vdbeaux.c \ |
| 966 | $(TOP)\src\vdbe.c \ |
| 967 | $(TOP)\src\vdbemem.c \ |
mistachkin | 81c428a | 2011-08-17 02:19:54 +0000 | [diff] [blame] | 968 | $(TOP)\src\vdbesort.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 969 | $(TOP)\src\vdbetrace.c \ |
| 970 | $(TOP)\src\where.c \ |
| 971 | parse.c \ |
| 972 | $(TOP)\ext\fts3\fts3.c \ |
| 973 | $(TOP)\ext\fts3\fts3_aux.c \ |
| 974 | $(TOP)\ext\fts3\fts3_expr.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 975 | $(TOP)\ext\fts3\fts3_tokenizer.c \ |
drh | 4d648c7 | 2013-04-22 17:07:56 +0000 | [diff] [blame] | 976 | $(TOP)\ext\fts3\fts3_tokenize_vtab.c \ |
drh | 391d4ba | 2012-05-28 20:22:16 +0000 | [diff] [blame] | 977 | $(TOP)\ext\fts3\fts3_unicode.c \ |
| 978 | $(TOP)\ext\fts3\fts3_unicode2.c \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 979 | $(TOP)\ext\fts3\fts3_write.c \ |
| 980 | $(TOP)\ext\async\sqlite3async.c |
| 981 | |
| 982 | # Header files used by all library source files. |
| 983 | # |
| 984 | HDR = \ |
| 985 | $(TOP)\src\btree.h \ |
| 986 | $(TOP)\src\btreeInt.h \ |
| 987 | $(TOP)\src\hash.h \ |
| 988 | $(TOP)\src\hwtime.h \ |
| 989 | keywordhash.h \ |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 990 | $(TOP)\src\msvc.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 991 | $(TOP)\src\mutex.h \ |
| 992 | opcodes.h \ |
| 993 | $(TOP)\src\os.h \ |
| 994 | $(TOP)\src\os_common.h \ |
mistachkin | f74b9e0 | 2013-11-26 01:00:31 +0000 | [diff] [blame] | 995 | $(TOP)\src\os_setup.h \ |
mistachkin | 8bc5262 | 2013-11-25 09:36:07 +0000 | [diff] [blame] | 996 | $(TOP)\src\os_win.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 997 | $(TOP)\src\pager.h \ |
| 998 | $(TOP)\src\pcache.h \ |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 999 | parse.h \ |
drh | 67e65e5 | 2015-02-02 21:34:54 +0000 | [diff] [blame] | 1000 | $(TOP)\src\pragma.h \ |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1001 | sqlite3.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1002 | $(TOP)\src\sqlite3ext.h \ |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1003 | $(TOP)\src\sqliteInt.h \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1004 | $(TOP)\src\sqliteLimit.h \ |
| 1005 | $(TOP)\src\vdbe.h \ |
drh | e54df42 | 2013-11-12 18:37:25 +0000 | [diff] [blame] | 1006 | $(TOP)\src\vdbeInt.h \ |
| 1007 | $(TOP)\src\whereInt.h |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1008 | |
| 1009 | # Header files used by extensions |
| 1010 | # |
| 1011 | EXTHDR = $(EXTHDR) \ |
| 1012 | $(TOP)\ext\fts1\fts1.h \ |
| 1013 | $(TOP)\ext\fts1\fts1_hash.h \ |
| 1014 | $(TOP)\ext\fts1\fts1_tokenizer.h |
| 1015 | EXTHDR = $(EXTHDR) \ |
| 1016 | $(TOP)\ext\fts2\fts2.h \ |
| 1017 | $(TOP)\ext\fts2\fts2_hash.h \ |
| 1018 | $(TOP)\ext\fts2\fts2_tokenizer.h |
| 1019 | EXTHDR = $(EXTHDR) \ |
| 1020 | $(TOP)\ext\fts3\fts3.h \ |
| 1021 | $(TOP)\ext\fts3\fts3Int.h \ |
| 1022 | $(TOP)\ext\fts3\fts3_hash.h \ |
| 1023 | $(TOP)\ext\fts3\fts3_tokenizer.h |
| 1024 | EXTHDR = $(EXTHDR) \ |
| 1025 | $(TOP)\ext\rtree\rtree.h |
| 1026 | EXTHDR = $(EXTHDR) \ |
| 1027 | $(TOP)\ext\icu\sqliteicu.h |
| 1028 | EXTHDR = $(EXTHDR) \ |
| 1029 | $(TOP)\ext\rtree\sqlite3rtree.h |
| 1030 | |
| 1031 | # This is the default Makefile target. The objects listed here |
| 1032 | # are what get build when you type just "make" with no arguments. |
| 1033 | # |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 1034 | all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1035 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1036 | libsqlite3.lib: $(LIBOBJ) |
shaneh | 29ebea8 | 2011-06-21 18:12:07 +0000 | [diff] [blame] | 1037 | $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1038 | |
| 1039 | libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib |
mistachkin | c756ded | 2011-10-02 05:23:16 +0000 | [diff] [blame] | 1040 | $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1041 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1042 | sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h |
mistachkin | 27b2f05 | 2015-01-12 19:49:46 +0000 | [diff] [blame] | 1043 | $(LTLINK) $(READLINE_FLAGS) $(TOP)\src\shell.c \ |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1044 | /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1045 | |
drh | bc94dbb | 2013-04-08 14:28:33 +0000 | [diff] [blame] | 1046 | mptester.exe: $(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h |
| 1047 | $(LTLINK) $(TOP)\mptest\mptest.c \ |
| 1048 | /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1049 | |
| 1050 | # This target creates a directory named "tsrc" and fills it with |
| 1051 | # copies of all of the C source code and header files needed to |
| 1052 | # build on the target system. Some of the C source code and header |
| 1053 | # files are automatically generated. This target takes care of |
| 1054 | # all that automatic generation. |
| 1055 | # |
| 1056 | .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl |
| 1057 | -rmdir /S/Q tsrc |
| 1058 | -mkdir tsrc |
drh | 6267920 | 2015-01-29 18:38:05 +0000 | [diff] [blame] | 1059 | for %i in ($(SRC1)) do copy /Y %i tsrc |
| 1060 | for %i in ($(SRC2)) do copy /Y %i tsrc |
| 1061 | for %i in ($(SRC3)) do copy /Y %i tsrc |
| 1062 | for %i in ($(SRC4)) do copy /Y %i tsrc |
| 1063 | for %i in ($(SRC5)) do copy /Y %i tsrc |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1064 | del /Q tsrc\sqlite.h.in tsrc\parse.y |
drh | 2dc0648 | 2013-12-11 00:59:10 +0000 | [diff] [blame] | 1065 | $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1066 | move vdbe.new tsrc\vdbe.c |
| 1067 | echo > .target_source |
| 1068 | |
| 1069 | sqlite3.c: .target_source $(TOP)\tool\mksqlite3c.tcl |
mistachkin | b042751 | 2014-01-30 11:12:52 +0000 | [diff] [blame] | 1070 | $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl $(MKSQLITE3C_ARGS) |
drh | 339d6c6 | 2013-03-19 16:12:40 +0000 | [diff] [blame] | 1071 | copy tsrc\shell.c . |
| 1072 | copy tsrc\sqlite3ext.h . |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1073 | |
mistachkin | 48dd9de | 2012-12-06 04:33:13 +0000 | [diff] [blame] | 1074 | sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl |
| 1075 | $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl |
drh | 75e7bc1 | 2011-07-22 11:23:49 +0000 | [diff] [blame] | 1076 | |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 1077 | # Set the source code file to be used by executables and libraries when |
| 1078 | # they need the amalgamation. |
| 1079 | # |
| 1080 | !IF $(SPLIT_AMALGAMATION)!=0 |
| 1081 | SQLITE3C = sqlite3-all.c |
| 1082 | !ELSE |
| 1083 | SQLITE3C = sqlite3.c |
| 1084 | !ENDIF |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1085 | |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1086 | # Rule to build the amalgamation |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1087 | # |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 1088 | sqlite3.lo: $(SQLITE3C) |
| 1089 | $(LTCOMPILE) -c $(SQLITE3C) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1090 | |
| 1091 | # Rules to build the LEMON compiler generator |
| 1092 | # |
| 1093 | lempar.c: $(TOP)\src\lempar.c |
| 1094 | copy $(TOP)\src\lempar.c . |
| 1095 | |
| 1096 | lemon.exe: $(TOP)\tool\lemon.c lempar.c |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 1097 | $(BCC) $(NO_WARN) -Daccess=_access \ |
| 1098 | -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLINKOPTS) $(NLTLIBPATHS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1099 | |
| 1100 | # Rules to build individual *.lo files from generated *.c files. This |
| 1101 | # applies to: |
| 1102 | # |
| 1103 | # parse.lo |
| 1104 | # opcodes.lo |
| 1105 | # |
| 1106 | parse.lo: parse.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1107 | $(LTCOMPILE) -c parse.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1108 | |
| 1109 | opcodes.lo: opcodes.c |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1110 | $(LTCOMPILE) -c opcodes.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1111 | |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 1112 | # Rule to build the Win32 resources object file. |
| 1113 | # |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1114 | !IF $(USE_RC)!=0 |
| 1115 | $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR) |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 1116 | echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h |
mistachkin | 8ccc6d4 | 2012-09-27 21:03:53 +0000 | [diff] [blame] | 1117 | for /F %%V in ('type "$(TOP)\VERSION"') do ( \ |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 1118 | echo #define SQLITE_RESOURCE_VERSION %%V \ |
mistachkin | 597a8c5 | 2012-09-03 11:14:53 +0000 | [diff] [blame] | 1119 | | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \ |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 1120 | ) |
| 1121 | echo #endif >> sqlite3rc.h |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1122 | $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc |
| 1123 | !ENDIF |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 1124 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1125 | # Rules to build individual *.lo files from files in the src directory. |
| 1126 | # |
| 1127 | alter.lo: $(TOP)\src\alter.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1128 | $(LTCOMPILE) -c $(TOP)\src\alter.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1129 | |
| 1130 | analyze.lo: $(TOP)\src\analyze.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1131 | $(LTCOMPILE) -c $(TOP)\src\analyze.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1132 | |
| 1133 | attach.lo: $(TOP)\src\attach.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1134 | $(LTCOMPILE) -c $(TOP)\src\attach.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1135 | |
| 1136 | auth.lo: $(TOP)\src\auth.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1137 | $(LTCOMPILE) -c $(TOP)\src\auth.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1138 | |
| 1139 | backup.lo: $(TOP)\src\backup.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1140 | $(LTCOMPILE) -c $(TOP)\src\backup.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1141 | |
| 1142 | bitvec.lo: $(TOP)\src\bitvec.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1143 | $(LTCOMPILE) -c $(TOP)\src\bitvec.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1144 | |
| 1145 | btmutex.lo: $(TOP)\src\btmutex.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1146 | $(LTCOMPILE) -c $(TOP)\src\btmutex.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1147 | |
| 1148 | btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1149 | $(LTCOMPILE) -c $(TOP)\src\btree.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1150 | |
| 1151 | build.lo: $(TOP)\src\build.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1152 | $(LTCOMPILE) -c $(TOP)\src\build.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1153 | |
| 1154 | callback.lo: $(TOP)\src\callback.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1155 | $(LTCOMPILE) -c $(TOP)\src\callback.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1156 | |
| 1157 | complete.lo: $(TOP)\src\complete.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1158 | $(LTCOMPILE) -c $(TOP)\src\complete.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1159 | |
| 1160 | ctime.lo: $(TOP)\src\ctime.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1161 | $(LTCOMPILE) -c $(TOP)\src\ctime.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1162 | |
| 1163 | date.lo: $(TOP)\src\date.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1164 | $(LTCOMPILE) -c $(TOP)\src\date.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1165 | |
| 1166 | delete.lo: $(TOP)\src\delete.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1167 | $(LTCOMPILE) -c $(TOP)\src\delete.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1168 | |
| 1169 | expr.lo: $(TOP)\src\expr.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1170 | $(LTCOMPILE) -c $(TOP)\src\expr.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1171 | |
| 1172 | fault.lo: $(TOP)\src\fault.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1173 | $(LTCOMPILE) -c $(TOP)\src\fault.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1174 | |
| 1175 | fkey.lo: $(TOP)\src\fkey.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1176 | $(LTCOMPILE) -c $(TOP)\src\fkey.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1177 | |
| 1178 | func.lo: $(TOP)\src\func.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1179 | $(LTCOMPILE) -c $(TOP)\src\func.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1180 | |
| 1181 | global.lo: $(TOP)\src\global.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1182 | $(LTCOMPILE) -c $(TOP)\src\global.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1183 | |
| 1184 | hash.lo: $(TOP)\src\hash.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1185 | $(LTCOMPILE) -c $(TOP)\src\hash.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1186 | |
| 1187 | insert.lo: $(TOP)\src\insert.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1188 | $(LTCOMPILE) -c $(TOP)\src\insert.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1189 | |
| 1190 | journal.lo: $(TOP)\src\journal.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1191 | $(LTCOMPILE) -c $(TOP)\src\journal.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1192 | |
| 1193 | legacy.lo: $(TOP)\src\legacy.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1194 | $(LTCOMPILE) -c $(TOP)\src\legacy.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1195 | |
| 1196 | loadext.lo: $(TOP)\src\loadext.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1197 | $(LTCOMPILE) -c $(TOP)\src\loadext.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1198 | |
| 1199 | main.lo: $(TOP)\src\main.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1200 | $(LTCOMPILE) -c $(TOP)\src\main.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1201 | |
| 1202 | malloc.lo: $(TOP)\src\malloc.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1203 | $(LTCOMPILE) -c $(TOP)\src\malloc.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1204 | |
| 1205 | mem0.lo: $(TOP)\src\mem0.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1206 | $(LTCOMPILE) -c $(TOP)\src\mem0.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1207 | |
| 1208 | mem1.lo: $(TOP)\src\mem1.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1209 | $(LTCOMPILE) -c $(TOP)\src\mem1.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1210 | |
| 1211 | mem2.lo: $(TOP)\src\mem2.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1212 | $(LTCOMPILE) -c $(TOP)\src\mem2.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1213 | |
| 1214 | mem3.lo: $(TOP)\src\mem3.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1215 | $(LTCOMPILE) -c $(TOP)\src\mem3.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1216 | |
| 1217 | mem5.lo: $(TOP)\src\mem5.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1218 | $(LTCOMPILE) -c $(TOP)\src\mem5.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1219 | |
| 1220 | memjournal.lo: $(TOP)\src\memjournal.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1221 | $(LTCOMPILE) -c $(TOP)\src\memjournal.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1222 | |
| 1223 | mutex.lo: $(TOP)\src\mutex.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1224 | $(LTCOMPILE) -c $(TOP)\src\mutex.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1225 | |
| 1226 | mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1227 | $(LTCOMPILE) -c $(TOP)\src\mutex_noop.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1228 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1229 | mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1230 | $(LTCOMPILE) -c $(TOP)\src\mutex_unix.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1231 | |
| 1232 | mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1233 | $(LTCOMPILE) -c $(TOP)\src\mutex_w32.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1234 | |
| 1235 | notify.lo: $(TOP)\src\notify.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1236 | $(LTCOMPILE) -c $(TOP)\src\notify.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1237 | |
| 1238 | pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1239 | $(LTCOMPILE) -c $(TOP)\src\pager.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1240 | |
| 1241 | pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1242 | $(LTCOMPILE) -c $(TOP)\src\pcache.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1243 | |
| 1244 | pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1245 | $(LTCOMPILE) -c $(TOP)\src\pcache1.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1246 | |
| 1247 | os.lo: $(TOP)\src\os.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1248 | $(LTCOMPILE) -c $(TOP)\src\os.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1249 | |
| 1250 | os_unix.lo: $(TOP)\src\os_unix.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1251 | $(LTCOMPILE) -c $(TOP)\src\os_unix.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1252 | |
| 1253 | os_win.lo: $(TOP)\src\os_win.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1254 | $(LTCOMPILE) -c $(TOP)\src\os_win.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1255 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1256 | pragma.lo: $(TOP)\src\pragma.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1257 | $(LTCOMPILE) -c $(TOP)\src\pragma.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1258 | |
| 1259 | prepare.lo: $(TOP)\src\prepare.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1260 | $(LTCOMPILE) -c $(TOP)\src\prepare.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1261 | |
| 1262 | printf.lo: $(TOP)\src\printf.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1263 | $(LTCOMPILE) -c $(TOP)\src\printf.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1264 | |
| 1265 | random.lo: $(TOP)\src\random.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1266 | $(LTCOMPILE) -c $(TOP)\src\random.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1267 | |
| 1268 | resolve.lo: $(TOP)\src\resolve.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1269 | $(LTCOMPILE) -c $(TOP)\src\resolve.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1270 | |
| 1271 | rowset.lo: $(TOP)\src\rowset.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1272 | $(LTCOMPILE) -c $(TOP)\src\rowset.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1273 | |
| 1274 | select.lo: $(TOP)\src\select.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1275 | $(LTCOMPILE) -c $(TOP)\src\select.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1276 | |
| 1277 | status.lo: $(TOP)\src\status.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1278 | $(LTCOMPILE) -c $(TOP)\src\status.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1279 | |
| 1280 | table.lo: $(TOP)\src\table.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1281 | $(LTCOMPILE) -c $(TOP)\src\table.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1282 | |
drh | f51446a | 2012-07-21 19:40:42 +0000 | [diff] [blame] | 1283 | threads.lo: $(TOP)\src\threads.c $(HDR) |
| 1284 | $(LTCOMPILE) -c $(TOP)\src\threads.c |
| 1285 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1286 | tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1287 | $(LTCOMPILE) -c $(TOP)\src\tokenize.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1288 | |
| 1289 | trigger.lo: $(TOP)\src\trigger.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1290 | $(LTCOMPILE) -c $(TOP)\src\trigger.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1291 | |
| 1292 | update.lo: $(TOP)\src\update.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1293 | $(LTCOMPILE) -c $(TOP)\src\update.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1294 | |
| 1295 | utf.lo: $(TOP)\src\utf.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1296 | $(LTCOMPILE) -c $(TOP)\src\utf.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1297 | |
| 1298 | util.lo: $(TOP)\src\util.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1299 | $(LTCOMPILE) -c $(TOP)\src\util.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1300 | |
| 1301 | vacuum.lo: $(TOP)\src\vacuum.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1302 | $(LTCOMPILE) -c $(TOP)\src\vacuum.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1303 | |
| 1304 | vdbe.lo: $(TOP)\src\vdbe.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1305 | $(LTCOMPILE) -c $(TOP)\src\vdbe.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1306 | |
| 1307 | vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1308 | $(LTCOMPILE) -c $(TOP)\src\vdbeapi.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1309 | |
| 1310 | vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1311 | $(LTCOMPILE) -c $(TOP)\src\vdbeaux.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1312 | |
| 1313 | vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1314 | $(LTCOMPILE) -c $(TOP)\src\vdbeblob.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1315 | |
| 1316 | vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1317 | $(LTCOMPILE) -c $(TOP)\src\vdbemem.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1318 | |
mistachkin | 81c428a | 2011-08-17 02:19:54 +0000 | [diff] [blame] | 1319 | vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR) |
| 1320 | $(LTCOMPILE) -c $(TOP)\src\vdbesort.c |
| 1321 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1322 | vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1323 | $(LTCOMPILE) -c $(TOP)\src\vdbetrace.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1324 | |
| 1325 | vtab.lo: $(TOP)\src\vtab.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1326 | $(LTCOMPILE) -c $(TOP)\src\vtab.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1327 | |
| 1328 | wal.lo: $(TOP)\src\wal.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1329 | $(LTCOMPILE) -c $(TOP)\src\wal.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1330 | |
| 1331 | walker.lo: $(TOP)\src\walker.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1332 | $(LTCOMPILE) -c $(TOP)\src\walker.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1333 | |
| 1334 | where.lo: $(TOP)\src\where.c $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1335 | $(LTCOMPILE) -c $(TOP)\src\where.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1336 | |
| 1337 | tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) |
| 1338 | $(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c |
| 1339 | |
| 1340 | tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) |
| 1341 | $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c |
| 1342 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1343 | tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS) |
| 1344 | $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1345 | |
| 1346 | # Rules to build opcodes.c and opcodes.h |
| 1347 | # |
| 1348 | opcodes.c: opcodes.h $(TOP)\mkopcodec.awk |
drh | 307ff30 | 2011-08-30 01:29:04 +0000 | [diff] [blame] | 1349 | $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1350 | |
| 1351 | opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 1352 | type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1353 | |
| 1354 | # Rules to build parse.c and parse.h - the outputs of lemon. |
| 1355 | # |
| 1356 | parse.h: parse.c |
| 1357 | |
| 1358 | parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1359 | del /Q parse.y parse.h parse.h.temp |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1360 | copy $(TOP)\src\parse.y . |
mistachkin | 4712c21 | 2014-05-09 20:51:17 +0000 | [diff] [blame] | 1361 | .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1362 | move parse.h parse.h.temp |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 1363 | $(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1364 | |
| 1365 | sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION |
mistachkin | 3f40d40 | 2014-02-13 21:57:48 +0000 | [diff] [blame] | 1366 | $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > sqlite3.h |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1367 | |
| 1368 | mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c |
mistachkin | 2318d33 | 2015-01-12 18:02:52 +0000 | [diff] [blame] | 1369 | $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) \ |
| 1370 | $(TOP)\tool\mkkeywordhash.c /link $(NLTLINKOPTS) $(NLTLIBPATHS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1371 | |
| 1372 | keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 1373 | .\mkkeywordhash.exe > keywordhash.h |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1374 | |
| 1375 | |
| 1376 | |
| 1377 | # Rules to build the extension objects. |
| 1378 | # |
| 1379 | icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR) |
| 1380 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c |
| 1381 | |
| 1382 | fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR) |
| 1383 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c |
| 1384 | |
| 1385 | fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR) |
| 1386 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c |
| 1387 | |
| 1388 | fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR) |
| 1389 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c |
| 1390 | |
| 1391 | fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR) |
| 1392 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c |
| 1393 | |
| 1394 | fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR) |
| 1395 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c |
| 1396 | |
| 1397 | fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR) |
| 1398 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c |
| 1399 | |
| 1400 | fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR) |
| 1401 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c |
| 1402 | |
| 1403 | fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR) |
| 1404 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c |
| 1405 | |
| 1406 | fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR) |
| 1407 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c |
| 1408 | |
| 1409 | fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR) |
| 1410 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c |
| 1411 | |
| 1412 | fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR) |
| 1413 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c |
| 1414 | |
| 1415 | fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR) |
| 1416 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c |
| 1417 | |
| 1418 | fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR) |
| 1419 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c |
| 1420 | |
| 1421 | fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR) |
| 1422 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c |
| 1423 | |
| 1424 | fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR) |
| 1425 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c |
| 1426 | |
drh | 4d648c7 | 2013-04-22 17:07:56 +0000 | [diff] [blame] | 1427 | fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR) |
| 1428 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c |
| 1429 | |
drh | 391d4ba | 2012-05-28 20:22:16 +0000 | [diff] [blame] | 1430 | fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR) |
| 1431 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c |
| 1432 | |
| 1433 | fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR) |
| 1434 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c |
| 1435 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1436 | fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR) |
| 1437 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c |
| 1438 | |
| 1439 | rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR) |
| 1440 | $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c |
| 1441 | |
| 1442 | |
| 1443 | # Rules to build the 'testfixture' application. |
| 1444 | # |
| 1445 | # If using the amalgamation, use sqlite3.c directly to build the test |
| 1446 | # fixture. Otherwise link against libsqlite3.lib. (This distinction is |
| 1447 | # necessary because the test fixture requires non-API symbols which are |
| 1448 | # hidden when the library is built via the amalgamation). |
| 1449 | # |
| 1450 | TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 |
mistachkin | 27b2f05 | 2015-01-12 19:49:46 +0000 | [diff] [blame] | 1451 | TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" |
| 1452 | TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1453 | |
drh | 1fb64af | 2013-04-25 14:36:28 +0000 | [diff] [blame] | 1454 | TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 1455 | TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1456 | !IF $(USE_AMALGAMATION)==0 |
| 1457 | TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0) |
| 1458 | !ELSE |
| 1459 | TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1) |
| 1460 | !ENDIF |
| 1461 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1462 | testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR) |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1463 | $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1464 | -DBUILD_sqlite -I$(TCLINCDIR) \ |
shaneh | 2a0b9ef | 2011-06-20 20:52:32 +0000 | [diff] [blame] | 1465 | $(TESTFIXTURE_SRC) \ |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1466 | /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1467 | |
mistachkin | 1925a2e | 2014-02-24 21:20:25 +0000 | [diff] [blame] | 1468 | extensiontest: testfixture.exe testloadext.dll |
| 1469 | .\testfixture.exe $(TOP)\test\loadext.test |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1470 | |
| 1471 | fulltest: testfixture.exe sqlite3.exe |
| 1472 | .\testfixture.exe $(TOP)\test\all.test |
| 1473 | |
| 1474 | soaktest: testfixture.exe sqlite3.exe |
| 1475 | .\testfixture.exe $(TOP)\test\all.test -soak=1 |
| 1476 | |
mistachkin | c60941f | 2012-09-13 01:51:02 +0000 | [diff] [blame] | 1477 | fulltestonly: testfixture.exe sqlite3.exe |
| 1478 | .\testfixture.exe $(TOP)\test\full.test |
| 1479 | |
mistachkin | 036acf3 | 2013-07-20 00:34:31 +0000 | [diff] [blame] | 1480 | queryplantest: testfixture.exe sqlite3.exe |
| 1481 | .\testfixture.exe $(TOP)\test\permutations.test queryplanner |
| 1482 | |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1483 | test: testfixture.exe sqlite3.exe |
| 1484 | .\testfixture.exe $(TOP)\test\veryquick.test |
| 1485 | |
mistachkin | 7651091 | 2013-10-11 23:01:18 +0000 | [diff] [blame] | 1486 | sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl |
| 1487 | copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@ |
mistachkin | 9a55e31 | 2011-09-22 00:06:44 +0000 | [diff] [blame] | 1488 | echo static const char *tclsh_main_loop(void){ >> $@ |
| 1489 | echo static const char *zMainloop = >> $@ |
| 1490 | $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@ |
| 1491 | echo ; return zMainloop; } >> $@ |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1492 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1493 | sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS) |
mistachkin | 9a55e31 | 2011-09-22 00:06:44 +0000 | [diff] [blame] | 1494 | $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \ |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1495 | /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1496 | |
mistachkin | 1925a2e | 2014-02-24 21:20:25 +0000 | [diff] [blame] | 1497 | testloadext.lo: $(TOP)\src\test_loadext.c |
| 1498 | $(LTCOMPILE) -c $(TOP)\src\test_loadext.c |
| 1499 | |
| 1500 | testloadext.dll: testloadext.lo |
| 1501 | $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo |
| 1502 | |
mistachkin | b042751 | 2014-01-30 11:12:52 +0000 | [diff] [blame] | 1503 | showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) |
| 1504 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1505 | $(TOP)\tool\showdb.c $(SQLITE3C) |
drh | 9ac3c1e | 2013-11-07 18:37:31 +0000 | [diff] [blame] | 1506 | |
drh | 4bb77ec | 2014-06-30 11:14:26 +0000 | [diff] [blame] | 1507 | showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) |
| 1508 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1509 | $(TOP)\tool\showstat4.c $(SQLITE3C) |
| 1510 | |
| 1511 | showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) |
| 1512 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1513 | $(TOP)\tool\showjournal.c $(SQLITE3C) |
| 1514 | |
| 1515 | showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) |
| 1516 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1517 | $(TOP)\tool\showwal.c $(SQLITE3C) |
| 1518 | |
mistachkin | de54527 | 2014-07-07 17:57:50 +0000 | [diff] [blame] | 1519 | fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) |
| 1520 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1521 | $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) |
| 1522 | |
drh | 4bb77ec | 2014-06-30 11:14:26 +0000 | [diff] [blame] | 1523 | rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) |
| 1524 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1525 | $(TOP)\tool\rollback-test.c $(SQLITE3C) |
| 1526 | |
drh | 267a13f | 2014-06-18 18:10:12 +0000 | [diff] [blame] | 1527 | LogEst.exe: $(TOP)\tool\logest.c sqlite3.h |
| 1528 | $(LTLINK) -Fe$@ $(TOP)\tool\LogEst.c |
| 1529 | |
mistachkin | b042751 | 2014-01-30 11:12:52 +0000 | [diff] [blame] | 1530 | wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) |
| 1531 | $(LTLINK) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1532 | $(TOP)\test\wordcount.c $(SQLITE3C) |
drh | 9ac3c1e | 2013-11-07 18:37:31 +0000 | [diff] [blame] | 1533 | |
mistachkin | b042751 | 2014-01-30 11:12:52 +0000 | [diff] [blame] | 1534 | speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) |
| 1535 | $(LTLINK) -DSQLITE_OMIT_LOAD_EXTENSION -Fe$@ \ |
| 1536 | $(TOP)\test\speedtest1.c $(SQLITE3C) |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1537 | |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1538 | clean: |
mistachkin | 8d8738e | 2015-02-25 01:06:08 +0000 | [diff] [blame] | 1539 | del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib 2>NUL |
| 1540 | del /Q *.cod *.da *.bb *.bbg gmon.out 2>NUL |
| 1541 | del /Q sqlite3.h opcodes.c opcodes.h 2>NUL |
| 1542 | del /Q lemon.* lempar.c parse.* 2>NUL |
| 1543 | del /Q mkkeywordhash.* keywordhash.h 2>NUL |
| 1544 | del /Q notasharedlib.* 2>NUL |
| 1545 | -rmdir /Q/S .deps 2>NUL |
| 1546 | -rmdir /Q/S .libs 2>NUL |
| 1547 | -rmdir /Q/S quota2a 2>NUL |
| 1548 | -rmdir /Q/S quota2b 2>NUL |
| 1549 | -rmdir /Q/S quota2c 2>NUL |
| 1550 | -rmdir /Q/S tsrc 2>NUL |
| 1551 | del /Q .target_source 2>NUL |
| 1552 | del /Q tclsqlite3.exe tclsqlite3.exp 2>NUL |
| 1553 | del /Q testloadext.dll testloadext.exp 2>NUL |
| 1554 | del /Q testfixture.exe testfixture.exp test.db 2>NUL |
| 1555 | del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL |
| 1556 | del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL |
| 1557 | del /Q wordcount.exe 2>NUL |
| 1558 | del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def 2>NUL |
| 1559 | del /Q sqlite3.c sqlite3-*.c 2>NUL |
| 1560 | del /Q sqlite3rc.h 2>NUL |
| 1561 | del /Q shell.c sqlite3ext.h 2>NUL |
| 1562 | del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c 2>NUL |
| 1563 | del /Q sqlite-*-output.vsix 2>NUL |
| 1564 | del /Q mptester.exe 2>NUL |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1565 | |
mistachkin | 4d9d1f4 | 2012-09-03 10:32:32 +0000 | [diff] [blame] | 1566 | # Dynamic link library section. |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1567 | # |
| 1568 | dll: sqlite3.dll |
| 1569 | |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1570 | sqlite3.def: libsqlite3.lib |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 1571 | echo EXPORTS > sqlite3.def |
shaneh | 6e7850c | 2011-06-17 15:57:07 +0000 | [diff] [blame] | 1572 | dumpbin /all libsqlite3.lib \ |
mistachkin | 6a3eb4a | 2011-08-17 07:46:48 +0000 | [diff] [blame] | 1573 | | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \ |
mistachkin | 5b0b6fd | 2011-06-25 01:14:36 +0000 | [diff] [blame] | 1574 | | sort >> sqlite3.def |
shaneh | b2f20bf | 2011-06-17 07:07:24 +0000 | [diff] [blame] | 1575 | |
mistachkin | 08c1c31 | 2012-10-06 03:48:25 +0000 | [diff] [blame] | 1576 | sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def |
| 1577 | $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) |