1304732Scy#### DO NOT EDIT #### 2304732Scy# This makefile is automatically generated from the Makefile.msc at 3304732Scy# the root of the canonical SQLite source tree (not the 4304732Scy# amalgamation tarball) using the tool/mkmsvcmin.tcl 5304732Scy# script. 6304732Scy# 7304732Scy 8304732Scy# 9304732Scy# nmake Makefile for SQLite 10304732Scy# 11304732Scy############################################################################### 12304732Scy############################## START OF OPTIONS ############################### 13304732Scy############################################################################### 14304732Scy 15304732Scy# The toplevel directory of the source tree. This is the directory 16304732Scy# that contains this "Makefile.msc". 17304732Scy# 18304732ScyTOP = . 19304732Scy 20304732Scy 21304732Scy# Set this non-0 to enable full warnings (-W4, etc) when compiling. 22304732Scy# 23304732Scy!IFNDEF USE_FULLWARN 24304732ScyUSE_FULLWARN = 0 25304732Scy!ENDIF 26304732Scy 27304732Scy# Set this non-0 to enable full runtime error checks (-RTC1, etc). This 28304732Scy# has no effect if (any) optimizations are enabled. 29304732Scy# 30304732Scy!IFNDEF USE_RUNTIME_CHECKS 31304732ScyUSE_RUNTIME_CHECKS = 0 32304732Scy!ENDIF 33304732Scy 34304732Scy# Set this non-0 to use "stdcall" calling convention for the core library 35304732Scy# and shell executable. 36304732Scy# 37304732Scy!IFNDEF USE_STDCALL 38304732ScyUSE_STDCALL = 0 39304732Scy!ENDIF 40304732Scy 41304732Scy# Set this non-0 to have the shell executable link against the core dynamic 42304732Scy# link library. 43304732Scy# 44304732Scy!IFNDEF DYNAMIC_SHELL 45304732ScyDYNAMIC_SHELL = 0 46304732Scy!ENDIF 47304732Scy 48304732Scy# Set this non-0 to enable extra code that attempts to detect misuse of the 49304732Scy# SQLite API. 50304732Scy# 51304732Scy!IFNDEF API_ARMOR 52304732ScyAPI_ARMOR = 0 53304732Scy!ENDIF 54304732Scy 55304732Scy# If necessary, create a list of harmless compiler warnings to disable when 56304732Scy# compiling the various tools. For the SQLite source code itself, warnings, 57304732Scy# if any, will be disabled from within it. 58304732Scy# 59304732Scy!IFNDEF NO_WARN 60304732Scy!IF $(USE_FULLWARN)!=0 61304732ScyNO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206 62304732ScyNO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706 63304732Scy!ENDIF 64304732Scy!ENDIF 65304732Scy 66304732Scy# Set this non-0 to use the library paths and other options necessary for 67304732Scy# Windows Phone 8.1. 68304732Scy# 69304732Scy!IFNDEF USE_WP81_OPTS 70304732ScyUSE_WP81_OPTS = 0 71304732Scy!ENDIF 72304732Scy 73304732Scy# Set this non-0 to split the SQLite amalgamation file into chunks to 74304732Scy# be used for debugging with Visual Studio. 75304732Scy# 76304732Scy!IFNDEF SPLIT_AMALGAMATION 77304732ScySPLIT_AMALGAMATION = 0 78304732Scy!ENDIF 79304732Scy 80304732Scy 81304732Scy# Set this non-0 to dynamically link to the MSVC runtime library. 82304732Scy# 83304732Scy!IFNDEF USE_CRT_DLL 84304732ScyUSE_CRT_DLL = 0 85304732Scy!ENDIF 86304732Scy 87304732Scy# Set this non-0 to link to the RPCRT4 library. 88304732Scy# 89304732Scy!IFNDEF USE_RPCRT4_LIB 90304732ScyUSE_RPCRT4_LIB = 0 91304732Scy!ENDIF 92304732Scy 93304732Scy# Set this non-0 to generate assembly code listings for the source code 94304732Scy# files. 95304732Scy# 96304732Scy!IFNDEF USE_LISTINGS 97304732ScyUSE_LISTINGS = 0 98304732Scy!ENDIF 99304732Scy 100304732Scy# Set this non-0 to attempt setting the native compiler automatically 101304732Scy# for cross-compiling the command line tools needed during the compilation 102304732Scy# process. 103304732Scy# 104304732Scy!IFNDEF XCOMPILE 105304732ScyXCOMPILE = 0 106304732Scy!ENDIF 107304732Scy 108304732Scy# Set this non-0 to use the native libraries paths for cross-compiling 109304732Scy# the command line tools needed during the compilation process. 110304732Scy# 111304732Scy!IFNDEF USE_NATIVE_LIBPATHS 112304732ScyUSE_NATIVE_LIBPATHS = 0 113304732Scy!ENDIF 114304732Scy 115304732Scy# Set this 0 to skip the compiling and embedding of version resources. 116304732Scy# 117304732Scy!IFNDEF USE_RC 118304732ScyUSE_RC = 1 119304732Scy!ENDIF 120304732Scy 121304732Scy# Set this non-0 to compile binaries suitable for the WinRT environment. 122304732Scy# This setting does not apply to any binaries that require Tcl to operate 123304732Scy# properly (i.e. the text fixture, etc). 124304732Scy# 125304732Scy!IFNDEF FOR_WINRT 126304732ScyFOR_WINRT = 0 127304732Scy!ENDIF 128304732Scy 129304732Scy# Set this non-0 to compile binaries suitable for the UWP environment. 130304732Scy# This setting does not apply to any binaries that require Tcl to operate 131304732Scy# properly (i.e. the text fixture, etc). 132304732Scy# 133304732Scy!IFNDEF FOR_UWP 134304732ScyFOR_UWP = 0 135304732Scy!ENDIF 136304732Scy 137304732Scy# Set this non-0 to compile binaries suitable for the Windows 10 platform. 138304732Scy# 139304732Scy!IFNDEF FOR_WIN10 140304732ScyFOR_WIN10 = 0 141304732Scy!ENDIF 142304732Scy 143304732Scy 144304732Scy# Set this to non-0 to create and use PDBs. 145304732Scy# 146304732Scy!IFNDEF SYMBOLS 147304732ScySYMBOLS = 1 148304732Scy!ENDIF 149304732Scy 150304732Scy# Set this to non-0 to use the SQLite debugging heap subsystem. 151304732Scy# 152304732Scy!IFNDEF MEMDEBUG 153304732ScyMEMDEBUG = 0 154304732Scy!ENDIF 155304732Scy 156304732Scy# Set this to non-0 to use the Win32 native heap subsystem. 157304732Scy# 158304732Scy!IFNDEF WIN32HEAP 159304732ScyWIN32HEAP = 0 160304732Scy!ENDIF 161304732Scy 162304732Scy# Set this to non-0 to enable OSTRACE() macros, which can be useful when 163304732Scy# debugging. 164304732Scy# 165304732Scy!IFNDEF OSTRACE 166304732ScyOSTRACE = 0 167304732Scy!ENDIF 168304732Scy 169304732Scy# Set this to one of the following values to enable various debugging 170304732Scy# features. Each level includes the debugging options from the previous 171304732Scy# levels. Currently, the recognized values for DEBUG are: 172304732Scy# 173304732Scy# 0 == NDEBUG: Disables assert() and other runtime diagnostics. 174304732Scy# 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API. 175304732Scy# 2 == Disables NDEBUG and all optimizations and then enables PDBs. 176304732Scy# 3 == SQLITE_DEBUG: Enables various diagnostics messages and code. 177304732Scy# 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call. 178304732Scy# 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros. 179304732Scy# 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros. 180304732Scy# 181304732Scy!IFNDEF DEBUG 182304732ScyDEBUG = 0 183304732Scy!ENDIF 184304732Scy 185304732Scy# Enable use of available compiler optimizations? Normally, this should be 186304732Scy# non-zero. Setting this to zero, thus disabling all compiler optimizations, 187304732Scy# can be useful for testing. 188304732Scy# 189304732Scy!IFNDEF OPTIMIZATIONS 190304732ScyOPTIMIZATIONS = 2 191304732Scy!ENDIF 192304732Scy 193304732Scy# Set this to non-0 to enable support for the session extension. 194304732Scy# 195304732Scy!IFNDEF SESSION 196304732ScySESSION = 0 197304732Scy!ENDIF 198304732Scy 199304732Scy# Set the source code file to be used by executables and libraries when 200304732Scy# they need the amalgamation. 201304732Scy# 202304732Scy!IFNDEF SQLITE3C 203304732Scy!IF $(SPLIT_AMALGAMATION)!=0 204304732ScySQLITE3C = sqlite3-all.c 205304732Scy!ELSE 206304732ScySQLITE3C = sqlite3.c 207304732Scy!ENDIF 208304732Scy!ENDIF 209304732Scy 210304732Scy# Set the include code file to be used by executables and libraries when 211304732Scy# they need SQLite. 212304732Scy# 213304732Scy!IFNDEF SQLITE3H 214304732ScySQLITE3H = sqlite3.h 215304732Scy!ENDIF 216304732Scy 217304732Scy# This is the name to use for the SQLite dynamic link library (DLL). 218304732Scy# 219304732Scy!IFNDEF SQLITE3DLL 220304732Scy!IF $(FOR_WIN10)!=0 221304732ScySQLITE3DLL = winsqlite3.dll 222304732Scy!ELSE 223304732ScySQLITE3DLL = sqlite3.dll 224304732Scy!ENDIF 225304732Scy!ENDIF 226304732Scy 227304732Scy# This is the name to use for the SQLite import library (LIB). 228304732Scy# 229304732Scy!IFNDEF SQLITE3LIB 230304732Scy!IF $(FOR_WIN10)!=0 231304732ScySQLITE3LIB = winsqlite3.lib 232304732Scy!ELSE 233304732ScySQLITE3LIB = sqlite3.lib 234304732Scy!ENDIF 235304732Scy!ENDIF 236304732Scy 237304732Scy# This is the name to use for the SQLite shell executable (EXE). 238304732Scy# 239304732Scy!IFNDEF SQLITE3EXE 240304732Scy!IF $(FOR_WIN10)!=0 241304732ScySQLITE3EXE = winsqlite3shell.exe 242304732Scy!ELSE 243304732ScySQLITE3EXE = sqlite3.exe 244304732Scy!ENDIF 245304732Scy!ENDIF 246304732Scy 247304732Scy# This is the argument used to set the program database (PDB) file for the 248304732Scy# SQLite shell executable (EXE). 249304732Scy# 250304732Scy!IFNDEF SQLITE3EXEPDB 251304732Scy!IF $(FOR_WIN10)!=0 252304732ScySQLITE3EXEPDB = 253304732Scy!ELSE 254304732ScySQLITE3EXEPDB = /pdb:sqlite3sh.pdb 255304732Scy!ENDIF 256304732Scy!ENDIF 257304732Scy 258304732Scy# These are the "standard" SQLite compilation options used when compiling for 259304732Scy# the Windows platform. 260304732Scy# 261304732Scy!IFNDEF OPT_FEATURE_FLAGS 262304732ScyOPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1 263304732ScyOPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1 264304732ScyOPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1 265304732Scy!ENDIF 266304732Scy 267304732Scy# Should the session extension be enabled? If so, add compilation options 268304732Scy# to enable it. 269304732Scy# 270304732Scy!IF $(SESSION)!=0 271304732ScyOPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1 272304732ScyOPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1 273304732Scy!ENDIF 274304732Scy 275304732Scy# These are the "extended" SQLite compilation options used when compiling for 276304732Scy# the Windows 10 platform. 277304732Scy# 278304732Scy!IFNDEF EXT_FEATURE_FLAGS 279304732Scy!IF $(FOR_WIN10)!=0 280304732ScyEXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1 281304732ScyEXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1 282304732ScyEXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1 283304732Scy!ELSE 284304732ScyEXT_FEATURE_FLAGS = 285304732Scy!ENDIF 286304732Scy!ENDIF 287304732Scy 288304732Scy############################################################################### 289304732Scy############################### END OF OPTIONS ################################ 290304732Scy############################################################################### 291304732Scy 292304732Scy# When compiling for the Windows 10 platform, the PLATFORM macro must be set 293304732Scy# to an appropriate value (e.g. x86, x64, arm, arm64, etc). 294304732Scy# 295304732Scy!IF $(FOR_WIN10)!=0 296304732Scy!IFNDEF PLATFORM 297304732Scy!ERROR Using the FOR_WIN10 option requires a value for PLATFORM. 298304732Scy!ENDIF 299304732Scy!ENDIF 300304732Scy 301304732Scy# This assumes that MSVC is always installed in 32-bit Program Files directory 302304732Scy# and sets the variable for use in locating other 32-bit installs accordingly. 303304732Scy# 304304732ScyPROGRAMFILES_X86 = $(VCINSTALLDIR)\..\.. 305304732ScyPROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\) 306304732Scy 307304732Scy# Check for the predefined command macro CC. This should point to the compiler 308304732Scy# binary for the target platform. If it is not defined, simply define it to 309304732Scy# the legacy default value 'cl.exe'. 310304732Scy# 311304732Scy!IFNDEF CC 312304732ScyCC = cl.exe 313304732Scy!ENDIF 314304732Scy 315304732Scy# Check for the predefined command macro CSC. This should point to a working 316304732Scy# C Sharp compiler binary. If it is not defined, simply define it to the 317304732Scy# legacy default value 'csc.exe'. 318304732Scy# 319304732Scy!IFNDEF CSC 320304732ScyCSC = csc.exe 321304732Scy!ENDIF 322304732Scy 323304732Scy# Check for the command macro LD. This should point to the linker binary for 324304732Scy# the target platform. If it is not defined, simply define it to the legacy 325304732Scy# default value 'link.exe'. 326304732Scy# 327304732Scy!IFNDEF LD 328304732ScyLD = link.exe 329304732Scy!ENDIF 330304732Scy 331304732Scy# Check for the predefined command macro RC. This should point to the resource 332304732Scy# compiler binary for the target platform. If it is not defined, simply define 333304732Scy# it to the legacy default value 'rc.exe'. 334304732Scy# 335304732Scy!IFNDEF RC 336304732ScyRC = rc.exe 337304732Scy!ENDIF 338304732Scy 339304732Scy# Check for the MSVC runtime library path macro. Otherwise, this value will 340304732Scy# default to the 'lib' directory underneath the MSVC installation directory. 341304732Scy# 342304732Scy!IFNDEF CRTLIBPATH 343304732ScyCRTLIBPATH = $(VCINSTALLDIR)\lib 344304732Scy!ENDIF 345304732Scy 346304732ScyCRTLIBPATH = $(CRTLIBPATH:\\=\) 347304732Scy 348304732Scy# Check for the command macro NCC. This should point to the compiler binary 349304732Scy# for the platform the compilation process is taking place on. If it is not 350304732Scy# defined, simply define it to have the same value as the CC macro. When 351304732Scy# cross-compiling, it is suggested that this macro be modified via the command 352304732Scy# line (since nmake itself does not provide a built-in method to guess it). 353304732Scy# For example, to use the x86 compiler when cross-compiling for x64, a command 354304732Scy# line similar to the following could be used (all on one line): 355304732Scy# 356304732Scy# nmake /f Makefile.msc sqlite3.dll 357304732Scy# XCOMPILE=1 USE_NATIVE_LIBPATHS=1 358304732Scy# 359304732Scy# Alternatively, the full path and file name to the compiler binary for the 360304732Scy# platform the compilation process is taking place may be specified (all on 361304732Scy# one line): 362304732Scy# 363304732Scy# nmake /f Makefile.msc sqlite3.dll 364304732Scy# "NCC=""%VCINSTALLDIR%\bin\cl.exe""" 365304732Scy# USE_NATIVE_LIBPATHS=1 366304732Scy# 367304732Scy!IFDEF NCC 368304732ScyNCC = $(NCC:\\=\) 369304732Scy!ELSEIF $(XCOMPILE)!=0 370304732ScyNCC = "$(VCINSTALLDIR)\bin\$(CC)" 371304732ScyNCC = $(NCC:\\=\) 372304732Scy!ELSE 373304732ScyNCC = $(CC) 374304732Scy!ENDIF 375304732Scy 376304732Scy# Check for the MSVC native runtime library path macro. Otherwise, 377304732Scy# this value will default to the 'lib' directory underneath the MSVC 378304732Scy# installation directory. 379304732Scy# 380304732Scy!IFNDEF NCRTLIBPATH 381304732ScyNCRTLIBPATH = $(VCINSTALLDIR)\lib 382304732Scy!ENDIF 383304732Scy 384304732ScyNCRTLIBPATH = $(NCRTLIBPATH:\\=\) 385304732Scy 386304732Scy# Check for the Platform SDK library path macro. Otherwise, this 387304732Scy# value will default to the 'lib' directory underneath the Windows 388304732Scy# SDK installation directory (the environment variable used appears 389304732Scy# to be available when using Visual C++ 2008 or later via the 390304732Scy# command line). 391304732Scy# 392304732Scy!IFNDEF NSDKLIBPATH 393304732ScyNSDKLIBPATH = $(WINDOWSSDKDIR)\lib 394304732Scy!ENDIF 395304732Scy 396304732ScyNSDKLIBPATH = $(NSDKLIBPATH:\\=\) 397304732Scy 398304732Scy# Check for the UCRT library path macro. Otherwise, this value will 399304732Scy# default to the version-specific, platform-specific 'lib' directory 400304732Scy# underneath the Windows SDK installation directory. 401304732Scy# 402304732Scy!IFNDEF UCRTLIBPATH 403304732ScyUCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM) 404304732Scy!ENDIF 405304732Scy 406304732ScyUCRTLIBPATH = $(UCRTLIBPATH:\\=\) 407304732Scy 408304732Scy# C compiler and options for use in building executables that 409304732Scy# will run on the platform that is doing the build. 410304732Scy# 411304732Scy!IF $(USE_FULLWARN)!=0 412304732ScyBCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS) 413304732Scy!ELSE 414304732ScyBCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS) 415304732Scy!ENDIF 416304732Scy 417304732Scy# Check if assembly code listings should be generated for the source 418304732Scy# code files to be compiled. 419304732Scy# 420304732Scy!IF $(USE_LISTINGS)!=0 421304732ScyBCC = $(BCC) -FAcs 422304732Scy!ENDIF 423304732Scy 424304732Scy# Check if the native library paths should be used when compiling 425304732Scy# the command line tools used during the compilation process. If 426304732Scy# so, set the necessary macro now. 427304732Scy# 428304732Scy!IF $(USE_NATIVE_LIBPATHS)!=0 429304732ScyNLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)" 430304732Scy 431304732Scy!IFDEF NUCRTLIBPATH 432304732ScyNUCRTLIBPATH = $(NUCRTLIBPATH:\\=\) 433304732ScyNLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)" 434304732Scy!ENDIF 435304732Scy!ENDIF 436304732Scy 437304732Scy# C compiler and options for use in building executables that 438304732Scy# will run on the target platform. (BCC and TCC are usually the 439304732Scy# same unless your are cross-compiling.) 440304732Scy# 441304732Scy!IF $(USE_FULLWARN)!=0 442304732ScyTCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS) 443304732Scy!ELSE 444304732ScyTCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS) 445304732Scy!ENDIF 446304732Scy 447304732ScyTCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -fp:precise 448304732ScyRCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS) 449304732Scy 450304732Scy# Check if we want to use the "stdcall" calling convention when compiling. 451304732Scy# This is not supported by the compilers for non-x86 platforms. It should 452304732Scy# also be noted here that building any target with these "stdcall" options 453304732Scy# will most likely fail if the Tcl library is also required. This is due 454304732Scy# to how the Tcl library functions are declared and exported (i.e. without 455304732Scy# an explicit calling convention, which results in "cdecl"). 456304732Scy# 457304732Scy!IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0 458304732Scy!IF "$(PLATFORM)"=="x86" 459304732ScyCORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall 460304732ScySHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall 461304732Scy!ELSE 462304732Scy!IFNDEF PLATFORM 463304732ScyCORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall 464304732ScySHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall 465304732Scy!ELSE 466304732ScyCORE_CCONV_OPTS = 467304732ScySHELL_CCONV_OPTS = 468304732Scy!ENDIF 469304732Scy!ENDIF 470304732Scy!ELSE 471304732ScyCORE_CCONV_OPTS = 472304732ScySHELL_CCONV_OPTS = 473304732Scy!ENDIF 474304732Scy 475304732Scy# These are additional compiler options used for the core library. 476304732Scy# 477304732Scy!IFNDEF CORE_COMPILE_OPTS 478304732Scy!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 479304732ScyCORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport) 480304732Scy!ELSE 481304732ScyCORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) 482304732Scy!ENDIF 483304732Scy!ENDIF 484304732Scy 485304732Scy# These are the additional targets that the core library should depend on 486304732Scy# when linking. 487304732Scy# 488304732Scy!IFNDEF CORE_LINK_DEP 489304732Scy!IF $(DYNAMIC_SHELL)!=0 490304732ScyCORE_LINK_DEP = 491304732Scy!ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86" 492304732ScyCORE_LINK_DEP = sqlite3.def 493304732Scy!ELSE 494304732ScyCORE_LINK_DEP = 495304732Scy!ENDIF 496304732Scy!ENDIF 497304732Scy 498304732Scy# These are additional linker options used for the core library. 499304732Scy# 500304732Scy!IFNDEF CORE_LINK_OPTS 501304732Scy!IF $(DYNAMIC_SHELL)!=0 502304732ScyCORE_LINK_OPTS = 503304732Scy!ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86" 504304732ScyCORE_LINK_OPTS = /DEF:sqlite3.def 505304732Scy!ELSE 506304732ScyCORE_LINK_OPTS = 507304732Scy!ENDIF 508304732Scy!ENDIF 509304732Scy 510304732Scy# These are additional compiler options used for the shell executable. 511304732Scy# 512304732Scy!IFNDEF SHELL_COMPILE_OPTS 513304732Scy!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 514304732ScySHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport) 515304732Scy!ELSE 516304732ScySHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) 517304732Scy!ENDIF 518304732Scy!ENDIF 519304732Scy 520304732Scy# This is the source code that the shell executable should be compiled 521304732Scy# with. 522304732Scy# 523304732Scy!IFNDEF SHELL_CORE_SRC 524304732Scy!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 525304732ScySHELL_CORE_SRC = 526304732Scy!ELSE 527304732ScySHELL_CORE_SRC = $(SQLITE3C) 528304732Scy!ENDIF 529304732Scy!ENDIF 530304732Scy 531304732Scy# This is the core library that the shell executable should depend on. 532304732Scy# 533304732Scy!IFNDEF SHELL_CORE_DEP 534304732Scy!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 535304732ScySHELL_CORE_DEP = $(SQLITE3DLL) 536304732Scy!ELSE 537304732ScySHELL_CORE_DEP = 538304732Scy!ENDIF 539304732Scy!ENDIF 540304732Scy 541304732Scy# This is the core library that the shell executable should link with. 542304732Scy# 543304732Scy!IFNDEF SHELL_CORE_LIB 544304732Scy!IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0 545304732ScySHELL_CORE_LIB = $(SQLITE3LIB) 546304732Scy!ELSE 547304732ScySHELL_CORE_LIB = 548304732Scy!ENDIF 549304732Scy!ENDIF 550304732Scy 551304732Scy# These are additional linker options used for the shell executable. 552304732Scy# 553304732Scy!IFNDEF SHELL_LINK_OPTS 554304732ScySHELL_LINK_OPTS = $(SHELL_CORE_LIB) 555304732Scy!ENDIF 556304732Scy 557304732Scy# Check if assembly code listings should be generated for the source 558304732Scy# code files to be compiled. 559304732Scy# 560304732Scy!IF $(USE_LISTINGS)!=0 561304732ScyTCC = $(TCC) -FAcs 562304732Scy!ENDIF 563304732Scy 564304732Scy# When compiling the library for use in the WinRT environment, 565304732Scy# the following compile-time options must be used as well to 566304732Scy# disable use of Win32 APIs that are not available and to enable 567304732Scy# use of Win32 APIs that are specific to Windows 8 and/or WinRT. 568304732Scy# 569304732Scy!IF $(FOR_WINRT)!=0 570304732ScyTCC = $(TCC) -DSQLITE_OS_WINRT=1 571304732ScyRCC = $(RCC) -DSQLITE_OS_WINRT=1 572304732ScyTCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP 573304732ScyRCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP 574304732Scy!ENDIF 575304732Scy 576304732Scy# C compiler options for the Windows 10 platform (needs MSVC 2015). 577304732Scy# 578304732Scy!IF $(FOR_WIN10)!=0 579304732ScyTCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 580304732ScyBCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 581304732Scy!ENDIF 582304732Scy 583304732Scy# Also, we need to dynamically link to the correct MSVC runtime 584304732Scy# when compiling for WinRT (e.g. debug or release) OR if the 585304732Scy# USE_CRT_DLL option is set to force dynamically linking to the 586304732Scy# MSVC runtime library. 587304732Scy# 588304732Scy!IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0 589304732Scy!IF $(DEBUG)>1 590304732ScyTCC = $(TCC) -MDd 591304732ScyBCC = $(BCC) -MDd 592304732Scy!ELSE 593304732ScyTCC = $(TCC) -MD 594304732ScyBCC = $(BCC) -MD 595304732Scy!ENDIF 596304732Scy!ELSE 597304732Scy!IF $(DEBUG)>1 598304732ScyTCC = $(TCC) -MTd 599304732ScyBCC = $(BCC) -MTd 600304732Scy!ELSE 601304732ScyTCC = $(TCC) -MT 602304732ScyBCC = $(BCC) -MT 603304732Scy!ENDIF 604304732Scy!ENDIF 605304732Scy 606304732Scy 607304732Scy# Define -DNDEBUG to compile without debugging (i.e., for production usage) 608304732Scy# Omitting the define will cause extra debugging code to be inserted and 609304732Scy# includes extra comments when "EXPLAIN stmt" is used. 610304732Scy# 611304732Scy!IF $(DEBUG)==0 612304732ScyTCC = $(TCC) -DNDEBUG 613304732ScyBCC = $(BCC) -DNDEBUG 614304732ScyRCC = $(RCC) -DNDEBUG 615304732Scy!ENDIF 616304732Scy 617304732Scy!IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0 618304732ScyTCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1 619304732ScyRCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1 620304732Scy!ENDIF 621304732Scy 622304732Scy!IF $(DEBUG)>2 623304732ScyTCC = $(TCC) -DSQLITE_DEBUG=1 624304732ScyRCC = $(RCC) -DSQLITE_DEBUG=1 625304732Scy!ENDIF 626304732Scy 627304732Scy!IF $(DEBUG)>4 || $(OSTRACE)!=0 628304732ScyTCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1 629304732ScyRCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1 630304732Scy!ENDIF 631304732Scy 632304732Scy!IF $(DEBUG)>5 633304732ScyTCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1 634304732ScyRCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1 635304732Scy!ENDIF 636304732Scy 637304732Scy# Prevent warnings about "insecure" MSVC runtime library functions 638304732Scy# being used. 639304732Scy# 640304732ScyTCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS 641304732ScyBCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS 642304732ScyRCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS 643304732Scy 644304732Scy# Prevent warnings about "deprecated" POSIX functions being used. 645304732Scy# 646304732ScyTCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS 647304732ScyBCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS 648304732ScyRCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS 649304732Scy 650304732Scy# Use the SQLite debugging heap subsystem? 651304732Scy# 652304732Scy!IF $(MEMDEBUG)!=0 653304732ScyTCC = $(TCC) -DSQLITE_MEMDEBUG=1 654304732ScyRCC = $(RCC) -DSQLITE_MEMDEBUG=1 655304732Scy 656304732Scy# Use native Win32 heap subsystem instead of malloc/free? 657304732Scy# 658304732Scy!ELSEIF $(WIN32HEAP)!=0 659304732ScyTCC = $(TCC) -DSQLITE_WIN32_MALLOC=1 660304732ScyRCC = $(RCC) -DSQLITE_WIN32_MALLOC=1 661304732Scy 662304732Scy# Validate the heap on every call into the native Win32 heap subsystem? 663304732Scy# 664304732Scy!IF $(DEBUG)>3 665304732ScyTCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 666304732ScyRCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1 667304732Scy!ENDIF 668304732Scy!ENDIF 669304732Scy 670304732Scy 671304732Scy# Compiler options needed for programs that use the readline() library. 672304732Scy# 673304732Scy!IFNDEF READLINE_FLAGS 674304732ScyREADLINE_FLAGS = -DHAVE_READLINE=0 675304732Scy!ENDIF 676304732Scy 677304732Scy# The library that programs using readline() must link against. 678304732Scy# 679304732Scy!IFNDEF LIBREADLINE 680304732ScyLIBREADLINE = 681304732Scy!ENDIF 682304732Scy 683304732Scy# Should the database engine be compiled threadsafe 684304732Scy# 685304732ScyTCC = $(TCC) -DSQLITE_THREADSAFE=1 686304732ScyRCC = $(RCC) -DSQLITE_THREADSAFE=1 687304732Scy 688304732Scy# Do threads override each others locks by default (1), or do we test (-1) 689304732Scy# 690304732ScyTCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1 691304732ScyRCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1 692304732Scy 693304732Scy# Any target libraries which libsqlite must be linked against 694304732Scy# 695304732Scy!IFNDEF TLIBS 696304732ScyTLIBS = 697304732Scy!ENDIF 698304732Scy 699304732Scy# Flags controlling use of the in memory btree implementation 700304732Scy# 701304732Scy# SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to 702304732Scy# default to file, 2 to default to memory, and 3 to force temporary 703304732Scy# tables to always be in memory. 704304732Scy# 705304732ScyTCC = $(TCC) -DSQLITE_TEMP_STORE=1 706304732ScyRCC = $(RCC) -DSQLITE_TEMP_STORE=1 707304732Scy 708304732Scy# Enable/disable loadable extensions, and other optional features 709304732Scy# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). 710304732Scy# The same set of OMIT and ENABLE flags should be passed to the 711304732Scy# LEMON parser generator and the mkkeywordhash tool as well. 712304732Scy 713304732Scy# These are the required SQLite compilation options used when compiling for 714304732Scy# the Windows platform. 715304732Scy# 716304732ScyREQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100 717304732Scy 718304732Scy# If we are linking to the RPCRT4 library, enable features that need it. 719304732Scy# 720304732Scy!IF $(USE_RPCRT4_LIB)!=0 721304732ScyREQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1 722304732Scy!ENDIF 723304732Scy 724304732Scy# Add the required and optional SQLite compilation options into the command 725304732Scy# lines used to invoke the MSVC code and resource compilers. 726304732Scy# 727304732ScyTCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) 728304732ScyRCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) 729304732Scy 730304732Scy# Add in any optional parameters specified on the commane line, e.g. 731304732Scy# nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1" 732304732Scy# 733304732ScyTCC = $(TCC) $(OPTS) 734304732ScyRCC = $(RCC) $(OPTS) 735304732Scy 736304732Scy# If compiling for debugging, add some defines. 737304732Scy# 738304732Scy!IF $(DEBUG)>1 739304732ScyTCC = $(TCC) -D_DEBUG 740304732ScyBCC = $(BCC) -D_DEBUG 741304732ScyRCC = $(RCC) -D_DEBUG 742304732Scy!ENDIF 743304732Scy 744304732Scy# If optimizations are enabled or disabled (either implicitly or 745304732Scy# explicitly), add the necessary flags. 746304732Scy# 747304732Scy!IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0 748304732ScyTCC = $(TCC) -Od 749304732ScyBCC = $(BCC) -Od 750304732Scy!IF $(USE_RUNTIME_CHECKS)!=0 751304732ScyTCC = $(TCC) -RTC1 752304732ScyBCC = $(BCC) -RTC1 753304732Scy!ENDIF 754304732Scy!ELSEIF $(OPTIMIZATIONS)>=3 755304732ScyTCC = $(TCC) -Ox 756304732ScyBCC = $(BCC) -Ox 757304732Scy!ELSEIF $(OPTIMIZATIONS)==2 758304732ScyTCC = $(TCC) -O2 759304732ScyBCC = $(BCC) -O2 760304732Scy!ELSEIF $(OPTIMIZATIONS)==1 761304732ScyTCC = $(TCC) -O1 762304732ScyBCC = $(BCC) -O1 763304732Scy!ENDIF 764304732Scy 765304732Scy# If symbols are enabled (or compiling for debugging), enable PDBs. 766304732Scy# 767304732Scy!IF $(DEBUG)>1 || $(SYMBOLS)!=0 768304732ScyTCC = $(TCC) -Zi 769304732ScyBCC = $(BCC) -Zi 770304732Scy!ENDIF 771304732Scy 772304732Scy 773304732Scy# Command line prefixes for compiling code, compiling resources, 774304732Scy# linking, etc. 775304732Scy# 776304732ScyLTCOMPILE = $(TCC) -Fo$@ 777304732ScyLTRCOMPILE = $(RCC) -r 778304732ScyLTLIB = lib.exe 779304732ScyLTLINK = $(TCC) -Fe$@ 780304732Scy 781304732Scy# If requested, link to the RPCRT4 library. 782304732Scy# 783304732Scy!IF $(USE_RPCRT4_LIB)!=0 784304732ScyLTLINK = $(LTLINK) rpcrt4.lib 785304732Scy!ENDIF 786304732Scy 787304732Scy# If a platform was set, force the linker to target that. 788304732Scy# Note that the vcvars*.bat family of batch files typically 789304732Scy# set this for you. Otherwise, the linker will attempt 790304732Scy# to deduce the binary type based on the object files. 791304732Scy!IFDEF PLATFORM 792304732ScyLTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM) 793304732ScyLTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM) 794304732Scy!ELSE 795304732ScyLTLINKOPTS = /NOLOGO 796304732ScyLTLIBOPTS = /NOLOGO 797304732Scy!ENDIF 798304732Scy 799304732Scy# When compiling for use in the WinRT environment, the following 800304732Scy# linker option must be used to mark the executable as runnable 801304732Scy# only in the context of an application container. 802304732Scy# 803304732Scy!IF $(FOR_WINRT)!=0 804304732ScyLTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER 805304732Scy!IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0" 806304732Scy!IFNDEF STORELIBPATH 807304732Scy!IF "$(PLATFORM)"=="x86" 808304732ScySTORELIBPATH = $(CRTLIBPATH)\store 809304732Scy!ELSEIF "$(PLATFORM)"=="x64" 810304732ScySTORELIBPATH = $(CRTLIBPATH)\store\amd64 811304732Scy!ELSEIF "$(PLATFORM)"=="ARM" 812304732ScySTORELIBPATH = $(CRTLIBPATH)\store\arm 813304732Scy!ELSE 814304732ScySTORELIBPATH = $(CRTLIBPATH)\store 815304732Scy!ENDIF 816304732Scy!ENDIF 817304732ScySTORELIBPATH = $(STORELIBPATH:\\=\) 818304732ScyLTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)" 819304732Scy!ENDIF 820304732Scy!ENDIF 821304732Scy 822304732Scy# When compiling for Windows Phone 8.1, an extra library path is 823304732Scy# required. 824304732Scy# 825304732Scy!IF $(USE_WP81_OPTS)!=0 826304732Scy!IFNDEF WP81LIBPATH 827304732Scy!IF "$(PLATFORM)"=="x86" 828304732ScyWP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 829304732Scy!ELSEIF "$(PLATFORM)"=="ARM" 830304732ScyWP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM 831304732Scy!ELSE 832304732ScyWP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86 833304732Scy!ENDIF 834304732Scy!ENDIF 835304732Scy!ENDIF 836304732Scy 837304732Scy# When compiling for Windows Phone 8.1, some extra linker options 838304732Scy# are also required. 839304732Scy# 840304732Scy!IF $(USE_WP81_OPTS)!=0 841304732Scy!IFDEF WP81LIBPATH 842304732ScyLTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" 843304732Scy!ENDIF 844304732ScyLTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE 845304732ScyLTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib 846304732ScyLTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib 847304732Scy!ENDIF 848304732Scy 849304732Scy# When compiling for UWP or the Windows 10 platform, some extra linker 850304732Scy# options are also required. 851304732Scy# 852304732Scy!IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 853304732ScyLTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib 854304732ScyLTLINKOPTS = $(LTLINKOPTS) mincore.lib 855304732Scy!IFDEF PSDKLIBPATH 856304732ScyLTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" 857304732Scy!ENDIF 858304732Scy!ENDIF 859304732Scy 860304732Scy!IF $(FOR_WIN10)!=0 861304732ScyLTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)" 862304732Scy!IF $(DEBUG)>1 863304732ScyLTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib 864304732Scy!ELSE 865304732ScyLTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib 866304732Scy!ENDIF 867304732Scy!ENDIF 868304732Scy 869304732Scy# If either debugging or symbols are enabled, enable PDBs. 870304732Scy# 871304732Scy!IF $(DEBUG)>1 || $(SYMBOLS)!=0 872304732ScyLDFLAGS = /DEBUG $(LDOPTS) 873304732Scy!ELSE 874304732ScyLDFLAGS = $(LDOPTS) 875304732Scy!ENDIF 876304732Scy 877304732Scy 878304732Scy# You should not have to change anything below this line 879304732Scy############################################################################### 880304732Scy 881304732Scy 882304732Scy# Object files for the amalgamation. 883304732Scy# 884304732ScyLIBOBJS1 = sqlite3.lo 885304732Scy 886304732Scy# Determine the real value of LIBOBJ based on the 'configure' script 887304732Scy# 888304732ScyLIBOBJ = $(LIBOBJS1) 889304732Scy 890304732Scy# Determine if embedded resource compilation and usage are enabled. 891304732Scy# 892304732Scy!IF $(USE_RC)!=0 893304732ScyLIBRESOBJS = sqlite3res.lo 894304732Scy!ELSE 895304732ScyLIBRESOBJS = 896304732Scy!ENDIF 897304732Scy 898304732Scy 899304732Scy# Additional compiler options for the shell. These are only effective 900304732Scy# when the shell is not being dynamically linked. 901304732Scy# 902304732Scy!IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0 903304732ScySHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS 904304732Scy!ENDIF 905304732Scy 906304732Scy 907304732Scy# This is the default Makefile target. The objects listed here 908304732Scy# are what get build when you type just "make" with no arguments. 909304732Scy# 910304732Scyall: dll shell 911304732Scy 912304732Scy# Dynamic link library section. 913304732Scy# 914304732Scydll: $(SQLITE3DLL) 915304732Scy 916304732Scy# Shell executable. 917304732Scy# 918304732Scyshell: $(SQLITE3EXE) 919304732Scy 920304732Scy 921304732Scy$(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) 922304732Scy $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) 923304732Scy 924304732ScyReplace.exe: 925304732Scy $(CSC) /target:exe $(TOP)\Replace.cs 926304732Scy 927304732Scysqlite3.def: Replace.exe $(LIBOBJ) 928304732Scy echo EXPORTS > sqlite3.def 929304732Scy dumpbin /all $(LIBOBJ) \ 930304732Scy | .\Replace.exe "^\s+/EXPORT:_?(sqlite3_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \ 931304732Scy | sort >> sqlite3.def 932304732Scy 933304732Scy$(SQLITE3EXE): $(TOP)\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H) 934304732Scy $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\shell.c $(SHELL_CORE_SRC) \ 935304732Scy /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) 936304732Scy 937304732Scy 938304732Scy# Rule to build the amalgamation 939304732Scy# 940304732Scysqlite3.lo: $(SQLITE3C) 941304732Scy $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C) 942304732Scy 943304732Scy 944304732Scy# Rule to build the Win32 resources object file. 945304732Scy# 946304732Scy!IF $(USE_RC)!=0 947304732Scy_HASHCHAR=^# 948304732Scy!IF ![echo !IFNDEF VERSION > rcver.vc] && \ 949304732Scy ![for /F "delims=" %V in ('type "$(SQLITE3H)" ^| find "$(_HASHCHAR)define SQLITE_VERSION "') do (echo VERSION = ^^%V >> rcver.vc)] && \ 950304732Scy ![echo !ENDIF >> rcver.vc] 951304732Scy!INCLUDE rcver.vc 952304732Scy!ENDIF 953304732Scy 954304732ScyRESOURCE_VERSION = $(VERSION:^#=) 955304732ScyRESOURCE_VERSION = $(RESOURCE_VERSION:define=) 956304732ScyRESOURCE_VERSION = $(RESOURCE_VERSION:SQLITE_VERSION=) 957304732ScyRESOURCE_VERSION = $(RESOURCE_VERSION:"=) 958304732ScyRESOURCE_VERSION = $(RESOURCE_VERSION:.=,) 959304732Scy 960304732Scy$(LIBRESOBJS): $(TOP)\sqlite3.rc rcver.vc $(SQLITE3H) 961304732Scy echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h 962304732Scy echo #define SQLITE_RESOURCE_VERSION $(RESOURCE_VERSION) >> sqlite3rc.h 963304732Scy echo #endif >> sqlite3rc.h 964304732Scy $(LTRCOMPILE) -fo $(LIBRESOBJS) -DRC_VERONLY $(TOP)\sqlite3.rc 965304732Scy!ENDIF 966304732Scy 967304732Scy 968304732Scyclean: 969304732Scy del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL 970304732Scy del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL 971304732Scy del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL 972