Makefile.ios
# -*- mode: makefile -*-
#
# Makefile of ROOT for MacOS X, using g++ 32-bit mode
PLATFORM = ios
DEBUGFLAGS = -g
OPTFLAGS = -O2
ifeq (debug,$(findstring debug,$(ROOTBUILD)))
OPT = $(DEBUGFLAGS)
NOOPT =
else
OPT = $(OPTFLAGS)
NOOPT =
endif
# iOS version
IOS_MAJOR := $(shell echo $(IOSVERS) | cut -d . -f 1)
# Compiler:
ifeq ($(subst $(IOS_MAJOR),,1234),1234)
CXX := $(shell xcrun -find clang++)
CC := $(shell xcrun -find clang)
ifeq ($(LIBCXX),yes)
CXX11FLAGS = -stdlib=libc++
CXX11LDFLAGS = -stdlib=libc++
endif
else
CXX := $(shell xcrun -find g++)
CC := $(shell xcrun -find gcc)
endif
CXXFLAGS = -std=c++11 -arch armv7 -pipe -Wshadow -W -Wall \
-Woverloaded-virtual -fsigned-char -fno-common \
-fvisibility-inlines-hidden $(EXTRA_CXXFLAGS) \
-isysroot $(IOSSDK) $(CXX11FLAGS)
CFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \
$(EXTRA_CFLAGS) -isysroot $(IOSSDK)
COMPILER = gnu
# Linker:
ifeq ($(subst $(IOS_MAJOR),,1234),1234)
LD := $(shell xcrun -find clang++)
else
LD := $(shell xcrun -find g++)
endif
LDFLAGS = $(OPT) -arch armv7 -isysroot $(IOSSDK) \
-miphoneos-version-min=$(IOSVERS) $(CXX11LDFLAGS)
# this is set for 64 but not for 32 bit (for iOS too???)
CXXFLAGS += -D__DARWIN_UNIX03=1
CFLAGS += -D__DARWIN_UNIX03=1
ifeq ($(USECONFIG),FALSE)
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name @rpath/
else
SOFLAGS = -dynamiclib -single_module \
-undefined dynamic_lookup -install_name $(LIBDIR)/
endif
FORCELINK = no
SOEXT = so
# System libraries:
SYSLIBS = -lm $(EXTRA_LDFLAGS) $(OSTHREADLIBDIR) \
$(OSTHREADLIB) -ldl $(ALLOCLIBDIR) $(ALLOCLIB)
CILIBS = -lm $(EXTRA_LDFLAGS) -ldl
# Fortran:
F77 =
# Override default in Makefile.config
INSTALL := /bin/cp -pPR
INSTALLDATA := /bin/cp -pPR
# Extras
ifeq ($(CONFIGURE),yes)
showcxx:
@echo "$(CXX)"
showcc:
@echo "$(CC)"
showld:
@echo "$(LD)"
showf77:
@echo "$(F77)"
endif