Skip to content

Commit

Permalink
remove build options for OSX 10.1-10.5, this fixes also the built on …
Browse files Browse the repository at this point in the history
…macOS 10.12.
  • Loading branch information
FonsRademakers committed Jul 15, 2016
1 parent 968ddbe commit 564d263
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 231 deletions.
30 changes: 6 additions & 24 deletions bindings/pyroot/Module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ PYROOTDIR := $(MODDIR)
PYROOTDIRS := $(PYROOTDIR)/src
PYROOTDIRI := $(PYROOTDIR)/inc

##### python64 #####
ifeq ($(ARCH),macosx64)
ifeq ($(MACOSX_MINOR),5)
PYTHON64S := $(MODDIRS)/python64.c
PYTHON64O := $(call stripsrc,$(PYTHON64S:.c=.o))
PYTHON64 := bin/python64
PYTHON64DEP := $(PYTHON64O:.o=.d)
endif
endif

##### libPyROOT #####
PYROOTL := $(MODDIRI)/LinkDef.h
PYROOTDS := $(call stripsrc,$(MODDIRS)/G__PyROOT.cxx)
Expand Down Expand Up @@ -75,9 +65,6 @@ ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(PYROOTH))
ALLLIBS += $(PYROOTLIB)
ALLMAPS += $(PYROOTMAP)

ALLEXECS += $(PYTHON64)
INCLUDEFILES += $(PYTHON64DEP)

# include all dependency files
INCLUDEFILES += $(PYROOTDEP)

Expand Down Expand Up @@ -125,37 +112,32 @@ $(PYROOTMAP): $(PYROOTH) $(PYROOTL) $(ROOTCLINGEXE) $(call pcmdep,PYROOT)
@echo "Generating rootmap $@..."
$(ROOTCLINGSTAGE2) -r $(PYROOTDS) $(call dictModule,PYROOT) -c $(PYROOTH) $(PYROOTL)

$(PYTHON64): $(PYTHON64O)
$(CC) $(LDFLAGS) -o $@ $(PYTHON64O) \
$(PYTHONLIBDIR) $(PYTHONLIB)

all-$(MODNAME): $(PYROOTLIB) $(PYTHON64)
all-$(MODNAME): $(PYROOTLIB)

clean-$(MODNAME):
@rm -f $(PYROOTO) $(PYROOTDO) $(PYTHON64O)
@rm -f $(PYROOTO) $(PYROOTDO)

clean:: clean-$(MODNAME)

distclean-$(MODNAME): clean-$(MODNAME)
@rm -f $(PYROOTDEP) $(PYROOTDS) $(PYROOTDH) $(PYROOTLIB) \
$(ROOTPY) $(ROOTPYC) $(ROOTPYO) $(PYROOTMAP) \
$(PYROOTPYD) $(PYTHON64DEP) $(PYTHON64)
$(PYROOTPYD)
@rm -rf $(LPATH)/ROOTaaS bin/ROOTaaS

distclean:: distclean-$(MODNAME)

##### extra rules ######
$(PYROOTO): CXXFLAGS += $(PYTHONINCDIR:%=-I%)
$(PYTHON64O): CFLAGS += $(PYTHONINCDIR:%=-I%)
ifeq ($(GCC_MAJOR),4)
$(PYROOTO): CXXFLAGS += -fno-strict-aliasing
endif
ifneq ($(CLANG_MAJOR)$(GCC_MAJOR),)
# Building with clang or GCC
$(PYROOTO) $(PYTHON64O) $(PYROOTDO): CXXFLAGS += -Wno-error=format
$(PYROOTO) $(PYROOTDO): CXXFLAGS += -Wno-error=format
endif

ifneq ($(CLANG_MAJOR),)
# Building with clang
$(PYROOTO) $(PYTHON64O) $(PYROOTDO): CXXFLAGS += -Wno-ignored-attributes
# Building with clang
$(PYROOTO) $(PYROOTDO): CXXFLAGS += -Wno-ignored-attributes
endif
24 changes: 3 additions & 21 deletions bindings/ruby/Module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ RUBYROOTDIR := $(MODDIR)
RUBYROOTDIRS := $(RUBYROOTDIR)/src
RUBYROOTDIRI := $(RUBYROOTDIR)/inc

