X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=mupen64plus-pandora.git;a=blobdiff_plain;f=source%2Fmupen64plus-audio-sdl%2Fprojects%2Funix%2FMakefile;h=2f3e59f1316f90c50fd265a61c6e2ef2525a75ab;hp=518f4ccb561de635f760fce5138ff6f0c778a559;hb=2d26287291331f2b1793a8e76ede08c75654fb7c;hpb=01d8ca6fb06a8261602900cab63c61e5a1b143c9 diff --git a/source/mupen64plus-audio-sdl/projects/unix/Makefile b/source/mupen64plus-audio-sdl/projects/unix/Makefile index 518f4cc..2f3e59f 100755 --- a/source/mupen64plus-audio-sdl/projects/unix/Makefile +++ b/source/mupen64plus-audio-sdl/projects/unix/Makefile @@ -149,24 +149,16 @@ ifeq ($(OS), LINUX) LDLIBS += -ldl endif ifeq ($(OS), OSX) - # Select the proper SDK - # Also, SDKs are stored in a different location since XCode 4.3 - OSX_SDK ?= $(shell sw_vers -productVersion | cut -f1 -f2 -d .) - OSX_XCODEMAJ = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f1 -d .) - OSX_XCODEMIN = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f2 -d .) - OSX_XCODEGE43 = $(shell echo "`expr $(OSX_XCODEMAJ) \>= 4``expr $(OSX_XCODEMIN) \>= 3`") - ifeq ($(OSX_XCODEGE43), 11) - OSX_SYSROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs - else - OSX_SYSROOT := /Developer/SDKs - endif + #xcode-select has been around since XCode 3.0, i.e. OS X 10.5 + OSX_SDK_ROOT = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs + OSX_SDK_PATH = $(OSX_SDK_ROOT)/$(shell ls $(OSX_SDK_ROOT) | tail -1) ifeq ($(CPU), X86) ifeq ($(ARCH_DETECTED), 64BITS) - CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk + CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH) LDLIBS += -ldl else - CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk + CFLAGS += -pipe -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=10.5 -isysroot $(OSX_SDK_PATH) LDLIBS += -ldl -read_only_relocs suppress endif endif @@ -358,7 +350,7 @@ clean: rebuild: clean all # build dependency files -CFLAGS += -MD +CFLAGS += -MD -MP -include $(OBJECTS:.o=.d) # standard build rules