forked from XCSoar/XCSoar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
294 lines (263 loc) · 8.32 KB
/
Makefile
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
#
# This is the XCSoar build script. To compile XCSoar, you must
# specify the target platform, e.g. for Android, type:
#
# make TARGET=ANDROID
#
# The following parameters may be specified on the "make" command
# line:
#
# TARGET The name of the target platform. See the TARGETS variable
# in build/targets.mk for a list of valid target platforms.
#
# HEADLESS If set to "y", no UI is available.
#
# VFB "y" means software rendering to non-interactive virtual
# frame buffer
#
# USE_FB "y" means software rendering to /dev/fb0
#
# ENABLE_SDL If set to "y", the UI is drawn with libSDL.
#
# ENABLE_MESA_KMS If set to "y", the program uses KMS to switch to graphics mode.
# Use this option when the program runs on a text-mode system
# without graphics and window system like X11 or Wayland.
# Default for Rasperry PI 4, optional for Cubieboard.
#
# OPENGL "y" means render with OpenGL.
#
# GLES2 "y" means render with OpenGL/ES 2.0.
#
# GREYSCALE "y" means render 8-bit greyscale internally
#
# DITHER "y" means dither to 1-bit black&white
#
# EYE_CANDY "n" disables eye candy rendering.
#
# ICF "y" enables Identical Code Folding (gold --icf=all)
#
# DEBUG If set to "y", the debugging version of XCSoar is built
# (default is "y")
#
# WERROR Make all compiler warnings fatal (default is $DEBUG)
#
# V Verbosity; 1 is the default, and prints terse information.
# 0 means quiet, and 2 prints the full compiler commands.
#
# LTO "y" enables gcc's link-time optimization flag (experimental,
# requires gcc 4.5)
#
# THIN_LTO "y" enables ThinLTO (https://clang.llvm.org/docs/ThinLTO.html)
#
# CLANG "y" to use clang instead of gcc
#
# ANALYZER "y" to support the clang analyzer
#
# LLVM "y" to compile LLVM bitcode with clang
#
# LIBCXX "y" to compile with libc++, or the absolute path of the
# libc++ svn/git working directory.
#
# IWYU "y" to run "include-what-you-use" on all sources
#
# USE_CCACHE "y" to build with ccache
#
.DEFAULT_GOAL := all
topdir = .
-include $(topdir)/build/local-config.mk
include $(topdir)/build/make.mk
include $(topdir)/build/thunk.mk
include $(topdir)/build/bool.mk
include $(topdir)/build/string.mk
include $(topdir)/build/dirs.mk
include $(topdir)/build/verbose.mk
include $(topdir)/build/util.mk
include $(topdir)/build/detect.mk
include $(topdir)/build/targets.mk
include $(topdir)/build/thirdparty.mk
include $(topdir)/build/pkgconfig.mk
include $(topdir)/build/languages.mk
include $(topdir)/build/options.mk
include $(topdir)/build/debug.mk
include $(topdir)/build/abi.mk
include $(topdir)/build/coverage.mk
include $(topdir)/build/libintl.mk
ifeq ($(HEADLESS),y)
else
include $(topdir)/build/libglm.mk
include $(topdir)/build/vfb.mk
include $(topdir)/build/fb.mk
include $(topdir)/build/wayland.mk
include $(topdir)/build/egl.mk
include $(topdir)/build/glx.mk
include $(topdir)/build/opengl.mk
endif
include $(topdir)/build/compile.mk
include $(topdir)/build/host.mk
include $(topdir)/build/flags.mk
include $(topdir)/build/charset.mk
include $(topdir)/build/warnings.mk
include $(topdir)/build/depends.mk
include $(topdir)/build/link.mk
include $(topdir)/build/resource.mk
include $(topdir)/build/libdata.mk
include $(topdir)/build/java.mk
include $(topdir)/build/android.mk
include $(topdir)/build/llvm.mk
include $(topdir)/build/tools.mk
include $(topdir)/build/version.mk
include $(topdir)/build/darwin.mk
include $(topdir)/build/ios.mk
include $(topdir)/build/osx.mk
include $(topdir)/build/generate.mk
include $(topdir)/build/doxygen.mk
include $(topdir)/build/manual.mk
include $(topdir)/build/sphinx.mk
include $(topdir)/build/libboost.mk
INCLUDES += $(BOOST_CPPFLAGS)
include $(topdir)/build/libjson.mk
ifeq ($(FAT_BINARY),n)
# Create libraries for zzip, jasper and compatibility stuff
include $(topdir)/build/libfmt.mk
include $(topdir)/build/libdbus.mk
include $(topdir)/build/libresource.mk
include $(topdir)/build/liblook.mk
include $(topdir)/build/libstdcxx.mk
include $(topdir)/build/libutil.mk
include $(topdir)/build/libmath.mk
include $(topdir)/build/libgeo.mk
include $(topdir)/build/libnmea.mk
include $(topdir)/build/libcomputer.mk
include $(topdir)/build/libos.mk
include $(topdir)/build/libtime.mk
include $(topdir)/build/libprofile.mk
include $(topdir)/build/liboperation.mk
include $(topdir)/build/libnet.mk
include $(topdir)/build/libhttp.mk
include $(topdir)/build/libcoroutines.mk
include $(topdir)/build/libclient.mk
include $(topdir)/build/sdl.mk
include $(topdir)/build/alsa.mk
include $(topdir)/build/zlib.mk
include $(topdir)/build/zzip.mk
include $(topdir)/build/libcrypto.mk
include $(topdir)/build/jasper.mk
include $(topdir)/build/libport.mk
include $(topdir)/build/driver.mk
include $(topdir)/build/libio.mk
include $(topdir)/build/shapelib.mk
include $(topdir)/build/libunits.mk
include $(topdir)/build/libwaypoint.mk
include $(topdir)/build/libairspace.mk
include $(topdir)/build/libtask.mk
include $(topdir)/build/libxml.mk
include $(topdir)/build/libcupfile.mk
include $(topdir)/build/libwaypointfile.mk
include $(topdir)/build/libtaskfile.mk
include $(topdir)/build/libroute.mk
include $(topdir)/build/libcontest.mk
include $(topdir)/build/libglide.mk
include $(topdir)/build/datafield.mk
include $(topdir)/build/libevent_options.mk
include $(topdir)/build/udev.mk
include $(topdir)/build/libevent.mk
include $(topdir)/build/freetype.mk
include $(topdir)/build/libpng.mk
include $(topdir)/build/libjpeg.mk
include $(topdir)/build/libtiff.mk
include $(topdir)/build/coregraphics.mk
include $(topdir)/build/appkit.mk
include $(topdir)/build/uikit.mk
include $(topdir)/build/screen.mk
include $(topdir)/build/libthread.mk
include $(topdir)/build/libasync.mk
include $(topdir)/build/form.mk
include $(topdir)/build/libwidget.mk
include $(topdir)/build/libaudio.mk
include $(topdir)/build/libtopo.mk
include $(topdir)/build/libterrain.mk
include $(topdir)/build/lua.mk
include $(topdir)/build/harness.mk
endif # FAT_BINARY=n
ifeq ($(FUZZER),y)
include $(topdir)/build/fuzzer.mk
else ifeq ($(FAT_BINARY),y)
# No native code in TARGET=ANDROIDFAT
else
include $(topdir)/build/vali.mk
include $(topdir)/build/infobox.mk
include $(topdir)/build/mapwindow.mk
include $(topdir)/build/main.mk
include $(topdir)/build/test.mk
endif
ifeq ($(TARGET_IS_LINUX),y)
include $(topdir)/build/cloud.mk
include $(topdir)/build/kobo.mk
ifeq ($(USE_POLL_EVENT),y)
include $(topdir)/build/ov.mk
endif
endif
include $(topdir)/build/hot.mk
include $(topdir)/build/nolto.mk
ifeq ($(FUZZER),n)
include $(topdir)/build/python.mk
endif
# Load local-config a second time
# to set (override) choices for GXX and friends.
-include $(topdir)/build/local-config.mk
######## output files
ifeq ($(FUZZER),n)
include $(topdir)/build/dist.mk
include $(topdir)/build/install.mk
endif
######## compiler flags
INCLUDES += -I$(SRC) -I$(ENGINE_SRC_DIR)
####### sources
include $(topdir)/build/gettext.mk
ifeq ($(FUZZER),n)
ifeq ($(FAT_BINARY),n)
OUTPUTS := $(XCSOAR_BIN) $(VALI_XCS_BIN)
endif
ifeq ($(TARGET),ANDROID)
OUTPUTS += $(ANDROID_BIN)/XCSoar-debug.apk
endif
ifeq ($(TARGET_IS_KOBO),y)
OUTPUTS += $(KOBO_MENU_BIN) $(KOBO_POWER_OFF_BIN)
endif
ifeq ($(HAVE_WIN32),y)
OUTPUTS += $(LAUNCH_XCSOAR_BIN)
endif
endif
all: $(OUTPUTS)
ifeq ($(FAT_BINARY),n)
everything: $(OUTPUTS) $(OPTIONAL_OUTPUTS) debug build-check build-harness
else
everything: all
endif
clean:
@$(NQ)echo "cleaning all"
$(Q)rm -rf build/local-config.mk
$(Q)rm -rf $(OUT)
$(RM) $(BUILDTESTS)
.PHONY: all everything clean FORCE
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/src/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/src/*.d)
endif
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/src/*/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/src/*/*.d)
endif
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*.d)
endif
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*/*.d)
endif
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*/*/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*/*/*.d)
endif
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*/*/*/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/src/*/*/*/*/*/*.d)
endif
ifneq ($(wildcard $(ABI_OUTPUT_DIR)/test/src/*.d),)
include $(wildcard $(ABI_OUTPUT_DIR)/test/src/*.d)
endif