From abf470d7a34f59f8b47e878c88e4f9041a344601 Mon Sep 17 00:00:00 2001 From: stephan Date: Sat, 19 Oct 2024 18:31:47 +0000 Subject: [PATCH] Factor out all autosetup-processed @if/@else blocks from Makefile.in in prep for moving most of the makefile code into main.mk (which has, so far, been completely overlooked in this port but will now become the main basis for the static parts of the build). The idea is that all build configuration goes into a platform-dependent makefile which then includes main.mk. FossilOrigin-Name: 707e0f5857d58ec8b457270f988126b1dd0f01b5a3445a43ff7b5429324b1b3d --- Makefile.in | 188 ++++---- auto.def | 20 +- main.mk | 1163 +------------------------------------------------ manifest | 16 +- manifest.uuid | 2 +- 5 files changed, 128 insertions(+), 1261 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6576b58f63..fb9df642e3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,13 +19,15 @@ TOP = @abs_top_srcdir@ # top_srcdir = @top_srcdir@ # abs_top_srcdir = @abs_top_srcdir@ # abs_top_builddir = @abs_top_builddir@ -LDFLAGS_ZLIB = @LDFLAGS_ZLIB@ -LDFLAGS_MATH = @LDFLAGS_MATH@ -LDFLAGS_RPATH = @LDFLAGS_RPATH@ -LDFLAGS_READLINE = @LDFLAGS_READLINE@ -LDFLAGS_PTHREAD = @LDFLAGS_PTHREAD@ -LD = @LD@ -AR = @AR@ +LDFLAGS_ZLIB ?= @LDFLAGS_ZLIB@ +LDFLAGS_MATH ?= @LDFLAGS_MATH@ +LDFLAGS_RPATH ?= @LDFLAGS_RPATH@ +LDFLAGS_READLINE ?= @LDFLAGS_READLINE@ +LDFLAGS_PTHREAD ?= @LDFLAGS_PTHREAD@ +ENABLE_SHARED ?= @ENABLE_SHARED@ +HAVE_WASI_SDK ?= @HAVE_WASI_SDK@ +AR ?= @AR@ +CC ?= @CC@ # C Compiler and options for use in building executables that # will run on the platform that is doing the build. @@ -38,12 +40,8 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@ # are provide so that these aspects of the build process can be changed # on the "make" command-line. Ex: "make CC=clang CFLAGS=-fsanitize=undefined" # -CC = @CC@ -CFLAGS ?= @CFLAGS@ +CFLAGS ?= @CFLAGS@ @SH_CFLAGS@ CPPFLAGS ?= @CPPFLAGS@ -@if SH_CFLAGS -CFLAGS += @SH_CFLAGS@ -@endif # CFLAGS_stdio3 ==> for sqlite3_stdio.h CFLAGS_stdio3 := -I${TOP}/ext/misc TCC = ${CC} ${CFLAGS} @@ -91,7 +89,8 @@ CFLAGS_readline = -DHAVE_READLINE=@HAVE_READLINE@ @CFLAGS_READLINE@ # those in $(LDFLAGS_libsqlite3) and include those flags for both # $(libsqlite3.SO) and any apps which directly link in either # sqlite3.o or its origin sources. -TLIBS = @LIBS@ $(LIBS) +LIBS += @LIBS@ +TLIBS = $(LIBS) # # JimTCL is part of the autosetup suite and is suitable for all @@ -103,10 +102,9 @@ TLIBS = @LIBS@ $(LIBS) # generators. # JIMSH = @srcdir@/jimsh -@if CFLAGS_JIMSH +CFLAGS_JIMSH ?= @CFLAGS_JIMSH@ $(JIMSH): $(TOP)/autosetup/jimsh0.c - $(BCC) -o $(JIMSH) @CFLAGS_JIMSH@ $< -@endif + $(BCC) -o $(JIMSH) $(CFLAGS_JIMSH) $< # BTCLSH is the tclsh-compatible app used for running various code # generators and other in-tree tools, as opposed to the TCL-based @@ -177,6 +175,13 @@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_EXEC_PREFIX = @TCL_EXEC_PREFIX@ TCL_VERSION = @TCL_VERSION@ +TCLLIB_RPATH = @TCLLIB_RPATH@ +TCLLIBDIR = @TCLLIBDIR@ + +# EMCC_WRAPPER must refer to the genuine emcc binary, or a +# call-compatible wrapper, e.g. $(TOP)/tool/emcc.sh. If it's empty, +# build components requiring Emscripten will not build. +EMCC_WRAPPER = @EMCC_WRAPPER@ # Additional options when running tests using testrunner.tcl @@ -210,12 +215,12 @@ TLINK_EXTRAS += $(GCOV_LDFLAGS$(USE_GCOV)) # Some standard variables and programs # -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ -pkgconfigdir = $(libdir)/pkgconfig -bindir = @bindir@ -includedir = @includedir@ +prefix ?= @prefix@ +exec_prefix ?= @exec_prefix@ +libdir ?= @libdir@ +pkgconfigdir ?= $(libdir)/pkgconfig +bindir ?= @bindir@ +includedir ?= @includedir@ INSTALL = @BIN_INSTALL@ INSTALL_noexec = $(INSTALL) -m 0644 # ^^^ do not use GNU-specific flags to $(INSTALL), e.g. --mode=... @@ -230,11 +235,6 @@ install.pkgconfigdir = "$(DESTDIR)$(pkgconfigdir)" $(install.bindir) $(install.libdir) $(install.includedir) $(install.pkgconfigdir): $(INSTALL) -d $@ -#XX## libtool compile/link/install -#XX#TCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC) $(TCOMPILE_EXTRAS) -#XX#TLINK = $(LIBTOOL) --mode=link $(TCC) $(TCOMPILE_EXTRAS) @LDFLAGS@ $(TLINK_EXTRAS) -#XX#LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) - # TCOMPILE = generic target platform compiler invocation TCOMPILE = $(TCC) $(TCOMPILE_EXTRAS) # TLINK = compiler invocation for when the target will be an executable @@ -741,90 +741,83 @@ ST_OPT = -DSQLITE_OS_KV_OPTIONAL # In wasi-sdk builds, remove the CLI shell build from 'all'. -@if HAVE_WASI_SDK - SQLITE3_SHELL_TARGET = -@else - SQLITE3_SHELL_TARGET = sqlite3$(TEXE) -@endif - -@if HAVE_TCL -libtclsqlite3.SO = libtclsqlite3$(TDLL) -@else -libtclsqlite3.SO = -@endif +target_sqlite3_shell_1 = +target_sqlite3_shell_0 = sqlite3$(TEXE) +target_sqlite3_shell = $(target_sqlite3_shell_$(HAVE_WASI_SDK)) # # This is the default Makefile target. The objects listed here # are what get build when you type just "make" with no arguments. # -all: sqlite3.h sqlite3.c shell.c $(SQLITE3_SHELL_TARGET) +all: sqlite3.h sqlite3.c shell.c $(target_sqlite3_shell) # Re-run $(TOP)/configure with the same args invoked to produce this # makefile. # -AUTOREMAKE = @SQLITE_AUTOREMAKE@ +AS_AUTOREMAKE = @SQLITE_AUTOREMAKE@ Makefile: $(TOP)/Makefile.in $(AS_AUTO_DEF) - $(AUTOREMAKE) + $(AS_AUTOREMAKE) @touch $@ sqlite3.pc: $(TOP)/sqlite3.pc.in $(AS_AUTO_DEF) - $(AUTOREMAKE) + $(AS_AUTOREMAKE) @touch $@ install-pc: sqlite3.pc $(install.pkgconfigdir) $(INSTALL_noexec) sqlite3.pc $(install.pkgconfigdir) install: install-pc sqlite_cfg.h: $(TOP)/sqlite_cfg.h.in $(AS_AUTO_DEF) - $(AUTOREMAKE) + $(AS_AUTOREMAKE) @touch $@ -libsqlite3.SO = libsqlite3$(TDLL) libsqlite3.LIB = libsqlite3$(TLIB) -# LDFLAGS_libsqlite3 should be used with any target which either -# results in building libsqlite3.so, compiles sqlite3.c directly, or -# links in either of $(LIBOBJSO) or $(LIBOBJS1). Note that these -# flags are for the target build platform, not necessarily localhost. -# i.e. it should be used with $(TCC) or $(TLINK) but not $(BCC). -LDFLAGS_libsqlite3 = \ - $(LDFLAGS_RPATH) @LIBS@ $(LIBS) $(LDFLAGS_PTHREAD) \ - $(LDFLAGS_MATH) $(LDFLAGS_ZLIB) - -@if ENABLE_SHARED -$(libsqlite3.SO): $(LIBOBJ) - $(TLINK_shared) -o $@ \ - $(LIBOBJ) $(TLIBS) $(LDFLAGS_libsqlite3) -so: $(libsqlite3.SO) -all: so -@else -$(libsqlite3.SO): - @echo "Build of $@ was explicitly disabled."; exit 1 -@endif $(libsqlite3.LIB): $(LIBOBJ) $(AR) crs $@ $(LIBOBJ) lib: $(libsqlite3.LIB) all: lib -# Install the $(libsqlite3.SO) as $(libsqlite3.SO).@RELEASE@ and +# LDFLAGS_libsqlite3 should be used with any target which either +# results in building libsqlite3.so, compiles sqlite3.c directly, or +# links in either of $(LIBOBJSO) or $(LIBOBJS1). Note that these +# flags are for the target build platform, not necessarily localhost. +# i.e. it should be used with $(TCC) or $(TLINK) but not $(BCC). +LDFLAGS_libsqlite3 = \ + $(LDFLAGS_RPATH) $(TLIBS) $(LDFLAGS_PTHREAD) \ + $(LDFLAGS_MATH) $(LDFLAGS_ZLIB) + +libsqlite3.SO = libsqlite3$(TDLL) +target_libsqlite3_so_0 = +target_libsqlite3_so_1 = $(libsqlite3.SO) +target_libsqlite3_so = $(target_libsqlite3_so_$(ENABLE_SHARED)) + +$(libsqlite3.SO): $(LIBOBJ) + @if [ "x1" != "x$(ENABLE_SHARED)" ]; then echo "Shared lib build is disabled." 1>&2; exit 1; fi + $(TLINK_shared) -o $@ \ + $(LIBOBJ) $(TLIBS) $(LDFLAGS_libsqlite3) +so: $(target_libsqlite3_so) +all: so + +# Install the $(libsqlite3.SO) as $(libsqlite3.SO).$(RELEASE) and # create symlinks which point to it. Do we really need all of this # hoop-jumping? Can we not simply install the .so as-is to # libsqlite3.so (without the versioned bits)? # # The historical SQLite build always used a version number of 0.8.6 -# for reasons lost to history. +# for reasons lost to history but having something to do with libtool +# (which is not longer used in this tree). # -install-so: $(install.libdir) $(libsqlite3.SO) - $(INSTALL) $(libsqlite3.SO) $(install.libdir) +install-so-1: $(install.libdir) $(libsqlite3.SO) + $(INSTALL) $(libsqlite3.SO) $(install.libdir); \ cd $(install.libdir); \ - rm -f $(libsqlite3.SO).3 $(libsqlite3.SO).@RELEASE@; \ - mv $(libsqlite3.SO) $(libsqlite3.SO).@RELEASE@; \ - ln -s $(libsqlite3.SO).@RELEASE@ $(libsqlite3.SO).3; \ + rm -f $(libsqlite3.SO).3 $(libsqlite3.SO).$(RELEASE); \ + mv $(libsqlite3.SO) $(libsqlite3.SO).$(RELEASE); \ + ln -s $(libsqlite3.SO).$(RELEASE) $(libsqlite3.SO).3; \ ln -s $(libsqlite3.SO).3 $(libsqlite3.SO) -@if ENABLE_SHARED -install: install-so -@endif +install-so-0: +install: install-so-$(ENABLE_SHARED) # Install $(libsqlite3.LIB) # @@ -838,26 +831,31 @@ install-includes: sqlite3.h $(install.includedir) $(INSTALL_noexec) sqlite3.h "$(TOP)/src/sqlite3ext.h" $(install.includedir) install: install-includes -@if HAVE_TCL +# libtclsqlite3... +# +libtclsqlite3.SO = libtclsqlite3$(TDLL) +target_libtclsqlite3_1 = $(libtclsqlite3.SO) +target_libtclsqlite3_0 = +target_libtclsqlite3 = $(target_libtclsqlite3_$(HAVE_TCL)) $(libtclsqlite3.SO): tclsqlite.o $(libsqlite3.LIB) $(TLINK_shared) -o $@ tclsqlite.o \ $(TCL_INCLUDE_SPEC) $(TCL_STUB_LIB_SPEC) $(LDFLAGS_libsqlite3) \ - $(libsqlite3.LIB) @TCLLIB_RPATH@ -libtcl: $(libtclsqlite3.SO) + $(libsqlite3.LIB) $(TCLLIB_RPATH) -all: $(libtclsqlite3.SO) +libtcl: $(target_libtclsqlite3) + +all: $(target_libtclsqlite3) pkgIndex.tcl: echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@ -@if TCLLIBDIR -install.tcldir = "$(DESTDIR)@TCLLIBDIR@" -install-tcl: install-lib $(libtclsqlite3.SO) pkgIndex.tcl +install.tcldir = "$(DESTDIR)$(TCLLIBDIR)" +install-tcl: install-lib $(target_libtclsqlite3) pkgIndex.tcl + @if [ "x$(DESTDIR)" = "x$(install.tcldir)" ]; then echo "TCLLIBDIR is not set." 1>&2; exit 1; fi $(INSTALL) -d $(install.tcldir) $(INSTALL) $(libtclsqlite3.SO) $(install.tcldir) $(INSTALL_noexec) pkgIndex.tcl $(install.tcldir) install: install-tcl -@endif tclsqlite3.c: sqlite3.c echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c @@ -892,21 +890,15 @@ tclextension-uninstall: tclextension-list: $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --info -# end of @if HAVE_TCL -@endif - sqlite3$(TEXE): shell.c sqlite3.c $(TCC) $(CFLAGS_readline) $(SHELL_OPT) -o $@ \ shell.c sqlite3.c \ $(LDFLAGS_libsqlite3) $(LDFLAGS_READLINE) -cli: sqlite3$(TEXE) -@if !HAVE_WASI_SDK -all: cli -@endif -install-cli: sqlite3$(TEXT) $(install.bindir) +install-cli-0: sqlite3$(TEXT) $(install.bindir) $(INSTALL) -s sqlite3$(TEXT) $(install.bindir) -install: install-cli +install-cli-1: +install: install-cli-$(HAVE_WASI_SDK) sqldiff$(TEXE): $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.o sqlite3.h $(TLINK) $(CFLAGS_stdio3) -o $@ $(TOP)/tool/sqldiff.c sqlite3.o $(LDFLAGS_libsqlite3) @@ -1045,11 +1037,10 @@ has_tclsh85: touch has_tclsh85 has_tclconfig: -@if !TCL_CONFIG_SH - @echo 'ERROR: Requires access to "tclConfig.sh" which "configure" was not able to locate'; exit 1; -@else + @if [ x = "x$(TCL_CONFIG_SH)" ]; then + echo 'TCL_CONFIG_SH must be set to point to a "tclConfig.sh"' 1>&2; exit 1; \ + fi touch has_tclconfig -@endif # # This target creates a directory named "tsrc" and fills it with @@ -1819,13 +1810,12 @@ sqlite3.dll: $(LIBOBJ) sqlite3.def # # Fiddle app # -@if EMCC_WRAPPER fiddle: sqlite3.c shell.c + @if [ x = "x$(EMCC_WRAPPER)" ]; then \ + echo "Emscripten's emcc not found. Cannot build fiddle." 1&>2; \ + exit 1; \ + fi make -C ext/wasm fiddle emcc_opt=-Os -@else -fiddle: - @echo "Configure script did not find emcc, so fiddle build is not available." 2>&1; exit 1 -@endif # # Spell-checking for source comments diff --git a/auto.def b/auto.def index ee958ec23f..c93aceef49 100644 --- a/auto.def +++ b/auto.def @@ -82,8 +82,7 @@ define RELEASE $RELEASE puts "RELEASE = $RELEASE" puts "VERSION = $VERSION" -define SQLITE_AUTOREMAKE cd -define-append SQLITE_AUTOREMAKE $autosetup(srcdir) && $top_srcdir/configure {*}$autosetup(argv) +define-append SQLITE_AUTOREMAKE cd $autosetup(srcdir) && $top_srcdir/configure {*}$autosetup(argv) set outOfTreeBuild 0 if {![file exists sqlite3.pc.in]} { @@ -188,9 +187,14 @@ if {"" eq [hwaci-bin-define install]} { msg-result "Cannot find install binary, so 'make install' will not work." # Reminder: we historically have ./install-sh in the source tree. # Can we not simply use that? + # # define BIN_INSTALL "$top_srcdir/install-sh" - # Nope: it MOVES its source files over the target, which - # break the installation in some cases. + # + # Nope: it MOVES its source files over the target, which breaks the + # installation in some cases. It's easy to hack to copy instead of + # mv (simply replace the instcmd=... bit) but that won't retain the + # source timestamp and permissions unless we use cp's -p flag, which + # may not be portable enough. } @@ -222,6 +226,7 @@ define BUILD_CFLAGS [get-env CFLAGS {-g}] # # It's unclear whether we can actually get away with making these # changes to the autosetup environment. +define HAVE_WASI_SDK 0 if {1} { set wasiSdkDir [opt-val with-wasi-sdk] ; # ??? [lindex [opt-val with-wasi-sdk] end] #puts "x wasiSdkDir=$wasiSdkDir foo=[lindex [opt-val with-wasi-sdk] end]" @@ -319,7 +324,7 @@ msg-checking "Debug build? " hwaci-if-opt-truthy with-debug { define SQLITE_DEBUG 1 - define TARGET_DEBUG {-DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0 -Wall} + define TARGET_DEBUG {-g -DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0 -Wall} msg-result yes } { define TARGET_DEBUG {-DNDEBUG} @@ -848,6 +853,11 @@ if {0 && "" ne [get-define CFLAGS_JIMSH]} { define-append CFLAGS_JIMSH -DHAVE_LONG_LONG; # SQLite relies on long long, so we know it's available }; # JimTCL +if {"" eq [get-define CFLAGS_JIMSH]} { + define USE_OWN_JIMSH 0 +} else { + define USE_OWN_JIMSH 1 +} ######################################################################## # Determine proper rpath-handling flags diff --git a/main.mk b/main.mk index 3c2c379a39..fa9f7cce1a 100644 --- a/main.mk +++ b/main.mk @@ -1,8 +1,14 @@ - ############################################################################### -# The following macros should be defined before this script is +# This is the main makefile for sqlite. It expects to be included from +# a higher-level makefile which configures any dynamic state needed by +# this one. +# +# The following variables must be defined before this script is # invoked: # +#XX# FIXME: the list of vars from the historical main.mk is dated and +#XX# needs to be updated for autosetup. +# # TOP The toplevel directory of the source tree. This is the # directory that contains this "Makefile.in" and the # "configure.in" script. @@ -10,1159 +16,20 @@ # BCC C Compiler and options for use in building executables that # will run on the platform that is doing the build. # -# THREADLIB Specify any extra linker options needed to make the library -# thread safe -# -# LIBS Extra libraries options -# -# OPTS Extra compiler command-line options. -# -# EXE The suffix to add to executable files. ".exe" for windows -# and "" for Unix. -# # TCC C Compiler and options for use in building executables that # will run on the target platform. This is usually the same # as BCC, unless you are cross-compiling. # # AR Tools used to build a static library. -# RANLIB # -# TCL_FLAGS Extra compiler options needed for programs that use the -# TCL library. +# BEXE File extension for executables on the build platform. ".exe" +# for Windows and "" everywhere else. # -# LIBTCL Linker options needed to link against the TCL library. +# TEXE File extension for executables on the target platform. ".exe" +# for Windows and "" everywhere else. # -# READLINE_FLAGS Compiler options needed for programs that use the -# readline() library. +# ... and many, many more ... # -# LIBREADLINE Linker options needed by programs using readline() must -# link against. -# -# Once the macros above are defined, the rest of this make script will -# build the SQLite library and testing tools. +# Once the variables above are defined, the rest of this make script +# will build the SQLite library and testing tools. ################################################################################ - -# If OPTIONS... is specified on the command-line, append its value to OPTS -# -OPTS += $(OPTIONS) - -# This is how we compile -# -TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) -TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3 -TCCX += -I$(TOP)/ext/async -I$(TOP)/ext/userauth -TCCX += -I$(TOP)/ext/session -TCCX += -I$(TOP)/ext/fts5 -THREADLIB += $(LIBS) - -# Object files for the SQLite library. -# -LIBOBJ+= vdbe.o parse.o \ - alter.o analyze.o attach.o auth.o \ - backup.o bitvec.o btmutex.o btree.o build.o \ - callback.o complete.o ctime.o \ - date.o dbpage.o dbstat.o delete.o expr.o \ - fault.o fkey.o \ - fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \ - fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \ - fts3_tokenize_vtab.o \ - fts3_unicode.o fts3_unicode2.o \ - fts3_write.o fts5.o func.o global.o hash.o \ - icu.o insert.o json.o legacy.o loadext.o \ - main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \ - memdb.o memjournal.o \ - mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \ - notify.o opcodes.o os.o os_kv.o os_unix.o os_win.o \ - pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \ - random.o resolve.o rowset.o rtree.o \ - select.o sqlite3rbu.o status.o stmt.o \ - table.o threads.o tokenize.o treeview.o trigger.o \ - update.o upsert.o userauth.o util.o vacuum.o \ - vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \ - vdbetrace.o vdbevtab.o \ - wal.o walker.o where.o wherecode.o whereexpr.o \ - utf.o vtab.o window.o - -LIBOBJ += sqlite3session.o - -# All of the source code files. -# -SRC = \ - $(TOP)/src/alter.c \ - $(TOP)/src/analyze.c \ - $(TOP)/src/attach.c \ - $(TOP)/src/auth.c \ - $(TOP)/src/backup.c \ - $(TOP)/src/bitvec.c \ - $(TOP)/src/btmutex.c \ - $(TOP)/src/btree.c \ - $(TOP)/src/btree.h \ - $(TOP)/src/btreeInt.h \ - $(TOP)/src/build.c \ - $(TOP)/src/callback.c \ - $(TOP)/src/complete.c \ - $(TOP)/src/ctime.c \ - $(TOP)/src/date.c \ - $(TOP)/src/dbpage.c \ - $(TOP)/src/dbstat.c \ - $(TOP)/src/delete.c \ - $(TOP)/src/expr.c \ - $(TOP)/src/fault.c \ - $(TOP)/src/fkey.c \ - $(TOP)/src/func.c \ - $(TOP)/src/global.c \ - $(TOP)/src/hash.c \ - $(TOP)/src/hash.h \ - $(TOP)/src/hwtime.h \ - $(TOP)/src/insert.c \ - $(TOP)/src/json.c \ - $(TOP)/src/legacy.c \ - $(TOP)/src/loadext.c \ - $(TOP)/src/main.c \ - $(TOP)/src/malloc.c \ - $(TOP)/src/mem0.c \ - $(TOP)/src/mem1.c \ - $(TOP)/src/mem2.c \ - $(TOP)/src/mem3.c \ - $(TOP)/src/mem5.c \ - $(TOP)/src/memdb.c \ - $(TOP)/src/memjournal.c \ - $(TOP)/src/msvc.h \ - $(TOP)/src/mutex.c \ - $(TOP)/src/mutex.h \ - $(TOP)/src/mutex_noop.c \ - $(TOP)/src/mutex_unix.c \ - $(TOP)/src/mutex_w32.c \ - $(TOP)/src/notify.c \ - $(TOP)/src/os.c \ - $(TOP)/src/os.h \ - $(TOP)/src/os_common.h \ - $(TOP)/src/os_setup.h \ - $(TOP)/src/os_kv.c \ - $(TOP)/src/os_unix.c \ - $(TOP)/src/os_win.c \ - $(TOP)/src/os_win.h \ - $(TOP)/src/pager.c \ - $(TOP)/src/pager.h \ - $(TOP)/src/parse.y \ - $(TOP)/src/pcache.c \ - $(TOP)/src/pcache.h \ - $(TOP)/src/pcache1.c \ - $(TOP)/src/pragma.c \ - $(TOP)/src/pragma.h \ - $(TOP)/src/prepare.c \ - $(TOP)/src/printf.c \ - $(TOP)/src/random.c \ - $(TOP)/src/resolve.c \ - $(TOP)/src/rowset.c \ - $(TOP)/src/select.c \ - $(TOP)/src/status.c \ - $(TOP)/src/shell.c.in \ - $(TOP)/src/sqlite.h.in \ - $(TOP)/src/sqlite3ext.h \ - $(TOP)/src/sqliteInt.h \ - $(TOP)/src/sqliteLimit.h \ - $(TOP)/src/table.c \ - $(TOP)/src/tclsqlite.c \ - $(TOP)/src/threads.c \ - $(TOP)/src/tokenize.c \ - $(TOP)/src/treeview.c \ - $(TOP)/src/trigger.c \ - $(TOP)/src/utf.c \ - $(TOP)/src/update.c \ - $(TOP)/src/upsert.c \ - $(TOP)/src/util.c \ - $(TOP)/src/vacuum.c \ - $(TOP)/src/vdbe.c \ - $(TOP)/src/vdbe.h \ - $(TOP)/src/vdbeapi.c \ - $(TOP)/src/vdbeaux.c \ - $(TOP)/src/vdbeblob.c \ - $(TOP)/src/vdbemem.c \ - $(TOP)/src/vdbesort.c \ - $(TOP)/src/vdbetrace.c \ - $(TOP)/src/vdbevtab.c \ - $(TOP)/src/vdbeInt.h \ - $(TOP)/src/vtab.c \ - $(TOP)/src/vxworks.h \ - $(TOP)/src/wal.c \ - $(TOP)/src/wal.h \ - $(TOP)/src/walker.c \ - $(TOP)/src/where.c \ - $(TOP)/src/wherecode.c \ - $(TOP)/src/whereexpr.c \ - $(TOP)/src/whereInt.h \ - $(TOP)/src/window.c - -# Source code for extensions -# -SRC += \ - $(TOP)/ext/fts3/fts3.c \ - $(TOP)/ext/fts3/fts3.h \ - $(TOP)/ext/fts3/fts3Int.h \ - $(TOP)/ext/fts3/fts3_aux.c \ - $(TOP)/ext/fts3/fts3_expr.c \ - $(TOP)/ext/fts3/fts3_hash.c \ - $(TOP)/ext/fts3/fts3_hash.h \ - $(TOP)/ext/fts3/fts3_icu.c \ - $(TOP)/ext/fts3/fts3_porter.c \ - $(TOP)/ext/fts3/fts3_snippet.c \ - $(TOP)/ext/fts3/fts3_tokenizer.h \ - $(TOP)/ext/fts3/fts3_tokenizer.c \ - $(TOP)/ext/fts3/fts3_tokenizer1.c \ - $(TOP)/ext/fts3/fts3_tokenize_vtab.c \ - $(TOP)/ext/fts3/fts3_unicode.c \ - $(TOP)/ext/fts3/fts3_unicode2.c \ - $(TOP)/ext/fts3/fts3_write.c -SRC += \ - $(TOP)/ext/icu/sqliteicu.h \ - $(TOP)/ext/icu/icu.c -SRC += \ - $(TOP)/ext/rtree/sqlite3rtree.h \ - $(TOP)/ext/rtree/rtree.h \ - $(TOP)/ext/rtree/rtree.c \ - $(TOP)/ext/rtree/geopoly.c -SRC += \ - $(TOP)/ext/session/sqlite3session.c \ - $(TOP)/ext/session/sqlite3session.h -SRC += \ - $(TOP)/ext/userauth/userauth.c \ - $(TOP)/ext/userauth/sqlite3userauth.h -SRC += \ - $(TOP)/ext/rbu/sqlite3rbu.c \ - $(TOP)/ext/rbu/sqlite3rbu.h -SRC += \ - $(TOP)/ext/misc/stmt.c - -# FTS5 things -# -FTS5_HDR = \ - $(TOP)/ext/fts5/fts5.h \ - $(TOP)/ext/fts5/fts5Int.h \ - fts5parse.h - -FTS5_SRC = \ - $(TOP)/ext/fts5/fts5_aux.c \ - $(TOP)/ext/fts5/fts5_buffer.c \ - $(TOP)/ext/fts5/fts5_main.c \ - $(TOP)/ext/fts5/fts5_config.c \ - $(TOP)/ext/fts5/fts5_expr.c \ - $(TOP)/ext/fts5/fts5_hash.c \ - $(TOP)/ext/fts5/fts5_index.c \ - fts5parse.c \ - $(TOP)/ext/fts5/fts5_storage.c \ - $(TOP)/ext/fts5/fts5_tokenize.c \ - $(TOP)/ext/fts5/fts5_unicode2.c \ - $(TOP)/ext/fts5/fts5_varint.c \ - $(TOP)/ext/fts5/fts5_vocab.c \ - -LSM1_SRC = \ - $(TOP)/ext/lsm1/lsm.h \ - $(TOP)/ext/lsm1/lsmInt.h \ - $(TOP)/ext/lsm1/lsm_ckpt.c \ - $(TOP)/ext/lsm1/lsm_file.c \ - $(TOP)/ext/lsm1/lsm_log.c \ - $(TOP)/ext/lsm1/lsm_main.c \ - $(TOP)/ext/lsm1/lsm_mem.c \ - $(TOP)/ext/lsm1/lsm_mutex.c \ - $(TOP)/ext/lsm1/lsm_shared.c \ - $(TOP)/ext/lsm1/lsm_sorted.c \ - $(TOP)/ext/lsm1/lsm_str.c \ - $(TOP)/ext/lsm1/lsm_tree.c \ - $(TOP)/ext/lsm1/lsm_unix.c \ - $(TOP)/ext/lsm1/lsm_varint.c \ - $(TOP)/ext/lsm1/lsm_vtab.c \ - $(TOP)/ext/lsm1/lsm_win32.c - - -# Generated source code files -# -SRC += \ - keywordhash.h \ - opcodes.c \ - opcodes.h \ - parse.c \ - parse.h \ - shell.c \ - sqlite3.h - - -# Source code to the test files. -# -TESTSRC = \ - $(TOP)/ext/expert/sqlite3expert.c \ - $(TOP)/ext/expert/test_expert.c \ - $(TOP)/ext/fts3/fts3_term.c \ - $(TOP)/ext/fts3/fts3_test.c \ - $(TOP)/ext/rbu/test_rbu.c \ - $(TOP)/src/test1.c \ - $(TOP)/src/test2.c \ - $(TOP)/src/test3.c \ - $(TOP)/src/test4.c \ - $(TOP)/src/test5.c \ - $(TOP)/src/test6.c \ - $(TOP)/src/test8.c \ - $(TOP)/src/test9.c \ - $(TOP)/src/test_autoext.c \ - $(TOP)/src/test_async.c \ - $(TOP)/src/test_backup.c \ - $(TOP)/src/test_bestindex.c \ - $(TOP)/src/test_blob.c \ - $(TOP)/src/test_btree.c \ - $(TOP)/src/test_config.c \ - $(TOP)/src/test_delete.c \ - $(TOP)/src/test_demovfs.c \ - $(TOP)/src/test_devsym.c \ - $(TOP)/src/test_fs.c \ - $(TOP)/src/test_func.c \ - $(TOP)/src/test_hexio.c \ - $(TOP)/src/test_init.c \ - $(TOP)/src/test_intarray.c \ - $(TOP)/src/test_journal.c \ - $(TOP)/src/test_malloc.c \ - $(TOP)/src/test_md5.c \ - $(TOP)/src/test_multiplex.c \ - $(TOP)/src/test_mutex.c \ - $(TOP)/src/test_onefile.c \ - $(TOP)/src/test_osinst.c \ - $(TOP)/src/test_pcache.c \ - $(TOP)/src/test_quota.c \ - $(TOP)/src/test_rtree.c \ - $(TOP)/src/test_schema.c \ - $(TOP)/src/test_sqllog.c \ - $(TOP)/src/test_superlock.c \ - $(TOP)/src/test_syscall.c \ - $(TOP)/src/test_tclsh.c \ - $(TOP)/src/test_tclvar.c \ - $(TOP)/src/test_thread.c \ - $(TOP)/src/test_vdbecov.c \ - $(TOP)/src/test_vfs.c \ - $(TOP)/src/test_windirent.c \ - $(TOP)/src/test_window.c \ - $(TOP)/src/test_wsd.c - -# Extensions to be statically loaded. -# -TESTSRC += \ - $(TOP)/ext/misc/amatch.c \ - $(TOP)/ext/misc/appendvfs.c \ - $(TOP)/ext/misc/basexx.c \ - $(TOP)/ext/misc/carray.c \ - $(TOP)/ext/misc/cksumvfs.c \ - $(TOP)/ext/misc/closure.c \ - $(TOP)/ext/misc/csv.c \ - $(TOP)/ext/misc/decimal.c \ - $(TOP)/ext/misc/eval.c \ - $(TOP)/ext/misc/explain.c \ - $(TOP)/ext/misc/fileio.c \ - $(TOP)/ext/misc/fuzzer.c \ - $(TOP)/ext/misc/ieee754.c \ - $(TOP)/ext/misc/mmapwarm.c \ - $(TOP)/ext/misc/nextchar.c \ - $(TOP)/ext/misc/normalize.c \ - $(TOP)/ext/misc/percentile.c \ - $(TOP)/ext/misc/prefixes.c \ - $(TOP)/ext/misc/qpvtab.c \ - $(TOP)/ext/misc/randomjson.c \ - $(TOP)/ext/misc/regexp.c \ - $(TOP)/ext/misc/remember.c \ - $(TOP)/ext/misc/series.c \ - $(TOP)/ext/misc/spellfix.c \ - $(TOP)/ext/misc/stmtrand.c \ - $(TOP)/ext/misc/totype.c \ - $(TOP)/ext/misc/unionvtab.c \ - $(TOP)/ext/misc/wholenumber.c \ - $(TOP)/ext/misc/zipfile.c \ - $(TOP)/ext/fts5/fts5_tcl.c \ - $(TOP)/ext/fts5/fts5_test_mi.c \ - $(TOP)/ext/fts5/fts5_test_tok.c \ - $(TOP)/ext/rtree/test_rtreedoc.c \ - $(TOP)/ext/recover/sqlite3recover.c \ - $(TOP)/ext/recover/dbdata.c \ - $(TOP)/ext/recover/test_recover.c \ - $(TOP)/ext/intck/test_intck.c \ - $(TOP)/ext/intck/sqlite3intck.c - - -#TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c - -TESTSRC2 = \ - $(TOP)/src/attach.c \ - $(TOP)/src/backup.c \ - $(TOP)/src/btree.c \ - $(TOP)/src/build.c \ - $(TOP)/src/date.c \ - $(TOP)/src/dbpage.c \ - $(TOP)/src/dbstat.c \ - $(TOP)/src/expr.c \ - $(TOP)/src/func.c \ - $(TOP)/src/global.c \ - $(TOP)/src/insert.c \ - $(TOP)/src/wal.c \ - $(TOP)/src/main.c \ - $(TOP)/src/mem5.c \ - $(TOP)/src/os.c \ - $(TOP)/src/os_kv.c \ - $(TOP)/src/os_unix.c \ - $(TOP)/src/os_win.c \ - $(TOP)/src/pager.c \ - $(TOP)/src/pragma.c \ - $(TOP)/src/prepare.c \ - $(TOP)/src/printf.c \ - $(TOP)/src/random.c \ - $(TOP)/src/pcache.c \ - $(TOP)/src/pcache1.c \ - $(TOP)/src/select.c \ - $(TOP)/src/threads.c \ - $(TOP)/src/tokenize.c \ - $(TOP)/src/treeview.c \ - $(TOP)/src/utf.c \ - $(TOP)/src/util.c \ - $(TOP)/src/vdbeapi.c \ - $(TOP)/src/vdbeaux.c \ - $(TOP)/src/vdbe.c \ - $(TOP)/src/vdbemem.c \ - $(TOP)/src/vdbevtab.c \ - $(TOP)/src/where.c \ - $(TOP)/src/wherecode.c \ - $(TOP)/src/whereexpr.c \ - parse.c \ - $(TOP)/ext/fts3/fts3.c \ - $(TOP)/ext/fts3/fts3_aux.c \ - $(TOP)/ext/fts3/fts3_expr.c \ - $(TOP)/ext/fts3/fts3_tokenizer.c \ - $(TOP)/ext/fts3/fts3_write.c \ - $(TOP)/ext/async/sqlite3async.c \ - $(TOP)/ext/misc/stmt.c \ - $(TOP)/ext/session/sqlite3session.c \ - $(TOP)/ext/session/test_session.c \ - fts5.c - -# Header files used by all library source files. -# -HDR = \ - $(TOP)/src/btree.h \ - $(TOP)/src/btreeInt.h \ - $(TOP)/src/hash.h \ - $(TOP)/src/hwtime.h \ - keywordhash.h \ - $(TOP)/src/msvc.h \ - $(TOP)/src/mutex.h \ - opcodes.h \ - $(TOP)/src/os.h \ - $(TOP)/src/os_common.h \ - $(TOP)/src/os_setup.h \ - $(TOP)/src/os_win.h \ - $(TOP)/src/pager.h \ - $(TOP)/src/pcache.h \ - parse.h \ - $(TOP)/src/pragma.h \ - sqlite3.h \ - $(TOP)/src/sqlite3ext.h \ - $(TOP)/src/sqliteInt.h \ - $(TOP)/src/sqliteLimit.h \ - $(TOP)/src/vdbe.h \ - $(TOP)/src/vdbeInt.h \ - $(TOP)/src/vxworks.h \ - $(TOP)/src/whereInt.h - -# Header files used by extensions -# -EXTHDR += \ - $(TOP)/ext/fts3/fts3.h \ - $(TOP)/ext/fts3/fts3Int.h \ - $(TOP)/ext/fts3/fts3_hash.h \ - $(TOP)/ext/fts3/fts3_tokenizer.h -EXTHDR += \ - $(TOP)/ext/rtree/rtree.h \ - $(TOP)/ext/rtree/geopoly.c -EXTHDR += \ - $(TOP)/ext/icu/sqliteicu.h -EXTHDR += \ - $(TOP)/ext/fts5/fts5Int.h \ - fts5parse.h \ - $(TOP)/ext/fts5/fts5.h -EXTHDR += \ - $(TOP)/ext/userauth/sqlite3userauth.h - -# executables needed for testing -# -TESTPROGS = \ - testfixture$(EXE) \ - sqlite3$(EXE) \ - sqlite3_analyzer$(EXE) \ - sqlite3_checker$(EXE) \ - sqldiff$(EXE) \ - dbhash$(EXE) \ - sqltclsh$(EXE) - -# Databases containing fuzzer test cases -# -FUZZDATA = \ - $(TOP)/test/fuzzdata1.db \ - $(TOP)/test/fuzzdata2.db \ - $(TOP)/test/fuzzdata3.db \ - $(TOP)/test/fuzzdata4.db \ - $(TOP)/test/fuzzdata5.db \ - $(TOP)/test/fuzzdata6.db \ - $(TOP)/test/fuzzdata7.db \ - $(TOP)/test/fuzzdata8.db - -# Standard options to testfixture -# -TESTOPTS = --verbose=file --output=test-out.txt - -# Extra compiler options for various shell tools -# -SHELL_OPT += -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -SHELL_OPT += -DSQLITE_ENABLE_RTREE -SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS -SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB -SHELL_OPT += -DSQLITE_ENABLE_DBPAGE_VTAB -SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB -SHELL_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB -SHELL_OPT += -DSQLITE_ENABLE_OFFSET_SQL_FUNC -FUZZCHECK_OPT += -I$(TOP)/test -FUZZCHECK_OPT += -I$(TOP)/ext/recover -FUZZCHECK_OPT += -DSQLITE_ENABLE_MEMSYS5 -FUZZCHECK_OPT += -DSQLITE_MAX_MEMORY=50000000 -FUZZCHECK_OPT += -DSQLITE_PRINTF_PRECISION_LIMIT=1000 -FUZZCHECK_OPT += -DSQLITE_ENABLE_FTS4 -FUZZCHECK_OPT += -DSQLITE_ENABLE_RTREE -FUZZCHECK_OPT += -DSQLITE_ENABLE_GEOPOLY -FUZZCHECK_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB -FUZZCHECK_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB -FUZZCHECK_OPT += -DSQLITE_STRICT_SUBTYPE=1 -FUZZCHECK_OPT += -DSQLITE_STATIC_RANDOMJSON -FUZZSRC += $(TOP)/test/fuzzcheck.c -FUZZSRC += $(TOP)/test/ossfuzz.c -FUZZSRC += $(TOP)/test/vt02.c -FUZZSRC += $(TOP)/test/fuzzinvariants.c -FUZZSRC += $(TOP)/ext/recover/dbdata.c -FUZZSRC += $(TOP)/ext/recover/sqlite3recover.c -FUZZSRC += $(TOP)/ext/misc/percentile.c -FUZZSRC += $(TOP)/ext/misc/randomjson.c -DBFUZZ_OPT = -KV_OPT = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ -ST_OPT = -DSQLITE_THREADSAFE=0 - -# This is the default Makefile target. The objects listed here -# are what get build when you type just "make" with no arguments. -# -all: sqlite3.h sqlite3ext.h libsqlite3.a sqlite3$(EXE) - -libsqlite3.a: sqlite3.h $(LIBOBJ) - $(AR) libsqlite3.a $(LIBOBJ) - $(RANLIB) libsqlite3.a - -sqlite3$(EXE): sqlite3.h libsqlite3.a shell.c - $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) $(SHELL_OPT) \ - shell.c libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) - -sqldiff$(EXE): $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.c sqlite3.h - $(TCCX) -I$(TOP)/ext/misc -o sqldiff$(EXE) -DSQLITE_THREADSAFE=0 \ - $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) $(THREADLIB) - -dbhash$(EXE): $(TOP)/tool/dbhash.c sqlite3.c sqlite3.h - $(TCCX) -o dbhash$(EXE) -DSQLITE_THREADSAFE=0 \ - $(TOP)/tool/dbhash.c sqlite3.c $(TLIBS) $(THREADLIB) - -RSYNC_SRC = \ - $(TOP)/tool/sqlite3_rsync.c \ - sqlite3.c - -RSYNC_OPT = \ - -DSQLITE_ENABLE_DBPAGE_VTAB \ - -DSQLITE_THREADSAFE=0 \ - -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_OMIT_DEPRECATED - -sqlite3_rsync$(EXE): $(RSYNC_SRC) - $(TCC) -o $@ $(RSYNC_OPT) $(RSYNC_SRC) $(TLIBS) - -scrub$(EXE): $(TOP)/ext/misc/scrub.c sqlite3.o - $(TCC) -I. -DSCRUB_STANDALONE -o scrub$(EXE) $(TOP)/ext/misc/scrub.c sqlite3.o $(THREADLIB) - -srcck1$(EXE): $(TOP)/tool/srcck1.c - $(BCC) -o srcck1$(EXE) $(TOP)/tool/srcck1.c - -sourcetest: srcck1$(EXE) sqlite3.c - ./srcck1 sqlite3.c - -src-verify: $(TOP)/tool/src-verify.c - $(BCC) -o src-verify$(EXE) $(TOP)/tool/src-verify.c - -verify-source: ./src-verify - ./src-verify $(TOP) - -fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h - $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - $(FUZZERSHELL_OPT) $(TOP)/tool/fuzzershell.c sqlite3.c \ - $(TLIBS) $(THREADLIB) - -dbfuzz$(EXE): $(TOP)/test/dbfuzz.c sqlite3.c sqlite3.h - $(TCCX) -o dbfuzz$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - $(DBFUZZ_OPT) $(TOP)/test/dbfuzz.c sqlite3.c \ - $(TLIBS) $(THREADLIB) - -DBFUZZ2_OPTS = \ - -DSQLITE_THREADSAFE=0 \ - -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_DEBUG \ - -DSQLITE_ENABLE_DBSTAT_VTAB \ - -DSQLITE_ENABLE_BYTECODE_VTAB \ - -DSQLITE_ENABLE_RTREE \ - -DSQLITE_ENABLE_FTS4 \ - -DSQLITE_ENABLE_FTS5 - -dbfuzz2$(EXE): $(TOP)/test/dbfuzz2.c sqlite3.c sqlite3.h - $(TCCX) -I. -g -O0 -DSTANDALONE -o dbfuzz2$(EXE) \ - $(DBFUZZ2_OPTS) $(TOP)/test/dbfuzz2.c sqlite3.c $(TLIBS) $(THREADLIB) - -fuzzcheck$(EXE): $(FUZZSRC) sqlite3.c sqlite3.h $(FUZZDEP) - $(TCCX) -o $@ -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) -DSQLITE_OSS_FUZZ \ - $(FUZZSRC) sqlite3.c $(TLIBS) $(THREADLIB) - -fuzzcheck-asan$(EXE): $(FUZZSRC) sqlite3.c sqlite3.h $(FUZZDEP) - $(TCCX) -fsanitize=address -o $W -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) -DSQLITE_OSS_FUZZ \ - $(FUZZSRC) sqlite3.c $(TLIBS) $(THREADLIB) - -fuzzcheck-ubsan$(EXE): $(FUZZSRC) sqlite3.c sqlite3.h $(FUZZDEP) - $(TCCX) -fsanitize=undefined -o $@ -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) -DSQLITE_OSS_FUZZ \ - $(FUZZSRC) sqlite3.c $(TLIBS) $(THREADLIB) - -ossshell$(EXE): $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c sqlite3.h - $(TCCX) -o ossshell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) \ - $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c $(TLIBS) $(THREADLIB) - -sessionfuzz$(EXE): $(TOP)/test/sessionfuzz.c sqlite3.c sqlite3.h - $(TCC) -o sessionfuzz$(EXE) $(TOP)/test/sessionfuzz.c -lz $(TLIBS) $(THREADLIB) - -mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c - $(TCCX) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \ - $(TLIBS) $(THREADLIB) - -MPTEST1=./mptester$(EXE) mptest1.db $(TOP)/mptest/crash01.test --repeat 20 -MPTEST2=./mptester$(EXE) mptest2.db $(TOP)/mptest/multiwrite01.test --repeat 20 -mptest: mptester$(EXE) - $(MPTEST1) --journalmode DELETE - $(MPTEST2) --journalmode WAL - $(MPTEST1) --journalmode WAL - $(MPTEST2) --journalmode PERSIST - $(MPTEST1) --journalmode PERSIST - $(MPTEST2) --journalmode TRUNCATE - $(MPTEST1) --journalmode TRUNCATE - $(MPTEST2) --journalmode DELETE - -sqlite3.o: sqlite3.c - $(TCCX) -I. -c sqlite3.c - -# This target creates a directory named "tsrc" and fills it with -# copies of all of the C source code and header files needed to -# build on the target system. Some of the C source code and header -# files are automatically generated. This target takes care of -# all that automatic generation. -# -target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c - rm -rf tsrc - mkdir tsrc - cp -f $(SRC) tsrc - rm tsrc/sqlite.h.in tsrc/parse.y - tclsh $(TOP)/tool/vdbe-compress.tcl $(OPTS) vdbe.new - mv vdbe.new tsrc/vdbe.c - cp fts5.c fts5.h tsrc - touch target_source - -sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl src-verify - tclsh $(TOP)/tool/mksqlite3c.tcl $(EXTRA_SRC) - cp tsrc/sqlite3ext.h . - cp $(TOP)/ext/session/sqlite3session.h . - echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c - cat sqlite3.c >>tclsqlite3.c - echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c - cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c - -sqlite3ext.h: target_source - cp tsrc/sqlite3ext.h . - -sqlite3.c-debug: target_source $(TOP)/tool/mksqlite3c.tcl src-verify - tclsh $(TOP)/tool/mksqlite3c.tcl --linemacros=1 $(EXTRA_SRC) - echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c - cat sqlite3.c >>tclsqlite3.c - echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c - echo '#line 1 "tclsqlite.c"' >>tclsqlite3.c - cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c - -sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl - tclsh $(TOP)/tool/split-sqlite3c.tcl - -# Rules to build the LEMON compiler generator -# -lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c - $(BCC) -o lemon $(TOP)/tool/lemon.c - cp $(TOP)/tool/lempar.c . - -# A tool to generate the source-id -# -mksourceid: $(TOP)/tool/mksourceid.c - $(BCC) -o mksourceid $(TOP)/tool/mksourceid.c - -# Rules to build individual *.o files from generated *.c files. This -# applies to: -# -# parse.o -# opcodes.o -# -%.o: %.c $(HDR) - $(TCCX) -c $< - -# Rules to build individual *.o files from files in the src directory. -# -%.o: $(TOP)/src/%.c $(HDR) - $(TCCX) -c $< - -tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) - $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c - - - -# Rules to build opcodes.c and opcodes.h -# -opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl - tclsh $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c - -opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl - cat parse.h $(TOP)/src/vdbe.c | tclsh $(TOP)/tool/mkopcodeh.tcl >opcodes.h - -# Rules to build parse.c and parse.h - the outputs of lemon. -# -parse.h: parse.c - -parse.c: $(TOP)/src/parse.y lemon - cp $(TOP)/src/parse.y . - ./lemon -s $(OPTS) parse.y - -sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid $(TOP)/VERSION $(TOP)/ext/rtree/sqlite3rtree.h - tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h - -sqlite3rc.h: $(TOP)/src/sqlite3.rc $(TOP)/VERSION - echo '#ifndef SQLITE_RESOURCE_VERSION' >$@ - echo -n '#define SQLITE_RESOURCE_VERSION ' >>$@ - cat $(TOP)/VERSION | tclsh $(TOP)/tool/replace.tcl exact . , >>$@ - echo '#endif' >>sqlite3rc.h - -keywordhash.h: $(TOP)/tool/mkkeywordhash.c - $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c - ./mkkeywordhash >keywordhash.h - -# Source and header files that shell.c depends on -SHELL_DEP = \ - $(TOP)/src/shell.c.in \ - $(TOP)/ext/expert/sqlite3expert.c \ - $(TOP)/ext/expert/sqlite3expert.h \ - $(TOP)/ext/intck/sqlite3intck.c \ - $(TOP)/ext/intck/sqlite3intck.h \ - $(TOP)/ext/misc/appendvfs.c \ - $(TOP)/ext/misc/base64.c \ - $(TOP)/ext/misc/base85.c \ - $(TOP)/ext/misc/completion.c \ - $(TOP)/ext/misc/decimal.c \ - $(TOP)/ext/misc/fileio.c \ - $(TOP)/ext/misc/ieee754.c \ - $(TOP)/ext/misc/memtrace.c \ - $(TOP)/ext/misc/pcachetrace.c \ - $(TOP)/ext/misc/percentile.c \ - $(TOP)/ext/misc/regexp.c \ - $(TOP)/ext/misc/series.c \ - $(TOP)/ext/misc/sha1.c \ - $(TOP)/ext/misc/shathree.c \ - $(TOP)/ext/misc/sqlar.c \ - $(TOP)/ext/misc/sqlite3_stdio.c \ - $(TOP)/ext/misc/sqlite3_stdio.h \ - $(TOP)/ext/misc/uint.c \ - $(TOP)/ext/misc/vfstrace.c \ - $(TOP)/ext/misc/zipfile.c \ - $(TOP)/ext/recover/dbdata.c \ - $(TOP)/ext/recover/sqlite3recover.c \ - $(TOP)/ext/recover/sqlite3recover.h \ - $(TOP)/src/test_windirent.c \ - $(TOP)/src/test_windirent.h - -shell.c: $(SHELL_DEP) $(TOP)/tool/mkshellc.tcl - tclsh $(TOP)/tool/mkshellc.tcl >shell.c - - - -# Rules to build the extension objects. -# -icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c - -fts3.o: $(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c - -fts3_aux.o: $(TOP)/ext/fts3/fts3_aux.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_aux.c - -fts3_expr.o: $(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c - -fts3_hash.o: $(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c - -fts3_icu.o: $(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c - -fts3_snippet.o: $(TOP)/ext/fts3/fts3_snippet.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_snippet.c - -fts3_porter.o: $(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c - -fts3_tokenizer.o: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c - -fts3_tokenizer1.o: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c - -fts3_tokenize_vtab.o: $(TOP)/ext/fts3/fts3_tokenize_vtab.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenize_vtab.c - -fts3_unicode.o: $(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c - -fts3_unicode2.o: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode2.c - -fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c - -fts5.o: fts5.c sqlite3ext.h sqlite3.h - $(TCCX) -DSQLITE_CORE -c fts5.c - -stmt.o: $(TOP)/ext/misc/stmt.c sqlite3ext.h sqlite3.h - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/stmt.c - -rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c - - - -fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon - cp $(TOP)/ext/fts5/fts5parse.y . - rm -f fts5parse.h - ./lemon $(OPTS) fts5parse.y - -fts5parse.h: fts5parse.c - -fts5.c: $(FTS5_SRC) $(FTS5_HDR) - tclsh $(TOP)/ext/fts5/tool/mkfts5c.tcl - cp $(TOP)/ext/fts5/fts5.h . - -lsm1.c: $(LSM1_SRC) - tclsh $(TOP)/ext/lsm1/tool/mklsm1c.tcl - cp $(TOP)/ext/lsm1/lsm.h . - -userauth.o: $(TOP)/ext/userauth/userauth.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/userauth/userauth.c - -sqlite3session.o: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/session/sqlite3session.c - -sqlite3rbu.o: $(TOP)/ext/rbu/sqlite3rbu.c $(HDR) $(EXTHDR) - $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rbu/sqlite3rbu.c - -# Rules for building test programs and for running tests -# -tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a - $(TCCX) $(TCL_FLAGS) -DTCLSH -o tclsqlite3 \ - $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) - -sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/sqlite3_analyzer.c.in $(TOP)/tool/mkccode.tcl - tclsh $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c - -sqlite3_analyzer$(EXE): sqlite3_analyzer.c - $(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB) - -sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl - tclsh $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c - -sqltclsh$(EXE): sqltclsh.c - $(TCCX) $(TCL_FLAGS) sqltclsh.c -o $@ $(LIBTCL) $(THREADLIB) - -sqlite3_expert$(EXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c - $(TCCX) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert$(EXE) $(THREADLIB) - -CHECKER_DEPS =\ - $(TOP)/tool/mkccode.tcl \ - sqlite3.c \ - $(TOP)/src/tclsqlite.c \ - $(TOP)/ext/repair/sqlite3_checker.tcl \ - $(TOP)/ext/repair/checkindex.c \ - $(TOP)/ext/repair/checkfreelist.c \ - $(TOP)/ext/misc/btreeinfo.c \ - $(TOP)/ext/repair/sqlite3_checker.c.in - -sqlite3_checker.c: $(CHECKER_DEPS) - tclsh $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@ - -sqlite3_checker$(TEXE): sqlite3_checker.c - $(TCCX) $(TCL_FLAGS) sqlite3_checker.c -o $@ $(LIBTCL) $(THREADLIB) - -dbdump$(EXE): $(TOP)/ext/misc/dbdump.c sqlite3.o - $(TCCX) -DDBDUMP_STANDALONE -o dbdump$(EXE) \ - $(TOP)/ext/misc/dbdump.c sqlite3.o $(THREADLIB) - -# Rules to build the 'testfixture' application. -# -TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 -TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE -TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024 -TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_STMTVTAB -TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_DBPAGE_VTAB -TESTFIXTURE_FLAGS += -DSQLITE_ENABLE_BYTECODE_VTAB -TESTFIXTURE_FLAGS += -DTCLSH_INIT_PROC=sqlite3TestInit -TESTFIXTURE_FLAGS += -DSQLITE_CKSUMVFS_STATIC -TESTFIXTURE_FLAGS += -DSQLITE_STATIC_RANDOMJSON -TESTFIXTURE_FLAGS += -DSQLITE_STRICT_SUBTYPE=1 - -testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c - $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ - $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ - -o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB) - -amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c \ - $(TOP)/ext/session/test_session.c - $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ - $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ - $(TOP)/ext/session/test_session.c \ - -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) - -coretestprogs: $(TESTPROGS) - -testprogs: coretestprogs srcck1$(EXE) fuzzcheck$(EXE) sessionfuzz$(EXE) - -fulltest: $(TESTPROGS) fuzztest - ./testfixture$(EXE) $(TOP)/test/all.test $(TESTOPTS) - -soaktest: $(TESTPROGS) - ./testfixture$(EXE) $(TOP)/test/all.test -soak=1 $(TESTOPTS) - -fulltestonly: $(TESTPROGS) fuzztest - ./testfixture$(EXE) $(TOP)/test/full.test $(TESTOPTS) - -queryplantest: testfixture$(EXE) sqlite3$(EXE) - ./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner $(TESTOPTS) - -fuzztest: fuzzcheck$(EXE) $(FUZZDATA) sessionfuzz$(EXE) - ./fuzzcheck$(EXE) $(FUZZDATA) - ./sessionfuzz run $(TOP)/test/sessionfuzz-data1.db - -valgrindfuzz: fuzzcheck$(EXE) $(FUZZDATA) sessionfuzz$(EXE) - valgrind ./fuzzcheck$(EXE) --cell-size-check --limit-mem 10M $(FUZZDATA) - valgrind ./sessionfuzz run $(TOP)/test/sessionfuzz-data1.db - -# The veryquick.test TCL tests. -# -tcltest: ./testfixture$(EXE) - ./testfixture$(EXE) $(TOP)/test/veryquick.test $(TESTOPTS) - -# Runs all the same tests cases as the "tcltest" target but uses -# the testrunner.tcl script to run them in multiple cores -# concurrently. -testrunner: testfixture$(EXE) - ./testfixture$(EXE) $(TOP)/test/testrunner.tcl - -# This is the testing target preferred by the core SQLite developers. -# It runs tests under a standard configuration, regardless of how -# ./configure was run. The devs run "make devtest" prior to each -# check-in, at a minimum. Probably other tests too, but at least this -# one. -# -devtest: srctree-check sourcetest - tclsh $(TOP)/test/testrunner.tcl mdevtest - -mdevtest: - tclsh $(TOP)/test/testrunner.tcl mdevtest - -# A very quick test using only testfixture and omitting all the slower -# tests. Designed to run in under 3 minutes on a workstation. -# -quicktest: ./testfixture$(EXE) - ./testfixture$(EXE) $(TOP)/test/extraquick.test $(TESTOPTS) - -# Validate that various generated files in the source tree -# are up-to-date. -# -srctree-check: $(TOP)/tool/srctree-check.tcl - tclsh $(TOP)/tool/srctree-check.tcl - -# Try to run tests on whatever options are specified by the -# environment variables. The SQLite developers seldom use this target. -# Instead# they use "make devtest" which runs tests on a standard set of -# options regardless of how SQLite is configured. This "test" -# target is provided for legacy only. -# -test: fuzztest sourcetest $(TESTPROGS) tcltest - -# Run a test using valgrind. This can take a really long time -# because valgrind is so much slower than a native machine. -# -valgrindtest: $(TESTPROGS) valgrindfuzz - OMIT_MISUSE=1 valgrind -v \ - ./testfixture$(EXE) $(TOP)/test/permutations.test valgrind $(TESTOPTS) - -# A very fast test that checks basic sanity. The name comes from -# the 60s-era electronics testing: "Turn it on and see if smoke -# comes out." -# -smoketest: $(TESTPROGS) fuzzcheck$(EXE) - ./testfixture$(EXE) $(TOP)/test/main.test $(TESTOPTS) - -shelltest: $(TESTPROGS) - ./testfixture$(EXT) $(TOP)/test/permutations.test shell - -# The next two rules are used to support the "threadtest" target. Building -# threadtest runs a few thread-safety tests that are implemented in C. This -# target is invoked by the releasetest.tcl script. -# -THREADTEST3_SRC = $(TOP)/test/threadtest3.c \ - $(TOP)/test/tt3_checkpoint.c \ - $(TOP)/test/tt3_index.c \ - $(TOP)/test/tt3_vacuum.c \ - $(TOP)/test/tt3_stress.c \ - $(TOP)/test/tt3_lookaside1.c - -threadtest3$(EXE): sqlite3.o $(THREADTEST3_SRC) $(TOP)/src/test_multiplex.c - $(TCCX) $(TOP)/test/threadtest3.c $(TOP)/src/test_multiplex.c sqlite3.o -o $@ $(THREADLIB) - -threadtest: threadtest3$(EXE) - ./threadtest3$(EXE) - -TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO) -$(TEST_EXTENSION): $(TOP)/src/test_loadext.c - $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION) - -extensiontest: testfixture$(EXE) $(TEST_EXTENSION) - ./testfixture$(EXE) $(TOP)/test/loadext.test - -dbtotxt$(EXE): $(TOP)/tool/dbtotxt.c - $(TCC) -o dbtotxt$(EXE) $(TOP)/tool/dbtotxt.c - -showdb$(EXE): $(TOP)/tool/showdb.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showdb$(EXE) \ - $(TOP)/tool/showdb.c sqlite3.o $(THREADLIB) - -showstat4$(EXE): $(TOP)/tool/showstat4.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showstat4$(EXE) \ - $(TOP)/tool/showstat4.c sqlite3.o $(THREADLIB) - -showjournal$(EXE): $(TOP)/tool/showjournal.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showjournal$(EXE) \ - $(TOP)/tool/showjournal.c sqlite3.o $(THREADLIB) - -showwal$(EXE): $(TOP)/tool/showwal.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o showwal$(EXE) \ - $(TOP)/tool/showwal.c sqlite3.o $(THREADLIB) - -showshm$(EXE): $(TOP)/tool/showshm.c - $(TCC) -o showshm$(EXE) $(TOP)/tool/showshm.c - -index_usage$(EXE): $(TOP)/tool/index_usage.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_DEPRECATED $(SHELL_OPTS) -o index_usage$(EXE) \ - $(TOP)/tool/index_usage.c sqlite3.o $(THREADLIB) - -changeset$(EXE): $(TOP)/ext/session/changeset.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o changeset$(EXE) \ - $(TOP)/ext/session/changeset.c sqlite3.o $(THREADLIB) - -changesetfuzz$(EXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o changesetfuzz$(EXE) \ - $(TOP)/ext/session/changesetfuzz.c sqlite3.o $(THREADLIB) - -fts3view$(EXE): $(TOP)/ext/fts3/tool/fts3view.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o fts3view$(EXE) \ - $(TOP)/ext/fts3/tool/fts3view.c sqlite3.o $(THREADLIB) - -rollback-test$(EXE): $(TOP)/tool/rollback-test.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o rollback-test$(EXE) \ - $(TOP)/tool/rollback-test.c sqlite3.o $(THREADLIB) - -atrc$(EXE): $(TOP)/test/atrc.c sqlite3.o - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o atrc$(EXE) \ - $(TOP)/test/atrc.c sqlite3.o $(THREADLIB) - -LogEst$(EXE): $(TOP)/tool/logest.c sqlite3.h - $(TCC) -o LogEst$(EXE) $(TOP)/tool/logest.c - -wordcount$(EXE): $(TOP)/test/wordcount.c sqlite3.c - $(TCC) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -o wordcount$(EXE) \ - $(TOP)/test/wordcount.c sqlite3.c - -speedtest1$(EXE): $(TOP)/test/speedtest1.c sqlite3.c - $(TCCX) -I. $(ST_OPT) -o speedtest1$(EXE) $(TOP)/test/speedtest1.c sqlite3.c $(THREADLIB) - -kvtest$(EXE): $(TOP)/test/kvtest.c sqlite3.c - $(TCCX) -I. $(KV_OPT) -o kvtest$(EXE) $(TOP)/test/kvtest.c sqlite3.c $(THREADLIB) - -rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.o - $(TCC) -I. -o rbu$(EXE) $(TOP)/ext/rbu/rbu.c sqlite3.o \ - $(THREADLIB) - -loadfts: $(TOP)/tool/loadfts.c libsqlite3.a - $(TCC) $(TOP)/tool/loadfts.c libsqlite3.a -o loadfts $(THREADLIB) - -threadtest5: $(TOP)/test/threadtest5.c libsqlite3.a - $(TCC) $(TOP)/test/threadtest5.c libsqlite3.a -o threadtest5 $(THREADLIB) - -# This target will fail if the SQLite amalgamation contains any exported -# symbols that do not begin with "sqlite3_". It is run as part of the -# releasetest.tcl script. -# -checksymbols: sqlite3.o - nm -g --defined-only sqlite3.o | grep -v " sqlite3_" ; test $$? -ne 0 - -# Build the amalgamation-autoconf package. The amalamgation-tarball target builds -# a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz. -# The snapshot-tarball target builds a tarball named by the SHA1 hash -# -amalgamation-tarball: sqlite3.c sqlite3rc.h - TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal - -snapshot-tarball: sqlite3.c sqlite3rc.h - TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot - - -# Standard install and cleanup targets -# -install: sqlite3 libsqlite3.a sqlite3.h - mv sqlite3 /usr/bin - mv libsqlite3.a /usr/lib - mv sqlite3.h /usr/include - -clean: - rm -f *.lo *.la *.o *.c *.h *.da *.bb *.bbg gmon.* *.rws sqlite3$(TEXE) - rm -rf .libs .deps tsrc libtool target_source testrunner_* - rm -f lemon$(BEXE) sqlite*.tar.gz - rm -f mkkeywordhash$(BEXE) mksourceid$(BEXE) - rm -f parse.* fts5parse.* - rm -rf tsrc .target_source testrunner_bld_* testdir* - rm -f tclsqlite3$(TEXE) - rm -f $(TESTPROGS) testrunner.* - rm -f LogEst$(TEXE) fts3view$(TEXE) rollback-test$(TEXE) showdb$(TEXE) - rm -f showjournal$(TEXE) showstat4$(TEXE) showwal$(TEXE) speedtest1$(TEXE) - rm -f wordcount$(TEXE) changeset$(TEXE) version-info$(TEXE) - rm -f *.dll *.lib *.exp *.def *.pc *.vsix - rm -f sqlite3_analyzer$(TEXE) sqlite3_rsync$(TEXE) - rm -f mptester$(TEXE) rbu$(TEXE) srcck1$(TEXE) - rm -f fuzzershell$(TEXE) fuzzcheck$(TEXE) sqldiff$(TEXE) dbhash$(TEXE) - rm -f threadtest5$(TEXE) - rm -f src-verify has_tclsh* - -distclean: clean diff --git a/manifest b/manifest index c2ac84e840..2eb7bebd49 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Generic\sbuild\scleanups. -D 2024-10-19T16:58:17.870 +C Factor\sout\sall\sautosetup-processed\s@if/@else\sblocks\sfrom\sMakefile.in\sin\sprep\sfor\smoving\smost\sof\sthe\smakefile\scode\sinto\smain.mk\s(which\shas,\sso\sfar,\sbeen\scompletely\soverlooked\sin\sthis\sport\sbut\swill\snow\sbecome\sthe\smain\sbasis\sfor\sthe\sstatic\sparts\sof\sthe\sbuild).\sThe\sidea\sis\sthat\sall\sbuild\sconfiguration\sgoes\sinto\sa\splatform-dependent\smakefile\swhich\sthen\sincludes\smain.mk. +D 2024-10-19T18:31:47.423 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 -F Makefile.in b9de6145692620a3176e9a0e6a1317a049d6bf2559896f642ae9fdc6aba3a627 +F Makefile.in 799e30c5ea3622e4909e2befa455bfa4e90ec214cb06a714c469897da3166b9e F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc 58b69eda1faad5d475092b8aeffab9156ee4901a82db089b166607f2ec907ee4 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159 @@ -14,7 +14,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def c212e2066f75941113296d1120b3375388816eaee7f04e1342f0a8e82dec03fc +F auto.def 3ee0c65b809262dab45d3a92c8af29a584fe0799cbe65c545214cabc2191f1ff F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -711,7 +711,7 @@ F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b5 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk c6501abe2d915ed1a2ec3d074e652c096177f93c50ac91f815c831e3417f9019 +F main.mk ea3f49474ea443c294ca75820839fb43db4a9f72cd4b14b895ddc9fa73a4e9b0 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -2240,8 +2240,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 2923a8924c92f62d07cb130462a8e6f4662837bad1a02bda53e630b64c692f60 -R e27a73e275f999d0b19f7fb9f885c617 +P 510afccf02dc9c3e3b928c64c34d10bee66a2343ecec6e24c4770cb0f139cd65 +R 7a8eadbb3ae7a887d98a01ebf4e8c64c U stephan -Z 78428a8bc6db32b4f76584c8d3747578 +Z 7236fe64030e3971014f63694120dff4 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 3bc8019b6b..5d2c7d818b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -510afccf02dc9c3e3b928c64c34d10bee66a2343ecec6e24c4770cb0f139cd65 +707e0f5857d58ec8b457270f988126b1dd0f01b5a3445a43ff7b5429324b1b3d