##### ruby64 #####
ifeq ($(ARCH),macosx64)
ifeq ($(MACOSX_MINOR),5)
RUBY64S := $(MODDIRS)/ruby64.c
RUBY64O := $(call stripsrc,$(RUBY64S:.c=.o))
RUBY64 := bin/ruby64
RUBY64DEP := $(RUBY64O:.o=.d)
endif
endif

##### libRuby #####
RUBYROOTL := $(MODDIRI)/LinkDef.h
RUBYROOTDS := $(call stripsrc,$(MODDIRS)/G__Ruby.cxx)
Expand All @@ -42,9 +32,6 @@ ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(RUBYROOTH))
ALLLIBS += $(RUBYROOTLIB)
ALLMAPS += $(RUBYROOTMAP)

ALLEXECS += $(RUBY64)
INCLUDEFILES += $(RUBY64DEP)

# include all dependency files
INCLUDEFILES += $(RUBYROOTDEP)

Expand Down Expand Up @@ -73,23 +60,18 @@ $(RUBYROOTMAP): $(RUBYROOTH) $(RUBYROOTL) $(ROOTCLINGEXE) $(call pcmdep,RUBYROOT
@echo "Generating rootmap $@..."
$(ROOTCLINGSTAGE2) -r $(RUBYROOTDS) $(call dictModule,RUBYROOT) -c $(RUBYROOTH) $(RUBYROOTL)

$(RUBY64): $(RUBY64O)
$(CC) $(LDFLAGS) -o $@ $(RUBY64O) \
$(RUBYLIBDIR) $(RUBYLIB)

all-$(MODNAME): $(RUBYROOTLIB) $(RUBY64)
all-$(MODNAME): $(RUBYROOTLIB)

clean-$(MODNAME):
@rm -f $(RUBYROOTO) $(RUBYROOTDO) $(RUBY64O)
@rm -f $(RUBYROOTO) $(RUBYROOTDO)

clean:: clean-$(MODNAME)

distclean-$(MODNAME): clean-$(MODNAME)
@rm -f $(RUBYROOTDEP) $(RUBYROOTDS) $(RUBYROOTDH) \
$(RUBYROOTLIB) $(RUBYROOTMAP) $(RUBY64DEP) $(RUBY64)
$(RUBYROOTLIB) $(RUBYROOTMAP)

distclean:: distclean-$(MODNAME)

##### extra rules ######
$(RUBYROOTO): CXXFLAGS += $(RUBYINCDIR:%=-I%)
$(RUBY64O): CFLAGS += $(RUBYINCDIR:%=-I%)
57 changes: 13 additions & 44 deletions config/Makefile.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ endif
# MacOS X version
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSX_CPU := $(shell uname -p)
FINK_DIR := $(shell which fink 2>&1 | sed -ne "s/\/bin\/fink//p")

CXX = clang++
CC = clang
Expand All @@ -28,10 +27,10 @@ CXX11FLAGS = -std=c++11
endif

CXXFLAGS = -m32 $(CXX11FLAGS) -pipe -Wshadow -W -Wall -Woverloaded-virtual \
-fsigned-char -fno-common $(EXTRA_CXXFLAGS) $(FINK_CXXFLAGS) \
-fsigned-char -fno-common $(EXTRA_CXXFLAGS) \
$(TARGETFLAGS) $(USERCONF_CXXFLAGS)
CFLAGS = -m32 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \
$(EXTRA_CFLAGS) $(FINK_CFLAGS) $(TARGETFLAGS) $(USERCONF_CFLAGS)
$(EXTRA_CFLAGS) $(TARGETFLAGS) $(USERCONF_CFLAGS)
CLINGCXXFLAGS = -m32
COMPILER = gnu

Expand All @@ -41,57 +40,26 @@ LDFLAGS = $(OPT) -m32 -mmacosx-version-min=$(MACOSXVERS)
LDFLAGS += $(CXX11LDFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)

FORCELINK = yes
NEEDFINK = yes
FORCELINK = no

ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
# this is set for 64 but not for 32 bit
CXXFLAGS += -D__DARWIN_UNIX03=1
CFLAGS += -D__DARWIN_UNIX03=1
endif
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)

