forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.ios
93 lines (79 loc) · 2.31 KB
/
Makefile.ios
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- mode: makefile -*-
#
# Makefile of ROOT for MacOS X, using g++ 32-bit mode
PLATFORM = ios
DEBUGFLAGS = -g
OPTFLAGS = -O2 -DNDEBUG
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 ($(CXX14),yes)
CXX11FLAGS = -std=c++1y
else
CXX11FLAGS = -std=c++11
endif
ifeq ($(LIBCXX),yes)
CXX11FLAGS += -stdlib=libc++
CXX11LDFLAGS = -stdlib=libc++
endif
else
CXX := $(shell xcrun -find g++)
CC := $(shell xcrun -find gcc)
endif
CXXFLAGS = $(CXX11FLAGS) -arch armv7 -pipe -Wshadow -W -Wall \
-Woverloaded-virtual -fsigned-char -fno-common \
-fvisibility-inlines-hidden $(EXTRA_CXXFLAGS) \
-isysroot $(IOSSDK) $(CXX11FLAGS) $(USERCONF_CXXFLAGS)
CFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \
$(EXTRA_CFLAGS) -isysroot $(IOSSDK) $(USERCONF_CFLAGS)
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