Respect flag '-mmacosx-version-min=*' from lib makefile
Makefile.pdlibbuilder sets a default minimum OSX version for optimal support of older OSX versions. With this commit, '-mmacosx-version-min=*' in variable 'cflags' from the lib makefile is respected, not overridden. A lib makefile can now determine the minimum OSX version (for example to support C++11, which was the direct motivation for this change). This is a response to pull request #22 'Making minimum Mac OS X version configurable', but note that it is implemented in a different way.
This commit is contained in:
parent
7b5e3599ce
commit
a7d309822d
1 changed files with 8 additions and 4 deletions
|
|
@ -503,6 +503,7 @@ endif
|
||||||
# LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for
|
# LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for
|
||||||
# OSX x86_64.
|
# OSX x86_64.
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(system), Darwin)
|
ifeq ($(system), Darwin)
|
||||||
pkglibdir = $(HOME)/Library/Pd
|
pkglibdir = $(HOME)/Library/Pd
|
||||||
pdincludepath := $(firstword $(wildcard \
|
pdincludepath := $(firstword $(wildcard \
|
||||||
|
|
@ -519,15 +520,18 @@ ifeq ($(system), Darwin)
|
||||||
-install_name @loader_path/$(shared.lib) \
|
-install_name @loader_path/$(shared.lib) \
|
||||||
-compatibility_version 1 -current_version 1.0
|
-compatibility_version 1 -current_version 1.0
|
||||||
stripflags = -x
|
stripflags = -x
|
||||||
|
version.flag := $(filter $(cflags), -mmacosx-version-min=%)
|
||||||
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 := ppc i386 x86_64
|
||||||
arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
|
version.flag ?= -mmacosx-version-min=10.4
|
||||||
endif
|
endif
|
||||||
ifeq ($(machine), x86_64)
|
ifeq ($(machine), x86_64)
|
||||||
arch.c.flags := -arch i386 -arch x86_64 -mmacosx-version-min=10.5
|
arch := i386 x86_64
|
||||||
arch.ld.flags := -arch i386 -arch x86_64 -mmacosx-version-min=10.5
|
version.flag ?= -mmacosx-version-min=10.5
|
||||||
endif
|
endif
|
||||||
|
arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag)
|
||||||
|
arch.ld.flags := $(arch.c.flags)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue