-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile_g++
119 lines (101 loc) · 2.59 KB
/
Makefile_g++
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Makefile macros. See `Makefile' for explanations.
# Additional defines:
SYS_DEFS += -imacros system/BigFileDefines.h -pthread
# From user-defined options in Makefile:
ifeq ($(QUIET),yes)
SYS_WARN += -w
else
ifeq ($(GPP_VERSION),3.4.3)
SYS_WARN += -I. -I./extern/stb -I./extern/lua-5.4.2/src -Wextra -Wall -Wno-unused -Wno-deprecated -std=c++14
else
SYS_WARN += -I. -I./extern/stb -I./extern/lua-5.4.2/src -W -Wall -Wno-unused -Wno-deprecated -std=c++14
endif
endif
ifeq ($(DEBUG),yes)
SYS_DEBUG +=
endif
ifeq ($(FAST),yes)
# Force minor optimizations:
OPTIM = -O
endif
ifeq ($(OPTIM),none)
SYS_OPT +=
else
ifeq ($(OPTIM),)
SYS_OPT += -O3
else
SYS_OPT += $(OPTIM)
endif
endif
ifeq ($(PROFILE),yes)
SYS_DEBUG += -pg
endif
ifeq ($(FORCE_DEBUG),yes)
SYS_DEFS += -DFORCE_DEBUG
endif
ifeq ($(TRACK_MEMORY),yes)
SYS_DEBUG += -DTRACK_MEMORY
SYS_MEMTRACK += -include system/MemTracker.h
endif
ifeq ($(ASSERT),FAST)
SYS_DEFS += -DFAST_ASSERT
endif
# No OpenMP support for g++:
ifeq ($(OPEN_MP),yes)
OMP_FLAGS = -fopenmp
OMP_LINK = -fopenmp
SYS_DEFS += -DOPEN_MP
endif
# No Posix threads for g++ < v3.0.3:
ifeq ($(PTHREADS),yes)
PTHREAD_DEFS =
PTHREAD_FLAGS =
PTHREAD_LIBS =
endif
ifeq ($(GCOV),yes)
SYS_DEBUG += -fprofile-arcs -ftest-coverage
endif
ifeq ($(GPP_VERSION),3.4.3)
SYS_LANG += -fno-strict-aliasing
else
SYS_LANG += -fno-strict-aliasing
endif
SYS_INCS +=
SYS_LINK +=
ifeq ($(OS_MACHINE),alpha)
include Makefile_g++_alpha
else
ifeq ($(OS_MACHINE),ia64)
include Makefile_g++_ia64
else
ifeq ($(OS_MACHINE),i686)
include Makefile_g++_i686
else
ifeq ($(OS_MACHINE),macosx)
include Makefile_g++_macosx
else
ifeq ($(OS_MACHINE),x86_64)
include Makefile_g++_x86_64
else
ifeq ($(OS_MACHINE),i386)
include Makefile_g++_i386
else
ifeq ($(OS_MACHINE),i86pc)
include Makefile_g++_i86pc
else
ifeq ($(OS_MACHINE),armv7l)
include Makefile_g++_armv7l
else
ifeq ($(OS_MACHINE),arm64)
include Makefile_g++_arm64
else
$(error No appropriate Makefile_g++ file for this platform.)
endif
endif
endif
endif
endif
endif
endif
endif
endif