LIB=		sqlite3
INTERNALLIB=
SRCS=		sqlite3.c \
		shell.c

CFLAGS+=	-fPIC
WARNS=		1
WFORMAT=	1

.if exists(/usr/include/edit/readline/readline.h)
CFLAGS+=	-DHAVE_READLINE=1 \
		-I/usr/include/edit
.endif
# http://www.sqlite.org/compile.html
CFLAGS+=	-DSQLITE_OMIT_AUTOVACUUM \
		-DSQLITE_OMIT_BLOB_LITERAL \
		-DSQLITE_OMIT_DECLTYPE \
		-DSQLITE_OMIT_EXPLAIN \
		-DSQLITE_OMIT_DEPRECATED \
		-DSQLITE_OMIT_LOAD_EXTENSION \
		-DSQLITE_OMIT_PROGRESS_CALLBACK \
		-DSQLITE_OMIT_TCL_VARIABLE \
		-DSQLITE_OMIT_UTF16 \
		-DSQLITE_OMIT_CAT \
		-DSQLITE_OMIT_CHECK \
		-DSQLITE_OMIT_AUTOINIT \
		-DSQLITE_OMIT_COMPILEOPTION_DIAGS \
		-DSQLITE_OMIT_INTEGRITY_CHECK \
		-DSQLITE_OMIT_BUILTIN_TEST \
		-DSQLITE_OMIT_SHARED_CACHE \
		-DUSE_PREAD \
		-DSQLITE_THREADSAFE=1 \
		-DSQLITE_TEMP_STORE=3 \
		-Dmain=sqlite3_shell \
		-DNDEBUG

NO_MAN=		true

.include <bsd.lib.mk>
