Login
Artifact [21a9022c57]
Login

Artifact 21a9022c57d985165aa839c87c0fb8fe04eb7f4c:

Wiki page [scratchpad] by stephan 2013-08-24 13:37:22.
D 2013-08-24T13:37:22.967
L scratchpad
N text/plain
P 327a3ca8cf70434d2e02670450e27b70b93dc9d8
U stephan
W 902
########################################################################
# Looks for sqlite3.[ch] in $PWD. If found, it sets up some bits
# to build them and tell downstream make code about it so that it can
# link to the lib or the .o, as appropriate.
SQLITE3.H := $(wildcard sqlite3.h)
SQLITE3.C := $(wildcard sqlite3.c)
ifneq (,$(SQLITE3.C))
SQLITE3.O := $(OBJ.DIR)/sqlite3.o
SQLITE3_LDFLAGS :=
# These are the flags used by fossil's embedded sqlite3:
SQLITE3_CPPFLAGS := -DSQLITE_OMIT_LOAD_EXTENSION=1 \
	-DSQLITE_THREADSAFE=0 \
	-DSQLITE_DEFAULT_FILE_FORMAT=4 \
	-DSQLITE_ENABLE_STAT3 \
	-DSQLITE_ENABLE_LOCKING_STYLE=0 
# TODO? -Dlocaltime=fossil_localtime. See definition in v1's timeline.c.
$(SQLITE3.O): $(SQLITE3.C) $(SQLITE3.H)
	@$(call ShakeNMake.CALL.SETX,"CC [$@] ..."); \
	$(COMPILE.c) $(COMPILE.c.OPTIONS) $(SQLITE3_CPPFLAGS) $(OUTPUT_OPTION) $<
else
SQLITE3_LDFLAGS := -lsqlite3
endif

Z 9f48e135e02eee43b0564dc135ce443d