Makefile.msc 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369
  1. #
  2. # nmake Makefile for SQLite
  3. #
  4. # The toplevel directory of the source tree. This is the directory
  5. # that contains this "Makefile.msc".
  6. #
  7. TOP = .
  8. # Set this non-0 to create and use the SQLite amalgamation file.
  9. #
  10. !IFNDEF USE_AMALGAMATION
  11. USE_AMALGAMATION = 1
  12. !ENDIF
  13. # Set this non-0 to split the SQLite amalgamation file into chunks to
  14. # be used for debugging with Visual Studio.
  15. #
  16. !IFNDEF SPLIT_AMALGAMATION
  17. SPLIT_AMALGAMATION = 0
  18. !ENDIF
  19. # Set this non-0 to use the International Components for Unicode (ICU).
  20. #
  21. !IFNDEF USE_ICU
  22. USE_ICU = 0
  23. !ENDIF
  24. # Set this non-0 to dynamically link to the MSVC runtime library.
  25. #
  26. !IFNDEF USE_CRT_DLL
  27. USE_CRT_DLL = 0
  28. !ENDIF
  29. # Set this non-0 to generate assembly code listings for the source code
  30. # files.
  31. #
  32. !IFNDEF USE_LISTINGS
  33. USE_LISTINGS = 0
  34. !ENDIF
  35. # Set this non-0 to attempt setting the native compiler automatically
  36. # for cross-compiling the command line tools needed during the compilation
  37. # process.
  38. #
  39. !IFNDEF XCOMPILE
  40. XCOMPILE = 0
  41. !ENDIF
  42. # Set this non-0 to use the native libraries paths for cross-compiling
  43. # the command line tools needed during the compilation process.
  44. #
  45. !IFNDEF USE_NATIVE_LIBPATHS
  46. USE_NATIVE_LIBPATHS = 0
  47. !ENDIF
  48. # Set this 0 to skip the compiling and embedding of version resources.
  49. #
  50. !IFNDEF USE_RC
  51. USE_RC = 1
  52. !ENDIF
  53. # Set this non-0 to compile binaries suitable for the WinRT environment.
  54. # This setting does not apply to any binaries that require Tcl to operate
  55. # properly (i.e. the text fixture, etc).
  56. #
  57. !IFNDEF FOR_WINRT
  58. FOR_WINRT = 0
  59. !ENDIF
  60. # Set this non-0 to skip attempting to look for and/or link with the Tcl
  61. # runtime library.
  62. #
  63. !IFNDEF NO_TCL
  64. NO_TCL = 0
  65. !ENDIF
  66. # Set this to non-0 to create and use PDBs.
  67. #
  68. !IFNDEF SYMBOLS
  69. SYMBOLS = 1
  70. !ENDIF
  71. # Set this to non-0 to use the SQLite debugging heap subsystem.
  72. #
  73. !IFNDEF MEMDEBUG
  74. MEMDEBUG = 0
  75. !ENDIF
  76. # Set this to non-0 to use the Win32 native heap subsystem.
  77. #
  78. !IFNDEF WIN32HEAP
  79. WIN32HEAP = 0
  80. !ENDIF
  81. # Set this to one of the following values to enable various debugging
  82. # features. Each level includes the debugging options from the previous
  83. # levels. Currently, the recognized values for DEBUG are:
  84. #
  85. # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
  86. # 1 == Disables NDEBUG and all optimizations and then enables PDBs.
  87. # 2 == SQLITE_DEBUG: Enables various diagnostics messages and code.
  88. # 3 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
  89. # 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
  90. # 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
  91. #
  92. !IFNDEF DEBUG
  93. DEBUG = 0
  94. !ENDIF
  95. # Enable use of available compiler optimizations? Normally, this should be
  96. # non-zero. Setting this to zero, thus disabling all compiler optimizations,
  97. # can be useful for testing.
  98. #
  99. !IFNDEF OPTIMIZATIONS
  100. OPTIMIZATIONS = 2
  101. !ENDIF
  102. # Check for the predefined command macro CC. This should point to the compiler
  103. # binary for the target platform. If it is not defined, simply define it to
  104. # the legacy default value 'cl.exe'.
  105. #
  106. !IFNDEF CC
  107. CC = cl.exe
  108. !ENDIF
  109. # Check for the command macro LD. This should point to the linker binary for
  110. # the target platform. If it is not defined, simply define it to the legacy
  111. # default value 'link.exe'.
  112. #
  113. !IFNDEF LD
  114. LD = link.exe
  115. !ENDIF
  116. # Check for the predefined command macro RC. This should point to the resource
  117. # compiler binary for the target platform. If it is not defined, simply define
  118. # it to the legacy default value 'rc.exe'.
  119. #
  120. !IFNDEF RC
  121. RC = rc.exe
  122. !ENDIF
  123. # Check for the command macro NCC. This should point to the compiler binary
  124. # for the platform the compilation process is taking place on. If it is not
  125. # defined, simply define it to have the same value as the CC macro. When
  126. # cross-compiling, it is suggested that this macro be modified via the command
  127. # line (since nmake itself does not provide a built-in method to guess it).
  128. # For example, to use the x86 compiler when cross-compiling for x64, a command
  129. # line similar to the following could be used (all on one line):
  130. #
  131. # nmake /f Makefile.msc sqlite3.dll
  132. # XCOMPILE=1 USE_NATIVE_LIBPATHS=1
  133. #
  134. # Alternatively, the full path and file name to the compiler binary for the
  135. # platform the compilation process is taking place may be specified (all on
  136. # one line):
  137. #
  138. # nmake /f Makefile.msc sqlite3.dll
  139. # "NCC=""%VCINSTALLDIR%\bin\cl.exe"""
  140. # USE_NATIVE_LIBPATHS=1
  141. #
  142. !IFDEF NCC
  143. NCC = $(NCC:\\=\)
  144. !ELSEIF $(XCOMPILE)!=0
  145. NCC = "$(VCINSTALLDIR)\bin\cl.exe"
  146. NCC = $(NCC:\\=\)
  147. !ELSE
  148. NCC = $(CC)
  149. !ENDIF
  150. # Check for the MSVC runtime library path macro. Othertise, this
  151. # value will default to the 'lib' directory underneath the MSVC
  152. # installation directory.
  153. #
  154. !IFNDEF NCRTLIBPATH
  155. NCRTLIBPATH = $(VCINSTALLDIR)\lib
  156. !ENDIF
  157. NCRTLIBPATH = $(NCRTLIBPATH:\\=\)
  158. # Check for the Platform SDK library path macro. Othertise, this
  159. # value will default to the 'lib' directory underneath the Windows
  160. # SDK installation directory (the environment variable used appears
  161. # to be available when using Visual C++ 2008 or later via the
  162. # command line).
  163. #
  164. !IFNDEF NSDKLIBPATH
  165. NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
  166. !ENDIF
  167. NSDKLIBPATH = $(NSDKLIBPATH:\\=\)
  168. # C compiler and options for use in building executables that
  169. # will run on the platform that is doing the build.
  170. #
  171. BCC = $(NCC) -W3
  172. # Check if assembly code listings should be generated for the source
  173. # code files to be compiled.
  174. #
  175. !IF $(USE_LISTINGS)!=0
  176. BCC = $(BCC) -FAcs
  177. !ENDIF
  178. # Check if the native library paths should be used when compiling
  179. # the command line tools used during the compilation process. If
  180. # so, set the necessary macro now.
  181. #
  182. !IF $(USE_NATIVE_LIBPATHS)!=0
  183. NLTLIBPATHS = "/LIBPATH:$(NCRTLIBPATH)" "/LIBPATH:$(NSDKLIBPATH)"
  184. !ENDIF
  185. # C compiler and options for use in building executables that
  186. # will run on the target platform. (BCC and TCC are usually the
  187. # same unless your are cross-compiling.)
  188. #
  189. TCC = $(CC) -W3 -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src -fp:precise
  190. RCC = $(RC) -DSQLITE_OS_WIN=1 -I$(TOP) -I$(TOP)\src
  191. # Check if assembly code listings should be generated for the source
  192. # code files to be compiled.
  193. #
  194. !IF $(USE_LISTINGS)!=0
  195. TCC = $(TCC) -FAcs
  196. !ENDIF
  197. # When compiling the library for use in the WinRT environment,
  198. # the following compile-time options must be used as well to
  199. # disable use of Win32 APIs that are not available and to enable
  200. # use of Win32 APIs that are specific to Windows 8 and/or WinRT.
  201. #
  202. !IF $(FOR_WINRT)!=0
  203. TCC = $(TCC) -DSQLITE_OS_WINRT=1
  204. RCC = $(RCC) -DSQLITE_OS_WINRT=1
  205. TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
  206. RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
  207. !ENDIF
  208. # Also, we need to dynamically link to the correct MSVC runtime
  209. # when compiling for WinRT (e.g. debug or release) OR if the
  210. # USE_CRT_DLL option is set to force dynamically linking to the
  211. # MSVC runtime library.
  212. #
  213. !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
  214. !IF $(DEBUG)>0
  215. TCC = $(TCC) -MDd
  216. BCC = $(BCC) -MDd
  217. !ELSE
  218. TCC = $(TCC) -MD
  219. BCC = $(BCC) -MD
  220. !ENDIF
  221. !ELSE
  222. !IF $(DEBUG)>0
  223. TCC = $(TCC) -MTd
  224. BCC = $(BCC) -MTd
  225. !ELSE
  226. TCC = $(TCC) -MT
  227. BCC = $(BCC) -MT
  228. !ENDIF
  229. !ENDIF
  230. # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in
  231. # any extension header files by default. For non-amalgamation
  232. # builds, we need to make sure the compiler can find these.
  233. #
  234. !IF $(USE_AMALGAMATION)==0
  235. TCC = $(TCC) -I$(TOP)\ext\fts3
  236. RCC = $(RCC) -I$(TOP)\ext\fts3
  237. TCC = $(TCC) -I$(TOP)\ext\rtree
  238. RCC = $(RCC) -I$(TOP)\ext\rtree
  239. !ENDIF
  240. # Define -DNDEBUG to compile without debugging (i.e., for production usage)
  241. # Omitting the define will cause extra debugging code to be inserted and
  242. # includes extra comments when "EXPLAIN stmt" is used.
  243. #
  244. !IF $(DEBUG)==0
  245. TCC = $(TCC) -DNDEBUG
  246. BCC = $(BCC) -DNDEBUG
  247. RCC = $(RCC) -DNDEBUG
  248. !ENDIF
  249. !IF $(DEBUG)>1
  250. TCC = $(TCC) -DSQLITE_DEBUG
  251. RCC = $(RCC) -DSQLITE_DEBUG
  252. !ENDIF
  253. !IF $(DEBUG)>3
  254. TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1
  255. RCC = $(RCC) -DSQLITE_DEBUG_OS_TRACE=1
  256. !ENDIF
  257. !IF $(DEBUG)>4
  258. TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
  259. RCC = $(RCC) -DSQLITE_ENABLE_IOTRACE
  260. !ENDIF
  261. #
  262. # Prevent warnings about "insecure" MSVC runtime library functions
  263. # being used.
  264. #
  265. TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
  266. BCC = $(BCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
  267. RCC = $(RCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
  268. #
  269. # Prevent warnings about "deprecated" POSIX functions being used.
  270. #
  271. TCC = $(TCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
  272. BCC = $(BCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
  273. RCC = $(RCC) -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
  274. #
  275. # Use the SQLite debugging heap subsystem?
  276. #
  277. !IF $(MEMDEBUG)!=0
  278. TCC = $(TCC) -DSQLITE_MEMDEBUG=1
  279. RCC = $(RCC) -DSQLITE_MEMDEBUG=1
  280. #
  281. # Use native Win32 heap subsystem instead of malloc/free?
  282. #
  283. !ELSEIF $(WIN32HEAP)!=0
  284. TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1
  285. RCC = $(RCC) -DSQLITE_WIN32_MALLOC=1
  286. #
  287. # Validate the heap on every call into the native Win32 heap subsystem?
  288. #
  289. !IF $(DEBUG)>2
  290. TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
  291. RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
  292. !ENDIF
  293. !ENDIF
  294. # The locations of the Tcl header and library files. Also, the library that
  295. # non-stubs enabled programs using Tcl must link against. These variables
  296. # (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
  297. # prior to running nmake in order to match the actual installed location and
  298. # version on this machine.
  299. #
  300. !IFNDEF TCLINCDIR
  301. TCLINCDIR = c:\tcl\include
  302. !ENDIF
  303. !IFNDEF TCLLIBDIR
  304. TCLLIBDIR = c:\tcl\lib
  305. !ENDIF
  306. !IFNDEF LIBTCL
  307. LIBTCL = tcl85.lib
  308. !ENDIF
  309. # The locations of the ICU header and library files. These variables
  310. # (ICUINCDIR, ICULIBDIR, and LIBICU) may be overridden via the environment
  311. # prior to running nmake in order to match the actual installed location on
  312. # this machine.
  313. #
  314. !IFNDEF ICUINCDIR
  315. ICUINCDIR = c:\icu\include
  316. !ENDIF
  317. !IFNDEF ICULIBDIR
  318. ICULIBDIR = c:\icu\lib
  319. !ENDIF
  320. !IFNDEF LIBICU
  321. LIBICU = icuuc.lib icuin.lib
  322. !ENDIF
  323. # This is the command to use for tclsh - normally just "tclsh", but we may
  324. # know the specific version we want to use. This variable (TCLSH_CMD) may be
  325. # overridden via the environment prior to running nmake in order to select a
  326. # specific Tcl shell to use.
  327. #
  328. !IFNDEF TCLSH_CMD
  329. TCLSH_CMD = tclsh85
  330. !ENDIF
  331. # Compiler options needed for programs that use the readline() library.
  332. #
  333. !IFNDEF READLINE_FLAGS
  334. READLINE_FLAGS = -DHAVE_READLINE=0
  335. !ENDIF
  336. # The library that programs using readline() must link against.
  337. #
  338. !IFNDEF LIBREADLINE
  339. LIBREADLINE =
  340. !ENDIF
  341. # Should the database engine be compiled threadsafe
  342. #
  343. TCC = $(TCC) -DSQLITE_THREADSAFE=1
  344. RCC = $(RCC) -DSQLITE_THREADSAFE=1
  345. # Do threads override each others locks by default (1), or do we test (-1)
  346. #
  347. TCC = $(TCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
  348. RCC = $(RCC) -DSQLITE_THREAD_OVERRIDE_LOCK=-1
  349. # Any target libraries which libsqlite must be linked against
  350. #
  351. !IFNDEF TLIBS
  352. TLIBS =
  353. !ENDIF
  354. # Flags controlling use of the in memory btree implementation
  355. #
  356. # SQLITE_TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
  357. # default to file, 2 to default to memory, and 3 to force temporary
  358. # tables to always be in memory.
  359. #
  360. TCC = $(TCC) -DSQLITE_TEMP_STORE=1
  361. RCC = $(RCC) -DSQLITE_TEMP_STORE=1
  362. # Enable/disable loadable extensions, and other optional features
  363. # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
  364. # The same set of OMIT and ENABLE flags should be passed to the
  365. # LEMON parser generator and the mkkeywordhash tool as well.
  366. # BEGIN standard options
  367. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
  368. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
  369. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
  370. # END standard options
  371. # BEGIN required Windows option
  372. OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_MAX_TRIGGER_DEPTH=100
  373. # END required Windows option
  374. TCC = $(TCC) $(OPT_FEATURE_FLAGS)
  375. RCC = $(RCC) $(OPT_FEATURE_FLAGS)
  376. # Add in any optional parameters specified on the make commane line
  377. # ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
  378. TCC = $(TCC) $(OPTS)
  379. RCC = $(RCC) $(OPTS)
  380. # If compiling for debugging, add some defines.
  381. !IF $(DEBUG)>0
  382. TCC = $(TCC) -D_DEBUG
  383. BCC = $(BCC) -D_DEBUG
  384. RCC = $(RCC) -D_DEBUG
  385. !ENDIF
  386. # If optimizations are enabled or disabled (either implicitly or
  387. # explicitly), add the necessary flags.
  388. !IF $(DEBUG)>0 || $(OPTIMIZATIONS)==0
  389. TCC = $(TCC) -Od
  390. BCC = $(BCC) -Od
  391. !ELSEIF $(OPTIMIZATIONS)>=3
  392. TCC = $(TCC) -Ox
  393. BCC = $(BCC) -Ox
  394. !ELSEIF $(OPTIMIZATIONS)==2
  395. TCC = $(TCC) -O2
  396. BCC = $(BCC) -O2
  397. !ELSEIF $(OPTIMIZATIONS)==1
  398. TCC = $(TCC) -O1
  399. BCC = $(BCC) -O1
  400. !ENDIF
  401. # If symbols are enabled (or compiling for debugging), enable PDBs.
  402. !IF $(DEBUG)>0 || $(SYMBOLS)!=0
  403. TCC = $(TCC) -Zi
  404. BCC = $(BCC) -Zi
  405. !ENDIF
  406. # If ICU support is enabled, add the compiler options for it.
  407. !IF $(USE_ICU)!=0
  408. TCC = $(TCC) -DSQLITE_ENABLE_ICU=1
  409. RCC = $(RCC) -DSQLITE_ENABLE_ICU=1
  410. TCC = $(TCC) -I$(TOP)\ext\icu
  411. RCC = $(RCC) -I$(TOP)\ext\icu
  412. TCC = $(TCC) -I$(ICUINCDIR)
  413. RCC = $(RCC) -I$(ICUINCDIR)
  414. !ENDIF
  415. # Command line prefixes for compiling code, compiling resources,
  416. # linking, etc.
  417. LTCOMPILE = $(TCC) -Fo$@
  418. LTRCOMPILE = $(RCC) -r
  419. LTLIB = lib.exe
  420. LTLINK = $(TCC) -Fe$@
  421. # If a platform was set, force the linker to target that.
  422. # Note that the vcvars*.bat family of batch files typically
  423. # set this for you. Otherwise, the linker will attempt
  424. # to deduce the binary type based on the object files.
  425. !IFDEF PLATFORM
  426. LTLINKOPTS = /MACHINE:$(PLATFORM)
  427. LTLIBOPTS = /MACHINE:$(PLATFORM)
  428. !ENDIF
  429. # When compiling for use in the WinRT environment, the following
  430. # linker option must be used to mark the executable as runnable
  431. # only in the context of an application container.
  432. #
  433. !IF $(FOR_WINRT)!=0
  434. LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
  435. !IF "$(VISUALSTUDIOVERSION)"=="12.0"
  436. !IF "$(PLATFORM)"=="x86"
  437. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store"
  438. !ELSEIF "$(PLATFORM)"=="x64"
  439. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store\amd64"
  440. !ELSEIF "$(PLATFORM)"=="ARM"
  441. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store\arm"
  442. !ELSE
  443. LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(VCINSTALLDIR)\lib\store"
  444. !ENDIF
  445. !ENDIF
  446. !ENDIF
  447. # If either debugging or symbols are enabled, enable PDBs.
  448. !IF $(DEBUG)>0 || $(SYMBOLS)!=0
  449. LDFLAGS = /DEBUG
  450. !ENDIF
  451. # Start with the Tcl related linker options.
  452. !IF $(NO_TCL)==0
  453. LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
  454. LTLIBS = $(LIBTCL)
  455. !ENDIF
  456. # If ICU support is enabled, add the linker options for it.
  457. !IF $(USE_ICU)!=0
  458. LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
  459. LTLIBS = $(LTLIBS) $(LIBICU)
  460. !ENDIF
  461. # nawk compatible awk.
  462. !IFNDEF NAWK
  463. NAWK = gawk.exe
  464. !ENDIF
  465. # You should not have to change anything below this line
  466. ###############################################################################
  467. # Object files for the SQLite library (non-amalgamation).
  468. #
  469. LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \
  470. backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
  471. callback.lo complete.lo ctime.lo date.lo delete.lo \
  472. expr.lo fault.lo fkey.lo \
  473. fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
  474. fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
  475. fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
  476. func.lo global.lo hash.lo \
  477. icu.lo insert.lo journal.lo legacy.lo loadext.lo \
  478. main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
  479. memjournal.lo \
  480. mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
  481. notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
  482. pager.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
  483. random.lo resolve.lo rowset.lo rtree.lo select.lo status.lo \
  484. table.lo tokenize.lo trigger.lo \
  485. update.lo util.lo vacuum.lo \
  486. vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
  487. vdbetrace.lo wal.lo walker.lo where.lo utf.lo vtab.lo
  488. # Object files for the amalgamation.
  489. #
  490. LIBOBJS1 = sqlite3.lo
  491. # Determine the real value of LIBOBJ based on the 'configure' script
  492. #
  493. !IF $(USE_AMALGAMATION)==0
  494. LIBOBJ = $(LIBOBJS0)
  495. !ELSE
  496. LIBOBJ = $(LIBOBJS1)
  497. !ENDIF
  498. # Determine if embedded resource compilation and usage are enabled.
  499. #
  500. !IF $(USE_RC)!=0
  501. LIBRESOBJS = sqlite3res.lo
  502. !ELSE
  503. LIBRESOBJS =
  504. !ENDIF
  505. # All of the source code files.
  506. #
  507. SRC = \
  508. $(TOP)\src\alter.c \
  509. $(TOP)\src\analyze.c \
  510. $(TOP)\src\attach.c \
  511. $(TOP)\src\auth.c \
  512. $(TOP)\src\backup.c \
  513. $(TOP)\src\bitvec.c \
  514. $(TOP)\src\btmutex.c \
  515. $(TOP)\src\btree.c \
  516. $(TOP)\src\btree.h \
  517. $(TOP)\src\btreeInt.h \
  518. $(TOP)\src\build.c \
  519. $(TOP)\src\callback.c \
  520. $(TOP)\src\complete.c \
  521. $(TOP)\src\ctime.c \
  522. $(TOP)\src\date.c \
  523. $(TOP)\src\delete.c \
  524. $(TOP)\src\expr.c \
  525. $(TOP)\src\fault.c \
  526. $(TOP)\src\fkey.c \
  527. $(TOP)\src\func.c \
  528. $(TOP)\src\global.c \
  529. $(TOP)\src\hash.c \
  530. $(TOP)\src\hash.h \
  531. $(TOP)\src\hwtime.h \
  532. $(TOP)\src\insert.c \
  533. $(TOP)\src\journal.c \
  534. $(TOP)\src\legacy.c \
  535. $(TOP)\src\loadext.c \
  536. $(TOP)\src\main.c \
  537. $(TOP)\src\malloc.c \
  538. $(TOP)\src\mem0.c \
  539. $(TOP)\src\mem1.c \
  540. $(TOP)\src\mem2.c \
  541. $(TOP)\src\mem3.c \
  542. $(TOP)\src\mem5.c \
  543. $(TOP)\src\memjournal.c \
  544. $(TOP)\src\mutex.c \
  545. $(TOP)\src\mutex.h \
  546. $(TOP)\src\mutex_noop.c \
  547. $(TOP)\src\mutex_unix.c \
  548. $(TOP)\src\mutex_w32.c \
  549. $(TOP)\src\notify.c \
  550. $(TOP)\src\os.c \
  551. $(TOP)\src\os.h \
  552. $(TOP)\src\os_common.h \
  553. $(TOP)\src\os_unix.c \
  554. $(TOP)\src\os_win.c \
  555. $(TOP)\src\pager.c \
  556. $(TOP)\src\pager.h \
  557. $(TOP)\src\parse.y \
  558. $(TOP)\src\pcache.c \
  559. $(TOP)\src\pcache.h \
  560. $(TOP)\src\pcache1.c \
  561. $(TOP)\src\pragma.c \
  562. $(TOP)\src\prepare.c \
  563. $(TOP)\src\printf.c \
  564. $(TOP)\src\random.c \
  565. $(TOP)\src\resolve.c \
  566. $(TOP)\src\rowset.c \
  567. $(TOP)\src\select.c \
  568. $(TOP)\src\status.c \
  569. $(TOP)\src\shell.c \
  570. $(TOP)\src\sqlite.h.in \
  571. $(TOP)\src\sqlite3ext.h \
  572. $(TOP)\src\sqliteInt.h \
  573. $(TOP)\src\sqliteLimit.h \
  574. $(TOP)\src\table.c \
  575. $(TOP)\src\tclsqlite.c \
  576. $(TOP)\src\tokenize.c \
  577. $(TOP)\src\trigger.c \
  578. $(TOP)\src\utf.c \
  579. $(TOP)\src\update.c \
  580. $(TOP)\src\util.c \
  581. $(TOP)\src\vacuum.c \
  582. $(TOP)\src\vdbe.c \
  583. $(TOP)\src\vdbe.h \
  584. $(TOP)\src\vdbeapi.c \
  585. $(TOP)\src\vdbeaux.c \
  586. $(TOP)\src\vdbeblob.c \
  587. $(TOP)\src\vdbemem.c \
  588. $(TOP)\src\vdbesort.c \
  589. $(TOP)\src\vdbetrace.c \
  590. $(TOP)\src\vdbeInt.h \
  591. $(TOP)\src\vtab.c \
  592. $(TOP)\src\wal.c \
  593. $(TOP)\src\wal.h \
  594. $(TOP)\src\walker.c \
  595. $(TOP)\src\where.c
  596. # Source code for extensions
  597. #
  598. SRC = $(SRC) \
  599. $(TOP)\ext\fts1\fts1.c \
  600. $(TOP)\ext\fts1\fts1.h \
  601. $(TOP)\ext\fts1\fts1_hash.c \
  602. $(TOP)\ext\fts1\fts1_hash.h \
  603. $(TOP)\ext\fts1\fts1_porter.c \
  604. $(TOP)\ext\fts1\fts1_tokenizer.h \
  605. $(TOP)\ext\fts1\fts1_tokenizer1.c
  606. SRC = $(SRC) \
  607. $(TOP)\ext\fts2\fts2.c \
  608. $(TOP)\ext\fts2\fts2.h \
  609. $(TOP)\ext\fts2\fts2_hash.c \
  610. $(TOP)\ext\fts2\fts2_hash.h \
  611. $(TOP)\ext\fts2\fts2_icu.c \
  612. $(TOP)\ext\fts2\fts2_porter.c \
  613. $(TOP)\ext\fts2\fts2_tokenizer.h \
  614. $(TOP)\ext\fts2\fts2_tokenizer.c \
  615. $(TOP)\ext\fts2\fts2_tokenizer1.c
  616. SRC = $(SRC) \
  617. $(TOP)\ext\fts3\fts3.c \
  618. $(TOP)\ext\fts3\fts3.h \
  619. $(TOP)\ext\fts3\fts3Int.h \
  620. $(TOP)\ext\fts3\fts3_aux.c \
  621. $(TOP)\ext\fts3\fts3_expr.c \
  622. $(TOP)\ext\fts3\fts3_hash.c \
  623. $(TOP)\ext\fts3\fts3_hash.h \
  624. $(TOP)\ext\fts3\fts3_icu.c \
  625. $(TOP)\ext\fts3\fts3_porter.c \
  626. $(TOP)\ext\fts3\fts3_snippet.c \
  627. $(TOP)\ext\fts3\fts3_tokenizer.h \
  628. $(TOP)\ext\fts3\fts3_tokenizer.c \
  629. $(TOP)\ext\fts3\fts3_tokenizer1.c \
  630. $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
  631. $(TOP)\ext\fts3\fts3_unicode.c \
  632. $(TOP)\ext\fts3\fts3_unicode2.c \
  633. $(TOP)\ext\fts3\fts3_write.c
  634. SRC = $(SRC) \
  635. $(TOP)\ext\icu\sqliteicu.h \
  636. $(TOP)\ext\icu\icu.c
  637. SRC = $(SRC) \
  638. $(TOP)\ext\rtree\rtree.h \
  639. $(TOP)\ext\rtree\rtree.c
  640. # Generated source code files
  641. #
  642. SRC = $(SRC) \
  643. keywordhash.h \
  644. opcodes.c \
  645. opcodes.h \
  646. parse.c \
  647. parse.h \
  648. sqlite3.h
  649. # Source code to the test files.
  650. #
  651. TESTSRC = \
  652. $(TOP)\src\test1.c \
  653. $(TOP)\src\test2.c \
  654. $(TOP)\src\test3.c \
  655. $(TOP)\src\test4.c \
  656. $(TOP)\src\test5.c \
  657. $(TOP)\src\test6.c \
  658. $(TOP)\src\test7.c \
  659. $(TOP)\src\test8.c \
  660. $(TOP)\src\test9.c \
  661. $(TOP)\src\test_autoext.c \
  662. $(TOP)\src\test_async.c \
  663. $(TOP)\src\test_backup.c \
  664. $(TOP)\src\test_btree.c \
  665. $(TOP)\src\test_config.c \
  666. $(TOP)\src\test_demovfs.c \
  667. $(TOP)\src\test_devsym.c \
  668. $(TOP)\src\test_fs.c \
  669. $(TOP)\src\test_func.c \
  670. $(TOP)\src\test_hexio.c \
  671. $(TOP)\src\test_init.c \
  672. $(TOP)\src\test_intarray.c \
  673. $(TOP)\src\test_journal.c \
  674. $(TOP)\src\test_malloc.c \
  675. $(TOP)\src\test_multiplex.c \
  676. $(TOP)\src\test_mutex.c \
  677. $(TOP)\src\test_onefile.c \
  678. $(TOP)\src\test_osinst.c \
  679. $(TOP)\src\test_pcache.c \
  680. $(TOP)\src\test_quota.c \
  681. $(TOP)\src\test_rtree.c \
  682. $(TOP)\src\test_schema.c \
  683. $(TOP)\src\test_server.c \
  684. $(TOP)\src\test_superlock.c \
  685. $(TOP)\src\test_syscall.c \
  686. $(TOP)\src\test_stat.c \
  687. $(TOP)\src\test_tclvar.c \
  688. $(TOP)\src\test_thread.c \
  689. $(TOP)\src\test_vfs.c \
  690. $(TOP)\src\test_wsd.c \
  691. $(TOP)\ext\fts3\fts3_term.c \
  692. $(TOP)\ext\fts3\fts3_test.c
  693. # Statically linked extensions
  694. #
  695. TESTEXT = \
  696. $(TOP)\ext\misc\amatch.c \
  697. $(TOP)\ext\misc\closure.c \
  698. $(TOP)\ext\misc\fuzzer.c \
  699. $(TOP)\ext\misc\ieee754.c \
  700. $(TOP)\ext\misc\nextchar.c \
  701. $(TOP)\ext\misc\percentile.c \
  702. $(TOP)\ext\misc\regexp.c \
  703. $(TOP)\ext\misc\spellfix.c \
  704. $(TOP)\ext\misc\totype.c \
  705. $(TOP)\ext\misc\wholenumber.c
  706. # Source code to the library files needed by the test fixture
  707. #
  708. TESTSRC2 = \
  709. $(TOP)\src\attach.c \
  710. $(TOP)\src\backup.c \
  711. $(TOP)\src\bitvec.c \
  712. $(TOP)\src\btree.c \
  713. $(TOP)\src\build.c \
  714. $(TOP)\src\ctime.c \
  715. $(TOP)\src\date.c \
  716. $(TOP)\src\expr.c \
  717. $(TOP)\src\func.c \
  718. $(TOP)\src\insert.c \
  719. $(TOP)\src\wal.c \
  720. $(TOP)\src\main.c \
  721. $(TOP)\src\mem5.c \
  722. $(TOP)\src\os.c \
  723. $(TOP)\src\os_unix.c \
  724. $(TOP)\src\os_win.c \
  725. $(TOP)\src\pager.c \
  726. $(TOP)\src\pragma.c \
  727. $(TOP)\src\prepare.c \
  728. $(TOP)\src\printf.c \
  729. $(TOP)\src\random.c \
  730. $(TOP)\src\pcache.c \
  731. $(TOP)\src\pcache1.c \
  732. $(TOP)\src\select.c \
  733. $(TOP)\src\tokenize.c \
  734. $(TOP)\src\utf.c \
  735. $(TOP)\src\util.c \
  736. $(TOP)\src\vdbeapi.c \
  737. $(TOP)\src\vdbeaux.c \
  738. $(TOP)\src\vdbe.c \
  739. $(TOP)\src\vdbemem.c \
  740. $(TOP)\src\vdbesort.c \
  741. $(TOP)\src\vdbetrace.c \
  742. $(TOP)\src\where.c \
  743. parse.c \
  744. $(TOP)\ext\fts3\fts3.c \
  745. $(TOP)\ext\fts3\fts3_aux.c \
  746. $(TOP)\ext\fts3\fts3_expr.c \
  747. $(TOP)\ext\fts3\fts3_tokenizer.c \
  748. $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
  749. $(TOP)\ext\fts3\fts3_unicode.c \
  750. $(TOP)\ext\fts3\fts3_unicode2.c \
  751. $(TOP)\ext\fts3\fts3_write.c \
  752. $(TOP)\ext\async\sqlite3async.c
  753. # Header files used by all library source files.
  754. #
  755. HDR = \
  756. $(TOP)\src\btree.h \
  757. $(TOP)\src\btreeInt.h \
  758. $(TOP)\src\hash.h \
  759. $(TOP)\src\hwtime.h \
  760. keywordhash.h \
  761. $(TOP)\src\mutex.h \
  762. opcodes.h \
  763. $(TOP)\src\os.h \
  764. $(TOP)\src\os_common.h \
  765. $(TOP)\src\pager.h \
  766. $(TOP)\src\pcache.h \
  767. parse.h \
  768. sqlite3.h \
  769. $(TOP)\src\sqlite3ext.h \
  770. $(TOP)\src\sqliteInt.h \
  771. $(TOP)\src\sqliteLimit.h \
  772. $(TOP)\src\vdbe.h \
  773. $(TOP)\src\vdbeInt.h
  774. # Header files used by extensions
  775. #
  776. EXTHDR = $(EXTHDR) \
  777. $(TOP)\ext\fts1\fts1.h \
  778. $(TOP)\ext\fts1\fts1_hash.h \
  779. $(TOP)\ext\fts1\fts1_tokenizer.h
  780. EXTHDR = $(EXTHDR) \
  781. $(TOP)\ext\fts2\fts2.h \
  782. $(TOP)\ext\fts2\fts2_hash.h \
  783. $(TOP)\ext\fts2\fts2_tokenizer.h
  784. EXTHDR = $(EXTHDR) \
  785. $(TOP)\ext\fts3\fts3.h \
  786. $(TOP)\ext\fts3\fts3Int.h \
  787. $(TOP)\ext\fts3\fts3_hash.h \
  788. $(TOP)\ext\fts3\fts3_tokenizer.h
  789. EXTHDR = $(EXTHDR) \
  790. $(TOP)\ext\rtree\rtree.h
  791. EXTHDR = $(EXTHDR) \
  792. $(TOP)\ext\icu\sqliteicu.h
  793. EXTHDR = $(EXTHDR) \
  794. $(TOP)\ext\rtree\sqlite3rtree.h
  795. # This is the default Makefile target. The objects listed here
  796. # are what get build when you type just "make" with no arguments.
  797. #
  798. all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
  799. libsqlite3.lib: $(LIBOBJ)
  800. $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
  801. libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
  802. $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS)
  803. sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
  804. $(LTLINK) $(READLINE_FLAGS) \
  805. $(TOP)\src\shell.c \
  806. /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
  807. mptester.exe: $(TOP)\mptest\mptest.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h
  808. $(LTLINK) $(TOP)\mptest\mptest.c \
  809. /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS)
  810. # This target creates a directory named "tsrc" and fills it with
  811. # copies of all of the C source code and header files needed to
  812. # build on the target system. Some of the C source code and header
  813. # files are automatically generated. This target takes care of
  814. # all that automatic generation.
  815. #
  816. .target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl
  817. -rmdir /S/Q tsrc
  818. -mkdir tsrc
  819. for %i in ($(SRC)) do copy /Y %i tsrc
  820. del /Q tsrc\sqlite.h.in tsrc\parse.y
  821. $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl < tsrc\vdbe.c > vdbe.new
  822. move vdbe.new tsrc\vdbe.c
  823. echo > .target_source
  824. sqlite3.c: .target_source $(TOP)\tool\mksqlite3c.tcl
  825. $(TCLSH_CMD) $(TOP)\tool\mksqlite3c.tcl
  826. copy tsrc\shell.c .
  827. copy tsrc\sqlite3ext.h .
  828. sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
  829. $(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
  830. # Set the source code file to be used by executables and libraries when
  831. # they need the amalgamation.
  832. #
  833. !IF $(SPLIT_AMALGAMATION)!=0
  834. SQLITE3C = sqlite3-all.c
  835. !ELSE
  836. SQLITE3C = sqlite3.c
  837. !ENDIF
  838. # Rule to build the amalgamation
  839. #
  840. sqlite3.lo: $(SQLITE3C)
  841. $(LTCOMPILE) -c $(SQLITE3C)
  842. # Rules to build the LEMON compiler generator
  843. #
  844. lempar.c: $(TOP)\src\lempar.c
  845. copy $(TOP)\src\lempar.c .
  846. lemon.exe: $(TOP)\tool\lemon.c lempar.c
  847. $(BCC) -Daccess=_access -Fe$@ $(TOP)\tool\lemon.c /link $(NLTLIBPATHS)
  848. # Rules to build individual *.lo files from generated *.c files. This
  849. # applies to:
  850. #
  851. # parse.lo
  852. # opcodes.lo
  853. #
  854. parse.lo: parse.c $(HDR)
  855. $(LTCOMPILE) -c parse.c
  856. opcodes.lo: opcodes.c
  857. $(LTCOMPILE) -c opcodes.c
  858. # Rule to build the Win32 resources object file.
  859. #
  860. !IF $(USE_RC)!=0
  861. $(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR)
  862. echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
  863. for /F %%V in ('type "$(TOP)\VERSION"') do ( \
  864. echo #define SQLITE_RESOURCE_VERSION %%V \
  865. | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
  866. )
  867. echo #endif >> sqlite3rc.h
  868. $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
  869. !ENDIF
  870. # Rules to build individual *.lo files from files in the src directory.
  871. #
  872. alter.lo: $(TOP)\src\alter.c $(HDR)
  873. $(LTCOMPILE) -c $(TOP)\src\alter.c
  874. analyze.lo: $(TOP)\src\analyze.c $(HDR)
  875. $(LTCOMPILE) -c $(TOP)\src\analyze.c
  876. attach.lo: $(TOP)\src\attach.c $(HDR)
  877. $(LTCOMPILE) -c $(TOP)\src\attach.c
  878. auth.lo: $(TOP)\src\auth.c $(HDR)
  879. $(LTCOMPILE) -c $(TOP)\src\auth.c
  880. backup.lo: $(TOP)\src\backup.c $(HDR)
  881. $(LTCOMPILE) -c $(TOP)\src\backup.c
  882. bitvec.lo: $(TOP)\src\bitvec.c $(HDR)
  883. $(LTCOMPILE) -c $(TOP)\src\bitvec.c
  884. btmutex.lo: $(TOP)\src\btmutex.c $(HDR)
  885. $(LTCOMPILE) -c $(TOP)\src\btmutex.c
  886. btree.lo: $(TOP)\src\btree.c $(HDR) $(TOP)\src\pager.h
  887. $(LTCOMPILE) -c $(TOP)\src\btree.c
  888. build.lo: $(TOP)\src\build.c $(HDR)
  889. $(LTCOMPILE) -c $(TOP)\src\build.c
  890. callback.lo: $(TOP)\src\callback.c $(HDR)
  891. $(LTCOMPILE) -c $(TOP)\src\callback.c
  892. complete.lo: $(TOP)\src\complete.c $(HDR)
  893. $(LTCOMPILE) -c $(TOP)\src\complete.c
  894. ctime.lo: $(TOP)\src\ctime.c $(HDR)
  895. $(LTCOMPILE) -c $(TOP)\src\ctime.c
  896. date.lo: $(TOP)\src\date.c $(HDR)
  897. $(LTCOMPILE) -c $(TOP)\src\date.c
  898. delete.lo: $(TOP)\src\delete.c $(HDR)
  899. $(LTCOMPILE) -c $(TOP)\src\delete.c
  900. expr.lo: $(TOP)\src\expr.c $(HDR)
  901. $(LTCOMPILE) -c $(TOP)\src\expr.c
  902. fault.lo: $(TOP)\src\fault.c $(HDR)
  903. $(LTCOMPILE) -c $(TOP)\src\fault.c
  904. fkey.lo: $(TOP)\src\fkey.c $(HDR)
  905. $(LTCOMPILE) -c $(TOP)\src\fkey.c
  906. func.lo: $(TOP)\src\func.c $(HDR)
  907. $(LTCOMPILE) -c $(TOP)\src\func.c
  908. global.lo: $(TOP)\src\global.c $(HDR)
  909. $(LTCOMPILE) -c $(TOP)\src\global.c
  910. hash.lo: $(TOP)\src\hash.c $(HDR)
  911. $(LTCOMPILE) -c $(TOP)\src\hash.c
  912. insert.lo: $(TOP)\src\insert.c $(HDR)
  913. $(LTCOMPILE) -c $(TOP)\src\insert.c
  914. journal.lo: $(TOP)\src\journal.c $(HDR)
  915. $(LTCOMPILE) -c $(TOP)\src\journal.c
  916. legacy.lo: $(TOP)\src\legacy.c $(HDR)
  917. $(LTCOMPILE) -c $(TOP)\src\legacy.c
  918. loadext.lo: $(TOP)\src\loadext.c $(HDR)
  919. $(LTCOMPILE) -c $(TOP)\src\loadext.c
  920. main.lo: $(TOP)\src\main.c $(HDR)
  921. $(LTCOMPILE) -c $(TOP)\src\main.c
  922. malloc.lo: $(TOP)\src\malloc.c $(HDR)
  923. $(LTCOMPILE) -c $(TOP)\src\malloc.c
  924. mem0.lo: $(TOP)\src\mem0.c $(HDR)
  925. $(LTCOMPILE) -c $(TOP)\src\mem0.c
  926. mem1.lo: $(TOP)\src\mem1.c $(HDR)
  927. $(LTCOMPILE) -c $(TOP)\src\mem1.c
  928. mem2.lo: $(TOP)\src\mem2.c $(HDR)
  929. $(LTCOMPILE) -c $(TOP)\src\mem2.c
  930. mem3.lo: $(TOP)\src\mem3.c $(HDR)
  931. $(LTCOMPILE) -c $(TOP)\src\mem3.c
  932. mem5.lo: $(TOP)\src\mem5.c $(HDR)
  933. $(LTCOMPILE) -c $(TOP)\src\mem5.c
  934. memjournal.lo: $(TOP)\src\memjournal.c $(HDR)
  935. $(LTCOMPILE) -c $(TOP)\src\memjournal.c
  936. mutex.lo: $(TOP)\src\mutex.c $(HDR)
  937. $(LTCOMPILE) -c $(TOP)\src\mutex.c
  938. mutex_noop.lo: $(TOP)\src\mutex_noop.c $(HDR)
  939. $(LTCOMPILE) -c $(TOP)\src\mutex_noop.c
  940. mutex_unix.lo: $(TOP)\src\mutex_unix.c $(HDR)
  941. $(LTCOMPILE) -c $(TOP)\src\mutex_unix.c
  942. mutex_w32.lo: $(TOP)\src\mutex_w32.c $(HDR)
  943. $(LTCOMPILE) -c $(TOP)\src\mutex_w32.c
  944. notify.lo: $(TOP)\src\notify.c $(HDR)
  945. $(LTCOMPILE) -c $(TOP)\src\notify.c
  946. pager.lo: $(TOP)\src\pager.c $(HDR) $(TOP)\src\pager.h
  947. $(LTCOMPILE) -c $(TOP)\src\pager.c
  948. pcache.lo: $(TOP)\src\pcache.c $(HDR) $(TOP)\src\pcache.h
  949. $(LTCOMPILE) -c $(TOP)\src\pcache.c
  950. pcache1.lo: $(TOP)\src\pcache1.c $(HDR) $(TOP)\src\pcache.h
  951. $(LTCOMPILE) -c $(TOP)\src\pcache1.c
  952. os.lo: $(TOP)\src\os.c $(HDR)
  953. $(LTCOMPILE) -c $(TOP)\src\os.c
  954. os_unix.lo: $(TOP)\src\os_unix.c $(HDR)
  955. $(LTCOMPILE) -c $(TOP)\src\os_unix.c
  956. os_win.lo: $(TOP)\src\os_win.c $(HDR)
  957. $(LTCOMPILE) -c $(TOP)\src\os_win.c
  958. pragma.lo: $(TOP)\src\pragma.c $(HDR)
  959. $(LTCOMPILE) -c $(TOP)\src\pragma.c
  960. prepare.lo: $(TOP)\src\prepare.c $(HDR)
  961. $(LTCOMPILE) -c $(TOP)\src\prepare.c
  962. printf.lo: $(TOP)\src\printf.c $(HDR)
  963. $(LTCOMPILE) -c $(TOP)\src\printf.c
  964. random.lo: $(TOP)\src\random.c $(HDR)
  965. $(LTCOMPILE) -c $(TOP)\src\random.c
  966. resolve.lo: $(TOP)\src\resolve.c $(HDR)
  967. $(LTCOMPILE) -c $(TOP)\src\resolve.c
  968. rowset.lo: $(TOP)\src\rowset.c $(HDR)
  969. $(LTCOMPILE) -c $(TOP)\src\rowset.c
  970. select.lo: $(TOP)\src\select.c $(HDR)
  971. $(LTCOMPILE) -c $(TOP)\src\select.c
  972. status.lo: $(TOP)\src\status.c $(HDR)
  973. $(LTCOMPILE) -c $(TOP)\src\status.c
  974. table.lo: $(TOP)\src\table.c $(HDR)
  975. $(LTCOMPILE) -c $(TOP)\src\table.c
  976. tokenize.lo: $(TOP)\src\tokenize.c keywordhash.h $(HDR)
  977. $(LTCOMPILE) -c $(TOP)\src\tokenize.c
  978. trigger.lo: $(TOP)\src\trigger.c $(HDR)
  979. $(LTCOMPILE) -c $(TOP)\src\trigger.c
  980. update.lo: $(TOP)\src\update.c $(HDR)
  981. $(LTCOMPILE) -c $(TOP)\src\update.c
  982. utf.lo: $(TOP)\src\utf.c $(HDR)
  983. $(LTCOMPILE) -c $(TOP)\src\utf.c
  984. util.lo: $(TOP)\src\util.c $(HDR)
  985. $(LTCOMPILE) -c $(TOP)\src\util.c
  986. vacuum.lo: $(TOP)\src\vacuum.c $(HDR)
  987. $(LTCOMPILE) -c $(TOP)\src\vacuum.c
  988. vdbe.lo: $(TOP)\src\vdbe.c $(HDR)
  989. $(LTCOMPILE) -c $(TOP)\src\vdbe.c
  990. vdbeapi.lo: $(TOP)\src\vdbeapi.c $(HDR)
  991. $(LTCOMPILE) -c $(TOP)\src\vdbeapi.c
  992. vdbeaux.lo: $(TOP)\src\vdbeaux.c $(HDR)
  993. $(LTCOMPILE) -c $(TOP)\src\vdbeaux.c
  994. vdbeblob.lo: $(TOP)\src\vdbeblob.c $(HDR)
  995. $(LTCOMPILE) -c $(TOP)\src\vdbeblob.c
  996. vdbemem.lo: $(TOP)\src\vdbemem.c $(HDR)
  997. $(LTCOMPILE) -c $(TOP)\src\vdbemem.c
  998. vdbesort.lo: $(TOP)\src\vdbesort.c $(HDR)
  999. $(LTCOMPILE) -c $(TOP)\src\vdbesort.c
  1000. vdbetrace.lo: $(TOP)\src\vdbetrace.c $(HDR)
  1001. $(LTCOMPILE) -c $(TOP)\src\vdbetrace.c
  1002. vtab.lo: $(TOP)\src\vtab.c $(HDR)
  1003. $(LTCOMPILE) -c $(TOP)\src\vtab.c
  1004. wal.lo: $(TOP)\src\wal.c $(HDR)
  1005. $(LTCOMPILE) -c $(TOP)\src\wal.c
  1006. walker.lo: $(TOP)\src\walker.c $(HDR)
  1007. $(LTCOMPILE) -c $(TOP)\src\walker.c
  1008. where.lo: $(TOP)\src\where.c $(HDR)
  1009. $(LTCOMPILE) -c $(TOP)\src\where.c
  1010. tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR)
  1011. $(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
  1012. tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR)
  1013. $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
  1014. tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS)
  1015. $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1016. # Rules to build opcodes.c and opcodes.h
  1017. #
  1018. opcodes.c: opcodes.h $(TOP)\mkopcodec.awk
  1019. $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c
  1020. opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk
  1021. type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h
  1022. # Rules to build parse.c and parse.h - the outputs of lemon.
  1023. #
  1024. parse.h: parse.c
  1025. parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
  1026. del /Q parse.y parse.h parse.h.temp
  1027. copy $(TOP)\src\parse.y .
  1028. .\lemon.exe $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
  1029. move parse.h parse.h.temp
  1030. $(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
  1031. sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
  1032. $(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP) > sqlite3.h
  1033. mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
  1034. $(BCC) -Fe$@ $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c /link $(NLTLIBPATHS)
  1035. keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
  1036. .\mkkeywordhash.exe > keywordhash.h
  1037. # Rules to build the extension objects.
  1038. #
  1039. icu.lo: $(TOP)\ext\icu\icu.c $(HDR) $(EXTHDR)
  1040. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\icu\icu.c
  1041. fts2.lo: $(TOP)\ext\fts2\fts2.c $(HDR) $(EXTHDR)
  1042. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2.c
  1043. fts2_hash.lo: $(TOP)\ext\fts2\fts2_hash.c $(HDR) $(EXTHDR)
  1044. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_hash.c
  1045. fts2_icu.lo: $(TOP)\ext\fts2\fts2_icu.c $(HDR) $(EXTHDR)
  1046. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_icu.c
  1047. fts2_porter.lo: $(TOP)\ext\fts2\fts2_porter.c $(HDR) $(EXTHDR)
  1048. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_porter.c
  1049. fts2_tokenizer.lo: $(TOP)\ext\fts2\fts2_tokenizer.c $(HDR) $(EXTHDR)
  1050. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer.c
  1051. fts2_tokenizer1.lo: $(TOP)\ext\fts2\fts2_tokenizer1.c $(HDR) $(EXTHDR)
  1052. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts2\fts2_tokenizer1.c
  1053. fts3.lo: $(TOP)\ext\fts3\fts3.c $(HDR) $(EXTHDR)
  1054. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3.c
  1055. fts3_aux.lo: $(TOP)\ext\fts3\fts3_aux.c $(HDR) $(EXTHDR)
  1056. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_aux.c
  1057. fts3_expr.lo: $(TOP)\ext\fts3\fts3_expr.c $(HDR) $(EXTHDR)
  1058. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_expr.c
  1059. fts3_hash.lo: $(TOP)\ext\fts3\fts3_hash.c $(HDR) $(EXTHDR)
  1060. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_hash.c
  1061. fts3_icu.lo: $(TOP)\ext\fts3\fts3_icu.c $(HDR) $(EXTHDR)
  1062. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_icu.c
  1063. fts3_snippet.lo: $(TOP)\ext\fts3\fts3_snippet.c $(HDR) $(EXTHDR)
  1064. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_snippet.c
  1065. fts3_porter.lo: $(TOP)\ext\fts3\fts3_porter.c $(HDR) $(EXTHDR)
  1066. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
  1067. fts3_tokenizer.lo: $(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
  1068. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
  1069. fts3_tokenizer1.lo: $(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
  1070. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
  1071. fts3_tokenize_vtab.lo: $(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
  1072. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
  1073. fts3_unicode.lo: $(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
  1074. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
  1075. fts3_unicode2.lo: $(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
  1076. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
  1077. fts3_write.lo: $(TOP)\ext\fts3\fts3_write.c $(HDR) $(EXTHDR)
  1078. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_write.c
  1079. rtree.lo: $(TOP)\ext\rtree\rtree.c $(HDR) $(EXTHDR)
  1080. $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\rtree\rtree.c
  1081. # Rules to build the 'testfixture' application.
  1082. #
  1083. # If using the amalgamation, use sqlite3.c directly to build the test
  1084. # fixture. Otherwise link against libsqlite3.lib. (This distinction is
  1085. # necessary because the test fixture requires non-API symbols which are
  1086. # hidden when the library is built via the amalgamation).
  1087. #
  1088. TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
  1089. TESTFIXTURE_FLAGS = $(TESTFIXTURE_FLAGS) -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
  1090. TESTFIXTURE_SRC0 = $(TESTEXT) $(TESTSRC2) libsqlite3.lib
  1091. TESTFIXTURE_SRC1 = $(TESTEXT) $(SQLITE3C)
  1092. !IF $(USE_AMALGAMATION)==0
  1093. TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
  1094. !ELSE
  1095. TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
  1096. !ENDIF
  1097. testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR)
  1098. $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
  1099. -DBUILD_sqlite -I$(TCLINCDIR) \
  1100. $(TESTFIXTURE_SRC) \
  1101. /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1102. fulltest: testfixture.exe sqlite3.exe
  1103. .\testfixture.exe $(TOP)\test\all.test
  1104. soaktest: testfixture.exe sqlite3.exe
  1105. .\testfixture.exe $(TOP)\test\all.test -soak=1
  1106. fulltestonly: testfixture.exe sqlite3.exe
  1107. .\testfixture.exe $(TOP)\test\full.test
  1108. queryplantest: testfixture.exe sqlite3.exe
  1109. .\testfixture.exe $(TOP)\test\permutations.test queryplanner
  1110. test: testfixture.exe sqlite3.exe
  1111. .\testfixture.exe $(TOP)\test\veryquick.test
  1112. sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
  1113. copy $(SQLITE3C) + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@
  1114. echo static const char *tclsh_main_loop(void){ >> $@
  1115. echo static const char *zMainloop = >> $@
  1116. $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
  1117. echo ; return zMainloop; } >> $@
  1118. sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
  1119. $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \
  1120. /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1121. clean:
  1122. del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib
  1123. del /Q *.cod *.da *.bb *.bbg gmon.out
  1124. del /Q sqlite3.h opcodes.c opcodes.h
  1125. del /Q lemon.exe lempar.c parse.*
  1126. del /Q mkkeywordhash.exe keywordhash.h
  1127. -rmdir /Q/S .deps
  1128. -rmdir /Q/S .libs
  1129. -rmdir /Q/S quota2a
  1130. -rmdir /Q/S quota2b
  1131. -rmdir /Q/S quota2c
  1132. -rmdir /Q/S tsrc
  1133. del /Q .target_source
  1134. del /Q tclsqlite3.exe tclsqlite3.exp
  1135. del /Q testfixture.exe testfixture.exp test.db
  1136. del /Q sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
  1137. del /Q sqlite3.c sqlite3-*.c
  1138. del /Q sqlite3rc.h
  1139. del /Q shell.c sqlite3ext.h
  1140. del /Q sqlite3_analyzer.exe sqlite3_analyzer.exp sqlite3_analyzer.c
  1141. del /Q sqlite-*-output.vsix
  1142. del /Q mptester.exe
  1143. # Dynamic link library section.
  1144. #
  1145. dll: sqlite3.dll
  1146. sqlite3.def: libsqlite3.lib
  1147. echo EXPORTS > sqlite3.def
  1148. dumpbin /all libsqlite3.lib \
  1149. | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
  1150. | sort >> sqlite3.def
  1151. sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def
  1152. $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)