Mercurial > hg > vamp-plugin-sdk
comparison build/Makefile.osx @ 309:003147fdf42c vamp-plugin-sdk-v2.2
* Try to guess the best choice SDK rather than expecting the user to edit the Makefile
author | cannam |
---|---|
date | Thu, 26 Aug 2010 10:42:03 +0000 |
parents | b923a3d9c3d5 |
children | b570254e70a0 |
comparison
equal
deleted
inserted
replaced
308:34754c776530 | 309:003147fdf42c |
---|---|
58 # | 58 # |
59 default: all | 59 default: all |
60 | 60 |
61 # Architecture and developer SDK selection flags. Change these only | 61 # Architecture and developer SDK selection flags. Change these only |
62 # if you want to select a different OS/X compatibility level from the | 62 # if you want to select a different OS/X compatibility level from the |
63 # default (which is to target 10.4 or newer and build 3-way universal | 63 # default. |
64 # binaries). | 64 # |
65 # By default, we try to find the oldest available SDK that is newer | |
66 # than 10.3. | |
65 # | 67 # |
66 # If you don't have the 10.4 version of the OS/X SDK, change "10.4u" | 68 # If you want to override this to select a particular SDK, change |
67 # and "10.4" to "10.5" (or whatever is the oldest SDK available to | 69 # PREFERRED_SDK to the SDK name (e.g. "10.4u") and PREFERRED_MINVERSION |
68 # you) for maximum portability. | 70 # to the minimum OS revision (e.g. "10.4"). An example follows this code. |
69 # | 71 # |
70 SDKFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 | 72 SDKPREFIX := /Developer/SDKs/MacOSX |
71 ARCHFLAGS = $(SDKFLAGS) -arch i386 -arch x86_64 -arch ppc | 73 SDKS := $(wildcard $(SDKPREFIX)*.sdk) |
74 SDKVERSIONS := $(patsubst $(SDKPREFIX)%.sdk,%,$(SDKS)) | |
75 GOOD_SDKS := $(filter-out 10.1%,$(filter-out 10.2%,$(filter-out 10.3%,$(SDKVERSIONS)))) | |
76 # | |
77 PREFERRED_SDK := $(word 1, $(sort $(GOOD_SDKS))) | |
78 PREFERRED_MINVERSION := $(patsubst %u,%,$(PREFERRED_SDK)) | |
79 # | |
80 # Example: to set your own values, uncomment and adjust: | |
81 # PREFERRED_SDK := 10.4u | |
82 # PREFERRED_MINVERSION := 10.4 | |
83 | |
84 SDKFLAGS = -isysroot /Developer/SDKs/MacOSX$(PREFERRED_SDK).sdk -mmacosx-version-min=$(PREFERRED_MINVERSION) | |
85 | |
86 # Our default is to try to build for all available architectures in a | |
87 # universal binary. | |
88 # | |
89 ARCHFLAGS = $(SDKFLAGS) -arch i386 -arch x86_64 -arch ppc | |
72 | 90 |
73 # Compile flags | 91 # Compile flags |
74 # | 92 # |
75 CXXFLAGS = $(ARCHFLAGS) -O2 -Wall -I. -fPIC | 93 CXXFLAGS = $(ARCHFLAGS) -O2 -Wall -I. -fPIC |
76 | 94 |
209 $(RDFGENDIR)/vamp-rdf-template-generator.o | 227 $(RDFGENDIR)/vamp-rdf-template-generator.o |
210 | 228 |
211 RDFGEN_TARGET = \ | 229 RDFGEN_TARGET = \ |
212 $(RDFGENDIR)/vamp-rdf-template-generator | 230 $(RDFGENDIR)/vamp-rdf-template-generator |
213 | 231 |
214 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC) | 232 show: |
233 @echo " *** Found available SDK versions: $(SDKVERSIONS)" | |
234 @test -n "$(PREFERRED_SDK)" || ( echo "Error: Failed to establish preferred SDK version, please ensure at least one Developer SDK is installed" ; exit 1 ) | |
235 @test -n "$(PREFERRED_MINVERSION)" || ( echo "Error: Failed to establish preferred minimum OS version" ; exit 1 ) | |
236 @echo " *** Default SDK is $(PREFERRED_SDK) for minimum OS/X version $(PREFERRED_MINVERSION)" | |
237 | |
238 sdk: show sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC) | |
215 | 239 |
216 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC) | 240 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC) |
217 $(RANLIB) $(SDK_STATIC) | 241 $(RANLIB) $(SDK_STATIC) |
218 $(RANLIB) $(HOSTSDK_STATIC) | 242 $(RANLIB) $(HOSTSDK_STATIC) |
219 | 243 |