xref: /freebsd/contrib/sqlite3/README.txt (revision 8ef24a0d4b28fe230e20637f56869cc4148cd2ca)
1This package contains:
2
3 * the SQLite library amalgamation source code file: sqlite3.c
4 * the sqlite3.h and sqlite3ext.h header files that define the C-language
5   interface to the sqlite3.c library file
6 * the shell.c file used to build the sqlite3 command-line shell program
7 * autoconf/automake installation infrastucture for building on POSIX
8   compliant systems
9 * a Makefile.msc, sqlite3.rc, and Replace.cs for building with Microsoft
10   Visual C++ on Windows
11
12SUMMARY OF HOW TO BUILD
13=======================
14
15  Unix:      ./configure; make
16  Windows:   nmake /f Makefile.msc
17
18BUILDING ON POSIX
19=================
20
21The generic installation instructions for autoconf/automake are found
22in the INSTALL file.
23
24The following SQLite specific boolean options are supported:
25
26  --enable-readline           use readline in shell tool   [default=yes]
27  --enable-threadsafe         build a thread-safe library  [default=yes]
28  --enable-dynamic-extensions support loadable extensions  [default=yes]
29
30The default value for the CFLAGS variable (options passed to the C
31compiler) includes debugging symbols in the build, resulting in larger
32binaries than are necessary. Override it on the configure command
33line like this:
34
35  $ CFLAGS="-Os" ./configure
36
37to produce a smaller installation footprint.
38
39Other SQLite compilation parameters can also be set using CFLAGS. For
40example:
41
42  $ CFLAGS="-Os -DSQLITE_THREADSAFE=0" ./configure
43
44
45BUILDING WITH MICROSOFT VISUAL C++
46==================================
47
48To compile for Windows using Microsoft Visual C++:
49
50  $ nmake /f Makefile.msc
51
52Using Microsoft Visual C++ 2005 (or later) is recommended.  Several Windows
53platform variants may be built by adding additional macros to the NMAKE
54command line.
55
56Building for WinRT 8.0
57----------------------
58
59  FOR_WINRT=1
60
61Using Microsoft Visual C++ 2012 (or later) is required.  When using the
62above, something like the following macro will need to be added to the
63NMAKE command line as well:
64
65  "NSDKLIBPATH=%WindowsSdkDir%\..\8.0\lib\win8\um\x86"
66
67Building for WinRT 8.1
68----------------------
69
70  FOR_WINRT=1
71
72Using Microsoft Visual C++ 2013 (or later) is required.  When using the
73above, something like the following macro will need to be added to the
74NMAKE command line as well:
75
76  "NSDKLIBPATH=%WindowsSdkDir%\..\8.1\lib\winv6.3\um\x86"
77
78Building for UWP 10.0
79---------------------
80
81  FOR_WINRT=1 FOR_UWP=1
82
83Using Microsoft Visual C++ 2015 (or later) is required.  When using the
84above, something like the following macros will need to be added to the
85NMAKE command line as well:
86
87  "NSDKLIBPATH=%WindowsSdkDir%\..\10\lib\10.0.10586.0\um\x86"
88  "PSDKLIBPATH=%WindowsSdkDir%\..\10\lib\10.0.10586.0\um\x86"
89  "NUCRTLIBPATH=%UniversalCRTSdkDir%\..\10\lib\10.0.10586.0\ucrt\x86"
90
91Building for the Windows 10 SDK
92-------------------------------
93
94  FOR_WIN10=1
95
96Using Microsoft Visual C++ 2015 (or later) is required.  When using the
97above, no other macros should be needed on the NMAKE command line.
98
99Other preprocessor defines
100--------------------------
101
102Additionally, preprocessor defines may be specified by using the OPTS macro
103on the NMAKE command line.  However, not all possible preprocessor defines
104may be specified in this manner as some require the amalgamation to be built
105with them enabled (see http://www.sqlite.org/compile.html). For example, the
106following will work:
107
108  "OPTS=-DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_JSON1=1"
109
110However, the following will not compile unless the amalgamation was built
111with it enabled:
112
113  "OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1"
114