Revision
330
Author
kvv@apple.com
Date
2007-01-04 00:22:11 -0800 (Thu, 04 Jan 2007)

Log Message

Build darwintrace on Leopard

Modified Paths

Diff

Modified: trunk/darwintrace/Makefile (329 => 330)


--- trunk/darwintrace/Makefile	2006-11-15 09:02:27 UTC (rev 329)
+++ trunk/darwintrace/Makefile	2007-01-04 08:22:11 UTC (rev 330)
@@ -9,13 +9,21 @@
 
 all: darwintrace.dylib
 
+VERSION=$(shell uname -r | cut -f1 -d. )
+ifeq ($(VERSION), 9)
+CFLAGS = -nodefaultlibs
+else
+CFLAGS = -nostdlib
+endif
+
+
 darwintrace.dylib: darwintrace.c
 	cc -o $@ \
 		-arch i386 -arch ppc -arch ppc64 \
 		-W -Wall -pedantic -std=c99 \
 		-flat_namespace \
 		-fno-common \
-		-nostdlib \
+		$(CFLAGS) \
 		-undefined suppress \
 		-dynamiclib \
 		$^ $(LIBS)