Skip to content

Commit

Permalink
merge D2 pull 299
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Aug 10, 2011
1 parent 4e51f7e commit d4389bc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/posix.mak
@@ -1,5 +1,7 @@
# NOTE: need to validate solaris behavior
ifeq (,$(TARGET))
OS:=$(shell uname)
OSVER:=$(shell uname -r)
ifeq (Darwin,$(OS))
TARGET=OSX
else
Expand Down Expand Up @@ -32,12 +34,15 @@ MODEL=32
ifeq (OSX,$(TARGET))
## See: http://developer.apple.com/documentation/developertools/conceptual/cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB
ENVP= MACOSX_DEPLOYMENT_TARGET=10.3
SDK=/Developer/SDKs/MacOSX10.4u.sdk #doesn't work because can't find <stdarg.h>
SDK=/Developer/SDKs/MacOSX10.5.sdk
#SDK=/Developer/SDKs/MacOSX10.4u.sdk #doesn't work because can't find <stdarg.h>
#SDK=/Developer/SDKs/MacOSX10.5.sdk
#SDK=/Developer/SDKs/MacOSX10.6.sdk

SDK:=$(if $(filter 11.*, $(OSVER)), /Developer/SDKs/MacOSX10.5.sdk, /Developer/SDKs/MacOSX10.6.sdk)
TARGET_CFLAGS=-isysroot ${SDK}
LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl,-syslibroot,${SDK} -framework CoreServices
#-syslibroot is only passed to libtool, not ld.
#if gcc sees -isysroot it should pass -syslibroot to the linker when needed
#LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl,-syslibroot,${SDK} -framework CoreServices
LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl -framework CoreServices
else
LDFLAGS=-lm -lstdc++ -lpthread
endif
Expand Down

0 comments on commit d4389bc

Please sign in to comment.