@@ -31,7 +31,8 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@
3131#
3232CC = @CC@
3333CFLAGS = @CPPFLAGS@ @CFLAGS@
34- TCC = $(CC ) $(CFLAGS ) -I. -I${TOP}/src -I${TOP}/ext/rtree -I${TOP}/ext/fts3
34+ TCC = ${CC} ${CFLAGS} -I. -I${TOP}/src -I${TOP}/ext/rtree -I${TOP}/ext/icu
35+ TCC += -I${TOP}/ext/fts3 -I${TOP}/ext/async -I${TOP}/ext/session
3536
3637# Define this for the autoconf-based build, so that the code knows it can
3738# include the generated config.h
@@ -192,13 +193,14 @@ LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
192193 fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
193194 fts5.lo \
194195 func.lo global.lo hash.lo \
195- icu.lo insert.lo journal.lo json1.lo legacy.lo loadext.lo \
196+ icu.lo insert.lo json1.lo legacy.lo loadext.lo \
196197 main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
197198 memjournal.lo \
198199 mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
199200 notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
200201 pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
201- random.lo resolve.lo rowset.lo rtree.lo select.lo sqlite3rbu.lo status.lo \
202+ random.lo resolve.lo rowset.lo rtree.lo \
203+ sqlite3session.lo select.lo sqlite3rbu.lo status.lo \
202204 table.lo threads.lo tokenize.lo treeview.lo trigger.lo \
203205 update.lo util.lo vacuum.lo \
204206 vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo vdbesort.lo \
@@ -244,7 +246,6 @@ SRC = \
244246 $(TOP ) /src/hash.h \
245247 $(TOP ) /src/hwtime.h \
246248 $(TOP ) /src/insert.c \
247- $(TOP ) /src/journal.c \
248249 $(TOP ) /src/legacy.c \
249250 $(TOP ) /src/loadext.c \
250251 $(TOP ) /src/main.c \
@@ -362,14 +363,15 @@ SRC += \
362363SRC += \
363364 $(TOP ) /ext/rtree/rtree.h \
364365 $(TOP ) /ext/rtree/rtree.c
366+ SRC += \
367+ $(TOP ) /ext/session/sqlite3session.c \
368+ $(TOP ) /ext/session/sqlite3session.h
365369SRC += \
366370 $(TOP ) /ext/rbu/sqlite3rbu.h \
367371 $(TOP ) /ext/rbu/sqlite3rbu.c
368372SRC += \
369373 $(TOP ) /ext/misc/json1.c
370374
371-
372-
373375# Generated source code files
374376#
375377SRC += \
@@ -396,9 +398,11 @@ TESTSRC = \
396398 $(TOP ) /src/test_autoext.c \
397399 $(TOP ) /src/test_async.c \
398400 $(TOP ) /src/test_backup.c \
401+ $(TOP ) /src/test_bestindex.c \
399402 $(TOP ) /src/test_blob.c \
400403 $(TOP ) /src/test_btree.c \
401404 $(TOP ) /src/test_config.c \
405+ $(TOP ) /src/test_delete.c \
402406 $(TOP ) /src/test_demovfs.c \
403407 $(TOP ) /src/test_devsym.c \
404408 $(TOP ) /src/test_fs.c \
@@ -425,14 +429,17 @@ TESTSRC = \
425429 $(TOP ) /src/test_windirent.c \
426430 $(TOP ) /src/test_wsd.c \
427431 $(TOP ) /ext/fts3/fts3_term.c \
428- $(TOP ) /ext/fts3/fts3_test.c \
432+ $(TOP ) /ext/fts3/fts3_test.c \
433+ $(TOP ) /ext/session/test_session.c \
429434 $(TOP ) /ext/rbu/test_rbu.c
430435
431436# Statically linked extensions
432437#
433438TESTSRC += \
434439 $(TOP ) /ext/misc/amatch.c \
440+ $(TOP ) /ext/misc/carray.c \
435441 $(TOP ) /ext/misc/closure.c \
442+ $(TOP ) /ext/misc/csv.c \
436443 $(TOP ) /ext/misc/eval.c \
437444 $(TOP ) /ext/misc/fileio.c \
438445 $(TOP ) /ext/misc/fuzzer.c \
@@ -494,7 +501,8 @@ TESTSRC2 = \
494501 $(TOP ) /ext/fts3/fts3_term.c \
495502 $(TOP ) /ext/fts3/fts3_tokenizer.c \
496503 $(TOP ) /ext/fts3/fts3_write.c \
497- $(TOP ) /ext/async/sqlite3async.c
504+ $(TOP ) /ext/async/sqlite3async.c \
505+ $(TOP ) /ext/session/sqlite3session.c
498506
499507# Header files used by all library source files.
500508#
@@ -553,7 +561,8 @@ TESTPROGS = \
553561 testfixture$(TEXE ) \
554562 sqlite3$(TEXE ) \
555563 sqlite3_analyzer$(TEXE ) \
556- sqldiff$(TEXE )
564+ sqldiff$(TEXE ) \
565+ dbhash$(TEXE )
557566
558567# Databases containing fuzzer test cases
559568#
@@ -570,7 +579,9 @@ TESTOPTS = --verbose=file --output=test-out.txt
570579# Extra compiler options for various shell tools
571580#
572581SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
582+ # SHELL_OPT += -DSQLITE_ENABLE_FTS5
573583SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
584+ SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
574585FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
575586FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
576587
@@ -586,11 +597,11 @@ sqlcipher.pc: $(TOP)/sqlcipher.pc.in
586597 ./config.status
587598
588599libsqlcipher.la : $(LIBOBJ )
589- $(LTLINK ) -o $@ $(LIBOBJ ) $(TLIBS ) \
600+ $(LTLINK ) -no-undefined - o $@ $(LIBOBJ ) $(TLIBS ) \
590601 ${ALLOWRELEASE} -rpath " $( libdir) " -version-info " 8:6:8"
591602
592603libtclsqlite3.la : tclsqlite.lo libsqlcipher.la
593- $(LTLINK ) -o $@ tclsqlite.lo \
604+ $(LTLINK ) -no-undefined - o $@ tclsqlite.lo \
594605 libsqlcipher.la @TCL_STUB_LIB_SPEC@ $(TLIBS ) \
595606 -rpath " $( TCLLIBDIR) " \
596607 -version-info " 8:6:8" \
@@ -601,8 +612,15 @@ sqlcipher$(TEXE): $(TOP)/src/shell.c libsqlcipher.la sqlite3.h
601612 -o $@ $(TOP ) /src/shell.c libsqlcipher.la \
602613 $(LIBREADLINE ) $(TLIBS ) -rpath " $( libdir) "
603614
604- sqldiff$(TEXE ) : $(TOP ) /tool/sqldiff.c sqlite3.c sqlite3.h
605- $(LTLINK ) -o $@ $(TOP ) /tool/sqldiff.c sqlite3.c $(TLIBS )
615+ sqldiff$(TEXE ) : $(TOP ) /tool/sqldiff.c sqlite3.lo sqlite3.h
616+ $(LTLINK ) -o $@ $(TOP ) /tool/sqldiff.c sqlite3.lo $(TLIBS )
617+
618+ dbhash$(TEXE ) : $(TOP ) /tool/dbhash.c sqlite3.lo sqlite3.h
619+ $(LTLINK ) -o $@ $(TOP ) /tool/dbhash.c sqlite3.lo $(TLIBS )
620+
621+ scrub$(TEXE ) : $(TOP ) /ext/misc/scrub.c sqlite3.lo
622+ $(LTLINK ) -o $@ -I. -DSCRUB_STANDALONE \
623+ $(TOP ) /ext/misc/scrub.c sqlite3.lo $(TLIBS )
606624
607625srcck1$(BEXE ) : $(TOP ) /tool/srcck1.c
608626 $(BCC ) -o srcck1$(BEXE ) $(TOP ) /tool/srcck1.c
@@ -617,8 +635,8 @@ fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h
617635fuzzcheck$(TEXE ) : $(TOP ) /test/fuzzcheck.c sqlite3.c sqlite3.h
618636 $(LTLINK ) -o $@ $(FUZZCHECK_OPT ) $(TOP ) /test/fuzzcheck.c sqlite3.c $(TLIBS )
619637
620- mptester$(TEXE ) : sqlite3.c $(TOP ) /mptest/mptest.c
621- $(LTLINK ) -o $@ -I. $(TOP ) /mptest/mptest.c sqlite3.c \
638+ mptester$(TEXE ) : sqlite3.lo $(TOP ) /mptest/mptest.c
639+ $(LTLINK ) -o $@ -I. $(TOP ) /mptest/mptest.c sqlite3.lo \
622640 $(TLIBS ) -rpath " $( libdir) "
623641
624642MPTEST1 =./mptester$(TEXE ) mptest.db $(TOP ) /mptest/crash01.test --repeat 20
@@ -654,6 +672,7 @@ mptest: mptester$(TEXE)
654672sqlite3.c : .target_source $(TOP ) /tool/mksqlite3c.tcl
655673 $(TCLSH_CMD ) $(TOP ) /tool/mksqlite3c.tcl
656674 cp tsrc/shell.c tsrc/sqlite3ext.h .
675+ cp $(TOP ) /ext/session/sqlite3session.h .
657676
658677sqlite3ext.h : .target_source
659678 cp tsrc/sqlite3ext.h .
@@ -771,9 +790,6 @@ hash.lo: $(TOP)/src/hash.c $(HDR)
771790insert.lo : $(TOP ) /src/insert.c $(HDR )
772791 $(LTCOMPILE ) $(TEMP_STORE ) -c $(TOP ) /src/insert.c
773792
774- journal.lo : $(TOP ) /src/journal.c $(HDR )
775- $(LTCOMPILE ) $(TEMP_STORE ) -c $(TOP ) /src/journal.c
776-
777793legacy.lo : $(TOP ) /src/legacy.c $(HDR )
778794 $(LTCOMPILE ) $(TEMP_STORE ) -c $(TOP ) /src/legacy.c
779795
@@ -1033,6 +1049,9 @@ fts3_write.lo: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
10331049rtree.lo : $(TOP ) /ext/rtree/rtree.c $(HDR ) $(EXTHDR )
10341050 $(LTCOMPILE ) -DSQLITE_CORE -c $(TOP ) /ext/rtree/rtree.c
10351051
1052+ sqlite3session.lo : $(TOP ) /ext/session/sqlite3session.c $(HDR ) $(EXTHDR )
1053+ $(LTCOMPILE ) -DSQLITE_CORE -c $(TOP ) /ext/session/sqlite3session.c
1054+
10361055json1.lo : $(TOP ) /ext/misc/json1.c
10371056 $(LTCOMPILE ) -DSQLITE_CORE -c $(TOP ) /ext/misc/json1.c
10381057
@@ -1058,7 +1077,7 @@ FTS5_SRC = \
10581077fts5parse.c : $(TOP ) /ext/fts5/fts5parse.y lemon
10591078 cp $(TOP ) /ext/fts5/fts5parse.y .
10601079 rm -f fts5parse.h
1061- ./lemon $(OPTS ) fts5parse.y
1080+ ./lemon$( BEXE ) $(OPTS ) fts5parse.y
10621081
10631082fts5parse.h : fts5parse.c
10641083
@@ -1083,6 +1102,8 @@ sqlite3rbu.lo: $(TOP)/ext/rbu/sqlite3rbu.c $(HDR) $(EXTHDR)
10831102TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
10841103TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
10851104TESTFIXTURE_FLAGS += -DBUILD_sqlite
1105+ TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
1106+ TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
10861107
10871108TESTFIXTURE_SRC0 = $(TESTSRC2 ) libsqlcipher.la
10881109TESTFIXTURE_SRC1 = sqlite3.c
@@ -1163,14 +1184,17 @@ showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
11631184showwal$(TEXE ) : $(TOP ) /tool/showwal.c sqlite3.lo
11641185 $(LTLINK ) -o $@ $(TOP ) /tool/showwal.c sqlite3.lo $(TLIBS )
11651186
1187+ changeset$(TEXE ) : $(TOP ) /ext/session/changeset.c sqlite3.lo
1188+ $(LTLINK ) -o $@ $(TOP ) /ext/session/changeset.c sqlite3.lo $(TLIBS )
1189+
11661190rollback-test$(TEXE ) : $(TOP ) /tool/rollback-test.c sqlite3.lo
11671191 $(LTLINK ) -o $@ $(TOP ) /tool/rollback-test.c sqlite3.lo $(TLIBS )
11681192
11691193LogEst$(TEXE ) : $(TOP ) /tool/logest.c sqlite3.h
11701194 $(LTLINK ) -I. -o $@ $(TOP ) /tool/logest.c
11711195
1172- wordcount$(TEXE ) : $(TOP ) /test/wordcount.c sqlite3.c
1173- $(LTLINK ) -o $@ $(TOP ) /test/wordcount.c sqlite3.c $(TLIBS )
1196+ wordcount$(TEXE ) : $(TOP ) /test/wordcount.c sqlite3.lo
1197+ $(LTLINK ) -o $@ $(TOP ) /test/wordcount.c sqlite3.lo $(TLIBS )
11741198
11751199speedtest1$(TEXE ) : $(TOP ) /test/speedtest1.c sqlite3.lo
11761200 $(LTLINK ) -o $@ $(TOP ) /test/speedtest1.c sqlite3.lo $(TLIBS )
@@ -1185,8 +1209,9 @@ loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
11851209# symbols that do not begin with "sqlite3_". It is run as part of the
11861210# releasetest.tcl script.
11871211#
1212+ VALIDIDS =' sqlite3(changeset|changegroup|session)?_'
11881213checksymbols : sqlite3.lo
1189- nm -g --defined-only sqlite3.o | grep -v " sqlite3_ " ; test $$? -ne 0
1214+ nm -g --defined-only sqlite3.lo | egrep -v $( VALIDIDS ) ; test $$? -ne 0
11901215 echo ' 0 errors out of 1 tests'
11911216
11921217# Build the amalgamation-autoconf package. The amalamgation-tarball target builds
@@ -1249,13 +1274,12 @@ clean:
12491274 rm -f lemon$(BEXE ) lempar.c parse.* sqlite* .tar.gz
12501275 rm -f mkkeywordhash$(BEXE ) keywordhash.h
12511276 rm -f * .da * .bb * .bbg gmon.out
1252- rm -rf quota2a quota2b quota2c
12531277 rm -rf tsrc .target_source
12541278 rm -f tclsqlcipher$(TEXE )
12551279 rm -f testfixture$(TEXE ) test.db
12561280 rm -f LogEst$(TEXE ) fts3view$(TEXE ) rollback-test$(TEXE ) showdb$(TEXE )
12571281 rm -f showjournal$(TEXE ) showstat4$(TEXE ) showwal$(TEXE ) speedtest1$(TEXE )
1258- rm -f wordcount$(TEXE )
1282+ rm -f wordcount$(TEXE ) changeset $( TEXE )
12591283 rm -f sqlite3.dll sqlite3.lib sqlite3.exp sqlite3.def
12601284 rm -f sqlite3.c
12611285 rm -f sqlite3rc.h
@@ -1268,6 +1292,7 @@ clean:
12681292 rm -f fuzzershell fuzzershell.exe
12691293 rm -f fuzzcheck fuzzcheck.exe
12701294 rm -f sqldiff sqldiff.exe
1295+ rm -f dbhash dbhash.exe
12711296 rm -f fts5.* fts5parse.*
12721297
12731298distclean : clean
0 commit comments