Mercurial
comparison third_party/sqlite3/README.txt @ 167:589bab390fb4
[ThirdParty] Added sqlite3 to the third_party.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 16:28:45 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 166:78ea8d5ccc87 | 167:589bab390fb4 |
|---|---|
| 1 This 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-like 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 | |
| 12 WHY USE THIS PACKAGE? | |
| 13 ===================== | |
| 14 | |
| 15 The canonical make system for SQLite requires TCL as part of the build | |
| 16 process. Various TCL scripts are used to generate parts of the code and | |
| 17 TCL is used to run tests. But some people would prefer to build SQLite | |
| 18 using only generic tools and without having to install TCL. The purpose | |
| 19 of this package is to provide that capability. | |
| 20 | |
| 21 This package contains a pre-build SQLite amalgamation file "sqlite3.c" | |
| 22 (and its associated header file "sqlite3.h"). Because the | |
| 23 amalgamation has been pre-built, no TCL is required for the code | |
| 24 generate (the configure script itself is written in TCL but it can use | |
| 25 the embedded copy of JimTCL). | |
| 26 | |
| 27 REASONS TO USE THE CANONICAL BUILD SYSTEM RATHER THAN THIS PACKAGE | |
| 28 ================================================================== | |
| 29 | |
| 30 * the canonical build system allows you to run tests to verify that | |
| 31 the build worked | |
| 32 * the canonical build system supports more compile-time options | |
| 33 * the canonical build system works for any arbitrary check-in to | |
| 34 the SQLite source tree | |
| 35 | |
| 36 Step-by-step instructions on how to build using the canonical make | |
| 37 system for SQLite can be found at: | |
| 38 | |
| 39 https://sqlite.org/src/doc/trunk/doc/compile-for-unix.md | |
| 40 https://sqlite.org/src/doc/trunk/doc/compile-for-windows.md | |
| 41 | |
| 42 | |
| 43 SUMMARY OF HOW TO BUILD USING THIS PACKAGE | |
| 44 ========================================== | |
| 45 | |
| 46 Unix: ./configure; make | |
| 47 Windows: nmake /f Makefile.msc | |
| 48 | |
| 49 BUILDING ON POSIX | |
| 50 ================= | |
| 51 | |
| 52 The configure script follows common conventions, making it easy | |
| 53 to use for anyone who has configured a software tree before. | |
| 54 It supports a number of build-time flags, the full list of which | |
| 55 can be seen by running: | |
| 56 | |
| 57 ./configure --help | |
| 58 | |
| 59 The default value for the CFLAGS variable (options passed to the C | |
| 60 compiler) includes debugging symbols in the build, resulting in larger | |
| 61 binaries than are necessary. Override it on the configure command | |
| 62 line like this: | |
| 63 | |
| 64 $ CFLAGS="-Os" ./configure | |
| 65 | |
| 66 to produce a smaller installation footprint. | |
| 67 | |
| 68 Many SQLite compilation parameters can be defined by passing flags | |
| 69 to the configure script. Others may be passed on in the CFLAGS. For | |
| 70 example: | |
| 71 | |
| 72 $ CFLAGS="-Os -DSQLITE_OMIT_DEPRECATED" ./configure | |
| 73 | |
| 74 | |
| 75 BUILDING WITH MICROSOFT VISUAL C++ | |
| 76 ================================== | |
| 77 | |
| 78 To compile for Windows using Microsoft Visual C++: | |
| 79 | |
| 80 $ nmake /f Makefile.msc | |
| 81 | |
| 82 Using Microsoft Visual C++ 2005 (or later) is recommended. Several Windows | |
| 83 platform variants may be built by adding additional macros to the NMAKE | |
| 84 command line. | |
| 85 | |
| 86 | |
| 87 Other preprocessor defines | |
| 88 -------------------------- | |
| 89 | |
| 90 Additionally, preprocessor defines may be specified by using the OPTS macro | |
| 91 on the NMAKE command line. However, not all possible preprocessor defines | |
| 92 may be specified in this manner as some require the amalgamation to be built | |
| 93 with them enabled (see http://sqlite.org/compile.html). For example, the | |
| 94 following will work: | |
| 95 | |
| 96 "OPTS=-DSQLITE_ENABLE_STAT4=1 -DSQLITE_OMIT_JSON=1" | |
| 97 | |
| 98 However, the following will not compile unless the amalgamation was built | |
| 99 with it enabled: | |
| 100 | |
| 101 "OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1" |