1298159SbaptThis package contains:
2298159Sbapt
3298159Sbapt * the SQLite library amalgamation source code file: sqlite3.c
4298159Sbapt * the sqlite3.h and sqlite3ext.h header files that define the C-language
5298159Sbapt   interface to the sqlite3.c library file
6298159Sbapt * the shell.c file used to build the sqlite3 command-line shell program
7298159Sbapt * autoconf/automake installation infrastucture for building on POSIX
8298159Sbapt   compliant systems
9298159Sbapt * a Makefile.msc, sqlite3.rc, and Replace.cs for building with Microsoft
10298159Sbapt   Visual C++ on Windows
11298159Sbapt
12298159SbaptSUMMARY OF HOW TO BUILD
13298159Sbapt=======================
14298159Sbapt
15298159Sbapt  Unix:      ./configure; make
16298159Sbapt  Windows:   nmake /f Makefile.msc
17298159Sbapt
18298159SbaptBUILDING ON POSIX
19298159Sbapt=================
20298159Sbapt
21298159SbaptThe generic installation instructions for autoconf/automake are found
22298159Sbaptin the INSTALL file.
23298159Sbapt
24298159SbaptThe following SQLite specific boolean options are supported:
25298159Sbapt
26298159Sbapt  --enable-readline           use readline in shell tool   [default=yes]
27298159Sbapt  --enable-threadsafe         build a thread-safe library  [default=yes]
28298159Sbapt  --enable-dynamic-extensions support loadable extensions  [default=yes]
29298159Sbapt
30298159SbaptThe default value for the CFLAGS variable (options passed to the C
31298159Sbaptcompiler) includes debugging symbols in the build, resulting in larger
32298159Sbaptbinaries than are necessary. Override it on the configure command
33298159Sbaptline like this:
34298159Sbapt
35298159Sbapt  $ CFLAGS="-Os" ./configure
36298159Sbapt
37298159Sbaptto produce a smaller installation footprint.
38298159Sbapt
39298159SbaptOther SQLite compilation parameters can also be set using CFLAGS. For
40298159Sbaptexample:
41298159Sbapt
42298159Sbapt  $ CFLAGS="-Os -DSQLITE_THREADSAFE=0" ./configure
43298159Sbapt
44298159Sbapt
45298159SbaptBUILDING WITH MICROSOFT VISUAL C++
46298159Sbapt==================================
47298159Sbapt
48298159SbaptTo compile for Windows using Microsoft Visual C++:
49298159Sbapt
50298159Sbapt  $ nmake /f Makefile.msc
51298159Sbapt
52298159SbaptUsing Microsoft Visual C++ 2005 (or later) is recommended.  Several Windows
53298159Sbaptplatform variants may be built by adding additional macros to the NMAKE
54298159Sbaptcommand line.
55298159Sbapt
56298159SbaptBuilding for WinRT 8.0
57298159Sbapt----------------------
58298159Sbapt
59298159Sbapt  FOR_WINRT=1
60298159Sbapt
61298159SbaptUsing Microsoft Visual C++ 2012 (or later) is required.  When using the
62298159Sbaptabove, something like the following macro will need to be added to the
63298159SbaptNMAKE command line as well:
64298159Sbapt
65298159Sbapt  "NSDKLIBPATH=%WindowsSdkDir%\..\8.0\lib\win8\um\x86"
66298159Sbapt
67298159SbaptBuilding for WinRT 8.1
68298159Sbapt----------------------
69298159Sbapt
70298159Sbapt  FOR_WINRT=1
71298159Sbapt
72298159SbaptUsing Microsoft Visual C++ 2013 (or later) is required.  When using the
73298159Sbaptabove, something like the following macro will need to be added to the
74298159SbaptNMAKE command line as well:
75298159Sbapt
76298159Sbapt  "NSDKLIBPATH=%WindowsSdkDir%\..\8.1\lib\winv6.3\um\x86"
77298159Sbapt
78298159SbaptBuilding for UWP 10.0
79298159Sbapt---------------------
80298159Sbapt
81298159Sbapt  FOR_WINRT=1 FOR_UWP=1
82298159Sbapt
83298159SbaptUsing Microsoft Visual C++ 2015 (or later) is required.  When using the
84298159Sbaptabove, something like the following macros will need to be added to the
85298159SbaptNMAKE command line as well:
86298159Sbapt
87298159Sbapt  "NSDKLIBPATH=%WindowsSdkDir%\..\10\lib\10.0.10586.0\um\x86"
88298159Sbapt  "PSDKLIBPATH=%WindowsSdkDir%\..\10\lib\10.0.10586.0\um\x86"
89298159Sbapt  "NUCRTLIBPATH=%UniversalCRTSdkDir%\..\10\lib\10.0.10586.0\ucrt\x86"
90298159Sbapt
91298159SbaptBuilding for the Windows 10 SDK
92298159Sbapt-------------------------------
93298159Sbapt
94298159Sbapt  FOR_WIN10=1
95298159Sbapt
96298159SbaptUsing Microsoft Visual C++ 2015 (or later) is required.  When using the
97298159Sbaptabove, no other macros should be needed on the NMAKE command line.
98298159Sbapt
99298159SbaptOther preprocessor defines
100298159Sbapt--------------------------
101298159Sbapt
102298159SbaptAdditionally, preprocessor defines may be specified by using the OPTS macro
103298159Sbapton the NMAKE command line.  However, not all possible preprocessor defines
104298159Sbaptmay be specified in this manner as some require the amalgamation to be built
105298159Sbaptwith them enabled (see http://www.sqlite.org/compile.html). For example, the
106298159Sbaptfollowing will work:
107298159Sbapt
108298159Sbapt  "OPTS=-DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_JSON1=1"
109298159Sbapt
110298159SbaptHowever, the following will not compile unless the amalgamation was built
111298159Sbaptwith it enabled:
112298159Sbapt
113298159Sbapt  "OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1"
114