ifeq ($(USECONFIG),FALSE)
SOFLAGS = -dynamiclib -single_module -Wl,-dead_strip_dylibs \
-install_name @rpath/
else
SOFLAGS = -dynamiclib -single_module -Wl,-dead_strip_dylibs \
-install_name $(LIBDIR)/
endif
FORCELINK = no
NEEDFINK = no
else
ifeq ($(subst $(MACOSX_MINOR),,123),123)
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name $(LIBDIR)/
FORCELINK = no
NEEDFINK = no
else
ifeq ($(MACOSX_MINOR),3)
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name $(LIBDIR)/
LDFLAGS += -bind_at_load
CXXFLAGS += -Wno-long-double
CFLAGS += -Wno-long-double
else
SOFLAGS = -dynamiclib -single_module \
-undefined suppress -install_name $(LIBDIR)/
LDFLAGS += -bind_at_load
CXXFLAGS += -Wno-long-double
CFLAGS += -Wno-long-double
endif
endif
endif
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
SOEXT = so
else
SOEXT = dylib
endif

# System libraries:
SYSLIBS = -lm $(FINK_LDFLAGS) $(OSTHREADLIBDIR) \
SYSLIBS = -lm $(OSTHREADLIBDIR) \
$(OSTHREADLIB) -ldl $(ALLOCLIBDIR) $(ALLOCLIB)
XLIBS = $(XPMLIBDIR) $(XPMLIB) $(X11LIBDIR) -lXext -lX11
CILIBS = -lm $(FINK_LDFLAGS) -ldl
CILIBS = -lm -ldl

# Fortran:
F77ORG = gfortran
Expand All @@ -107,12 +75,6 @@ INSTALL := /bin/cp -pPR
INSTALLDATA := /bin/cp -pPR

# Extras
ifeq ($(NEEDFINK),yes)
FINK_CXXFLAGS := $(shell [ -d $(FINK_DIR)/include ] && echo -I$(FINK_DIR)/include)
FINK_CFLAGS := $(shell [ -d $(FINK_DIR)/include ] && echo -I$(FINK_DIR)/include)
FINK_LDFLAGS := $(shell [ -d $(FINK_DIR)/lib ] && echo -L$(FINK_DIR)/lib)
endif

ifeq ($(MACOSX_MINOR),7)
MACOSX_SSL_DEPRECATED = yes
endif
Expand Down Expand Up @@ -140,6 +102,13 @@ MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif
ifeq ($(MACOSX_MINOR),12)
MACOSX_SSL_DEPRECATED = yes
MACOSX_ODBC_DEPRECATED = yes
MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif

ifeq ($(CONFIGURE),yes)
showcxx:
Expand Down
50 changes: 12 additions & 38 deletions config/Makefile.macosx64
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ endif
# OS version
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSX_CPU := $(shell uname -p)
FINK_DIR := $(shell which fink 2>&1 | sed -ne "s/\/bin\/fink//p")

CXX = clang++
CC = clang
Expand All @@ -32,10 +31,10 @@ CXX11LDFLAGS = -stdlib=libc++
endif

CXXFLAGS = -m64 $(CXX11FLAGS) -pipe -Wshadow -W -Wall -Woverloaded-virtual \
-fsigned-char -fno-common $(EXTRA_CXXFLAGS) $(FINK_CXXFLAGS) \
-fsigned-char -fno-common $(EXTRA_CXXFLAGS) \
$(TARGETFLAGS) $(USERCONF_CXXFLAGS)
CFLAGS = -m64 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \
$(EXTRA_CFLAGS) $(FINK_CFLAGS) $(TARGETFLAGS) $(USERCONF_CFLAGS)
$(EXTRA_CFLAGS) $(TARGETFLAGS) $(USERCONF_CFLAGS)
COMPILER = gnu

ifeq ($(WERROR),yes)
Expand All @@ -51,48 +50,22 @@ F77LDFLAGS := $(LDFLAGS)
LDFLAGS += $(CXX11LDFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)

