| 1 |
# uncomment the following to force 32-bit compilation |
| 2 |
# FORCE_M32=-m32 |
| 3 |
|
| 4 |
### combine the two updates below (1.4.1.0) |
| 5 |
ifneq ($(shell sw_vers -productVersion | egrep '^(10\.(6|7|8|9|10|11|12|13|14|15)(\.[0-9]+)|1[123456789])?'),) |
| 6 |
SDK=$(shell xcrun --show-sdk-path) |
| 7 |
### |
| 8 |
### update 1 (@mitchblank PR #158): fix for MacOS 11 / Big Sur |
| 9 |
# ifneq ($(shell sw_vers -productVersion | egrep '^(10\.(6|7|8|9|10|11|12|13|14|15)(\.[0-9]+)|1[123456789])?'),) |
| 10 |
# SDK=$(shell xcodebuild -sdk macosx -version | grep '^Path:' | sed 's/Path: \(.*\)/\1/') |
| 11 |
### update 2 (@rnkn PR #164): remove need to use xcodebuild (only available with XCode installed) |
| 12 |
# ifneq ($(shell sw_vers -productVersion | egrep '10\.(6|7|8|9|10|11|12|13|14|15)(\.[0-9]+)?'),) |
| 13 |
# SDK=$(shell xcrun --show-sdk-path) |
| 14 |
### |
| 15 |
|
| 16 |
ISYSROOT=-isysroot $(SDK) |
| 17 |
LINK_EXTRAS=-F/System/Library/PrivateFrameworks \ |
| 18 |
-weak_framework MultitouchSupport |
| 19 |
else |
| 20 |
ISYSROOT=-isysroot /Developer/SDKs/MacOSX10.4u.sdk |
| 21 |
LINK_EXTRAS= |
| 22 |
endif |
| 23 |
|
| 24 |
# ifneq ($(shell which clang),) |
| 25 |
# force clang if available (for OS X 10.4 compatibility) |
| 26 |
# CC=clang |
| 27 |
# CXX=clang++ |
| 28 |
# LD=clang++ |
| 29 |
# endif |
| 30 |
|
| 31 |
CFLAGS+= -D__MACOSX_CORE__ $(FORCE_M32) $(ISYSROOT) |
| 32 |
CFLAGSDEPEND+= -D__MACOSX_CORE__ $(FORCE_M32) $(ISYSROOT) |
| 33 |
|
| 34 |
FRAMEWORKS+= CoreAudio CoreMIDI CoreFoundation IOKit Carbon AppKit Foundation |
| 35 |
# linker assumes CXX -- e.g., g++ |
| 36 |
LDFLAGS+= $(FORCE_M32) $(ISYSROOT) $(addprefix -framework ,$(FRAMEWORKS)) \ |
| 37 |
$(LINK_EXTRAS) -lm |
| 38 |
# if linking using CC -- e.g., gcc -- add -lc++ |
| 39 |
# LDFLAGS+= -lc++ |
| 40 |
|
| 41 |
SF_CSRCS+= util_sndfile.c |
| 42 |
|
| 43 |
# this is to link properly on leopard... |
| 44 |
MACOSX_DEPLOYMENT_TARGET=10.9 |
| 45 |
export MACOSX_DEPLOYMENT_TARGET |
| 46 |
# option 2, add this to the gcc flags: -mmacosx-version-min=10.4 |
| 47 |
|
| 48 |
#----------------------------------------------------------------------------- |
| 49 |
# by default, ChucK uses a pre-configured libsndfile... |
| 50 |
# uncomment the next 3 lines to use libsndfile on your system |
| 51 |
#----------------------------------------------------------------------------- |
| 52 |
# FLAGS+= -D__CK_SNDFILE_NATIVE__ |
| 53 |
# LIBS+= -lsndfile |
| 54 |
# SF_OBJ= |