Skip to content

Commit

Permalink
Respect flag '-mmacosx-version-min=*' from lib makefile
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
katjav committed Oct 9, 2016
1 parent 7b5e359 commit a7d3098
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile.pdlibbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ endif
# LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for
# OSX x86_64.


ifeq ($(system), Darwin)
pkglibdir = $(HOME)/Library/Pd
pdincludepath := $(firstword $(wildcard \
Expand All @@ -519,15 +520,18 @@ ifeq ($(system), Darwin)
-install_name @loader_path/$(shared.lib) \
-compatibility_version 1 -current_version 1.0
stripflags = -x
version.flag := $(filter $(cflags), -mmacosx-version-min=%)
ifeq ($(machine), i386)
cxx.flags := -fcheck-new
arch.c.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=10.4
arch := ppc i386 x86_64
version.flag ?= -mmacosx-version-min=10.4
endif
ifeq ($(machine), x86_64)
arch.c.flags := -arch i386 -arch x86_64 -mmacosx-version-min=10.5
arch.ld.flags := -arch i386 -arch x86_64 -mmacosx-version-min=10.5
arch := i386 x86_64
version.flag ?= -mmacosx-version-min=10.5
endif
arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag)
arch.ld.flags := $(arch.c.flags)
endif


Expand Down

0 comments on commit a7d3098

Please sign in to comment.