OLD | NEW |
(Empty) | |
| 1 #### DO NOT EDIT #### |
| 2 # This makefile is automatically generated from the Makefile.msc at |
| 3 # the root of the canonical SQLite source tree (not the |
| 4 # amalgamation tarball) using the tool/mkmsvcmin.tcl |
| 5 # script. |
| 6 # |
| 7 |
| 8 # |
| 9 # nmake Makefile for SQLite |
| 10 # |
| 11 ############################################################################### |
| 12 ############################## START OF OPTIONS ############################### |
| 13 ############################################################################### |
| 14 |
| 15 # The toplevel directory of the source tree. This is the directory |
| 16 # that contains this "Makefile.msc". |
| 17 # |
| 18 TOP = . |
| 19 |
| 20 |
| 21 # Set this non-0 to enable full warnings (-W4, etc) when compiling. |
| 22 # |
| 23 !IFNDEF USE_FULLWARN |
| 24 USE_FULLWARN = 0 |
| 25 !ENDIF |
| 26 |
| 27 # Set this non-0 to enable treating warnings as errors (-WX, etc) when |
| 28 # compiling. |
| 29 # |
| 30 !IFNDEF USE_FATAL_WARN |
| 31 USE_FATAL_WARN = 0 |
| 32 !ENDIF |
| 33 |
| 34 # Set this non-0 to enable full runtime error checks (-RTC1, etc). This |
| 35 # has no effect if (any) optimizations are enabled. |
| 36 # |
| 37 !IFNDEF USE_RUNTIME_CHECKS |
| 38 USE_RUNTIME_CHECKS = 0 |
| 39 !ENDIF |
| 40 |
| 41 # Set this non-0 to create a SQLite amalgamation file that excludes the |
| 42 # various built-in extensions. |
| 43 # |
| 44 !IFNDEF MINIMAL_AMALGAMATION |
| 45 MINIMAL_AMALGAMATION = 0 |
| 46 !ENDIF |
| 47 |
| 48 # Set this non-0 to use "stdcall" calling convention for the core library |
| 49 # and shell executable. |
| 50 # |
| 51 !IFNDEF USE_STDCALL |
| 52 USE_STDCALL = 0 |
| 53 !ENDIF |
| 54 |
| 55 # Set this non-0 to have the shell executable link against the core dynamic |
| 56 # link library. |
| 57 # |
| 58 !IFNDEF DYNAMIC_SHELL |
| 59 DYNAMIC_SHELL = 0 |
| 60 !ENDIF |
| 61 |
| 62 # Set this non-0 to enable extra code that attempts to detect misuse of the |
| 63 # SQLite API. |
| 64 # |
| 65 !IFNDEF API_ARMOR |
| 66 API_ARMOR = 0 |
| 67 !ENDIF |
| 68 |
| 69 # If necessary, create a list of harmless compiler warnings to disable when |
| 70 # compiling the various tools. For the SQLite source code itself, warnings, |
| 71 # if any, will be disabled from within it. |
| 72 # |
| 73 !IFNDEF NO_WARN |
| 74 !IF $(USE_FULLWARN)!=0 |
| 75 NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206 |
| 76 NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706 |
| 77 !ENDIF |
| 78 !ENDIF |
| 79 |
| 80 # Set this non-0 to use the library paths and other options necessary for |
| 81 # Windows Phone 8.1. |
| 82 # |
| 83 !IFNDEF USE_WP81_OPTS |
| 84 USE_WP81_OPTS = 0 |
| 85 !ENDIF |
| 86 |
| 87 # Set this non-0 to split the SQLite amalgamation file into chunks to |
| 88 # be used for debugging with Visual Studio. |
| 89 # |
| 90 !IFNDEF SPLIT_AMALGAMATION |
| 91 SPLIT_AMALGAMATION = 0 |
| 92 !ENDIF |
| 93 |
| 94 |
| 95 # Set this non-0 to dynamically link to the MSVC runtime library. |
| 96 # |
| 97 !IFNDEF USE_CRT_DLL |
| 98 USE_CRT_DLL = 0 |
| 99 !ENDIF |
| 100 |
| 101 # Set this non-0 to link to the RPCRT4 library. |
| 102 # |
| 103 !IFNDEF USE_RPCRT4_LIB |
| 104 USE_RPCRT4_LIB = 0 |
| 105 !ENDIF |
| 106 |
| 107 # Set this non-0 to generate assembly code listings for the source code |
| 108 # files. |
| 109 # |
| 110 !IFNDEF USE_LISTINGS |
| 111 USE_LISTINGS = 0 |
| 112 !ENDIF |
| 113 |
| 114 # Set this non-0 to attempt setting the native compiler automatically |
| 115 # for cross-compiling the command line tools needed during the compilation |
| 116 # process. |
| 117 # |
| 118 !IFNDEF XCOMPILE |
| 119 XCOMPILE = 0 |
| 120 !ENDIF |
| 121 |
| 122 # Set this non-0 to use the native libraries paths for cross-compiling |
| 123 # the command line tools needed during the compilation process. |
| 124 # |
| 125 !IFNDEF USE_NATIVE_LIBPATHS |
| 126 USE_NATIVE_LIBPATHS = 0 |
| 127 !ENDIF |
| 128 |
| 129 # Set this 0 to skip the compiling and embedding of version resources. |
| 130 # |
| 131 !IFNDEF USE_RC |
| 132 USE_RC = 1 |
| 133 !ENDIF |
| 134 |
| 135 # Set this non-0 to compile binaries suitable for the WinRT environment. |
| 136 # This setting does not apply to any binaries that require Tcl to operate |
| 137 # properly (i.e. the text fixture, etc). |
| 138 # |
| 139 !IFNDEF FOR_WINRT |
| 140 FOR_WINRT = 0 |
| 141 !ENDIF |
| 142 |
| 143 # Set this non-0 to compile binaries suitable for the UWP environment. |
| 144 # This setting does not apply to any binaries that require Tcl to operate |
| 145 # properly (i.e. the text fixture, etc). |
| 146 # |
| 147 !IFNDEF FOR_UWP |
| 148 FOR_UWP = 0 |
| 149 !ENDIF |
| 150 |
| 151 # Set this non-0 to compile binaries suitable for the Windows 10 platform. |
| 152 # |
| 153 !IFNDEF FOR_WIN10 |
| 154 FOR_WIN10 = 0 |
| 155 !ENDIF |
| 156 |
| 157 |
| 158 # Set this to non-0 to create and use PDBs. |
| 159 # |
| 160 !IFNDEF SYMBOLS |
| 161 SYMBOLS = 1 |
| 162 !ENDIF |
| 163 |
| 164 # Set this to non-0 to use the SQLite debugging heap subsystem. |
| 165 # |
| 166 !IFNDEF MEMDEBUG |
| 167 MEMDEBUG = 0 |
| 168 !ENDIF |
| 169 |
| 170 # Set this to non-0 to use the Win32 native heap subsystem. |
| 171 # |
| 172 !IFNDEF WIN32HEAP |
| 173 WIN32HEAP = 0 |
| 174 !ENDIF |
| 175 |
| 176 # Set this to non-0 to enable OSTRACE() macros, which can be useful when |
| 177 # debugging. |
| 178 # |
| 179 !IFNDEF OSTRACE |
| 180 OSTRACE = 0 |
| 181 !ENDIF |
| 182 |
| 183 # Set this to one of the following values to enable various debugging |
| 184 # features. Each level includes the debugging options from the previous |
| 185 # levels. Currently, the recognized values for DEBUG are: |
| 186 # |
| 187 # 0 == NDEBUG: Disables assert() and other runtime diagnostics. |
| 188 # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API. |
| 189 # 2 == Disables NDEBUG and all optimizations and then enables PDBs. |
| 190 # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code. |
| 191 # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call. |
| 192 # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros. |
| 193 # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros. |
| 194 # |
| 195 !IFNDEF DEBUG |
| 196 DEBUG = 0 |
| 197 !ENDIF |
| 198 |
| 199 # Enable use of available compiler optimizations? Normally, this should be |
| 200 # non-zero. Setting this to zero, thus disabling all compiler optimizations, |
| 201 # can be useful for testing. |
| 202 # |
| 203 !IFNDEF OPTIMIZATIONS |
| 204 OPTIMIZATIONS = 2 |
| 205 !ENDIF |
| 206 |
| 207 # Set this to non-0 to enable support for the session extension. |
| 208 # |
| 209 !IFNDEF SESSION |
| 210 SESSION = 0 |
| 211 !ENDIF |
| 212 |
| 213 # Set the source code file to be used by executables and libraries when |
| 214 # they need the amalgamation. |
| 215 # |
| 216 !IFNDEF SQLITE3C |
| 217 !IF $(SPLIT_AMALGAMATION)!=0 |
| 218 SQLITE3C = sqlite3-all.c |
| 219 !ELSE |
| 220 SQLITE3C = sqlite3.c |
| 221 !ENDIF |
| 222 !ENDIF |
| 223 |
| 224 # Set the include code file to be used by executables and libraries when |
| 225 # they need SQLite. |
| 226 # |
| 227 !IFNDEF SQLITE3H |
| 228 SQLITE3H = sqlite3.h |
| 229 !ENDIF |
| 230 |
| 231 # This is the name to use for the SQLite dynamic link library (DLL). |
| 232 # |
| 233 !IFNDEF SQLITE3DLL |
| 234 !IF $(FOR_WIN10)!=0 |
| 235 SQLITE3DLL = winsqlite3.dll |
| 236 !ELSE |
| 237 SQLITE3DLL = sqlite3.dll |
| 238 !ENDIF |
| 239 !ENDIF |
| 240 |
| 241 # This is the name to use for the SQLite import library (LIB). |
| 242 # |
| 243 !IFNDEF SQLITE3LIB |
| 244 !IF $(FOR_WIN10)!=0 |
| 245 SQLITE3LIB = winsqlite3.lib |
| 246 !ELSE |
| 247 SQLITE3LIB = sqlite3.lib |
| 248 !ENDIF |
| 249 !ENDIF |
| 250 |
| 251 # This is the name to use for the SQLite shell executable (EXE). |
| 252 # |
| 253 !IFNDEF SQLITE3EXE |
| 254 !IF $(FOR_WIN10)!=0 |
| 255 SQLITE3EXE = winsqlite3shell.exe |
| 256 !ELSE |
| 257 SQLITE3EXE = sqlite3.exe |
| 258 !ENDIF |
| 259 !ENDIF |
| 260 |
| 261 # This is the argument used to set the program database (PDB) file for the |
| 262 # SQLite shell executable (EXE). |
| 263 # |
| 264 !IFNDEF SQLITE3EXEPDB |
| 265 !IF $(FOR_WIN10)!=0 |
| 266 SQLITE3EXEPDB = |
| 267 !ELSE |
| 268 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb |
| 269 !ENDIF |
| 270 !ENDIF |
| 271 |
| 272 |
| 273 # These are the "standard" SQLite compilation options used when compiling for |
| 274 # the Windows platform. |
| 275 # |
| 276 !IFNDEF OPT_FEATURE_FLAGS |
| 277 !IF $(MINIMAL_AMALGAMATION)==0 |
| 278 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1 |
| 279 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1 |
| 280 !ENDIF |
| 281 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1 |
| 282 !ENDIF |
| 283 |
| 284 # Should the session extension be enabled? If so, add compilation options |
| 285 # to enable it. |
| 286 # |
| 287 !IF $(SESSION)!=0 |
| 288 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1 |
| 289 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1 |
| 290 !ENDIF |
| 291 |
| 292 # These are the "extended" SQLite compilation options used when compiling for |
| 293 # the Windows 10 platform. |
| 294 # |
| 295 !IFNDEF EXT_FEATURE_FLAGS |
| 296 !IF $(FOR_WIN10)!=0 |
| 297 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1 |
| 298 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1 |
| 299 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1 |
| 300 !ELSE |
| 301 EXT_FEATURE_FLAGS = |
| 302 !ENDIF |
| 303 !ENDIF |
| 304 |
| 305 ############################################################################### |
| 306 ############################### END OF OPTIONS ################################ |
| 307 ############################################################################### |
| 308 |
| 309 # When compiling for the Windows 10 platform, the PLATFORM macro must be set |
| 310 # to an appropriate value (e.g. x86, x64, arm, arm64, etc). |
| 311 # |
| 312 !IF $(FOR_WIN10)!=0 |
| 313 !IFNDEF PLATFORM |
| 314 !ERROR Using the FOR_WIN10 option requires a value for PLATFORM. |
| 315 !ENDIF |
| 316 !ENDIF |
| 317 |
| 318 # This assumes that MSVC is always installed in 32-bit Program Files directory |
| 319 # and sets the variable for use in locating other 32-bit installs accordingly. |
| 320 # |
| 321 PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\.. |
| 322 PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\) |
| 323 |
| 324 # Check for the predefined command macro CC. This should point to the compiler |
| 325 # binary for the target platform. If it is not defined, simply define it to |
| 326 # the legacy default value 'cl.exe'. |
| 327 # |
| 328 !IFNDEF CC |
| 329 CC = cl.exe |
| 330 !ENDIF |
| 331 |
| 332 # Check for the predefined command macro CSC. This should point to a working |
| 333 # C Sharp compiler binary. If it is not defined, simply define it to the |
| 334 # legacy default value 'csc.exe'. |
| 335 # |
| 336 !IFNDEF CSC |
| 337 CSC = csc.exe |
| 338 !ENDIF |
| 339 |
| 340 # Check for the command macro LD. This should point to the linker binary for |
| 341 # the target platform. If it is not defined, simply define it to the legacy |
| 342 # default value 'link.exe'. |
| 343 # |
| 344 !IFNDEF LD |
| 345 LD = link.exe |
| 346 !ENDIF |
| 347 |
| 348 # Check for the predefined command macro RC. This should point to the resource |
| 349 # compiler binary for the target platform. If it is not defined, simply define |
| 350 # it to the legacy default value 'rc.exe'. |
| 351 # |
| 352 !IFNDEF RC |
| 353 RC = rc.exe |
| 354 !ENDIF |
| 355 |
| 356 # Check for the MSVC runtime library path macro. Otherwise, this value will |
| 357 # default to the 'lib' directory underneath the MSVC installation directory. |
| 358 # |
| 359 !IFNDEF CRTLIBPATH |
| 360 CRTLIBPATH = $(VCINSTALLDIR)\lib |
| 361 !ENDIF |
| 362 |
| 363 CRTLIBPATH = $(CRTLIBPATH:\\=\) |
| 364 |
| 365 # Check for the command macro NCC. This should point to the compiler binary |
| 366 # for the platform the compilation process is taking place on. If it is not |
| 367 # defined, simply define it to have the same value as the CC macro. When |
| 368 # cross-compiling, it is suggested that this macro be modified via the command |
| 369 # line (since nmake itself does not provide a built-in method to guess it). |
| 370 # For example, to use the x86 compiler when cross-compiling for x64, a command |
| 371 # line similar to the following could be used (all on one line): |
| 372 # |
| 373 # nmake /f Makefile.msc sqlite3.dll |
| 374 # XCOMPILE=1 USE_NATIVE_LIBPATHS=1 |
| 375 # |
| 376 # Alternatively, the full path and file name to the compiler binary for the |
| 377 # platform the compilation process is taking place may be specified (all on |
| 378 # one line): |
| 379 # |
| 380 # nmake /f Makefile.msc sqlite3.dll |
| 381 # "NCC=""%VCINSTALLDIR%\bin\cl.exe""" |
| 382 # USE_NATIVE_LIBPATHS=1 |
| 383 # |
| 384 !IFDEF NCC |
| 385 NCC = $(NCC:\\=\) |
| 386 !ELSEIF $(XCOMPILE)!=0 |
| 387 NCC = "$(VCINSTALLDIR)\bin\$(CC)" |
| 388 NCC = $(NCC:\\=\) |
| 389 !ELSE |
| 390 NCC = $(CC) |
| 391 !ENDIF |
| 392 |
| 393 # Check for the MSVC native runtime library path macro. Otherwise, |
| 394 # this value will default to the 'lib' directory underneath the MSVC |
| 395 # installation directory. |
| 396 # |
| 397 !IFNDEF NCRTLIBPATH |
| 398 NCRTLIBPATH = $(VCINSTALLDIR)\lib |
| 399 !ENDIF |
| 400 |
| 401 NCRTLIBPATH = $(NCRTLIBPATH:\\=\) |
| 402 |
| 403 # Check for the Platform SDK library path macro. Otherwise, this |
| 404 # value will default to the 'lib' directory underneath the Windows |
| 405 # SDK installation directory (the environment variable used appears |
| 406 # to be available when using Visual C++ 2008 or later via the |
| 407 # command line). |
| 408 # |
| 409 !IFNDEF NSDKLIBPATH |
| 410 NSDKLIBPATH = $(WINDOWSSDKDIR)\lib |
| 411 !ENDIF |
| 412 |
| 413 NSDKLIBPATH = $(NSDKLIBPATH:\\=\) |
| 414 |
| 415 # Check for the UCRT library path macro. Otherwise, this value will |
| 416 # default to the version-specific, platform-specific 'lib' directory |
| 417 # underneath the Windows SDK installation directory. |
| 418 # |
| 419 !IFNDEF UCRTLIBPATH |
| 420 UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM) |
| 421 !ENDIF |
| 422 |
| 423 UCRTLIBPATH = $(UCRTLIBPATH:\\=\) |
| 424 |
| 425 # C compiler and options for use in building executables that |
| 426 # will run on the platform that is doing the build. |
| 427 # |
| 428 !IF $(USE_FULLWARN)!=0 |
| 429 BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS) |
| 430 !ELSE |
| 431 BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS) |
| 432 !ENDIF |
| 433 |
| 434 # Check if assembly code listings should be generated for the source |
| 435 # code files to be compiled. |
| 436 # |
| 437 !IF $(USE_LISTINGS)!=0 |
| 438 BCC = $(BCC) -FAcs |
| 439 !ENDIF |
| 440 |
| 441 # Check if the native library paths should be used when compiling |
| 442 # the command line tools used during the compilation process. If |
| 443 # so, set the necessary macro now. |
| 444 # |
| 445 !IF $(USE_NATIVE_LIBPATHS)!=0 |
| 446 NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)" |
| 447 |
| 448 !IFDEF NUCRTLIBPATH |
| 449 NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\) |
| 450 NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)" |
| 451 !ENDIF |
| 452 !ENDIF |
| 453 |
| 454 # C compiler and options for use in building executables that |
| 455 # will run on the target platform. (BCC and TCC are usually the |
| 456 # same unless your are cross-compiling.) |
| 457 # |
| 458 !IF $(USE_FULLWARN)!=0 |
| 459 TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS) |
| 460 !ELSE |
| 461 TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS) |
| 462 !ENDIF |
| 463 |
| 464 # Check if warnings should be treated as errors when compiling. |
| 465 # |
| 466 !IF $(USE_FATAL_WARN)!=0 |
| 467 TCC = $(TCC) -WX |
| 468 !ENDIF |
| 469 |
| 470 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -fp:precise |
| 471 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS) |
| 472 |
| 473 # Check if we want to use the "stdcall" calling convention when compiling. |
| 474 # This is not supported by the compilers for non-x86 platforms. It should |
| 475 # also be noted here that building any target with these "stdcall" options |
| 476 # will most likely fail if the Tcl library is also required. This is due |
| 477 # to how the Tcl library functions are declared and exported (i.e. without |
| 478 # an explicit calling convention, which results in "cdecl"). |
| 479 # |
| 480 !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0 |
| 481 !IF "$(PLATFORM)"=="x86" |
| 482 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE
_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall |
| 483 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLIT
E_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall |
| 484 !ELSE |
| 485 !IFNDEF PLATFORM |
| 486 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE
_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall |
| 487 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLIT
E_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall |
| 488 !ELSE |
| 489 CORE_CCONV_OPTS = |
| 490 SHELL_CCONV_OPTS = |
| 491 !ENDIF |
| 492 !ENDIF |
| 493 !ELSE |
| 494 CORE_CCONV_OPTS = |
| 495 SHELL_CCONV_OPTS = |
| 496 !ENDIF |
| 497 |
| 498 # These are additional compiler options used for the core library. |
| 499 # |
| 500 !IFNDEF CORE_COMPILE_OPTS |
| 501 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 |
| 502 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport) |
| 503 !ELSE |
| 504 CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) |
| 505 !ENDIF |
| 506 !ENDIF |
| 507 |
| 508 # These are the additional targets that the core library should depend on |
| 509 # when linking. |
| 510 # |
| 511 !IFNDEF CORE_LINK_DEP |
| 512 !IF $(DYNAMIC_SHELL)!=0 |
| 513 CORE_LINK_DEP = |
| 514 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86" |
| 515 CORE_LINK_DEP = sqlite3.def |
| 516 !ELSE |
| 517 CORE_LINK_DEP = |
| 518 !ENDIF |
| 519 !ENDIF |
| 520 |
| 521 # These are additional linker options used for the core library. |
| 522 # |
| 523 !IFNDEF CORE_LINK_OPTS |
| 524 !IF $(DYNAMIC_SHELL)!=0 |
| 525 CORE_LINK_OPTS = |
| 526 !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86" |
| 527 CORE_LINK_OPTS = /DEF:sqlite3.def |
| 528 !ELSE |
| 529 CORE_LINK_OPTS = |
| 530 !ENDIF |
| 531 !ENDIF |
| 532 |
| 533 # These are additional compiler options used for the shell executable. |
| 534 # |
| 535 !IFNDEF SHELL_COMPILE_OPTS |
| 536 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 |
| 537 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport) |
| 538 !ELSE |
| 539 SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) |
| 540 !ENDIF |
| 541 !ENDIF |
| 542 |
| 543 # This is the source code that the shell executable should be compiled |
| 544 # with. |
| 545 # |
| 546 !IFNDEF SHELL_CORE_SRC |
| 547 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 |
| 548 SHELL_CORE_SRC = |
| 549 !ELSE |
| 550 SHELL_CORE_SRC = $(SQLITE3C) |
| 551 !ENDIF |
| 552 !ENDIF |
| 553 |
| 554 # This is the core library that the shell executable should depend on. |
| 555 # |
| 556 !IFNDEF SHELL_CORE_DEP |
| 557 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 |
| 558 SHELL_CORE_DEP = $(SQLITE3DLL) |
| 559 !ELSE |
| 560 SHELL_CORE_DEP = |
| 561 !ENDIF |
| 562 !ENDIF |
| 563 |
| 564 # This is the core library that the shell executable should link with. |
| 565 # |
| 566 !IFNDEF SHELL_CORE_LIB |
| 567 !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 |
| 568 SHELL_CORE_LIB = $(SQLITE3LIB) |
| 569 !ELSE |
| 570 SHELL_CORE_LIB = |
| 571 !ENDIF |
| 572 !ENDIF |
| 573 |
| 574 # These are additional linker options used for the shell executable. |
| 575 # |
| 576 !IFNDEF SHELL_LINK_OPTS |
| 577 SHELL_LINK_OPTS = $(SHELL_CORE_LIB) |
| 578 !ENDIF |
| 579 |
| 580 # Check if assembly code listings should be generated for the source |
| 581 # code files to be compiled. |
| 582 # |
| 583 !IF $(USE_LISTINGS)!=0 |
| 584 TCC = $(TCC) -FAcs |
| 585 !ENDIF |
| 586 |
| 587 # When compiling the library for use in the WinRT environment, |
| 588 # the following compile-time options must be used as well to |
| 589 # disable use of Win32 APIs that are not available and to enable |
| 590 # use of Win32 APIs that are specific to Windows 8 and/or WinRT. |
| 591 # |
| 592 !IF $(FOR_WINRT)!=0 |
| 593 TCC = $(TCC) -DSQLITE_OS_WINRT=1 |
| 594 RCC = $(RCC) -DSQLITE_OS_WINRT=1 |
| 595 TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP |
| 596 RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP |
| 597 !ENDIF |
| 598 |
| 599 # C compiler options for the Windows 10 platform (needs MSVC 2015). |
| 600 # |
| 601 !IF $(FOR_WIN10)!=0 |
| 602 TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE |
| 603 BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE |
| 604 !ENDIF |
| 605 |
| 606 # Also, we need to dynamically link to the correct MSVC runtime |
| 607 # when compiling for WinRT (e.g. debug or release) OR if the |
| 608 # USE_CRT_DLL option is set to force dynamically linking to the |
| 609 # MSVC runtime library. |
| 610 # |
| 611 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0 |
| 612 !IF $(DEBUG)>1 |
| 613 TCC = $(TCC) -MDd |
| 614 BCC = $(BCC) -MDd |
| 615 !ELSE |
| 616 TCC = $(TCC) -MD |
| 617 BCC = $(BCC) -MD |
| 618 !ENDIF |
| 619 !ELSE |
| 620 !IF $(DEBUG)>1 |
| 621 TCC = $(TCC) -MTd |
| 622 BCC = $(BCC) -MTd |
| 623 !ELSE |
| 624 TCC = $(TCC) -MT |
| 625 BCC = $(BCC) -MT |
| 626 !ENDIF |
| 627 !ENDIF |
| 628 |
| 629 |
| 630 # Define -DNDEBUG to compile without debugging (i.e., for production usage) |
| 631 # Omitting the define will cause extra debugging code to be inserted and |
| 632 # includes extra comments when "EXPLAIN stmt" is used. |
| 633 # |
| 634 !IF $(DEBUG)==0 |
| 635 TCC = $(TCC) -DNDEBUG |
| 636 BCC = $(BCC) -DNDEBUG |
| 637 RCC = $(RCC) -DNDEBUG |
| 638 !ENDIF |
| 639 |
| 640 !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0 |
| 641 TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1 |
| 642 RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1 |
| 643 !ENDIF |
| 644 |
| 645 !IF $(DEBUG)>2 |
| 646 TCC = $(TCC) -DSQLITE_DEBUG=1 |
| 647 RCC = $(RCC) -DSQLITE_DEBUG=1 |
| 648 !ENDIF |
| 649 |
| 650 !IF $(DEBUG)>4 || $(OSTRACE)!=0 |
| 651 TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1 |
| 652 RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1 |
| 653 !ENDIF |
| 654 |
| 655 !IF $(DEBUG)>5 |
| 656 TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1 |
| 657 RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1 |
| 658 !ENDIF |
| 659 |
| 660 # Prevent warnings about "insecure" MSVC runtime library functions |
| 661 # being used. |
| 662 # |
| 663 TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS |
| 664 BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS |
| 665 RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS |
| 666 |
| 667 # Prevent warnings about "deprecated" POSIX functions being used. |
| 668 # |
| 669 TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS |
| 670 BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS |
| 671 RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS |
| 672 |
| 673 # Use the SQLite debugging heap subsystem? |
| 674 # |
| 675 !IF $(MEMDEBUG)!=0 |
| 676 TCC = $(TCC) -DSQLITE_MEMDEBUG=1 |
| 677 RCC = $(RCC) -DSQLITE_MEMDEBUG=1 |
| 678 |
| 679 # Use native Win32 heap subsystem instead of malloc/free? |
| 680 # |
| 681 !ELSEIF $(WIN32HEAP)!=0 |
| 682 TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1 |
| 683 RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1 |
| 684 |
| 685 # Validate the heap on every call into the native Win32 heap subsystem? |
| 686 # |
| 687 !IF $(DEBUG)>3 |
| 688 TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 |
| 689 RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 |
| 690 !ENDIF |
| 691 !ENDIF |
| 692 |
| 693 |
| 694 # Compiler options needed for programs that use the readline() library. |
| 695 # |
| 696 !IFNDEF READLINE_FLAGS |
| 697 READLINE_FLAGS = -DHAVE_READLINE=0 |
| 698 !ENDIF |
| 699 |
| 700 # The library that programs using readline() must link against. |
| 701 # |
| 702 !IFNDEF LIBREADLINE |
| 703 LIBREADLINE = |
| 704 !ENDIF |
| 705 |
| 706 # Should the database engine be compiled threadsafe |
| 707 # |
| 708 TCC = $(TCC) -DSQLITE_THREADSAFE=1 |
| 709 RCC = $(RCC) -DSQLITE_THREADSAFE=1 |
| 710 |
| 711 # Do threads override each others locks by default (1), or do we test (-1) |
| 712 # |
| 713 TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1 |
| 714 RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1 |
| 715 |
| 716 # Any target libraries which libsqlite must be linked against |
| 717 # |
| 718 !IFNDEF TLIBS |
| 719 TLIBS = |
| 720 !ENDIF |
| 721 |
| 722 # Flags controlling use of the in memory btree implementation |
| 723 # |
| 724 # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to |
| 725 # default to file, 2 to default to memory, and 3 to force temporary |
| 726 # tables to always be in memory. |
| 727 # |
| 728 TCC = $(TCC) -DSQLITE_TEMP_STORE=1 |
| 729 RCC = $(RCC) -DSQLITE_TEMP_STORE=1 |
| 730 |
| 731 # Enable/disable loadable extensions, and other optional features |
| 732 # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). |
| 733 # The same set of OMIT and ENABLE flags should be passed to the |
| 734 # LEMON parser generator and the mkkeywordhash tool as well. |
| 735 |
| 736 # These are the required SQLite compilation options used when compiling for |
| 737 # the Windows platform. |
| 738 # |
| 739 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100 |
| 740 |
| 741 # If we are linking to the RPCRT4 library, enable features that need it. |
| 742 # |
| 743 !IF $(USE_RPCRT4_LIB)!=0 |
| 744 REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1 |
| 745 !ENDIF |
| 746 |
| 747 # Add the required and optional SQLite compilation options into the command |
| 748 # lines used to invoke the MSVC code and resource compilers. |
| 749 # |
| 750 TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) |
| 751 RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) |
| 752 |
| 753 # Add in any optional parameters specified on the commane line, e.g. |
| 754 # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1" |
| 755 # |
| 756 TCC = $(TCC) $(OPTS) |
| 757 RCC = $(RCC) $(OPTS) |
| 758 |
| 759 # If compiling for debugging, add some defines. |
| 760 # |
| 761 !IF $(DEBUG)>1 |
| 762 TCC = $(TCC) -D_DEBUG |
| 763 BCC = $(BCC) -D_DEBUG |
| 764 RCC = $(RCC) -D_DEBUG |
| 765 !ENDIF |
| 766 |
| 767 # If optimizations are enabled or disabled (either implicitly or |
| 768 # explicitly), add the necessary flags. |
| 769 # |
| 770 !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0 |
| 771 TCC = $(TCC) -Od |
| 772 BCC = $(BCC) -Od |
| 773 !IF $(USE_RUNTIME_CHECKS)!=0 |
| 774 TCC = $(TCC) -RTC1 |
| 775 BCC = $(BCC) -RTC1 |
| 776 !ENDIF |
| 777 !ELSEIF $(OPTIMIZATIONS)>=3 |
| 778 TCC = $(TCC) -Ox |
| 779 BCC = $(BCC) -Ox |
| 780 !ELSEIF $(OPTIMIZATIONS)==2 |
| 781 TCC = $(TCC) -O2 |
| 782 BCC = $(BCC) -O2 |
| 783 !ELSEIF $(OPTIMIZATIONS)==1 |
| 784 TCC = $(TCC) -O1 |
| 785 BCC = $(BCC) -O1 |
| 786 !ENDIF |
| 787 |
| 788 # If symbols are enabled (or compiling for debugging), enable PDBs. |
| 789 # |
| 790 !IF $(DEBUG)>1 || $(SYMBOLS)!=0 |
| 791 TCC = $(TCC) -Zi |
| 792 BCC = $(BCC) -Zi |
| 793 !ENDIF |
| 794 |
| 795 |
| 796 # Command line prefixes for compiling code, compiling resources, |
| 797 # linking, etc. |
| 798 # |
| 799 LTCOMPILE = $(TCC) -Fo$@ |
| 800 LTRCOMPILE = $(RCC) -r |
| 801 LTLIB = lib.exe |
| 802 LTLINK = $(TCC) -Fe$@ |
| 803 |
| 804 # If requested, link to the RPCRT4 library. |
| 805 # |
| 806 !IF $(USE_RPCRT4_LIB)!=0 |
| 807 LTLINK = $(LTLINK) rpcrt4.lib |
| 808 !ENDIF |
| 809 |
| 810 # If a platform was set, force the linker to target that. |
| 811 # Note that the vcvars*.bat family of batch files typically |
| 812 # set this for you. Otherwise, the linker will attempt |
| 813 # to deduce the binary type based on the object files. |
| 814 !IFDEF PLATFORM |
| 815 LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM) |
| 816 LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM) |
| 817 !ELSE |
| 818 LTLINKOPTS = /NOLOGO |
| 819 LTLIBOPTS = /NOLOGO |
| 820 !ENDIF |
| 821 |
| 822 # When compiling for use in the WinRT environment, the following |
| 823 # linker option must be used to mark the executable as runnable |
| 824 # only in the context of an application container. |
| 825 # |
| 826 !IF $(FOR_WINRT)!=0 |
| 827 LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER |
| 828 !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0" |
| 829 !IFNDEF STORELIBPATH |
| 830 !IF "$(PLATFORM)"=="x86" |
| 831 STORELIBPATH = $(CRTLIBPATH)\store |
| 832 !ELSEIF "$(PLATFORM)"=="x64" |
| 833 STORELIBPATH = $(CRTLIBPATH)\store\amd64 |
| 834 !ELSEIF "$(PLATFORM)"=="ARM" |
| 835 STORELIBPATH = $(CRTLIBPATH)\store\arm |
| 836 !ELSE |
| 837 STORELIBPATH = $(CRTLIBPATH)\store |
| 838 !ENDIF |
| 839 !ENDIF |
| 840 STORELIBPATH = $(STORELIBPATH:\\=\) |
| 841 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)" |
| 842 !ENDIF |
| 843 !ENDIF |
| 844 |
| 845 # When compiling for Windows Phone 8.1, an extra library path is |
| 846 # required. |
| 847 # |
| 848 !IF $(USE_WP81_OPTS)!=0 |
| 849 !IFNDEF WP81LIBPATH |
| 850 !IF "$(PLATFORM)"=="x86" |
| 851 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 |
| 852 !ELSEIF "$(PLATFORM)"=="ARM" |
| 853 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM |
| 854 !ELSE |
| 855 WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 |
| 856 !ENDIF |
| 857 !ENDIF |
| 858 !ENDIF |
| 859 |
| 860 # When compiling for Windows Phone 8.1, some extra linker options |
| 861 # are also required. |
| 862 # |
| 863 !IF $(USE_WP81_OPTS)!=0 |
| 864 !IFDEF WP81LIBPATH |
| 865 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" |
| 866 !ENDIF |
| 867 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE |
| 868 LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelH
ost.lib |
| 869 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib |
| 870 !ENDIF |
| 871 |
| 872 # When compiling for UWP or the Windows 10 platform, some extra linker |
| 873 # options are also required. |
| 874 # |
| 875 !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 |
| 876 LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib |
| 877 LTLINKOPTS = $(LTLINKOPTS) mincore.lib |
| 878 !IFDEF PSDKLIBPATH |
| 879 LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" |
| 880 !ENDIF |
| 881 !ENDIF |
| 882 |
| 883 !IF $(FOR_WIN10)!=0 |
| 884 LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)" |
| 885 !IF $(DEBUG)>1 |
| 886 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib |
| 887 !ELSE |
| 888 LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib |
| 889 !ENDIF |
| 890 !ENDIF |
| 891 |
| 892 # If either debugging or symbols are enabled, enable PDBs. |
| 893 # |
| 894 !IF $(DEBUG)>1 || $(SYMBOLS)!=0 |
| 895 LDFLAGS = /DEBUG $(LDOPTS) |
| 896 !ELSE |
| 897 LDFLAGS = $(LDOPTS) |
| 898 !ENDIF |
| 899 |
| 900 |
| 901 # You should not have to change anything below this line |
| 902 ############################################################################### |
| 903 |
| 904 |
| 905 # Object files for the amalgamation. |
| 906 # |
| 907 LIBOBJS1 = sqlite3.lo |
| 908 |
| 909 # Determine the real value of LIBOBJ based on the 'configure' script |
| 910 # |
| 911 LIBOBJ = $(LIBOBJS1) |
| 912 |
| 913 # Determine if embedded resource compilation and usage are enabled. |
| 914 # |
| 915 !IF $(USE_RC)!=0 |
| 916 LIBRESOBJS = sqlite3res.lo |
| 917 !ELSE |
| 918 LIBRESOBJS = |
| 919 !ENDIF |
| 920 |
| 921 |
| 922 # Additional compiler options for the shell. These are only effective |
| 923 # when the shell is not being dynamically linked. |
| 924 # |
| 925 !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0 |
| 926 SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_
FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 927 !ENDIF |
| 928 |
| 929 |
| 930 # This is the default Makefile target. The objects listed here |
| 931 # are what get build when you type just "make" with no arguments. |
| 932 # |
| 933 all: dll shell |
| 934 |
| 935 # Dynamic link library section. |
| 936 # |
| 937 dll: $(SQLITE3DLL) |
| 938 |
| 939 # Shell executable. |
| 940 # |
| 941 shell: $(SQLITE3EXE) |
| 942 |
| 943 |
| 944 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) |
| 945 $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT
:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) |
| 946 |
| 947 Replace.exe: |
| 948 $(CSC) /target:exe $(TOP)\Replace.cs |
| 949 |
| 950 sqlite3.def: Replace.exe $(LIBOBJ) |
| 951 echo EXPORTS > sqlite3.def |
| 952 dumpbin /all $(LIBOBJ) \ |
| 953 | .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset)?_[^
@,]*)(?:@\d+|,DATA)?$$" $$1 true \ |
| 954 | sort >> sqlite3.def |
| 955 |
| 956 $(SQLITE3EXE): $(TOP)\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC)
$(SQLITE3H) |
| 957 $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\shell.c $(SHELL
_CORE_SRC) \ |
| 958 /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPT
S) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) |
| 959 |
| 960 |
| 961 # Rule to build the amalgamation |
| 962 # |
| 963 sqlite3.lo: $(SQLITE3C) |
| 964 $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C) |
| 965 |
| 966 |
| 967 # Rule to build the Win32 resources object file. |
| 968 # |
| 969 !IF $(USE_RC)!=0 |
| 970 _HASHCHAR=^# |
| 971 !IF ![echo !IFNDEF VERSION > rcver.vc] && \ |
| 972 ![for /F "delims=" %V in ('type "$(SQLITE3H)" ^| find "$(_HASHCHAR)define SQ
LITE_VERSION "') do (echo VERSION = ^^%V >> rcver.vc)] && \ |
| 973 ![echo !ENDIF >> rcver.vc] |
| 974 !INCLUDE rcver.vc |
| 975 !ENDIF |
| 976 |
| 977 RESOURCE_VERSION = $(VERSION:^#=) |
| 978 RESOURCE_VERSION = $(RESOURCE_VERSION:define=) |
| 979 RESOURCE_VERSION = $(RESOURCE_VERSION:SQLITE_VERSION=) |
| 980 RESOURCE_VERSION = $(RESOURCE_VERSION:"=) |
| 981 RESOURCE_VERSION = $(RESOURCE_VERSION:.=,) |
| 982 |
| 983 $(LIBRESOBJS): $(TOP)\sqlite3.rc rcver.vc $(SQLITE3H) |
| 984 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h |
| 985 echo #define SQLITE_RESOURCE_VERSION $(RESOURCE_VERSION) >> sqlite3rc.h |
| 986 echo #endif >> sqlite3rc.h |
| 987 $(LTRCOMPILE) -fo $(LIBRESOBJS) -DRC_VERONLY $(TOP)\sqlite3.rc |
| 988 !ENDIF |
| 989 |
| 990 |
| 991 clean: |
| 992 del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL |
| 993 del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL |
| 994 del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL |
OLD | NEW |