# BOOST_NO_AUTO_PTR: https://github.com/eddelbuettel/bh/issues/57#issuecomment-406261595
PKG_CPPFLAGS=-Ivendor \
             -DRSQLITE_USE_BUNDLED_SQLITE \
             -DSQLITE_ENABLE_RTREE \
             -DSQLITE_ENABLE_FTS3 \
             -DSQLITE_ENABLE_FTS3_PARENTHESIS \
             -DSQLITE_ENABLE_FTS5 \
             -DSQLITE_ENABLE_JSON1 \
             -DSQLITE_ENABLE_STAT4 \
             -DSQLITE_SOUNDEX \
             -DSQLITE_USE_URI=1 \
             -DSQLITE_MAX_LENGTH=2147483647 \
             -DHAVE_USLEEP=1

PKG_CXXFLAGS=$(CXX_VISIBILITY)
PKG_CFLAGS=$(C_VISIBILITY)

PKG_LIBS = vendor/sqlite3/sqlite3.o

.PHONY: all

all: $(SHLIB)

$(SHLIB): $(PKG_LIBS)

# This file is available only during development.
# For the tarball, we create an empty file.
deps.mk:
	touch -r $$(ls -t *.cpp | head -n 1) "$@"

include deps.mk
