[darwinbuild-changes] [66] trunk/darwinxref/Makefile
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 4 01:42:47 PDT 2006
Revision: 66
http://trac.macosforge.org/projects/darwinbuild/changeset/66
Author: ssen
Date: 2006-10-04 01:42:47 -0700 (Wed, 04 Oct 2006)
Log Message:
-----------
On Darwin 7/Panther, use the embedded sqlite object file.
On Darwin 8/Tiger and future OSes, using the system-provided
libsqlite3.dylib in /usr/lib
Modified Paths:
--------------
trunk/darwinxref/Makefile
Modified: trunk/darwinxref/Makefile
===================================================================
--- trunk/darwinxref/Makefile 2005-07-12 02:41:38 UTC (rev 65)
+++ trunk/darwinxref/Makefile 2006-10-04 08:42:47 UTC (rev 66)
@@ -24,11 +24,20 @@
TCL_CFLAGS=-DHAVE_TCL_PLUGINS=1
TCL_LDFLAGS=-ltcl
-CFLAGS+=-ggdb $(TCL_CFLAGS) -DVERSION=\"$(shell cat ../VERSION)\"
+CFLAGS+=-ggdb $(TCL_CFLAGS) -DVERSION=\"$(shell cat ../VERSION)\" $(SQLITEINC)
LDFLAGS+=-framework CoreFoundation $(TCL_LDFLAGS)
PLUGIN_CFLAGS=$(CFLAGS) -I.
PLUGIN_LDFLAGS=$(LDFLAGS) -bundle -bundle_loader darwinxref
+VERSION=$(shell uname -r | cut -f1 -d. )
+ifeq ($(VERSION), 7)
+SQLITEINC = -I../sqlite
+SQLITELIB = ../sqlite/sqlite3.o
+else
+SQLITEINC =
+SQLITELIB = -lsqlite3
+endif
+
all: \
darwinxref \
$(PLUGIN_SOURCES:c=so) \
@@ -53,13 +62,11 @@
rm $(wildcard plugins/*.so)
darwinxref: $(SOURCES)
- ranlib ../sqlite/libsqlite3.a 2>/dev/null
cc -o $@ \
$(CFLAGS) \
$(LDFLAGS) \
- -I../sqlite \
$(SOURCES) \
- ../sqlite/libsqlite3.a
+ $(SQLITELIB)
plugins/%.so: plugins/%.c DBPlugin.h
cc -o $@ $(PLUGIN_CFLAGS) $(PLUGIN_LDFLAGS) $^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/67b62888/attachment-0001.html
More information about the darwinbuild-changes
mailing list