comparison build/Makefile.osx @ 334:c70e1ceb1eff

Move Makefile.osx across to .osx.106 and create a new one for the 10.7 / Xcode 4 tools
author Chris Cannam
date Fri, 29 Jun 2012 15:20:37 +0100
parents b570254e70a0
children 7d4aeb0d0d6c
comparison
equal deleted inserted replaced
333:ea5d9dbaeaf7 334:c70e1ceb1eff
1 1
2 # Makefile for the Vamp plugin SDK. This builds the SDK objects, 2 # Makefile for the Vamp plugin SDK. This builds the SDK objects,
3 # libraries, example plugins, and the test host. Please adjust to 3 # libraries, example plugins, and the test host. Please adjust to
4 # suit your operating system requirements. 4 # suit your operating system requirements.
5 # 5 #
6 # This version of the Makefile is approximately correct for OS/X. 6 # This version of the Makefile is approximately correct for OS/X 10.7.
7 # Note that it has no "install" target; the following are the 7 # Note that it has no "install" target; the following are the
8 # library and related files that may be of interest resulting from 8 # library and related files that may be of interest resulting from
9 # the build: 9 # the build:
10 # 10 #
11 # libvamp-sdk.dylib [SDK dynamic library for plugins] 11 # libvamp-sdk.dylib [SDK dynamic library for plugins]
56 # clean -- remove binary targets 56 # clean -- remove binary targets
57 # distclean -- remove all targets 57 # distclean -- remove all targets
58 # 58 #
59 default: all 59 default: all
60 60
61 # Architecture and developer SDK selection flags. Change these only 61 # Minimum version of OS/X to target. This will determine the
62 # if you want to select a different OS/X compatibility level from the 62 # compiler's choice of platform SDK material
63 # default. 63 MINVERSION := 10.6
64 # 64
65 # By default, we try to find the oldest available SDK that is newer 65 # Our default is to try to build for all architectures supported by
66 # than 10.4. 66 # the MINVERSION in a universal binary.
67 # 67 #
68 # If you want to override this to select a particular SDK, change 68 ARCHFLAGS = -mmacosx-version-min=$(MINVERSION) -arch x86_64 -arch i386
69 # PREFERRED_SDK to the SDK name (e.g. "10.4u") and PREFERRED_MINVERSION
70 # to the minimum OS revision (e.g. "10.4"). An example follows this code.
71 #
72 SDKPREFIX := /Developer/SDKs/MacOSX
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%,$(filter-out 10.4%,$(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
90 69
91 # Compile flags 70 # Compile flags
92 # 71 #
93 CXXFLAGS = $(ARCHFLAGS) -O2 -Wall -I. -fPIC 72 CXXFLAGS = $(ARCHFLAGS) -O2 -Wall -I. -fPIC
94 73
227 $(RDFGENDIR)/vamp-rdf-template-generator.o 206 $(RDFGENDIR)/vamp-rdf-template-generator.o
228 207
229 RDFGEN_TARGET = \ 208 RDFGEN_TARGET = \
230 $(RDFGENDIR)/vamp-rdf-template-generator 209 $(RDFGENDIR)/vamp-rdf-template-generator
231 210
232 show: 211 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
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)
239 212
240 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC) 213 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
241 $(RANLIB) $(SDK_STATIC) 214 $(RANLIB) $(SDK_STATIC)
242 $(RANLIB) $(HOSTSDK_STATIC) 215 $(RANLIB) $(HOSTSDK_STATIC)
243 216