On Tue, Jun 28, 2011 at 8:13 PM, Simon Slavin <slav...@bigfraud.org> wrote:
> That's clever. And it allows quick regression testing in case something > mysteriously stops working. > :-D Here's the makefile code... it of course relies on other project details, but you'll get the idea: ######################################################################## # Set up a local/embedded copy of sqlite3... # i found out afterwards: http://www.sqlite.org/compile.html#omitfeatures # The use of -DSQLITE_OMIT_xxx here isn't supposed to work, but it seems # to do what i want (remove the requirement for -ldl). ifeq (2,$(words $(wildcard ./sqlite3.c ./sqlite3.h))) SQLITE3.O := sqlite3.o CPDO_ENABLE_SQLITE3 := 1 #LDFLAGS_SQLITE3 := -L. -lsqlite3 LDFLAGS_SQLITE3 := sqlite3.o sqlite3.c: sqlite3.h: $(SQLITE3.O): sqlite3.c sqlite3.h $(SQLITE3.O): CPPFLAGS:=-I. \ $(CPPFLAGS) \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_TEMP_STORE=3 \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ $(CFLAGS_C99) libsqlite3.a: $(SQLITE3.O) $(AR) crs $@ $(SQLITE3.O) # C99: sqlite3.h does not compile cleanly in C89 mode # due to its use of (long long). #CPPFLAGS:=-I. $(filter-out -I.,$(CPPFLAGS)) #$(SQLITE3.O): CPPFLAGS:=-I. cson_amalgamation.o: libsqlite3.a cson_amalgamation.o: CPPFLAGS:=-I. $(CFLAGS_C99)# workaround for a bit of sloppiness in sqlite3.h endif # /local sqlite3 ######################################################################## ACHTUNG: that's a makefile and needs HARD TABS, which will almost certainly be lost through the email path. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users