FORCELINK = yes
NEEDFINK = yes
FORCELINK = no

ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
ifeq ($(USECONFIG),FALSE)
SOFLAGS = -dynamiclib -single_module -Wl,-dead_strip_dylibs \
-install_name @rpath/
else
SOFLAGS = -dynamiclib -single_module -Wl,-dead_strip_dylibs \
-install_name $(LIBDIR)/
endif
FORCELINK = no
NEEDFINK = no
else
ifeq ($(subst $(MACOSX_MINOR),,123),123)
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name $(LIBDIR)/
FORCELINK = no
NEEDFINK = no
else
ifeq ($(MACOSX_MINOR),3)
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name $(LIBDIR)/
LDFLAGS += -bind_at_load
else
SOFLAGS = -dynamiclib -single_module \
-undefined suppress -install_name $(LIBDIR)/
LDFLAGS += -bind_at_load
endif
endif
endif
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
SOEXT = so
else
SOEXT = dylib
endif

# System libraries:
SYSLIBS = -lm $(FINK_LDFLAGS) $(OSTHREADLIBDIR) \
SYSLIBS = -lm $(OSTHREADLIBDIR) \
$(OSTHREADLIB) -ldl $(ALLOCLIBDIR) $(ALLOCLIB)
XLIBS = $(XPMLIBDIR) $(XPMLIB) $(X11LIBDIR) -lXext -lX11
CILIBS = -lm $(FINK_LDFLAGS) -ldl
CILIBS = -lm -ldl

# Fortran:
F77ORG = gfortran
Expand All @@ -108,12 +81,6 @@ INSTALL := /bin/cp -pPR
INSTALLDATA := /bin/cp -pPR

# Extras
ifeq ($(NEEDFINK),yes)
FINK_CXXFLAGS := $(shell [ -d $(FINK_DIR)/include ] && echo -I$(FINK_DIR)/include)
FINK_CFLAGS := $(shell [ -d $(FINK_DIR)/include ] && echo -I$(FINK_DIR)/include)
FINK_LDFLAGS := $(shell [ -d $(FINK_DIR)/lib ] && echo -L$(FINK_DIR)/lib)
endif

ifeq ($(MACOSX_MINOR),7)
MACOSX_SSL_DEPRECATED = yes
endif
Expand Down Expand Up @@ -141,6 +108,13 @@ MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif
ifeq ($(MACOSX_MINOR),12)
MACOSX_SSL_DEPRECATED = yes
MACOSX_ODBC_DEPRECATED = yes
MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif

ifeq ($(CONFIGURE),yes)
showcxx:
Expand Down
26 changes: 14 additions & 12 deletions config/Makefile.macosxicc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ endif
# OS version
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSX_CPU := $(shell uname -p)
FINK_DIR := $(shell which fink 2>&1 | sed -ne "s/\/bin\/fink//p")

ifeq ($(CXX14),yes)
CXX11FLAGS = -std=c++1y
Expand Down Expand Up @@ -72,25 +71,14 @@ LDFLAGS += $(EXTRA_LDFLAGS)

FORCELINK = no

ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
ifeq ($(USECONFIG),FALSE)
SOFLAGS = -dynamiclib -single_module -Wl,-dead_strip_dylibs \
-install_name @rpath/
else
SOFLAGS = -dynamiclib -single_module -Wl,-dead_strip_dylibs \
-install_name $(LIBDIR)/
endif
else
ifeq ($(subst $(MACOSX_MINOR),,123),123)
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name $(LIBDIR)/
endif
endif
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
SOEXT = so
else
SOEXT = dylib
endif

# System libraries:
SYSLIBS = -lm $(OSTHREADLIBDIR) \
Expand Down Expand Up @@ -151,6 +139,20 @@ MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif
ifeq ($(MACOSX_MINOR),11)
MACOSX_SSL_DEPRECATED = yes
MACOSX_ODBC_DEPRECATED = yes
MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif
ifeq ($(MACOSX_MINOR),12)
MACOSX_SSL_DEPRECATED = yes
MACOSX_ODBC_DEPRECATED = yes
MACOSX_GLU_DEPRECATED = yes
MACOSX_KRB5_DEPRECATED = yes
MACOSX_LDAP_DEPRECATED = yes
endif

ifeq ($(CONFIGURE),yes)
showcxx:
Expand Down
Loading

0 comments on commit 564d263

Please sign in to comment.