Commit 03788428 authored by Albert Gräf's avatar Albert Gräf
Browse files

Fix compile options for Xcode 10 - externals and abstractions.

parent 2beb101c
...@@ -41,6 +41,10 @@ LIBS = ...@@ -41,6 +41,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -41,6 +41,10 @@ LIBS = ...@@ -41,6 +41,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -15,8 +15,12 @@ cvs_root_dir := $(shell cd $(CWD)/.. && pwd) ...@@ -15,8 +15,12 @@ cvs_root_dir := $(shell cd $(CWD)/.. && pwd)
DESTDIR = $(CWD)/build/ DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(cvs_root_dir)/packages BUILDLAYOUT_DIR = $(cvs_root_dir)/packages
ifeq ($(macos_target),)
macos_target = 10.9
endif
# turn on weak linking and dlopen support # turn on weak linking and dlopen support
export MACOSX_DEPLOYMENT_TARGET = 10.3 export MACOSX_DEPLOYMENT_TARGET = $(macos_target)
# default target # default target
default: all default: all
......
...@@ -53,6 +53,10 @@ ALL_LIBS = ...@@ -53,6 +53,10 @@ ALL_LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# these can be set from outside without (usually) breaking the build # these can be set from outside without (usually) breaking the build
CFLAGS = -Wall -W -g CFLAGS = -Wall -W -g
LDFLAGS = LDFLAGS =
...@@ -112,9 +116,9 @@ ifeq ($(UNAME),Darwin) ...@@ -112,9 +116,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
...@@ -260,7 +264,7 @@ all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) ...@@ -260,7 +264,7 @@ all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB)
multitouch.$(EXTENSION): multitouch.c multitouch.$(EXTENSION): multitouch.c
$(CC) $(ALL_CFLAGS) -o multitouch.o -c multitouch.c $(CC) $(ALL_CFLAGS) -o multitouch.o -c multitouch.c
$(CC) $(ALL_LDFLAGS) -mmacosx-version-min=10.5 -F/System/Library/PrivateFrameworks \ $(CC) $(ALL_LDFLAGS) -mmacosx-version-min=$(macos_target) -F/System/Library/PrivateFrameworks \
-o multitouch.$(EXTENSION) multitouch.o $(ALL_LIBS) \ -o multitouch.$(EXTENSION) multitouch.o $(ALL_LIBS) \
-framework MultitouchSupport -framework MultitouchSupport
chmod a-x multitouch.$(EXTENSION) chmod a-x multitouch.$(EXTENSION)
......
...@@ -40,6 +40,10 @@ EXTRA_DIST = ...@@ -40,6 +40,10 @@ EXTRA_DIST =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include \ CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include \
......
...@@ -40,6 +40,10 @@ SOURCES_windows = ...@@ -40,6 +40,10 @@ SOURCES_windows =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
#LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) #LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
LIBRARY_VERSION = 0.9 LIBRARY_VERSION = 0.9
...@@ -91,9 +95,9 @@ ifeq ($(UNAME),Darwin) ...@@ -91,9 +95,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include \ CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include \
......
...@@ -41,6 +41,10 @@ LIBS = ...@@ -41,6 +41,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -42,6 +42,10 @@ LIBS = ...@@ -42,6 +42,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -93,9 +97,9 @@ ifeq ($(UNAME),Darwin) ...@@ -93,9 +97,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -43,6 +43,10 @@ LIBS = -lm ...@@ -43,6 +43,10 @@ LIBS = -lm
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -94,9 +98,9 @@ ifeq ($(UNAME),Darwin) ...@@ -94,9 +98,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -45,6 +45,10 @@ LIBS = ...@@ -45,6 +45,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -96,9 +100,9 @@ ifeq ($(UNAME),Darwin) ...@@ -96,9 +100,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -408,6 +408,9 @@ endif ...@@ -408,6 +408,9 @@ endif
# OSX x86_64. # OSX x86_64.
ifeq ($(system), Darwin) ifeq ($(system), Darwin)
ifeq ($(macos_target),)
macos_target = 10.9
endif
pkglibdir = $(HOME)/Library/Pd pkglibdir = $(HOME)/Library/Pd
pdincludepath := $(firstword $(wildcard \ pdincludepath := $(firstword $(wildcard \
$(externalsdir)/../pd/src \ $(externalsdir)/../pd/src \
...@@ -427,12 +430,12 @@ ifeq ($(system), Darwin) ...@@ -427,12 +430,12 @@ ifeq ($(system), Darwin)
stripflags = -x stripflags = -x
ifeq ($(machine), i386) ifeq ($(machine), i386)
cxx.flags := -fcheck-new cxx.flags := -fcheck-new
arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
endif endif
ifeq ($(machine), x86_64) ifeq ($(machine), x86_64)
arch.c.flags := -arch x86_64 -mmacosx-version-min=10.5 arch.c.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch x86_64 -mmacosx-version-min=10.5 arch.ld.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
endif endif
endif endif
......
...@@ -41,6 +41,10 @@ LIBS = ...@@ -41,6 +41,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -41,6 +41,10 @@ LIBS = ...@@ -41,6 +41,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -47,6 +47,10 @@ LIBS = ...@@ -47,6 +47,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -98,9 +102,9 @@ ifeq ($(UNAME),Darwin) ...@@ -98,9 +102,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -514,6 +514,9 @@ endif ...@@ -514,6 +514,9 @@ endif
# OSX x86_64. # OSX x86_64.
ifeq ($(system), Darwin) ifeq ($(system), Darwin)
ifeq ($(macos_target),)
macos_target = 10.9
endif
pkglibdir = $(HOME)/Library/Pd pkglibdir = $(HOME)/Library/Pd
pdincludepath := $(firstword $(wildcard \ pdincludepath := $(firstword $(wildcard \
$(externalsdir)/../pd/src \ $(externalsdir)/../pd/src \
...@@ -533,12 +536,12 @@ ifeq ($(system), Darwin) ...@@ -533,12 +536,12 @@ ifeq ($(system), Darwin)
stripflags = -x stripflags = -x
ifeq ($(machine), i386) ifeq ($(machine), i386)
cxx.flags := -fcheck-new cxx.flags := -fcheck-new
arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
endif endif
ifeq ($(machine), x86_64) ifeq ($(machine), x86_64)
arch.c.flags := -arch x86_64 -mmacosx-version-min=10.5 arch.c.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch x86_64 -mmacosx-version-min=10.5 arch.ld.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
endif endif
endif endif
......
...@@ -514,6 +514,9 @@ endif ...@@ -514,6 +514,9 @@ endif
# OSX x86_64. # OSX x86_64.
ifeq ($(system), Darwin) ifeq ($(system), Darwin)
ifeq ($(macos_target),)
macos_target = 10.9
endif
pkglibdir = $(HOME)/Library/Pd pkglibdir = $(HOME)/Library/Pd
pdincludepath := $(firstword $(wildcard \ pdincludepath := $(firstword $(wildcard \
$(externalsdir)/../pd/src \ $(externalsdir)/../pd/src \
...@@ -533,12 +536,12 @@ ifeq ($(system), Darwin) ...@@ -533,12 +536,12 @@ ifeq ($(system), Darwin)
stripflags = -x stripflags = -x
ifeq ($(machine), i386) ifeq ($(machine), i386)
cxx.flags := -fcheck-new cxx.flags := -fcheck-new
arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
endif endif
ifeq ($(machine), x86_64) ifeq ($(machine), x86_64)
arch.c.flags := -arch x86_64 -mmacosx-version-min=10.5 arch.c.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch x86_64 -mmacosx-version-min=10.5 arch.ld.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
endif endif
endif endif
......
...@@ -41,6 +41,10 @@ LIBS = ...@@ -41,6 +41,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin) ...@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos) SOURCES += $(SOURCES_iphoneos)
endif endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
...@@ -44,6 +44,10 @@ LIBS = ...@@ -44,6 +44,10 @@ LIBS =
# #
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file # get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
...@@ -95,9 +99,9 @@ ifeq ($(UNAME),Darwin) ...@@ -95,9 +99,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer # build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)