Makefile.msc 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849
  1. #
  2. # nmake Makefile for SQLite
  3. #
  4. ###############################################################################
  5. ############################## START OF OPTIONS ###############################
  6. ###############################################################################
  7. # The toplevel directory of the source tree. This is the directory
  8. # that contains this "Makefile.msc".
  9. #
  10. TOP = .
  11. # <<mark>>
  12. # Set this non-0 to create and use the SQLite amalgamation file.
  13. #
  14. !IFNDEF USE_AMALGAMATION
  15. USE_AMALGAMATION = 1
  16. !ENDIF
  17. # <</mark>>
  18. # Optionally set EXTRA_SRC to a list of C files to append to
  19. # the generated sqlite3.c. Any sqlite3 extensions added this
  20. # way may require manual editing, as described in
  21. # https://sqlite.org/forum/forumpost/903f721f3e7c0d25
  22. #
  23. !IFNDEF EXTRA_SRC
  24. EXTRA_SRC =
  25. !ENDIF
  26. # Set this non-0 to enable full warnings (-W4, etc) when compiling.
  27. #
  28. !IFNDEF USE_FULLWARN
  29. USE_FULLWARN = 1
  30. !ENDIF
  31. # Set this non-0 to enable treating warnings as errors (-WX, etc) when
  32. # compiling.
  33. #
  34. !IFNDEF USE_FATAL_WARN
  35. USE_FATAL_WARN = 0
  36. !ENDIF
  37. # Set this non-0 to enable full runtime error checks (-RTC1, etc). This
  38. # has no effect if (any) optimizations are enabled.
  39. #
  40. !IFNDEF USE_RUNTIME_CHECKS
  41. USE_RUNTIME_CHECKS = 0
  42. !ENDIF
  43. # Set this non-0 to create a SQLite amalgamation file that excludes the
  44. # various built-in extensions.
  45. #
  46. !IFNDEF MINIMAL_AMALGAMATION
  47. MINIMAL_AMALGAMATION = 0
  48. !ENDIF
  49. # Set this non-0 to use "stdcall" calling convention for the core library
  50. # and shell executable.
  51. #
  52. !IFNDEF USE_STDCALL
  53. USE_STDCALL = 0
  54. !ENDIF
  55. # Use the USE_SEH=0 option on the nmake command line to omit structured
  56. # exception handling (SEH) support. SEH is on by default.
  57. #
  58. !IFNDEF USE_SEH
  59. USE_SEH = 1
  60. !ENDIF
  61. # Use STATICALLY_LINK_TCL=1 to statically link against TCL
  62. #
  63. !IFNDEF STATICALLY_LINK_TCL
  64. STATICALLY_LINK_TCL = 0
  65. !ELSEIF $(STATICALLY_LINK_TCL)!=0
  66. CCOPTS = $(CCOPTS) -DSTATIC_BUILD
  67. !ENDIF
  68. # Set this non-0 to have the shell executable link against the core dynamic
  69. # link library.
  70. #
  71. !IFNDEF DYNAMIC_SHELL
  72. DYNAMIC_SHELL = 0
  73. !ENDIF
  74. # Set this non-0 to enable extra code that attempts to detect misuse of the
  75. # SQLite API.
  76. #
  77. !IFNDEF API_ARMOR
  78. API_ARMOR = 0
  79. !ENDIF
  80. # If necessary, create a list of harmless compiler warnings to disable when
  81. # compiling the various tools. For the SQLite source code itself, warnings,
  82. # if any, will be disabled from within it.
  83. #
  84. !IFNDEF NO_WARN
  85. !IF $(USE_FULLWARN)!=0
  86. NO_WARN = -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189 -wd4206
  87. NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
  88. !ENDIF
  89. !ENDIF
  90. # Set this non-0 to use the library paths and other options necessary for
  91. # Windows Phone 8.1.
  92. #
  93. !IFNDEF USE_WP81_OPTS
  94. USE_WP81_OPTS = 0
  95. !ENDIF
  96. # Set this non-0 to split the SQLite amalgamation file into chunks to
  97. # be used for debugging with Visual Studio.
  98. #
  99. !IFNDEF SPLIT_AMALGAMATION
  100. SPLIT_AMALGAMATION = 0
  101. !ENDIF
  102. # <<mark>>
  103. # Set this non-0 to have this makefile assume the Tcl shell executable
  104. # (tclsh*.exe) is available in the PATH. By default, this is disabled
  105. # for compatibility with older build environments. This setting only
  106. # applies if TCLSH_CMD is not set manually.
  107. #
  108. !IFNDEF USE_TCLSH_IN_PATH
  109. USE_TCLSH_IN_PATH = 0
  110. !ENDIF
  111. # Set this non-0 to use zlib, possibly compiling it from source code.
  112. #
  113. !IFNDEF USE_ZLIB
  114. USE_ZLIB = 0
  115. !ENDIF
  116. # Set this non-0 to build zlib from source code. This is enabled by
  117. # default and in that case it will be assumed that the ZLIBDIR macro
  118. # points to the top-level source code directory for zlib.
  119. #
  120. !IFNDEF BUILD_ZLIB
  121. BUILD_ZLIB = 1
  122. !ENDIF
  123. # Set this non-0 to use the International Components for Unicode (ICU).
  124. #
  125. !IFNDEF USE_ICU
  126. USE_ICU = 0
  127. !ENDIF
  128. # <</mark>>
  129. # Set this non-0 to dynamically link to the MSVC runtime library.
  130. #
  131. !IFNDEF USE_CRT_DLL
  132. USE_CRT_DLL = 0
  133. !ENDIF
  134. # Set this non-0 to link to the RPCRT4 library.
  135. #
  136. !IFNDEF USE_RPCRT4_LIB
  137. USE_RPCRT4_LIB = 0
  138. !ENDIF
  139. # Set this non-0 to generate assembly code listings for the source code
  140. # files.
  141. #
  142. !IFNDEF USE_LISTINGS
  143. USE_LISTINGS = 0
  144. !ENDIF
  145. # Set this non-0 to attempt setting the native compiler automatically
  146. # for cross-compiling the command line tools needed during the compilation
  147. # process.
  148. #
  149. !IFNDEF XCOMPILE
  150. XCOMPILE = 0
  151. !ENDIF
  152. # Set this non-0 to use the native libraries paths for cross-compiling
  153. # the command line tools needed during the compilation process.
  154. #
  155. !IFNDEF USE_NATIVE_LIBPATHS
  156. USE_NATIVE_LIBPATHS = 0
  157. !ENDIF
  158. # Set this 0 to skip the compiling and embedding of version resources.
  159. #
  160. !IFNDEF USE_RC
  161. USE_RC = 1
  162. !ENDIF
  163. # Set this non-0 to compile binaries suitable for the WinRT environment.
  164. # This setting does not apply to any binaries that require Tcl to operate
  165. # properly (i.e. the text fixture, etc).
  166. #
  167. !IFNDEF FOR_WINRT
  168. FOR_WINRT = 0
  169. !ENDIF
  170. # Set this non-0 to compile binaries suitable for the UWP environment.
  171. # This setting does not apply to any binaries that require Tcl to operate
  172. # properly (i.e. the text fixture, etc).
  173. #
  174. !IFNDEF FOR_UWP
  175. FOR_UWP = 0
  176. !ENDIF
  177. # Set this non-0 to compile binaries suitable for the Windows 10 platform.
  178. #
  179. !IFNDEF FOR_WIN10
  180. FOR_WIN10 = 0
  181. !ENDIF
  182. # <<mark>>
  183. # Set this non-0 to skip attempting to look for and/or link with the Tcl
  184. # runtime library.
  185. #
  186. !IFNDEF NO_TCL
  187. NO_TCL = 0
  188. !ENDIF
  189. # <</mark>>
  190. # Set this to non-0 to create and use PDBs.
  191. #
  192. !IFNDEF SYMBOLS
  193. SYMBOLS = 1
  194. !ENDIF
  195. # Set this to non-0 to use the SQLite debugging heap subsystem.
  196. #
  197. !IFNDEF MEMDEBUG
  198. MEMDEBUG = 0
  199. !ENDIF
  200. # Set this to non-0 to use the Win32 native heap subsystem.
  201. #
  202. !IFNDEF WIN32HEAP
  203. WIN32HEAP = 0
  204. !ENDIF
  205. # Set this to non-0 to enable OSTRACE() macros, which can be useful when
  206. # debugging.
  207. #
  208. !IFNDEF OSTRACE
  209. OSTRACE = 0
  210. !ENDIF
  211. # enable address sanitizer using ASAN=1 on the command-line.
  212. #
  213. !IFNDEF ASAN
  214. ASAN = 0
  215. !ENDIF
  216. # Set this to one of the following values to enable various debugging
  217. # features. Each level includes the debugging options from the previous
  218. # levels. Currently, the recognized values for DEBUG are:
  219. #
  220. # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
  221. # 1 == SQLITE_ENABLE_API_ARMOR: extra attempts to detect misuse of the API.
  222. # 2 == Disables NDEBUG and all optimizations and then enables PDBs.
  223. # 3 == SQLITE_DEBUG: Enables various diagnostics messages and code.
  224. # 4 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
  225. # 5 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
  226. # 6 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
  227. #
  228. !IFNDEF DEBUG
  229. DEBUG = 0
  230. !ENDIF
  231. # <<mark>>
  232. # By default, use --linemacros=1 argument to the mksqlite3c.tcl tool, which
  233. # is used to build the amalgamation. This can be turned off to ease debug
  234. # of the amalgamation away from the source tree.
  235. #
  236. !IFNDEF NO_LINEMACROS
  237. NO_LINEMACROS = 0
  238. !ENDIF
  239. # <</mark>>
  240. # Enable use of available compiler optimizations? Normally, this should be
  241. # non-zero. Setting this to zero, thus disabling all compiler optimizations,
  242. # can be useful for testing.
  243. #
  244. !IFNDEF OPTIMIZATIONS
  245. OPTIMIZATIONS = 2
  246. !ENDIF
  247. # Set this to non-0 to enable support for the session extension.
  248. #
  249. !IFNDEF SESSION
  250. SESSION = 0
  251. !ENDIF
  252. # Set this to non-0 to enable support for the rbu extension.
  253. #
  254. !IFNDEF RBU
  255. RBU = 0
  256. !ENDIF
  257. # Set the source code file to be used by executables and libraries when
  258. # they need the amalgamation.
  259. #
  260. !IFNDEF SQLITE3C
  261. !IF $(SPLIT_AMALGAMATION)!=0
  262. SQLITE3C = sqlite3-all.c
  263. !ELSE
  264. SQLITE3C = sqlite3.c
  265. !ENDIF
  266. !ENDIF
  267. # Set the include code file to be used by executables and libraries when
  268. # they need SQLite.
  269. #
  270. !IFNDEF SQLITE3H
  271. SQLITE3H = sqlite3.h
  272. !ENDIF
  273. # This is the name to use for the SQLite dynamic link library (DLL).
  274. #
  275. !IFNDEF SQLITE3DLL
  276. !IF $(FOR_WIN10)!=0
  277. SQLITE3DLL = winsqlite3.dll
  278. !ELSE
  279. SQLITE3DLL = sqlite3.dll
  280. !ENDIF
  281. !ENDIF
  282. # This is the name to use for the SQLite import library (LIB).
  283. #
  284. !IFNDEF SQLITE3LIB
  285. !IF $(FOR_WIN10)!=0
  286. SQLITE3LIB = winsqlite3.lib
  287. !ELSE
  288. SQLITE3LIB = sqlite3.lib
  289. !ENDIF
  290. !ENDIF
  291. # This is the name to use for the SQLite shell executable (EXE).
  292. #
  293. !IFNDEF SQLITE3EXE
  294. !IF $(FOR_WIN10)!=0
  295. SQLITE3EXE = winsqlite3shell.exe
  296. !ELSE
  297. SQLITE3EXE = sqlite3.exe
  298. !ENDIF
  299. !ENDIF
  300. # This is the argument used to set the program database (PDB) file for the
  301. # SQLite shell executable (EXE).
  302. #
  303. !IFNDEF SQLITE3EXEPDB
  304. !IF $(FOR_WIN10)!=0
  305. SQLITE3EXEPDB =
  306. !ELSE
  307. SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
  308. !ENDIF
  309. !ENDIF
  310. # <<mark>>
  311. # These are the names of the customized Tcl header files used by various parts
  312. # of this makefile when the stdcall calling convention is in use. It is not
  313. # used for any other purpose.
  314. #
  315. !IFNDEF SQLITETCLH
  316. SQLITETCLH = sqlite_tcl.h
  317. !ENDIF
  318. !IFNDEF SQLITETCLDECLSH
  319. SQLITETCLDECLSH = sqlite_tclDecls.h
  320. !ENDIF
  321. # This is the name to use for the dynamic link library (DLL) containing the
  322. # Tcl bindings for SQLite.
  323. #
  324. !IFNDEF SQLITE3TCLDLL
  325. SQLITE3TCLDLL = tclsqlite3.dll
  326. !ENDIF
  327. # These are the additional targets that the targets that integrate with the
  328. # Tcl library should depend on when compiling, etc.
  329. #
  330. !IFNDEF SQLITE_TCL_DEP
  331. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  332. SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
  333. !ELSE
  334. SQLITE_TCL_DEP =
  335. !ENDIF
  336. !ENDIF
  337. # <</mark>>
  338. # These are the "standard" SQLite compilation options used when compiling for
  339. # the Windows platform.
  340. #
  341. !IFNDEF OPT_FEATURE_FLAGS
  342. OPT_FEATURE_FLAGS = $(OPT_XTRA)
  343. !IF $(MINIMAL_AMALGAMATION)==0
  344. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
  345. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS5=1
  346. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
  347. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_GEOPOLY=1
  348. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
  349. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
  350. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
  351. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
  352. !ENDIF
  353. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
  354. !ENDIF
  355. # Additional feature-options above and beyond what are normally used can be
  356. # be added using OPTIONS=.... on the command-line. These values are
  357. # appended to the OPT_FEATURE_FLAGS variable.
  358. #
  359. !IFDEF OPTIONS
  360. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) $(OPTIONS)
  361. !ENDIF
  362. # Should the session extension be enabled? If so, add compilation options
  363. # to enable it.
  364. #
  365. !IF $(SESSION)!=0
  366. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
  367. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
  368. !ENDIF
  369. # Always enable math functions on Windows
  370. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS
  371. # Should the rbu extension be enabled? If so, add compilation options
  372. # to enable it.
  373. #
  374. !IF $(RBU)!=0
  375. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
  376. !ENDIF
  377. # Should structured exception handling (SEH) be enabled for WAL mode in
  378. # the core library? It is on by default. Only omit it if the
  379. # USE_SEH=0 option is provided on the nmake command-line.
  380. #
  381. !IF $(USE_SEH)==0
  382. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_OMIT_SEH=1
  383. !ENDIF
  384. # These are the "extended" SQLite compilation options used when compiling for
  385. # the Windows 10 platform.
  386. #
  387. !IFNDEF EXT_FEATURE_FLAGS
  388. !IF $(FOR_WIN10)!=0
  389. EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1
  390. EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1
  391. EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1
  392. !ELSE
  393. EXT_FEATURE_FLAGS =
  394. !ENDIF
  395. !ENDIF
  396. ###############################################################################
  397. ############################### END OF OPTIONS ################################
  398. ###############################################################################
  399. # When compiling for the Windows 10 platform, the PLATFORM macro must be set
  400. # to an appropriate value (e.g. x86, x64, arm, arm64, etc).
  401. #
  402. !IF $(FOR_WIN10)!=0
  403. !IFNDEF PLATFORM
  404. !ERROR Using the FOR_WIN10 option requires a value for PLATFORM.
  405. !ENDIF
  406. !ENDIF
  407. # This assumes that MSVC is always installed in 32-bit Program Files directory
  408. # and sets the variable for use in locating other 32-bit installs accordingly.
  409. #
  410. PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\..
  411. PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\)
  412. # Check for the predefined command macro CC. This should point to the compiler
  413. # binary for the target platform. If it is not defined, simply define it to
  414. # the legacy default value 'cl.exe'.
  415. #
  416. !IFNDEF CC
  417. CC = cl.exe
  418. !ENDIF
  419. # Check for the predefined command macro CSC. This should point to a working
  420. # C Sharp compiler binary. If it is not defined, simply define it to the
  421. # legacy default value 'csc.exe'.
  422. #
  423. !IFNDEF CSC
  424. CSC = csc.exe
  425. !ENDIF
  426. # Check for the command macro LD. This should point to the linker binary for
  427. # the target platform. If it is not defined, simply define it to the legacy
  428. # default value 'link.exe'.
  429. #
  430. !IFNDEF LD
  431. LD = link.exe
  432. !ENDIF
  433. # Check for the predefined command macro RC. This should point to the resource
  434. # compiler binary for the target platform. If it is not defined, simply define
  435. # it to the legacy default value 'rc.exe'.
  436. #
  437. !IFNDEF RC
  438. RC = rc.exe
  439. !ENDIF
  440. # Check for the MSVC runtime library path macro. Otherwise, this value will
  441. # default to the 'lib' directory underneath the MSVC installation directory.
  442. #
  443. !IFNDEF CRTLIBPATH
  444. CRTLIBPATH = $(VCINSTALLDIR)\lib
  445. !ENDIF
  446. CRTLIBPATH = $(CRTLIBPATH:\\=\)
  447. # Check for the command macro NCC. This should point to the compiler binary
  448. # for the platform the compilation process is taking place on. If it is not
  449. # defined, simply define it to have the same value as the CC macro. When
  450. # cross-compiling, it is suggested that this macro be modified via the command
  451. # line (since nmake itself does not provide a built-in method to guess it).
  452. # For example, to use the x86 compiler when cross-compiling for x64, a command
  453. # line similar to the following could be used (all on one line):
  454. #
  455. # nmake /f Makefile.msc sqlite3.dll
  456. # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
  457. #
  458. # Alternatively, the full path and file name to the compiler binary for the
  459. # platform the compilation process is taking place may be specified (all on
  460. # one line):
  461. #
  462. # nmake /f Makefile.msc sqlite3.dll
  463. # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
  464. # USE_NATIVE_LIBPATHS=1
  465. #
  466. !IFDEF NCC
  467. NCC = $(NCC:\\=\)
  468. !ELSEIF $(XCOMPILE)!=0
  469. NCC = "$(VCINSTALLDIR)\bin\$(CC)"
  470. NCC = $(NCC:\\=\)
  471. !ELSE
  472. NCC = $(CC)
  473. !ENDIF
  474. # Check for the MSVC native runtime library path macro. Otherwise,
  475. # this value will default to the 'lib' directory underneath the MSVC
  476. # installation directory.
  477. #
  478. !IFNDEF NCRTLIBPATH
  479. NCRTLIBPATH = $(VCINSTALLDIR)\lib
  480. !ENDIF
  481. NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
  482. # Check for the Platform SDK library path macro. Otherwise, this
  483. # value will default to the 'lib' directory underneath the Windows
  484. # SDK installation directory (the environment variable used appears
  485. # to be available when using Visual C++ 2008 or later via the
  486. # command line).
  487. #
  488. !IFNDEF NSDKLIBPATH
  489. NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
  490. !ENDIF
  491. NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
  492. # Check for the UCRT library path macro. Otherwise, this value will
  493. # default to the version-specific, platform-specific 'lib' directory
  494. # underneath the Windows SDK installation directory.
  495. #
  496. !IFNDEF UCRTLIBPATH
  497. UCRTLIBPATH = $(WINDOWSSDKDIR)\lib\$(WINDOWSSDKLIBVERSION)\ucrt\$(PLATFORM)
  498. !ENDIF
  499. UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
  500. # C compiler and options for use in building executables that
  501. # will run on the platform that is doing the build.
  502. #
  503. !IF $(USE_FULLWARN)!=0
  504. BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
  505. !ELSE
  506. BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
  507. !ENDIF
  508. # Check if assembly code listings should be generated for the source
  509. # code files to be compiled.
  510. #
  511. !IF $(USE_LISTINGS)!=0
  512. BCC = $(BCC) -FAcs
  513. !ENDIF
  514. # Check if the native library paths should be used when compiling
  515. # the command line tools used during the compilation process. If
  516. # so, set the necessary macro now.
  517. #
  518. !IF $(USE_NATIVE_LIBPATHS)!=0
  519. NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
  520. !IFDEF NUCRTLIBPATH
  521. NUCRTLIBPATH = $(NUCRTLIBPATH:\\=\)
  522. NLTLIBPATHS = $(NLTLIBPATHS) "/LIBPATH:$(NUCRTLIBPATH)"
  523. !ENDIF
  524. !ENDIF
  525. # C compiler and options for use in building executables that
  526. # will run on the target platform. (BCC and TCC are usually the
  527. # same unless your are cross-compiling.)
  528. #
  529. !IF $(USE_FULLWARN)!=0
  530. TCC = $(CC) -nologo -W4 -DINCLUDE_MSVC_H=1 $(CCOPTS) $(TCCOPTS)
  531. !ELSE
  532. TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
  533. !ENDIF
  534. # Check if warnings should be treated as errors when compiling.
  535. #
  536. !IF $(USE_FATAL_WARN)!=0
  537. TCC = $(TCC) -WX
  538. !ENDIF
  539. TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
  540. RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
  541. # Check if we want to use the "stdcall" calling convention when compiling.
  542. # This is not supported by the compilers for non-x86 platforms. It should
  543. # also be noted here that building any target with these "stdcall" options
  544. # will most likely fail if the Tcl library is also required. This is due
  545. # to how the Tcl library functions are declared and exported (i.e. without
  546. # an explicit calling convention, which results in "cdecl").
  547. #
  548. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  549. !IF "$(PLATFORM)"=="x86"
  550. CORE_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
  551. SHELL_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
  552. # <<mark>>
  553. TEST_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
  554. # <</mark>>
  555. !ELSE
  556. !IFNDEF PLATFORM
  557. CORE_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
  558. SHELL_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
  559. # <<mark>>
  560. TEST_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
  561. # <</mark>>
  562. !ELSE
  563. CORE_CCONV_OPTS =
  564. SHELL_CCONV_OPTS =
  565. # <<mark>>
  566. TEST_CCONV_OPTS =
  567. # <</mark>>
  568. !ENDIF
  569. !ENDIF
  570. !ELSE
  571. CORE_CCONV_OPTS =
  572. SHELL_CCONV_OPTS =
  573. # <<mark>>
  574. TEST_CCONV_OPTS =
  575. # <</mark>>
  576. !ENDIF
  577. # These are additional compiler options used for the core library.
  578. #
  579. !IFNDEF CORE_COMPILE_OPTS
  580. !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
  581. CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS) -DSQLITE_API=__declspec(dllexport)
  582. !ELSE
  583. CORE_COMPILE_OPTS = $(CORE_CCONV_OPTS)
  584. !ENDIF
  585. !ENDIF
  586. # These are the additional targets that the core library should depend on
  587. # when linking.
  588. #
  589. !IFNDEF CORE_LINK_DEP
  590. !IF $(DYNAMIC_SHELL)!=0
  591. CORE_LINK_DEP =
  592. !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
  593. CORE_LINK_DEP = sqlite3.def
  594. !ELSE
  595. CORE_LINK_DEP =
  596. !ENDIF
  597. !ENDIF
  598. # These are additional linker options used for the core library.
  599. #
  600. !IFNDEF CORE_LINK_OPTS
  601. !IF $(DYNAMIC_SHELL)!=0
  602. CORE_LINK_OPTS =
  603. !ELSEIF $(FOR_WIN10)==0 || "$(PLATFORM)"=="x86"
  604. CORE_LINK_OPTS = /DEF:sqlite3.def
  605. !ELSE
  606. CORE_LINK_OPTS =
  607. !ENDIF
  608. !ENDIF
  609. # These are additional compiler options used for the shell executable.
  610. #
  611. !IFNDEF SHELL_COMPILE_OPTS
  612. !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
  613. SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport)
  614. !ELSE
  615. SHELL_COMPILE_OPTS = $(SHELL_CCONV_OPTS)
  616. !ENDIF
  617. !ENDIF
  618. # This is the source code that the shell executable should be compiled
  619. # with.
  620. #
  621. !IFNDEF SHELL_CORE_SRC
  622. !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
  623. SHELL_CORE_SRC =
  624. # <<mark>>
  625. !ELSEIF $(USE_AMALGAMATION)==0
  626. SHELL_CORE_SRC =
  627. # <</mark>>
  628. !ELSE
  629. SHELL_CORE_SRC = $(SQLITE3C)
  630. !ENDIF
  631. !ENDIF
  632. # This is the core library that the shell executable should depend on.
  633. #
  634. !IFNDEF SHELL_CORE_DEP
  635. !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
  636. SHELL_CORE_DEP = $(SQLITE3DLL)
  637. # <<mark>>
  638. !ELSEIF $(USE_AMALGAMATION)==0
  639. SHELL_CORE_DEP = libsqlite3.lib
  640. # <</mark>>
  641. !ELSE
  642. SHELL_CORE_DEP =
  643. !ENDIF
  644. !ENDIF
  645. # <<mark>>
  646. # If zlib support is enabled, add the dependencies for it.
  647. #
  648. !IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
  649. SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
  650. TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
  651. !ENDIF
  652. # <</mark>>
  653. # This is the core library that the shell executable should link with.
  654. #
  655. !IFNDEF SHELL_CORE_LIB
  656. !IF $(DYNAMIC_SHELL)!=0 || $(FOR_WIN10)!=0
  657. SHELL_CORE_LIB = $(SQLITE3LIB)
  658. # <<mark>>
  659. !ELSEIF $(USE_AMALGAMATION)==0
  660. SHELL_CORE_LIB = libsqlite3.lib
  661. # <</mark>>
  662. !ELSE
  663. SHELL_CORE_LIB =
  664. !ENDIF
  665. !ENDIF
  666. # These are additional linker options used for the shell executable.
  667. #
  668. !IFNDEF SHELL_LINK_OPTS
  669. SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
  670. !ENDIF
  671. # Check if assembly code listings should be generated for the source
  672. # code files to be compiled.
  673. #
  674. !IF $(USE_LISTINGS)!=0
  675. TCC = $(TCC) -FAcs
  676. !ENDIF
  677. # When compiling the library for use in the WinRT environment,
  678. # the following compile-time options must be used as well to
  679. # disable use of Win32 APIs that are not available and to enable
  680. # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
  681. #
  682. !IF $(FOR_WINRT)!=0
  683. TCC = $(TCC) -DSQLITE_OS_WINRT=1
  684. RCC = $(RCC) -DSQLITE_OS_WINRT=1
  685. TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
  686. RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
  687. !ENDIF
  688. # C compiler options for the Windows 10 platform (needs MSVC 2015).
  689. #
  690. !IF $(FOR_WIN10)!=0
  691. TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
  692. BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
  693. !ENDIF
  694. # Also, we need to dynamically link to the correct MSVC runtime
  695. # when compiling for WinRT (e.g. debug or release) OR if the
  696. # USE_CRT_DLL option is set to force dynamically linking to the
  697. # MSVC runtime library.
  698. #
  699. !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
  700. !IF $(DEBUG)>1
  701. TCC = $(TCC) -MDd
  702. BCC = $(BCC) -MDd
  703. !ELSE
  704. TCC = $(TCC) -MD
  705. BCC = $(BCC) -MD
  706. !ENDIF
  707. !ELSE
  708. !IF $(DEBUG)>1
  709. TCC = $(TCC) -MTd
  710. BCC = $(BCC) -MTd
  711. !ELSE
  712. TCC = $(TCC) -MT
  713. BCC = $(BCC) -MT
  714. !ENDIF
  715. !ENDIF
  716. # <<mark>>
  717. # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
  718. # any extension header files by default. For non-amalgamation
  719. # builds, we need to make sure the compiler can find these.
  720. #
  721. !IF $(USE_AMALGAMATION)==0
  722. TCC = $(TCC) -I$(TOP)\ext\fts3
  723. RCC = $(RCC) -I$(TOP)\ext\fts3
  724. TCC = $(TCC) -I$(TOP)\ext\rtree
  725. RCC = $(RCC) -I$(TOP)\ext\rtree
  726. TCC = $(TCC) -I$(TOP)\ext\session
  727. RCC = $(RCC) -I$(TOP)\ext\session
  728. !ENDIF
  729. # The mksqlite3c.tcl script accepts some options on the command
  730. # line. When compiling with debugging enabled, some of these
  731. # options are necessary in order to allow debugging symbols to
  732. # work correctly with Visual Studio when using the amalgamation.
  733. #
  734. !IFNDEF MKSQLITE3C_TOOL
  735. !IF $(MINIMAL_AMALGAMATION)!=0
  736. MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c-noext.tcl
  737. !ELSE
  738. MKSQLITE3C_TOOL = $(TOP)\tool\mksqlite3c.tcl
  739. !ENDIF
  740. !ENDIF
  741. !IFNDEF MKSQLITE3C_ARGS
  742. !IF $(DEBUG)>1 && $(NO_LINEMACROS)==0
  743. MKSQLITE3C_ARGS = --linemacros=1
  744. !ELSE
  745. MKSQLITE3C_ARGS = --linemacros=0
  746. !ENDIF
  747. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  748. MKSQLITE3C_ARGS = $(MKSQLITE3C_ARGS) --useapicall
  749. !ENDIF
  750. !ENDIF
  751. # The mksqlite3h.tcl script accepts some options on the command line.
  752. # When compiling with stdcall support, some of these options are
  753. # necessary.
  754. #
  755. !IFNDEF MKSQLITE3H_ARGS
  756. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  757. MKSQLITE3H_ARGS = --useapicall
  758. !ELSE
  759. MKSQLITE3H_ARGS =
  760. !ENDIF
  761. !ENDIF
  762. # <</mark>>
  763. # Define -DNDEBUG to compile without debugging (i.e., for production usage)
  764. # Omitting the define will cause extra debugging code to be inserted and
  765. # includes extra comments when "EXPLAIN stmt" is used.
  766. #
  767. !IF $(DEBUG)==0
  768. TCC = $(TCC) -DNDEBUG
  769. BCC = $(BCC) -DNDEBUG
  770. RCC = $(RCC) -DNDEBUG
  771. !ENDIF
  772. !IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
  773. TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
  774. RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
  775. !ENDIF
  776. !IF $(DEBUG)>2
  777. TCC = $(TCC) -DSQLITE_DEBUG=1
  778. RCC = $(RCC) -DSQLITE_DEBUG=1
  779. !IF $(DYNAMIC_SHELL)==0
  780. TCC = $(TCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
  781. RCC = $(RCC) -DSQLITE_ENABLE_WHERETRACE -DSQLITE_ENABLE_SELECTTRACE
  782. !ENDIF
  783. !ENDIF
  784. !IF $(DEBUG)>4 || $(OSTRACE)!=0
  785. TCC = $(TCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
  786. RCC = $(RCC) -DSQLITE_FORCE_OS_TRACE=1 -DSQLITE_DEBUG_OS_TRACE=1
  787. !ENDIF
  788. !IF $(DEBUG)>5
  789. TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE=1
  790. RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE=1
  791. !ENDIF
  792. # Prevent warnings about "insecure" MSVC runtime library functions
  793. # being used.
  794. #
  795. TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
  796. BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
  797. RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
  798. # Prevent warnings about "deprecated" POSIX functions being used.
  799. #
  800. TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
  801. BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
  802. RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
  803. # Use the SQLite debugging heap subsystem?
  804. #
  805. !IF $(MEMDEBUG)!=0
  806. TCC = $(TCC) -DSQLITE_MEMDEBUG=1
  807. RCC = $(RCC) -DSQLITE_MEMDEBUG=1
  808. # Use native Win32 heap subsystem instead of malloc/free?
  809. #
  810. !ELSEIF $(WIN32HEAP)!=0
  811. TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
  812. RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
  813. # Validate the heap on every call into the native Win32 heap subsystem?
  814. #
  815. !IF $(DEBUG)>3
  816. TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
  817. RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
  818. !ENDIF
  819. !ENDIF
  820. # Address sanitizer if ASAN=1
  821. #
  822. !IF $(ASAN)>0
  823. TCC = $(TCC) /fsanitize=address
  824. !ENDIF
  825. # <<mark>>
  826. # The locations of the Tcl header and library files. Also, the library that
  827. # non-stubs enabled programs using Tcl must link against. These variables
  828. # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
  829. # prior to running nmake in order to match the actual installed location and
  830. # version on this machine.
  831. #
  832. !IF $(STATICALLY_LINK_TCL)!=0
  833. TCLSUFFIX = s
  834. !ENDIF
  835. !IFNDEF TCLSUFFIX
  836. TCLSUFFIX =
  837. !ENDIF
  838. !IFNDEF TCLDIR
  839. TCLDIR = C:\Tcl
  840. !ENDIF
  841. !IFNDEF TCLVERSION
  842. !IF EXISTS("$(TCLDIR)\lib\tcl90$(TCLSUFFIX).lib")
  843. TCLVERSION = 90
  844. !ELSEIF EXISTS("$(TCLDIR)\lib\tcl86$(TCLSUFFIX).lib")
  845. TCLVERSION = 86
  846. !ELSEIF EXISTS("$(TCLDIR)\lib\tcl86t.lib")
  847. TCLSUFFIX = t
  848. TCLVERSION = 86
  849. !ELSE
  850. TCLVERSION = 90
  851. !ENDIF
  852. !ENDIF
  853. !IFNDEF TCLINCDIR
  854. TCLINCDIR = $(TCLDIR)\include
  855. !ENDIF
  856. !IFNDEF TCLLIBDIR
  857. TCLLIBDIR = $(TCLDIR)\lib
  858. !ENDIF
  859. !IFNDEF LIBTCL
  860. LIBTCL = tcl$(TCLVERSION)$(TCLSUFFIX).lib
  861. !ENDIF
  862. !IFNDEF TCLLIBS
  863. !IF $(STATICALLY_LINK_TCL)!=0
  864. TCLLIBS = /NODEFAULTLIB:libucrt.lib netapi32.lib user32.lib ucrt.lib
  865. !ELSE
  866. TCLLIBS =
  867. !ENDIF
  868. !ENDIF
  869. !IFNDEF LIBTCLSTUB
  870. !IF EXISTS("$(TCLLIBDIR)\tclstub$(TCLSUFFIX).lib")
  871. LIBTCLSTUB = tclstub$(TCLSUFFIX).lib
  872. !ELSE
  873. LIBTCLSTUB = tclstub$(TCLVERSION)$(TCLSUFFIX).lib
  874. !ENDIF
  875. !ENDIF
  876. !IFNDEF LIBTCLPATH
  877. LIBTCLPATH = $(TCLDIR)\bin
  878. !ENDIF
  879. # The locations of the zlib header and library files. These variables
  880. # (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
  881. # prior to running nmake in order to match the actual installed (or source
  882. # code) location on this machine.
  883. #
  884. !IFNDEF ZLIBDIR
  885. ZLIBDIR = $(TOP)\compat\zlib
  886. !ENDIF
  887. !IFNDEF ZLIBINCDIR
  888. ZLIBINCDIR = $(ZLIBDIR)
  889. !ENDIF
  890. !IFNDEF ZLIBLIBDIR
  891. ZLIBLIBDIR = $(ZLIBDIR)
  892. !ENDIF
  893. !IFNDEF ZLIBLIB
  894. !IF $(DYNAMIC_SHELL)!=0
  895. ZLIBLIB = zdll.lib
  896. !ELSE
  897. ZLIBLIB = zlib.lib
  898. !ENDIF
  899. !ENDIF
  900. # The locations of the ICU header and library files. These variables
  901. # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
  902. # prior to running nmake in order to match the actual installed location on
  903. # this machine.
  904. #
  905. !IFNDEF ICUDIR
  906. ICUDIR = $(TOP)\compat\icu
  907. !ENDIF
  908. !IFNDEF ICUINCDIR
  909. ICUINCDIR = $(ICUDIR)\include
  910. !ENDIF
  911. !IFNDEF ICULIBDIR
  912. ICULIBDIR = $(ICUDIR)\lib
  913. !ENDIF
  914. !IFNDEF LIBICU
  915. LIBICU = icuuc.lib icuin.lib
  916. !ENDIF
  917. # This is the command to use for tclsh - normally just "tclsh", but we may
  918. # know the specific version we want to use. This variable (TCLSH_CMD) may be
  919. # overridden via the environment prior to running nmake in order to select a
  920. # specific Tcl shell to use.
  921. #
  922. !IFNDEF TCLSH_CMD
  923. !IF EXISTS("$(TCLDIR)\bin\tclsh$(TCLVERSION).exe")
  924. TCLSH_CMD = $(TCLDIR)\bin\tclsh$(TCLVERSION).exe
  925. !ELSEIF EXISTS("$(TCLDIR)\bin\tclsh90.exe")
  926. TCLSH_CMD = $(TCLDIR)\bin\tclsh90.exe
  927. !ELSEIF EXISTS("$(TCLDIR)\bin\tclsh86.exe")
  928. TCLSH_CMD = $(TCLDIR)\bin\tclsh86.exe
  929. !ELSEIF EXISTS("$(TCLDIR)\bin\tclsh86t.exe")
  930. TCLSH_CMD = $(TCLDIR)\bin\tclsh86t.exe
  931. !ELSEIF EXISTS("$(TCLDIR)\bin\tclsh.exe")
  932. TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
  933. !ELSE
  934. TCLSH_CMD = tclsh
  935. !ENDIF
  936. !ENDIF
  937. # A light-weight TCLSH replacement that can be used for code generation
  938. # but which is not adequate for testing. This is "jimsh0" by default,
  939. # with source code in the repository. To force the whole build to use
  940. # the full, official tclsh, add WITHOUT_JIMSH=1 to the nmake command line.
  941. #
  942. !IFDEF WITHOUT_JIMSH
  943. JIM_TCLSH = $(TCLSH_CMD)
  944. !ENDIF
  945. !IFNDEF JIM_TCLSH
  946. JIM_TCLSH = jimsh0.exe
  947. !ENDIF
  948. # <</mark>>
  949. # Compiler options needed for programs that use the readline() library.
  950. #
  951. !IFNDEF READLINE_FLAGS
  952. READLINE_FLAGS = -DHAVE_READLINE=0
  953. !ENDIF
  954. # The library that programs using readline() must link against.
  955. #
  956. !IFNDEF LIBREADLINE
  957. LIBREADLINE =
  958. !ENDIF
  959. # Should the database engine be compiled threadsafe
  960. #
  961. TCC = $(TCC) -DSQLITE_THREADSAFE=1
  962. RCC = $(RCC) -DSQLITE_THREADSAFE=1
  963. # Do threads override each others locks by default (1), or do we test (-1)
  964. #
  965. TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
  966. RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
  967. # Any target libraries which libsqlite must be linked against
  968. #
  969. !IFNDEF TLIBS
  970. TLIBS =
  971. !ENDIF
  972. # Flags controlling use of the in memory btree implementation
  973. #
  974. # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
  975. # default to file, 2 to default to memory, and 3 to force temporary
  976. # tables to always be in memory.
  977. #
  978. TCC = $(TCC) -DSQLITE_TEMP_STORE=1
  979. RCC = $(RCC) -DSQLITE_TEMP_STORE=1
  980. # Enable/disable loadable extensions, and other optional features
  981. # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
  982. # The same set of OMIT and ENABLE flags should be passed to the
  983. # LEMON parser generator and the mkkeywordhash tool as well.
  984. # These are the required SQLite compilation options used when compiling for
  985. # the Windows platform.
  986. #
  987. REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
  988. # If we are linking to the RPCRT4 library, enable features that need it.
  989. #
  990. !IF $(USE_RPCRT4_LIB)!=0
  991. REQ_FEATURE_FLAGS = $(REQ_FEATURE_FLAGS) -DSQLITE_WIN32_USE_UUID=1
  992. !ENDIF
  993. # Add the required and optional SQLite compilation options into the command
  994. # lines used to invoke the MSVC code and resource compilers.
  995. #
  996. TCC = $(TCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
  997. RCC = $(RCC) $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS)
  998. # Add in any optional parameters specified on the commane line, e.g.
  999. # nmake /f Makefile.msc all "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1"
  1000. #
  1001. TCC = $(TCC) $(OPTS)
  1002. RCC = $(RCC) $(OPTS)
  1003. # If compiling for debugging, add some defines.
  1004. #
  1005. !IF $(DEBUG)>1
  1006. TCC = $(TCC) -D_DEBUG
  1007. BCC = $(BCC) -D_DEBUG
  1008. RCC = $(RCC) -D_DEBUG
  1009. !ENDIF
  1010. # If optimizations are enabled or disabled (either implicitly or
  1011. # explicitly), add the necessary flags.
  1012. #
  1013. !IF $(DEBUG)>1 || $(OPTIMIZATIONS)==0
  1014. TCC = $(TCC) -Od
  1015. BCC = $(BCC) -Od
  1016. !IF $(USE_RUNTIME_CHECKS)!=0
  1017. TCC = $(TCC) -RTC1
  1018. BCC = $(BCC) -RTC1
  1019. !ENDIF
  1020. !ELSEIF $(OPTIMIZATIONS)>=3
  1021. TCC = $(TCC) -Ox
  1022. BCC = $(BCC) -Ox
  1023. !ELSEIF $(OPTIMIZATIONS)==2
  1024. TCC = $(TCC) -O2
  1025. BCC = $(BCC) -O2
  1026. !ELSEIF $(OPTIMIZATIONS)==1
  1027. TCC = $(TCC) -O1
  1028. BCC = $(BCC) -O1
  1029. !ENDIF
  1030. # If symbols are enabled (or compiling for debugging), enable PDBs.
  1031. #
  1032. !IF $(DEBUG)>1 || $(SYMBOLS)!=0
  1033. TCC = $(TCC) -Zi
  1034. BCC = $(BCC) -Zi
  1035. !ENDIF
  1036. # <<mark>>
  1037. # If zlib support is enabled, add the compiler options for it.
  1038. #
  1039. !IF $(USE_ZLIB)!=0
  1040. TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
  1041. RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
  1042. TCC = $(TCC) -I$(ZLIBINCDIR)
  1043. RCC = $(RCC) -I$(ZLIBINCDIR)
  1044. !ENDIF
  1045. # If ICU support is enabled, add the compiler options for it.
  1046. #
  1047. !IF $(USE_ICU)!=0
  1048. TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
  1049. RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
  1050. TCC = $(TCC) -I$(TOP)\ext\icu
  1051. RCC = $(RCC) -I$(TOP)\ext\icu
  1052. TCC = $(TCC) -I$(ICUINCDIR)
  1053. RCC = $(RCC) -I$(ICUINCDIR)
  1054. !ENDIF
  1055. # <</mark>>
  1056. # Command line prefixes for compiling code, compiling resources,
  1057. # linking, etc.
  1058. #
  1059. LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
  1060. LTRCOMPILE = $(RCC) -r
  1061. LTLIB = lib.exe
  1062. LTLINK = $(TCC) -Fe$@
  1063. # If requested, link to the RPCRT4 library.
  1064. #
  1065. !IF $(USE_RPCRT4_LIB)!=0
  1066. LTLIBS = $(LTLIBS) rpcrt4.lib
  1067. !ENDIF
  1068. # If a platform was set, force the linker to target that.
  1069. # Note that the vcvars*.bat family of batch files typically
  1070. # set this for you. Otherwise, the linker will attempt
  1071. # to deduce the binary type based on the object files.
  1072. !IFDEF PLATFORM
  1073. LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
  1074. LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
  1075. !ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
  1076. "$(VISUALSTUDIOVERSION)"=="14.0" || \
  1077. "$(VISUALSTUDIOVERSION)"=="15.0"
  1078. LTLINKOPTS = /NOLOGO /MACHINE:x86
  1079. LTLIBOPTS = /NOLOGO /MACHINE:x86
  1080. !ELSE
  1081. LTLINKOPTS = /NOLOGO
  1082. LTLIBOPTS = /NOLOGO
  1083. !ENDIF
  1084. # When compiling for use in the WinRT environment, the following
  1085. # linker option must be used to mark the executable as runnable
  1086. # only in the context of an application container.
  1087. #
  1088. !IF $(FOR_WINRT)!=0
  1089. LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
  1090. !IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
  1091. !IFNDEF STORELIBPATH
  1092. !IF "$(PLATFORM)"=="x86"
  1093. STORELIBPATH = $(CRTLIBPATH)\store
  1094. !ELSEIF "$(PLATFORM)"=="x64"
  1095. STORELIBPATH = $(CRTLIBPATH)\store\amd64
  1096. !ELSEIF "$(PLATFORM)"=="ARM"
  1097. STORELIBPATH = $(CRTLIBPATH)\store\arm
  1098. !ELSE
  1099. STORELIBPATH = $(CRTLIBPATH)\store
  1100. !ENDIF
  1101. !ENDIF
  1102. STORELIBPATH = $(STORELIBPATH:\\=\)
  1103. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
  1104. !ENDIF
  1105. !ENDIF
  1106. # When compiling for Windows Phone 8.1, an extra library path is
  1107. # required.
  1108. #
  1109. !IF $(USE_WP81_OPTS)!=0
  1110. !IFNDEF WP81LIBPATH
  1111. !IF "$(PLATFORM)"=="x86"
  1112. WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
  1113. !ELSEIF "$(PLATFORM)"=="ARM"
  1114. WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
  1115. !ELSE
  1116. WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
  1117. !ENDIF
  1118. !ENDIF
  1119. !ENDIF
  1120. # When compiling for Windows Phone 8.1, some extra linker options
  1121. # are also required.
  1122. #
  1123. !IF $(USE_WP81_OPTS)!=0
  1124. !IFDEF WP81LIBPATH
  1125. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
  1126. !ENDIF
  1127. LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
  1128. LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
  1129. LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
  1130. !ENDIF
  1131. # When compiling for UWP or the Windows 10 platform, some extra linker
  1132. # options are also required.
  1133. #
  1134. !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0
  1135. LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib
  1136. LTLINKOPTS = $(LTLINKOPTS) mincore.lib
  1137. !IFDEF PSDKLIBPATH
  1138. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)"
  1139. !ENDIF
  1140. !ENDIF
  1141. !IF $(FOR_WIN10)!=0
  1142. LTLINKOPTS = $(LTLINKOPTS) /guard:cf "/LIBPATH:$(UCRTLIBPATH)"
  1143. !IF $(DEBUG)>1
  1144. LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib
  1145. !ELSE
  1146. LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
  1147. !ENDIF
  1148. !ENDIF
  1149. # If either debugging or symbols are enabled, enable PDBs.
  1150. #
  1151. !IF $(DEBUG)>1 || $(SYMBOLS)!=0
  1152. LDFLAGS = /DEBUG $(LDOPTS)
  1153. !ELSE
  1154. LDFLAGS = $(LDOPTS)
  1155. !ENDIF
  1156. # <<mark>>
  1157. # Start with the Tcl related linker options.
  1158. #
  1159. !IF $(NO_TCL)==0
  1160. TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
  1161. TCLLIBS = $(TCLLIBS) $(LIBTCL)
  1162. !ENDIF
  1163. # If zlib support is enabled, add the linker options for it.
  1164. #
  1165. !IF $(USE_ZLIB)!=0
  1166. LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
  1167. LTLIBS = $(LTLIBS) $(ZLIBLIB)
  1168. !ENDIF
  1169. # If ICU support is enabled, add the linker options for it.
  1170. #
  1171. !IF $(USE_ICU)!=0
  1172. LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
  1173. LTLIBS = $(LTLIBS) $(LIBICU)
  1174. !ENDIF
  1175. # <</mark>>
  1176. # You should not have to change anything below this line
  1177. ###############################################################################
  1178. # <<mark>>
  1179. # Object files for the SQLite library (non-amalgamation).
  1180. #
  1181. LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
  1182. backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
  1183. callback.lo complete.lo ctime.lo \
  1184. date.lo dbpage.lo dbstat.lo delete.lo \
  1185. expr.lo fault.lo fkey.lo \
  1186. fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
  1187. fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
  1188. fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
  1189. fts5.lo \
  1190. func.lo global.lo hash.lo \
  1191. icu.lo insert.lo json.lo legacy.lo loadext.lo \
  1192. main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
  1193. memdb.lo memjournal.lo \
  1194. mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
  1195. notify.lo opcodes.lo os.lo os_kv.lo os_unix.lo os_win.lo \
  1196. pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
  1197. random.lo resolve.lo rowset.lo rtree.lo \
  1198. sqlite3session.lo select.lo sqlite3rbu.lo status.lo stmt.lo \
  1199. table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
  1200. update.lo upsert.lo util.lo vacuum.lo \
  1201. vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
  1202. vdbetrace.lo vdbevtab.lo wal.lo walker.lo where.lo wherecode.lo \
  1203. whereexpr.lo \
  1204. window.lo utf.lo vtab.lo
  1205. # <</mark>>
  1206. # Object files for the amalgamation.
  1207. #
  1208. LIBOBJS1 = sqlite3.lo
  1209. # Determine the real value of LIBOBJ based on the 'configure' script
  1210. #
  1211. # <<mark>>
  1212. !IF $(USE_AMALGAMATION)==0
  1213. LIBOBJ = $(LIBOBJS0)
  1214. !ELSE
  1215. # <</mark>>
  1216. LIBOBJ = $(LIBOBJS1)
  1217. # <<mark>>
  1218. !ENDIF
  1219. # <</mark>>
  1220. # Determine if embedded resource compilation and usage are enabled.
  1221. #
  1222. !IF $(USE_RC)!=0
  1223. LIBRESOBJS = sqlite3res.lo
  1224. !ELSE
  1225. LIBRESOBJS =
  1226. !ENDIF
  1227. # <<mark>>
  1228. # Core source code files, part 1.
  1229. #
  1230. SRC00 = \
  1231. $(TOP)\src\alter.c \
  1232. $(TOP)\src\analyze.c \
  1233. $(TOP)\src\attach.c \
  1234. $(TOP)\src\auth.c \
  1235. $(TOP)\src\backup.c \
  1236. $(TOP)\src\bitvec.c \
  1237. $(TOP)\src\btmutex.c \
  1238. $(TOP)\src\btree.c \
  1239. $(TOP)\src\build.c \
  1240. $(TOP)\src\callback.c \
  1241. $(TOP)\src\complete.c \
  1242. $(TOP)\src\ctime.c \
  1243. $(TOP)\src\date.c \
  1244. $(TOP)\src\dbpage.c \
  1245. $(TOP)\src\dbstat.c \
  1246. $(TOP)\src\delete.c \
  1247. $(TOP)\src\expr.c \
  1248. $(TOP)\src\fault.c \
  1249. $(TOP)\src\fkey.c \
  1250. $(TOP)\src\func.c \
  1251. $(TOP)\src\global.c \
  1252. $(TOP)\src\hash.c \
  1253. $(TOP)\src\insert.c \
  1254. $(TOP)\src\json.c \
  1255. $(TOP)\src\legacy.c \
  1256. $(TOP)\src\loadext.c \
  1257. $(TOP)\src\main.c \
  1258. $(TOP)\src\malloc.c \
  1259. $(TOP)\src\mem0.c \
  1260. $(TOP)\src\mem1.c \
  1261. $(TOP)\src\mem2.c \
  1262. $(TOP)\src\mem3.c \
  1263. $(TOP)\src\mem5.c \
  1264. $(TOP)\src\memdb.c \
  1265. $(TOP)\src\memjournal.c \
  1266. $(TOP)\src\mutex.c \
  1267. $(TOP)\src\mutex_noop.c \
  1268. $(TOP)\src\mutex_unix.c \
  1269. $(TOP)\src\mutex_w32.c \
  1270. $(TOP)\src\notify.c \
  1271. $(TOP)\src\os.c \
  1272. $(TOP)\src\os_kv.c \
  1273. $(TOP)\src\os_unix.c \
  1274. $(TOP)\src\os_win.c
  1275. # Core source code files, part 2.
  1276. #
  1277. SRC01 = \
  1278. $(TOP)\src\pager.c \
  1279. $(TOP)\src\pcache.c \
  1280. $(TOP)\src\pcache1.c \
  1281. $(TOP)\src\pragma.c \
  1282. $(TOP)\src\prepare.c \
  1283. $(TOP)\src\printf.c \
  1284. $(TOP)\src\random.c \
  1285. $(TOP)\src\resolve.c \
  1286. $(TOP)\src\rowset.c \
  1287. $(TOP)\src\select.c \
  1288. $(TOP)\src\status.c \
  1289. $(TOP)\src\table.c \
  1290. $(TOP)\src\threads.c \
  1291. $(TOP)\src\tclsqlite.c \
  1292. $(TOP)\src\tokenize.c \
  1293. $(TOP)\src\treeview.c \
  1294. $(TOP)\src\trigger.c \
  1295. $(TOP)\src\utf.c \
  1296. $(TOP)\src\update.c \
  1297. $(TOP)\src\upsert.c \
  1298. $(TOP)\src\util.c \
  1299. $(TOP)\src\vacuum.c \
  1300. $(TOP)\src\vdbe.c \
  1301. $(TOP)\src\vdbeapi.c \
  1302. $(TOP)\src\vdbeaux.c \
  1303. $(TOP)\src\vdbeblob.c \
  1304. $(TOP)\src\vdbemem.c \
  1305. $(TOP)\src\vdbesort.c \
  1306. $(TOP)\src\vdbetrace.c \
  1307. $(TOP)\src\vdbevtab.c \
  1308. $(TOP)\src\vtab.c \
  1309. $(TOP)\src\wal.c \
  1310. $(TOP)\src\walker.c \
  1311. $(TOP)\src\where.c \
  1312. $(TOP)\src\wherecode.c \
  1313. $(TOP)\src\whereexpr.c \
  1314. $(TOP)\src\window.c
  1315. # Core miscellaneous files.
  1316. #
  1317. SRC03 = \
  1318. $(TOP)\src\parse.y
  1319. # Core header files, part 1.
  1320. #
  1321. SRC04 = \
  1322. $(TOP)\src\btree.h \
  1323. $(TOP)\src\btreeInt.h \
  1324. $(TOP)\src\hash.h \
  1325. $(TOP)\src\hwtime.h \
  1326. $(TOP)\src\msvc.h \
  1327. $(TOP)\src\mutex.h \
  1328. $(TOP)\src\os.h \
  1329. $(TOP)\src\os_common.h \
  1330. $(TOP)\src\os_setup.h \
  1331. $(TOP)\src\os_win.h
  1332. # Core header files, part 2.
  1333. #
  1334. SRC05 = \
  1335. $(TOP)\src\pager.h \
  1336. $(TOP)\src\pcache.h \
  1337. $(TOP)\src\pragma.h \
  1338. $(TOP)\src\sqlite.h.in \
  1339. $(TOP)\src\sqlite3ext.h \
  1340. $(TOP)\src\sqliteInt.h \
  1341. $(TOP)\src\sqliteLimit.h \
  1342. $(TOP)\src\vdbe.h \
  1343. $(TOP)\src\vdbeInt.h \
  1344. $(TOP)\src\vxworks.h \
  1345. $(TOP)\src\wal.h \
  1346. $(TOP)\src\whereInt.h
  1347. # Extension source code files, part 2.
  1348. #
  1349. SRC07 = \
  1350. $(TOP)\ext\fts3\fts3.c \
  1351. $(TOP)\ext\fts3\fts3_aux.c \
  1352. $(TOP)\ext\fts3\fts3_expr.c \
  1353. $(TOP)\ext\fts3\fts3_hash.c \
  1354. $(TOP)\ext\fts3\fts3_icu.c \
  1355. $(TOP)\ext\fts3\fts3_porter.c \
  1356. $(TOP)\ext\fts3\fts3_snippet.c \
  1357. $(TOP)\ext\fts3\fts3_tokenizer.c \
  1358. $(TOP)\ext\fts3\fts3_tokenizer1.c \
  1359. $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
  1360. $(TOP)\ext\fts3\fts3_unicode.c \
  1361. $(TOP)\ext\fts3\fts3_unicode2.c \
  1362. $(TOP)\ext\fts3\fts3_write.c \
  1363. $(TOP)\ext\icu\icu.c \
  1364. $(TOP)\ext\rtree\rtree.c \
  1365. $(TOP)\ext\session\sqlite3session.c \
  1366. $(TOP)\ext\rbu\sqlite3rbu.c \
  1367. $(TOP)\ext\misc\stmt.c
  1368. # Extension header files, part 2.
  1369. #
  1370. SRC09 = \
  1371. $(TOP)\ext\fts3\fts3.h \
  1372. $(TOP)\ext\fts3\fts3Int.h \
  1373. $(TOP)\ext\fts3\fts3_hash.h \
  1374. $(TOP)\ext\fts3\fts3_tokenizer.h \
  1375. $(TOP)\ext\icu\sqliteicu.h \
  1376. $(TOP)\ext\rtree\rtree.h \
  1377. $(TOP)\ext\rtree\geopoly.c \
  1378. $(TOP)\ext\rbu\sqlite3rbu.h \
  1379. $(TOP)\ext\session\sqlite3session.h
  1380. # Generated source code files
  1381. #
  1382. SRC10 = \
  1383. opcodes.c \
  1384. parse.c
  1385. # Generated header files
  1386. #
  1387. SRC11 = \
  1388. keywordhash.h \
  1389. opcodes.h \
  1390. parse.h \
  1391. shell.c \
  1392. $(SQLITE3H)
  1393. # Generated Tcl header files
  1394. #
  1395. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  1396. SRC12 = \
  1397. $(SQLITETCLH) \
  1398. $(SQLITETCLDECLSH)
  1399. !ELSE
  1400. SRC12 =
  1401. !ENDIF
  1402. # All source code files.
  1403. #
  1404. SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC07) $(SRC09) $(SRC10) $(SRC11) $(SRC12)
  1405. # Source code to the test files.
  1406. #
  1407. TESTSRC = \
  1408. $(TOP)\src\test1.c \
  1409. $(TOP)\src\test2.c \
  1410. $(TOP)\src\test3.c \
  1411. $(TOP)\src\test4.c \
  1412. $(TOP)\src\test5.c \
  1413. $(TOP)\src\test6.c \
  1414. $(TOP)\src\test8.c \
  1415. $(TOP)\src\test9.c \
  1416. $(TOP)\src\test_autoext.c \
  1417. $(TOP)\src\test_backup.c \
  1418. $(TOP)\src\test_bestindex.c \
  1419. $(TOP)\src\test_blob.c \
  1420. $(TOP)\src\test_btree.c \
  1421. $(TOP)\src\test_config.c \
  1422. $(TOP)\src\test_delete.c \
  1423. $(TOP)\src\test_demovfs.c \
  1424. $(TOP)\src\test_devsym.c \
  1425. $(TOP)\src\test_fs.c \
  1426. $(TOP)\src\test_func.c \
  1427. $(TOP)\src\test_hexio.c \
  1428. $(TOP)\src\test_init.c \
  1429. $(TOP)\src\test_intarray.c \
  1430. $(TOP)\src\test_journal.c \
  1431. $(TOP)\src\test_malloc.c \
  1432. $(TOP)\src\test_md5.c \
  1433. $(TOP)\src\test_multiplex.c \
  1434. $(TOP)\src\test_mutex.c \
  1435. $(TOP)\src\test_onefile.c \
  1436. $(TOP)\src\test_osinst.c \
  1437. $(TOP)\src\test_pcache.c \
  1438. $(TOP)\src\test_quota.c \
  1439. $(TOP)\src\test_rtree.c \
  1440. $(TOP)\src\test_schema.c \
  1441. $(TOP)\src\test_superlock.c \
  1442. $(TOP)\src\test_syscall.c \
  1443. $(TOP)\src\test_tclsh.c \
  1444. $(TOP)\src\test_tclvar.c \
  1445. $(TOP)\src\test_thread.c \
  1446. $(TOP)\src\test_vdbecov.c \
  1447. $(TOP)\src\test_vfs.c \
  1448. $(TOP)\src\test_windirent.c \
  1449. $(TOP)\src\test_window.c \
  1450. $(TOP)\src\test_wsd.c \
  1451. $(TOP)\ext\fts3\fts3_term.c \
  1452. $(TOP)\ext\fts3\fts3_test.c \
  1453. $(TOP)\ext\rbu\test_rbu.c \
  1454. $(TOP)\ext\session\test_session.c
  1455. # Statically linked extensions.
  1456. #
  1457. TESTEXT = \
  1458. $(TOP)\ext\expert\sqlite3expert.c \
  1459. $(TOP)\ext\expert\test_expert.c \
  1460. $(TOP)\ext\misc\amatch.c \
  1461. $(TOP)\ext\misc\appendvfs.c \
  1462. $(TOP)\ext\misc\basexx.c \
  1463. $(TOP)\ext\misc\carray.c \
  1464. $(TOP)\ext\misc\cksumvfs.c \
  1465. $(TOP)\ext\misc\closure.c \
  1466. $(TOP)\ext\misc\csv.c \
  1467. $(TOP)\ext\misc\decimal.c \
  1468. $(TOP)\ext\misc\eval.c \
  1469. $(TOP)\ext\misc\explain.c \
  1470. $(TOP)\ext\misc\fileio.c \
  1471. $(TOP)\ext\misc\fuzzer.c \
  1472. $(TOP)\ext\fts5\fts5_tcl.c \
  1473. $(TOP)\ext\fts5\fts5_test_mi.c \
  1474. $(TOP)\ext\fts5\fts5_test_tok.c \
  1475. $(TOP)\ext\misc\ieee754.c \
  1476. $(TOP)\ext\misc\mmapwarm.c \
  1477. $(TOP)\ext\misc\nextchar.c \
  1478. $(TOP)\ext\misc\normalize.c \
  1479. $(TOP)\ext\misc\percentile.c \
  1480. $(TOP)\ext\misc\prefixes.c \
  1481. $(TOP)\ext\misc\qpvtab.c \
  1482. $(TOP)\ext\misc\randomjson.c \
  1483. $(TOP)\ext\misc\regexp.c \
  1484. $(TOP)\ext\misc\remember.c \
  1485. $(TOP)\ext\misc\series.c \
  1486. $(TOP)\ext\misc\spellfix.c \
  1487. $(TOP)\ext\misc\stmtrand.c \
  1488. $(TOP)\ext\misc\totype.c \
  1489. $(TOP)\ext\misc\unionvtab.c \
  1490. $(TOP)\ext\misc\wholenumber.c \
  1491. $(TOP)\ext\rtree\test_rtreedoc.c \
  1492. $(TOP)\ext\recover\sqlite3recover.c \
  1493. $(TOP)\ext\recover\test_recover.c \
  1494. $(TOP)\ext\intck\test_intck.c \
  1495. $(TOP)\ext\intck\sqlite3intck.c \
  1496. $(TOP)\ext\recover\dbdata.c
  1497. # If use of zlib is enabled, add the "zipfile.c" source file.
  1498. #
  1499. !IF $(USE_ZLIB)!=0
  1500. TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
  1501. !ENDIF
  1502. # Source code to the library files needed by the test fixture
  1503. # (non-amalgamation)
  1504. #
  1505. TESTSRC2 = \
  1506. $(SRC00) \
  1507. $(SRC01) \
  1508. $(SRC07) \
  1509. $(SRC10) \
  1510. fts5.c
  1511. # Header files used by all library source files.
  1512. #
  1513. HDR = \
  1514. $(TOP)\src\btree.h \
  1515. $(TOP)\src\btreeInt.h \
  1516. $(TOP)\src\hash.h \
  1517. $(TOP)\src\hwtime.h \
  1518. keywordhash.h \
  1519. $(TOP)\src\msvc.h \
  1520. $(TOP)\src\mutex.h \
  1521. opcodes.h \
  1522. $(TOP)\src\os.h \
  1523. $(TOP)\src\os_common.h \
  1524. $(TOP)\src\os_setup.h \
  1525. $(TOP)\src\os_win.h \
  1526. $(TOP)\src\pager.h \
  1527. $(TOP)\src\pcache.h \
  1528. parse.h \
  1529. $(TOP)\src\pragma.h \
  1530. $(SQLITE3H) \
  1531. sqlite3ext.h \
  1532. $(TOP)\src\sqliteInt.h \
  1533. $(TOP)\src\sqliteLimit.h \
  1534. $(TOP)\src\vdbe.h \
  1535. $(TOP)\src\vdbeInt.h \
  1536. $(TOP)\src\vxworks.h \
  1537. $(TOP)\src\whereInt.h
  1538. # Header files used by extensions
  1539. #
  1540. EXTHDR = $(EXTHDR) \
  1541. $(TOP)\ext\fts3\fts3.h \
  1542. $(TOP)\ext\fts3\fts3Int.h \
  1543. $(TOP)\ext\fts3\fts3_hash.h \
  1544. $(TOP)\ext\fts3\fts3_tokenizer.h
  1545. EXTHDR = $(EXTHDR) \
  1546. $(TOP)\ext\rtree\rtree.h \
  1547. $(TOP)\ext\rtree\geopoly.c
  1548. EXTHDR = $(EXTHDR) \
  1549. $(TOP)\ext\icu\sqliteicu.h
  1550. EXTHDR = $(EXTHDR) \
  1551. $(TOP)\ext\rtree\sqlite3rtree.h
  1552. EXTHDR = $(EXTHDR) \
  1553. $(TOP)\ext\session\sqlite3session.h
  1554. # executables needed for testing
  1555. #
  1556. TESTPROGS = \
  1557. testfixture.exe \
  1558. $(SQLITE3EXE) \
  1559. sqlite3_analyzer.exe \
  1560. sqlite3_checker.exe \
  1561. sqldiff.exe \
  1562. dbhash.exe \
  1563. sqltclsh.exe
  1564. # Databases containing fuzzer test cases
  1565. #
  1566. FUZZDATA = \
  1567. $(TOP)\test\fuzzdata1.db \
  1568. $(TOP)\test\fuzzdata2.db \
  1569. $(TOP)\test\fuzzdata3.db \
  1570. $(TOP)\test\fuzzdata4.db \
  1571. $(TOP)\test\fuzzdata5.db \
  1572. $(TOP)\test\fuzzdata6.db \
  1573. $(TOP)\test\fuzzdata7.db \
  1574. $(TOP)\test\fuzzdata8.db
  1575. # <</mark>>
  1576. # Additional compiler options for the shell. These are only effective
  1577. # when the shell is not being dynamically linked.
  1578. #
  1579. !IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
  1580. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_DQS=0
  1581. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
  1582. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
  1583. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
  1584. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1
  1585. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_STMT_SCANSTATUS=1
  1586. SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_STRICT_SUBTYPE=1
  1587. !ENDIF
  1588. # <<mark>>
  1589. # Extra compiler options for various test tools.
  1590. #
  1591. MPTESTER_COMPILE_OPTS = -DSQLITE_ENABLE_FTS5
  1592. FUZZERSHELL_COMPILE_OPTS =
  1593. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -I$(TOP)\test -I$(TOP)\ext\recover
  1594. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MEMSYS5
  1595. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OSS_FUZZ
  1596. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
  1597. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB
  1598. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
  1599. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
  1600. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DESERIALIZE
  1601. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
  1602. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS3_PARENTHESIS
  1603. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
  1604. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS5
  1605. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
  1606. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MATH_FUNCTIONS
  1607. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_MEMSYS5
  1608. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_NORMALIZE
  1609. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC
  1610. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_PREUPDATE_HOOK
  1611. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
  1612. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_SESSION
  1613. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STMTVTAB
  1614. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
  1615. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STAT4
  1616. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_STMT_SCANSTATUS
  1617. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MEMORY=50000000
  1618. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MMAP_SIZE=0
  1619. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION
  1620. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRINTF_PRECISION_LIMIT=1000
  1621. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRIVATE=""
  1622. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_STRICT_SUBTYPE=1
  1623. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_STATIC_RANDOMJSON
  1624. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_MAX_MEMORY=50000000
  1625. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_PRINTF_PRECISION_LIMIT=1000
  1626. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION
  1627. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS4
  1628. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_FTS5
  1629. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_RTREE
  1630. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
  1631. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
  1632. FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
  1633. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\fuzzcheck.c
  1634. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\ossfuzz.c
  1635. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\fuzzinvariants.c
  1636. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\test\vt02.c
  1637. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\recover\dbdata.c
  1638. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\recover\sqlite3recover.c
  1639. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\misc\percentile.c
  1640. FUZZCHECK_SRC = $(FUZZCHECK_SRC) $(TOP)\ext\misc\randomjson.c
  1641. OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
  1642. DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
  1643. KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ
  1644. ST_COMPILE_OPTS = -DSQLITE_THREADSAFE=0
  1645. # Standard options to testfixture.
  1646. #
  1647. TESTOPTS = --verbose=file --output=test-out.txt
  1648. # Extra targets for the "all" target that require Tcl.
  1649. #
  1650. !IF $(NO_TCL)==0
  1651. ALL_TCL_TARGETS = $(SQLITE3TCLDLL)
  1652. !ELSE
  1653. ALL_TCL_TARGETS =
  1654. !ENDIF
  1655. # <</mark>>
  1656. # This is the default Makefile target. The objects listed here
  1657. # are what get build when you type just "make" with no arguments.
  1658. #
  1659. core: dll libsqlite3.lib shell
  1660. # Targets that require the Tcl library.
  1661. #
  1662. tcl: $(ALL_TCL_TARGETS)
  1663. # This Makefile target builds all of the standard binaries.
  1664. #
  1665. all: core tcl
  1666. # Dynamic link library section.
  1667. #
  1668. dll: $(SQLITE3DLL)
  1669. # Shell executable.
  1670. #
  1671. shell: $(SQLITE3EXE)
  1672. # jimsh0 - replacement for tclsh
  1673. #
  1674. jimsh0.exe: $(TOP)\autosetup\jimsh0.c
  1675. cl -DHAVE__FULLPATH=1 $(TOP)\autosetup\jimsh0.c
  1676. # <<mark>>
  1677. libsqlite3.lib: $(LIBOBJ)
  1678. $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
  1679. libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
  1680. $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
  1681. tclsqlite3.def: tclsqlite.lo
  1682. echo EXPORTS > tclsqlite3.def
  1683. dumpbin /all tclsqlite.lo \
  1684. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+/EXPORT:_?((?:Sqlite3|Tclsqlite3)_[^@]*)(?:@\d+)?$$" \1 \
  1685. | sort >> tclsqlite3.def
  1686. pkgIndex.tcl: $(TOP)\VERSION
  1687. for /F %%V in ('type "$(TOP)\VERSION"') do ( \
  1688. echo package ifneeded sqlite3 @version@ [list load [file join $$dir $(SQLITE3TCLDLL)] Sqlite3] \
  1689. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact @version@ %%V > pkgIndex.tcl \
  1690. )
  1691. $(SQLITE3TCLDLL): libtclsqlite3.lib $(LIBRESOBJS) tclsqlite3.def pkgIndex.tcl
  1692. $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:tclsqlite3.def /OUT:$@ libtclsqlite3.lib $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1693. tclextension: $(SQLITE3TCLDLL)
  1694. tclextension-install: $(SQLITE3TCLDLL)
  1695. $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --install-only
  1696. tclextension-uninstall:
  1697. $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --uninstall
  1698. tclextension-list:
  1699. $(TCLSH_CMD) $(TOP)\tool\buildtclext.tcl --info
  1700. # <</mark>>
  1701. $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
  1702. $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1703. # <<block2>>
  1704. sqlite3.def: libsqlite3.lib $(JIM_TCLSH)
  1705. echo EXPORTS > sqlite3.def
  1706. dumpbin /all libsqlite3.lib \
  1707. | $(JIM_TCLSH) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \
  1708. | sort >> sqlite3.def
  1709. # <</block2>>
  1710. $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)
  1711. $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) shell.c $(SHELL_CORE_SRC) \
  1712. /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
  1713. # <<mark>>
  1714. sqldiff.exe: $(TOP)\tool\sqldiff.c $(TOP)\ext\misc\sqlite3_stdio.h $(TOP)\ext\misc\sqlite3_stdio.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
  1715. $(LTLINK) $(NO_WARN) -I$(TOP)\ext\misc $(TOP)\tool\sqldiff.c $(TOP)\ext\misc\sqlite3_stdio.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LIBRESOBJS)
  1716. dbhash.exe: $(TOP)\tool\dbhash.c $(SQLITE3C) $(SQLITE3H)
  1717. $(LTLINK) $(NO_WARN) $(TOP)\tool\dbhash.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1718. RSYNC_SRC = \
  1719. $(TOP)\tool\sqlite3_rsync.c \
  1720. $(SQLITE3C)
  1721. RSYNC_OPT = \
  1722. -DSQLITE_ENABLE_DBPAGE_VTAB \
  1723. -DSQLITE_THREADSAFE=0 \
  1724. -DSQLITE_OMIT_LOAD_EXTENSION \
  1725. -DSQLITE_OMIT_DEPRECATED
  1726. sqlite3_rsync.exe: $(RSYNC_SRC) $(LIBRESOBJS)
  1727. $(LTLINK) $(RSYNC_OPT) $(NO_WARN) $(RSYNC_SRC) /link $(LDFLAGS) $(LTLINKOPTS) $(LIBRESOBJS)
  1728. scrub.exe: $(TOP)\ext\misc\scrub.c $(SQLITE3C) $(SQLITE3H)
  1729. $(LTLINK) $(NO_WARN) -DSCRUB_STANDALONE=1 $(TOP)\ext\misc\scrub.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1730. srcck1.exe: $(TOP)\tool\srcck1.c
  1731. $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
  1732. sourcetest: srcck1.exe $(SQLITE3C)
  1733. srcck1.exe $(SQLITE3C)
  1734. src-verify.exe: $(TOP)\tool\src-verify.c
  1735. $(LTLINK) $(NO_WARN) $(TOP)\tool\src-verify.c
  1736. verify-source: src-verify.exe
  1737. src-verify.exe $(TOP)
  1738. fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
  1739. $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1740. dbfuzz.exe: $(TOP)\test\dbfuzz.c $(SQLITE3C) $(SQLITE3H)
  1741. $(LTLINK) $(NO_WARN) $(DBFUZZ_COMPILE_OPTS) $(TOP)\test\dbfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1742. fuzzcheck.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
  1743. $(LTLINK) /F 8388608 $(NO_WARN) $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1744. fuzzcheck-asan.exe: $(FUZZCHECK_SRC) $(SQLITE3C) $(SQLITE3H)
  1745. $(LTLINK) $(NO_WARN) /fsanitize=address $(FUZZCHECK_OPTS) $(FUZZCHECK_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1746. run-fuzzcheck: fuzzcheck.exe fuzzcheck-asan.exe
  1747. fuzzcheck --spinner $(FUZZDB)
  1748. fuzzcheck-asan --spinner $(FUZZDB)
  1749. ossshell.exe: $(OSSSHELL_SRC) $(SQLITE3C) $(SQLITE3H)
  1750. $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPTS) $(OSSSHELL_SRC) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1751. sessionfuzz.exe: zlib $(TOP)\test\sessionfuzz.c $(SQLITE3C) $(SQLITE3H)
  1752. $(LTLINK) $(NO_WARN) -I$(ZLIBINCDIR) $(TOP)\test\sessionfuzz.c /link $(LDFLAGS) $(LTLINKOPTS) /LIBPATH:$(ZLIBLIBDIR) $(ZLIBLIB)
  1753. mptester.exe: $(TOP)\mptest\mptest.c $(SQLITE3C) $(SQLITE3H)
  1754. $(LTLINK) $(NO_WARN) $(MPTESTER_COMPILE_OPTS) $(TOP)\mptest\mptest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  1755. MPTEST1 = mptester mptest.db $(TOP)\mptest\crash01.test --repeat 20
  1756. MPTEST2 = mptester mptest.db $(TOP)\mptest\multiwrite01.test --repeat 20
  1757. mptest: mptester.exe
  1758. del /Q mptest.db 2>NUL
  1759. $(MPTEST1) --journalmode DELETE
  1760. $(MPTEST2) --journalmode WAL
  1761. $(MPTEST1) --journalmode WAL
  1762. $(MPTEST2) --journalmode PERSIST
  1763. $(MPTEST1) --journalmode PERSIST
  1764. $(MPTEST2) --journalmode TRUNCATE
  1765. $(MPTEST1) --journalmode TRUNCATE
  1766. $(MPTEST2) --journalmode DELETE
  1767. # This target creates a directory named "tsrc" and fills it with
  1768. # copies of all of the C source code and header files needed to
  1769. # build on the target system. Some of the C source code and header
  1770. # files are automatically generated. This target takes care of
  1771. # all that automatic generation.
  1772. #
  1773. .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c $(SQLITE_TCL_DEP) $(JIM_TCLSH)
  1774. -rmdir /Q/S tsrc 2>NUL
  1775. -mkdir tsrc
  1776. $(JIM_TCLSH) $(TOP)\tool\cp.tcl $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC07) $(SRC09) $(SRC10) $(SRC11) $(SRC12) fts5.c fts5.h tsrc
  1777. copy /B tsrc\fts5.c +,,
  1778. copy /B tsrc\fts5.h +,,
  1779. del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
  1780. $(JIM_TCLSH) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
  1781. move vdbe.new tsrc\vdbe.c
  1782. echo > .target_source
  1783. sqlite3.c: .target_source sqlite3ext.h sqlite3session.h $(MKSQLITE3C_TOOL) src-verify.exe $(JIM_TCLSH)
  1784. $(JIM_TCLSH) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS) $(EXTRA_SRC)
  1785. sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl $(JIM_TCLSH)
  1786. $(JIM_TCLSH) $(TOP)\tool\split-sqlite3c.tcl
  1787. # <</mark>>
  1788. # Rule to build the amalgamation
  1789. #
  1790. sqlite3.lo: $(SQLITE3C)
  1791. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(SQLITE3C)
  1792. # <<mark>>
  1793. # Rules to build the LEMON compiler generator
  1794. #
  1795. lempar.c: $(TOP)\tool\lempar.c
  1796. copy /Y $(TOP)\tool\lempar.c .
  1797. copy /B lempar.c +,,
  1798. lemon.exe: $(TOP)\tool\lemon.c lempar.c
  1799. $(BCC) $(NO_WARN) -Daccess=_access \
  1800. -Fe$@ $(TOP)\tool\lemon.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
  1801. # <<mark>>
  1802. # Rules to build the source-id generator tool
  1803. #
  1804. mksourceid.exe: $(TOP)\tool\mksourceid.c
  1805. $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\mksourceid.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
  1806. # Rules to build individual *.lo files from generated *.c files. This
  1807. # applies to:
  1808. #
  1809. # parse.lo
  1810. # opcodes.lo
  1811. #
  1812. parse.lo: parse.c $(HDR)
  1813. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c parse.c
  1814. opcodes.lo: opcodes.c
  1815. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
  1816. # <</mark>>
  1817. # Rule to build the Win32 resources object file.
  1818. #
  1819. !IF $(USE_RC)!=0
  1820. # <<block1>>
  1821. $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H) $(TOP)\VERSION $(JIM_TCLSH)
  1822. echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
  1823. for /F %%V in ('type "$(TOP)\VERSION"') do ( \
  1824. echo #define SQLITE_RESOURCE_VERSION %%V \
  1825. | $(JIM_TCLSH) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
  1826. )
  1827. echo #endif >> sqlite3rc.h
  1828. $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
  1829. # <</block1>>
  1830. !ENDIF
  1831. # <<mark>>
  1832. # Rules to build individual *.lo files from files in the src directory.
  1833. #
  1834. alter.lo: $(TOP)\src\alter.c $(HDR)
  1835. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\alter.c
  1836. analyze.lo: $(TOP)\src\analyze.c $(HDR)
  1837. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\analyze.c
  1838. attach.lo: $(TOP)\src\attach.c $(HDR)
  1839. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\attach.c
  1840. auth.lo: $(TOP)\src\auth.c $(HDR)
  1841. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\auth.c
  1842. backup.lo: $(TOP)\src\backup.c $(HDR)
  1843. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\backup.c
  1844. bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
  1845. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\bitvec.c
  1846. btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
  1847. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btmutex.c
  1848. btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
  1849. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\btree.c
  1850. build.lo: $(TOP)\src\build.c $(HDR)
  1851. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\build.c
  1852. callback.lo: $(TOP)\src\callback.c $(HDR)
  1853. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\callback.c
  1854. complete.lo: $(TOP)\src\complete.c $(HDR)
  1855. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c
  1856. ctime.lo: $(TOP)\src\ctime.c $(HDR)
  1857. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c
  1858. date.lo: $(TOP)\src\date.c $(HDR)
  1859. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\date.c
  1860. dbpage.lo: $(TOP)\src\dbpage.c $(HDR)
  1861. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbpage.c
  1862. dbstat.lo: $(TOP)\src\dbstat.c $(HDR)
  1863. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\dbstat.c
  1864. delete.lo: $(TOP)\src\delete.c $(HDR)
  1865. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\delete.c
  1866. expr.lo: $(TOP)\src\expr.c $(HDR)
  1867. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\expr.c
  1868. fault.lo: $(TOP)\src\fault.c $(HDR)
  1869. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fault.c
  1870. fkey.lo: $(TOP)\src\fkey.c $(HDR)
  1871. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\fkey.c
  1872. func.lo: $(TOP)\src\func.c $(HDR)
  1873. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\func.c
  1874. global.lo: $(TOP)\src\global.c $(HDR)
  1875. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\global.c
  1876. hash.lo: $(TOP)\src\hash.c $(HDR)
  1877. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\hash.c
  1878. insert.lo: $(TOP)\src\insert.c $(HDR)
  1879. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\insert.c
  1880. json.lo: $(TOP)\src\json.c $(HDR)
  1881. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\json.c
  1882. legacy.lo: $(TOP)\src\legacy.c $(HDR)
  1883. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\legacy.c
  1884. loadext.lo: $(TOP)\src\loadext.c $(HDR)
  1885. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\loadext.c
  1886. main.lo: $(TOP)\src\main.c $(HDR)
  1887. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\main.c
  1888. malloc.lo: $(TOP)\src\malloc.c $(HDR)
  1889. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\malloc.c
  1890. mem0.lo: $(TOP)\src\mem0.c $(HDR)
  1891. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem0.c
  1892. mem1.lo: $(TOP)\src\mem1.c $(HDR)
  1893. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem1.c
  1894. mem2.lo: $(TOP)\src\mem2.c $(HDR)
  1895. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem2.c
  1896. mem3.lo: $(TOP)\src\mem3.c $(HDR)
  1897. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem3.c
  1898. mem5.lo: $(TOP)\src\mem5.c $(HDR)
  1899. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mem5.c
  1900. memdb.lo: $(TOP)\src\memdb.c $(HDR)
  1901. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memdb.c
  1902. memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
  1903. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\memjournal.c
  1904. mutex.lo: $(TOP)\src\mutex.c $(HDR)
  1905. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex.c
  1906. mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
  1907. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_noop.c
  1908. mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
  1909. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_unix.c
  1910. mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
  1911. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\mutex_w32.c
  1912. notify.lo: $(TOP)\src\notify.c $(HDR)
  1913. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\notify.c
  1914. pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
  1915. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pager.c
  1916. pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
  1917. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache.c
  1918. pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
  1919. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pcache1.c
  1920. os.lo: $(TOP)\src\os.c $(HDR)
  1921. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os.c
  1922. os_kv.lo: $(TOP)\src\os_kv.c $(HDR)
  1923. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_kv.c
  1924. os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
  1925. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_unix.c
  1926. os_win.lo: $(TOP)\src\os_win.c $(HDR)
  1927. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\os_win.c
  1928. pragma.lo: $(TOP)\src\pragma.c $(HDR)
  1929. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\pragma.c
  1930. prepare.lo: $(TOP)\src\prepare.c $(HDR)
  1931. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\prepare.c
  1932. printf.lo: $(TOP)\src\printf.c $(HDR)
  1933. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\printf.c
  1934. random.lo: $(TOP)\src\random.c $(HDR)
  1935. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\random.c
  1936. resolve.lo: $(TOP)\src\resolve.c $(HDR)
  1937. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\resolve.c
  1938. rowset.lo: $(TOP)\src\rowset.c $(HDR)
  1939. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\rowset.c
  1940. select.lo: $(TOP)\src\select.c $(HDR)
  1941. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\select.c
  1942. status.lo: $(TOP)\src\status.c $(HDR)
  1943. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\status.c
  1944. table.lo: $(TOP)\src\table.c $(HDR)
  1945. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\table.c
  1946. threads.lo: $(TOP)\src\threads.c $(HDR)
  1947. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\threads.c
  1948. tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
  1949. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\tokenize.c
  1950. treeview.lo: $(TOP)\src\treeview.c $(HDR)
  1951. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\treeview.c
  1952. trigger.lo: $(TOP)\src\trigger.c $(HDR)
  1953. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\trigger.c
  1954. update.lo: $(TOP)\src\update.c $(HDR)
  1955. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\update.c
  1956. upsert.lo: $(TOP)\src\upsert.c $(HDR)
  1957. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\upsert.c
  1958. utf.lo: $(TOP)\src\utf.c $(HDR)
  1959. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\utf.c
  1960. util.lo: $(TOP)\src\util.c $(HDR)
  1961. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\util.c
  1962. vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
  1963. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vacuum.c
  1964. vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
  1965. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbe.c
  1966. vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
  1967. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeapi.c
  1968. vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
  1969. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeaux.c
  1970. vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
  1971. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbeblob.c
  1972. vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
  1973. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbemem.c
  1974. vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
  1975. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbesort.c
  1976. vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
  1977. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbetrace.c
  1978. vdbevtab.lo: $(TOP)\src\vdbevtab.c $(HDR)
  1979. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vdbevtab.c
  1980. vtab.lo: $(TOP)\src\vtab.c $(HDR)
  1981. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\vtab.c
  1982. wal.lo: $(TOP)\src\wal.c $(HDR)
  1983. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wal.c
  1984. walker.lo: $(TOP)\src\walker.c $(HDR)
  1985. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\walker.c
  1986. where.lo: $(TOP)\src\where.c $(HDR)
  1987. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\where.c
  1988. wherecode.lo: $(TOP)\src\wherecode.c $(HDR)
  1989. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\wherecode.c
  1990. whereexpr.lo: $(TOP)\src\whereexpr.c $(HDR)
  1991. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
  1992. window.lo: $(TOP)\src\window.c $(HDR)
  1993. $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\window.c
  1994. tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
  1995. $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
  1996. tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
  1997. $(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
  1998. tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
  1999. $(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
  2000. # Rules to build opcodes.c and opcodes.h
  2001. #
  2002. opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl $(JIM_TCLSH)
  2003. $(JIM_TCLSH) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c
  2004. opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl $(JIM_TCLSH)
  2005. type parse.h $(TOP)\src\vdbe.c | $(JIM_TCLSH) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
  2006. # Rules to build parse.c and parse.h - the outputs of lemon.
  2007. #
  2008. parse.h: parse.c
  2009. parse.c: $(TOP)\src\parse.y lemon.exe
  2010. del /Q parse.y parse.h parse.h.temp 2>NUL
  2011. copy /Y $(TOP)\src\parse.y .
  2012. copy /B parse.y +,,
  2013. .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S parse.y
  2014. $(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION $(JIM_TCLSH)
  2015. $(JIM_TCLSH) $(TOP)\tool\mksqlite3h.tcl "$(TOP:\=/)" > $(SQLITE3H) $(MKSQLITE3H_ARGS)
  2016. sqlite3ext.h: .target_source
  2017. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  2018. type tsrc\sqlite3ext.h | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*\)" "(SQLITE_CALLBACK *)" \
  2019. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_APICALL *" > sqlite3ext.h
  2020. copy /Y sqlite3ext.h tsrc\sqlite3ext.h
  2021. !ELSE
  2022. copy /Y tsrc\sqlite3ext.h sqlite3ext.h
  2023. copy /B sqlite3ext.h +,,
  2024. !ENDIF
  2025. sqlite3session.h: $(TOP)\ext\session\sqlite3session.h
  2026. copy /Y $(TOP)\ext\session\sqlite3session.h .
  2027. copy /B sqlite3session.h +,,
  2028. mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
  2029. $(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
  2030. $(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
  2031. keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
  2032. .\mkkeywordhash.exe > keywordhash.h
  2033. # Source and header files that shell.c depends on
  2034. SHELL_DEP = \
  2035. $(TOP)\src\shell.c.in \
  2036. $(TOP)\ext\expert\sqlite3expert.c \
  2037. $(TOP)\ext\expert\sqlite3expert.h \
  2038. $(TOP)\ext\intck\sqlite3intck.c \
  2039. $(TOP)\ext\intck\sqlite3intck.h \
  2040. $(TOP)\ext\misc\appendvfs.c \
  2041. $(TOP)\ext\misc\base64.c \
  2042. $(TOP)\ext\misc\base85.c \
  2043. $(TOP)\ext\misc\completion.c \
  2044. $(TOP)\ext\misc\decimal.c \
  2045. $(TOP)\ext\misc\fileio.c \
  2046. $(TOP)\ext\misc\ieee754.c \
  2047. $(TOP)\ext\misc\memtrace.c \
  2048. $(TOP)\ext\misc\pcachetrace.c \
  2049. $(TOP)\ext\misc\percentile.c \
  2050. $(TOP)\ext\misc\regexp.c \
  2051. $(TOP)\ext\misc\series.c \
  2052. $(TOP)\ext\misc\sha1.c \
  2053. $(TOP)\ext\misc\shathree.c \
  2054. $(TOP)\ext\misc\sqlar.c \
  2055. $(TOP)\ext\misc\sqlite3_stdio.c \
  2056. $(TOP)\ext\misc\sqlite3_stdio.h \
  2057. $(TOP)\ext\misc\uint.c \
  2058. $(TOP)\ext\misc\vfstrace.c \
  2059. $(TOP)\ext\misc\zipfile.c \
  2060. $(TOP)\ext\recover\dbdata.c \
  2061. $(TOP)\ext\recover\sqlite3recover.c \
  2062. $(TOP)\ext\recover\sqlite3recover.h \
  2063. $(TOP)\src\test_windirent.c \
  2064. $(TOP)\src\test_windirent.h
  2065. # If use of zlib is enabled, add the "zipfile.c" source file.
  2066. #
  2067. !IF $(USE_ZLIB)!=0
  2068. SHELL_DEP = $(SHELL_DEP) $(TOP)\ext\misc\sqlar.c
  2069. SHELL_DEP = $(SHELL_DEP) $(TOP)\ext\misc\zipfile.c
  2070. !ENDIF
  2071. shell.c: $(SHELL_DEP) $(TOP)\tool\mkshellc.tcl $(JIM_TCLSH)
  2072. $(JIM_TCLSH) $(TOP)\tool\mkshellc.tcl > shell.c
  2073. zlib:
  2074. pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
  2075. # Rules to build the extension objects.
  2076. #
  2077. icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
  2078. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
  2079. fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
  2080. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
  2081. fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
  2082. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
  2083. fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
  2084. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
  2085. fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
  2086. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
  2087. fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
  2088. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
  2089. fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
  2090. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
  2091. fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
  2092. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
  2093. fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
  2094. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
  2095. fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
  2096. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
  2097. fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
  2098. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
  2099. fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
  2100. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
  2101. fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
  2102. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
  2103. fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
  2104. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
  2105. stmt.lo: $(TOP)\ext\misc\stmt.c $(HDR) $(EXTHDR)
  2106. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\misc\stmt.c
  2107. rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
  2108. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
  2109. sqlite3session.lo: $(TOP)\ext\session\sqlite3session.c $(HDR) $(EXTHDR)
  2110. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c $(TOP)\ext\session\sqlite3session.c
  2111. # FTS5 things
  2112. #
  2113. FTS5_SRC = \
  2114. $(TOP)\ext\fts5\fts5.h \
  2115. $(TOP)\ext\fts5\fts5Int.h \
  2116. $(TOP)\ext\fts5\fts5_aux.c \
  2117. $(TOP)\ext\fts5\fts5_buffer.c \
  2118. $(TOP)\ext\fts5\fts5_main.c \
  2119. $(TOP)\ext\fts5\fts5_config.c \
  2120. $(TOP)\ext\fts5\fts5_expr.c \
  2121. $(TOP)\ext\fts5\fts5_hash.c \
  2122. $(TOP)\ext\fts5\fts5_index.c \
  2123. fts5parse.c fts5parse.h \
  2124. $(TOP)\ext\fts5\fts5_storage.c \
  2125. $(TOP)\ext\fts5\fts5_tokenize.c \
  2126. $(TOP)\ext\fts5\fts5_unicode2.c \
  2127. $(TOP)\ext\fts5\fts5_varint.c \
  2128. $(TOP)\ext\fts5\fts5_vocab.c
  2129. LSM1_SRC = \
  2130. $(TOP)\ext\lsm1\lsm.h \
  2131. $(TOP)\ext\lsm1\lsmInt.h \
  2132. $(TOP)\ext\lsm1\lsm_ckpt.c \
  2133. $(TOP)\ext\lsm1\lsm_file.c \
  2134. $(TOP)\ext\lsm1\lsm_log.c \
  2135. $(TOP)\ext\lsm1\lsm_main.c \
  2136. $(TOP)\ext\lsm1\lsm_mem.c \
  2137. $(TOP)\ext\lsm1\lsm_mutex.c \
  2138. $(TOP)\ext\lsm1\lsm_shared.c \
  2139. $(TOP)\ext\lsm1\lsm_sorted.c \
  2140. $(TOP)\ext\lsm1\lsm_str.c \
  2141. $(TOP)\ext\lsm1\lsm_tree.c \
  2142. $(TOP)\ext\lsm1\lsm_unix.c \
  2143. $(TOP)\ext\lsm1\lsm_varint.c \
  2144. $(TOP)\ext\lsm1\lsm_vtab.c \
  2145. $(TOP)\ext\lsm1\lsm_win32.c
  2146. fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
  2147. copy /Y $(TOP)\ext\fts5\fts5parse.y .
  2148. copy /B fts5parse.y +,,
  2149. del /Q fts5parse.h 2>NUL
  2150. .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S fts5parse.y
  2151. fts5parse.h: fts5parse.c
  2152. fts5.c: $(FTS5_SRC) $(JIM_TCLSH)
  2153. $(JIM_TCLSH) $(TOP)\ext\fts5\tool\mkfts5c.tcl
  2154. copy /Y $(TOP)\ext\fts5\fts5.h .
  2155. copy /B fts5.h +,,
  2156. lsm1.c: $(LSM1_SRC) $(JIM_TCLSH)
  2157. $(JIM_TCLSH) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
  2158. copy /Y $(TOP)\ext\lsm1\lsm.h .
  2159. copy /B lsm.h +,,
  2160. fts5.lo: fts5.c $(HDR) $(EXTHDR)
  2161. $(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
  2162. fts5_ext.lo: fts5.c $(HDR) $(EXTHDR)
  2163. $(LTCOMPILE) $(NO_WARN) -c fts5.c
  2164. fts5.dll: fts5_ext.lo
  2165. $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ fts5_ext.lo
  2166. sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR)
  2167. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rbu\sqlite3rbu.c
  2168. # Rules to build the 'testfixture' application.
  2169. #
  2170. # If using the amalgamation, use sqlite3.c directly to build the test
  2171. # fixture. Otherwise link against libsqlite3.lib. (This distinction is
  2172. # necessary because the test fixture requires non-API symbols which are
  2173. # hidden when the library is built via the amalgamation).
  2174. #
  2175. TESTFIXTURE_FLAGS = -DTCLSH_INIT_PROC=sqlite3TestInit -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
  2176. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE=""
  2177. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CORE $(NO_WARN)
  2178. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
  2179. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_DEFAULT_PAGE_SIZE=1024
  2180. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
  2181. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
  2182. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_ENABLE_BYTECODE_VTAB=1
  2183. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_CKSUMVFS_STATIC=1
  2184. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) $(TEST_CCONV_OPTS)
  2185. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_STATIC_RANDOMJSON
  2186. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_STRICT_SUBTYPE=1
  2187. TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2)
  2188. TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
  2189. !IF $(USE_AMALGAMATION)==0
  2190. TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
  2191. !ELSE
  2192. TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
  2193. !ENDIF
  2194. !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
  2195. sqlite_tclDecls.h:
  2196. echo #ifndef SQLITE_TCLAPI > $(SQLITETCLDECLSH)
  2197. echo # define SQLITE_TCLAPI >> $(SQLITETCLDECLSH)
  2198. echo #endif >> $(SQLITETCLDECLSH)
  2199. type "$(TCLINCDIR)\tclDecls.h" \
  2200. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN(?: CONST\d+?)?\s+?[^\(]*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" \
  2201. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" \
  2202. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tcl_" "(SQLITE_TCLAPI *tcl_" \
  2203. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*tclFreeObj" "(SQLITE_TCLAPI *tclFreeObj" \
  2204. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "\(\*" "(SQLITE_TCLAPI *" >> $(SQLITETCLDECLSH)
  2205. sqlite_tcl.h:
  2206. type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h \
  2207. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "typedef (.*?)\(Tcl_" "typedef \1 (SQLITE_TCLAPI Tcl_" \
  2208. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "void (*freeProc)" "void (SQLITE_TCLAPI *freeProc)" \
  2209. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*findProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *findProc)" \
  2210. | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
  2211. !ENDIF
  2212. testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
  2213. $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
  2214. -DBUILD_sqlite -I$(TCLINCDIR) \
  2215. $(TESTFIXTURE_SRC) \
  2216. /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
  2217. extensiontest: testfixture.exe testloadext.dll
  2218. @set PATH=$(LIBTCLPATH);$(PATH)
  2219. .\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
  2220. tool-zip: testfixture.exe sqlite3.exe sqldiff.exe sqlite3_analyzer.exe sqlite3_rsync.exe $(TOP)\tool\mktoolzip.tcl
  2221. .\testfixture.exe $(TOP)\tool\mktoolzip.tcl
  2222. coretestprogs: testfixture.exe sqlite3.exe
  2223. testprogs: $(TESTPROGS) srcck1.exe fuzzcheck.exe sessionfuzz.exe
  2224. fulltest: alltest fuzztest
  2225. alltest: $(TESTPROGS)
  2226. @set PATH=$(LIBTCLPATH);$(PATH)
  2227. .\testfixture.exe $(TOP)\test\all.test $(TESTOPTS)
  2228. soaktest: $(TESTPROGS)
  2229. @set PATH=$(LIBTCLPATH);$(PATH)
  2230. .\testfixture.exe $(TOP)\test\all.test -soak=1 $(TESTOPTS)
  2231. fulltestonly: $(TESTPROGS) fuzztest
  2232. @set PATH=$(LIBTCLPATH);$(PATH)
  2233. .\testfixture.exe $(TOP)\test\full.test
  2234. queryplantest: testfixture.exe shell
  2235. @set PATH=$(LIBTCLPATH);$(PATH)
  2236. .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS)
  2237. fuzztest: fuzzcheck.exe
  2238. .\fuzzcheck.exe $(FUZZDATA)
  2239. # Legacy testing target for third-party integrators. The SQLite
  2240. # developers seldom use this target themselves. Instead
  2241. # they use "nmake /f Makefile.msc devtest" which runs tests on
  2242. # a standard set of options
  2243. #
  2244. test: $(TESTPROGS) sourcetest fuzztest tcltest
  2245. # Minimal testing that runs in less than 3 minutes (on a fast machine)
  2246. #
  2247. quicktest: testfixture.exe sourcetest
  2248. @set PATH=$(LIBTCLPATH);$(PATH)
  2249. .\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
  2250. # This is the common case. Run many tests that do not take too long,
  2251. # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
  2252. #
  2253. # The veryquick.test TCL tests.
  2254. #
  2255. tcltest: testfixture.exe
  2256. @set PATH=$(LIBTCLPATH);$(PATH)
  2257. .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
  2258. # Runs all the same tests cases as the "tcltest" target but uses
  2259. # the testrunner.tcl script to run them in multiple cores
  2260. # concurrently.
  2261. testrunner: testfixture.exe
  2262. .\testfixture.exe $(TOP)\test\testrunner.tcl
  2263. # This is the testing target preferred by the core SQLite developers.
  2264. # It runs tests under a standard configuration. The devs run
  2265. # "nmake /f Makefile.msc devtest" prior to each check-in, at a minimum.
  2266. # Probably other tests too, but at least this one.
  2267. #
  2268. devtest: srctree-check sourcetest
  2269. $(TCLSH_CMD) $(TOP)\test\testrunner.tcl mdevtest
  2270. mdevtest:
  2271. $(TCLSH_CMD) $(TOP)\test\testrunner.tcl mdevtest
  2272. # Validate that various generated files in the source tree
  2273. # are up-to-date.
  2274. #
  2275. srctree-check: $(TOP)\tool\srctree-check.tcl
  2276. $(TCLSH_CMD) $(TOP)\tool\srctree-check.tcl
  2277. # Testing for a release
  2278. #
  2279. releasetest:
  2280. $(TCLSH_CMD) $(TOP)\test\testrunner.tcl release
  2281. smoketest: $(TESTPROGS)
  2282. @set PATH=$(LIBTCLPATH);$(PATH)
  2283. .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
  2284. shelltest: $(TESTPROGS)
  2285. .\testfixture.exe $(TOP)\test\permutations.test shell
  2286. sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(TOP)\ext\misc\sqlite3_stdio.h $(TOP)\ext\misc\sqlite3_stdio.c $(SQLITE_TCL_DEP)
  2287. $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl -DINCLUDE_SQLITE3_C $(TOP)\tool\sqlite3_analyzer.c.in > $@
  2288. sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
  2289. $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
  2290. /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
  2291. sqltclsh.c: sqlite3.c $(TOP)\src\tclsqlite.c $(TOP)\tool\sqltclsh.tcl $(TOP)\ext\misc\appendvfs.c $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in
  2292. $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
  2293. sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
  2294. $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
  2295. /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
  2296. sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
  2297. $(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
  2298. CHECKER_DEPS =\
  2299. $(TOP)\tool\mkccode.tcl \
  2300. sqlite3.c \
  2301. $(TOP)\src\tclsqlite.c \
  2302. $(TOP)\ext\repair\sqlite3_checker.tcl \
  2303. $(TOP)\ext\repair\checkindex.c \
  2304. $(TOP)\ext\repair\checkfreelist.c \
  2305. $(TOP)\ext\misc\btreeinfo.c \
  2306. $(TOP)\ext\repair\sqlite3_checker.c.in
  2307. sqlite3_checker.c: $(CHECKER_DEPS)
  2308. $(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\ext\repair\sqlite3_checker.c.in > $@
  2309. sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
  2310. $(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
  2311. /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
  2312. dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
  2313. $(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
  2314. /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS)
  2315. testloadext.lo: $(TOP)\src\test_loadext.c $(SQLITE3H)
  2316. $(LTCOMPILE) $(NO_WARN) -c $(TOP)\src\test_loadext.c
  2317. testloadext.dll: testloadext.lo
  2318. $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /OUT:$@ testloadext.lo
  2319. dbtotxt.exe: $(TOP)\tool\dbtotxt.c
  2320. $(LTLINK) $(NO_WARN) $(TOP)\tool\dbtotxt.c /link $(LDFLAGS) $(LTLINKOPTS)
  2321. showdb.exe: $(TOP)\tool\showdb.c $(SQLITE3C) $(SQLITE3H)
  2322. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2323. $(TOP)\tool\showdb.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2324. showstat4.exe: $(TOP)\tool\showstat4.c $(SQLITE3C) $(SQLITE3H)
  2325. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2326. $(TOP)\tool\showstat4.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2327. showjournal.exe: $(TOP)\tool\showjournal.c $(SQLITE3C) $(SQLITE3H)
  2328. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2329. $(TOP)\tool\showjournal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2330. showwal.exe: $(TOP)\tool\showwal.c $(SQLITE3C) $(SQLITE3H)
  2331. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2332. $(TOP)\tool\showwal.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2333. showshm.exe: $(TOP)\tool\showshm.c
  2334. $(LTLINK) $(NO_WARN) $(TOP)\tool\showshm.c /link $(LDFLAGS) $(LTLINKOPTS)
  2335. index_usage.exe: $(TOP)\tool\index_usage.c $(SQLITE3C) $(SQLITE3H)
  2336. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2337. $(TOP)\tool\index_usage.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2338. changeset.exe: $(TOP)\ext\session\changeset.c $(SQLITE3C) $(SQLITE3H)
  2339. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2340. -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
  2341. $(TOP)\ext\session\changeset.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2342. changesetfuzz.exe: $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) $(SQLITE3H)
  2343. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2344. -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
  2345. $(TOP)\ext\session\changesetfuzz.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2346. fts3view.exe: $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) $(SQLITE3H)
  2347. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2348. $(TOP)\ext\fts3\tool\fts3view.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2349. rollback-test.exe: $(TOP)\tool\rollback-test.c $(SQLITE3C) $(SQLITE3H)
  2350. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2351. $(TOP)\tool\rollback-test.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2352. atrc.exe: $(TOP)\test\atrc.c $(SQLITE3C) $(SQLITE3H)
  2353. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2354. $(TOP)\test\atrc.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2355. LogEst.exe: $(TOP)\tool\logest.c $(SQLITE3H)
  2356. $(LTLINK) $(NO_WARN) $(TOP)\tool\LogEst.c /link $(LDFLAGS) $(LTLINKOPTS)
  2357. wordcount.exe: $(TOP)\test\wordcount.c $(SQLITE3C) $(SQLITE3H)
  2358. $(LTLINK) $(NO_WARN) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
  2359. $(TOP)\test\wordcount.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2360. speedtest1.exe: $(TOP)\test\speedtest1.c $(SQLITE3C) $(SQLITE3H)
  2361. $(LTLINK) $(NO_WARN) $(ST_COMPILE_OPTS) -DSQLITE_OMIT_LOAD_EXTENSION \
  2362. $(TOP)\test\speedtest1.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2363. kvtest.exe: $(TOP)\test\kvtest.c $(SQLITE3C) $(SQLITE3H)
  2364. $(LTLINK) $(NO_WARN) $(KV_COMPILE_OPTS) \
  2365. $(TOP)\test\kvtest.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2366. rbu.exe: $(TOP)\ext\rbu\rbu.c $(TOP)\ext\rbu\sqlite3rbu.c $(SQLITE3C) $(SQLITE3H)
  2367. $(LTLINK) $(NO_WARN) -DSQLITE_ENABLE_RBU \
  2368. $(TOP)\ext\rbu\rbu.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2369. THREADTEST3_SRC = \
  2370. $(TOP)\test\threadtest3.c \
  2371. $(TOP)\test\tt3_checkpoint.c \
  2372. $(TOP)\test\tt3_index.c \
  2373. $(TOP)\test\tt3_vacuum.c \
  2374. $(TOP)\test\tt3_stress.c \
  2375. $(TOP)\test\tt3_lookaside1.c
  2376. threadtest3.exe: $(THREADTEST3_SRC) $(TOP)\src\test_multiplex.c $(SQLITE3C) $(SQLITE3H)
  2377. $(LTLINK) $(NO_WARN) $(TOP)\test\threadtest3.c $(TOP)\src\test_multiplex.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
  2378. # Display key variables that control which version of TCL is to be used.
  2379. #
  2380. tcl-env:
  2381. @echo TCLDIR = $(TCLDIR)
  2382. @echo TCLVERSION = $(TCLVERSION)
  2383. @echo TCLSUFFIX = $(TCLSUFFIX)
  2384. @echo LIBTCL = $(LIBTCL)
  2385. @echo LIBTCLSTUB = $(LIBTCLSTUB)
  2386. @echo TCLSH_CMD = $(TCLSH_CMD)
  2387. LSMDIR=$(TOP)\ext\lsm1
  2388. !INCLUDE $(LSMDIR)\Makefile.msc
  2389. moreclean: clean
  2390. del /Q $(SQLITE3C) $(SQLITE3H) 2>NUL
  2391. # <</mark>>
  2392. clean:
  2393. del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
  2394. del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
  2395. del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
  2396. # <<mark>>
  2397. del /Q $(SQLITE3TCLDLL) pkgIndex.tcl 2>NUL
  2398. del /Q opcodes.c opcodes.h 2>NUL
  2399. del /Q lemon.* lempar.c parse.* 2>NUL
  2400. del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
  2401. del /Q notasharedlib.* 2>NUL
  2402. -rmdir /Q/S .deps 2>NUL
  2403. -rmdir /Q/S .libs 2>NUL
  2404. -rmdir /Q/S tsrc 2>NUL
  2405. del /Q .target_source 2>NUL
  2406. del /Q tclsqlite3.exe $(SQLITETCLH) $(SQLITETCLDECLSH) 2>NUL
  2407. del /Q lsm.dll lsmtest.exe 2>NUL
  2408. del /Q atrc.exe changesetfuzz.exe dbtotxt.exe index_usage.exe 2>NUL
  2409. del /Q testloadext.dll 2>NUL
  2410. del /Q testfixture.exe test.db 2>NUL
  2411. del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
  2412. del /Q changeset.exe 2>NUL
  2413. del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
  2414. del /Q mptester.exe wordcount.exe rbu.exe srcck1.exe 2>NUL
  2415. del /Q sqlite3.c sqlite3-*.c sqlite3.h 2>NUL
  2416. del /Q sqlite3rc.h 2>NUL
  2417. del /Q shell.c sqlite3ext.h sqlite3session.h 2>NUL
  2418. del /Q sqlite3_analyzer.exe sqlite3_analyzer.c sqlite3_rsync.exe 2>NUL
  2419. del /Q sqlite-*-output.vsix 2>NUL
  2420. del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
  2421. del /Q sqltclsh.* 2>NUL
  2422. del /Q dbfuzz.exe sessionfuzz.exe threadtest3.exe 2>NUL
  2423. del /Q kvtest.exe ossshell.exe scrub.exe 2>NUL
  2424. del /Q showshm.exe sqlite3_checker.* sqlite3_expert.exe 2>NUL
  2425. del /Q fts5.* fts5parse.* 2>NUL
  2426. del /Q lsm.h lsm1.c 2>NUL
  2427. del /q src-verify.exe 2>NUL
  2428. # <</mark>>