Skip to content

Commit

Permalink
Introduce sqlite
Browse files Browse the repository at this point in the history
See #644
  • Loading branch information
jart committed Nov 29, 2024
1 parent 76cbe37 commit d8123c7
Show file tree
Hide file tree
Showing 8 changed files with 308,241 additions and 0 deletions.
2 changes: 2 additions & 0 deletions third_party/BUILD.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
include third_party/double-conversion/BUILD.mk
include third_party/mbedtls/BUILD.mk
include third_party/sqlite/BUILD.mk
include third_party/stb/BUILD.mk

.PHONY: o/$(MODE)/third_party
o/$(MODE)/third_party: \
o/$(MODE)/third_party/double-conversion \
o/$(MODE)/third_party/mbedtls \
o/$(MODE)/third_party/sqlite \
o/$(MODE)/third_party/stb \
16 changes: 16 additions & 0 deletions third_party/mbedtls/README.llamafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DESCRIPTION

mbedtls is a tls library created by arm limited

ORIGIN

https://github.com/jart/cosmopolitan/tree/master/third_party/mbedtls
2024-11-28

LICENSE

Apache 2.0

LOCAL CHANGES

- jart's x86-64 performance enhancements (see cosmopolitan)
56 changes: 56 additions & 0 deletions third_party/sqlite/BUILD.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘

PKGS += THIRD_PARTY_SQLITE

o/$(MODE)/third_party/sqlite/sqlite.a: \
o/$(MODE)/third_party/sqlite/sqlite3.o \

o/$(MODE)/third_party/sqlite/shell: \
o/$(MODE)/third_party/sqlite/shell.o \
o/$(MODE)/third_party/sqlite/sqlite3.o \

o/$(MODE)/third_party/sqlite/shell.o \
o/$(MODE)/third_party/sqlite/sqlite3.o: \
private CFLAGS += \
-mgcc \
-DSQLITE_CORE \
-DSQLITE_OS_UNIX \
-DHAVE_USLEEP \
-DHAVE_READLINK \
-DHAVE_FCHOWN \
-DHAVE_LOCALTIME_R \
-DHAVE_LSTAT \
-DHAVE_GMTIME_R \
-DHAVE_FDATASYNC \
-DHAVE_STRCHRNUL \
-DHAVE_LOCALTIME_R \
-DHAVE_MALLOC_USABLE_SIZE \
-DSQLITE_HAVE_C99_MATH_FUNCS \
-DSQLITE_ENABLE_STMT_SCANSTATUS \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_RTREE \
-DSQLITE_SOUNDEX \
-DSQLITE_ENABLE_GEOPOLY \
-DSQLITE_ENABLE_MATH_FUNCTIONS \
-USQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_DBPAGE_VTAB \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_ENABLE_BYTECODE_VTAB \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_HAVE_ZLIB \
-DSQLITE_INTROSPECTION_PRAGMAS \
-DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION \
-DSQLITE_ENABLE_STMT_SCANSTATUS \
-DSQLITE_DQS=0 \

o/$(MODE)/third_party/sqlite/shell.o \
o/$(MODE)/third_party/sqlite/sqlite3.o: \
third_party/sqlite/BUILD.mk

.PHONY: o/$(MODE)/third_party/sqlite
o/$(MODE)/third_party/sqlite: \
o/$(MODE)/third_party/sqlite/shell \
o/$(MODE)/third_party/sqlite/sqlite.a \
15 changes: 15 additions & 0 deletions third_party/sqlite/README.llamafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DESCRIPTION

SQLite is the world's most popular database

ORIGIN

https://www.sqlite.org/2024/sqlite-amalgamation-3470100.zip

LICENSE

Public domain or MIT

LOCAL CHANGES

- Renamed <zlib.h> to <third_party/zlib/zlib.h>
Loading

0 comments on commit d8123c7

Please sign in to comment.