root/Makefile

Revision 6bc96910700f05bd1842f851328f506c6d3ef66f, 12.8 kB (checked in by Tobias Bieniek <Tobias.Bieniek@…>, 2 weeks ago)

Removed unused Math/NavFunctions.cpp/hpp files

  • Property mode set to 100755
Line 
1#
2# This is the XCSoar build script.  To compile XCSoar, you must
3# specify the target platform, e.g. for Pocket PC 2003, type:
4#
5#   make TARGET=PPC2003
6#
7# The following parameters may be specified on the "make" command
8# line:
9#
10#   TARGET      The name of the target platform.  See the TARGETS variable
11#               below for a list of valid target platforms.
12#
13#   ENABLE_SDL  If set to "y", the UI is drawn with libSDL.
14#
15#   DEBUG       If set to "y", the debugging version of XCSoar is built
16#               (default is "y")
17#
18#   WERROR      Make all compiler warnings fatal (default is $DEBUG)
19#
20#   V           Verbosity; 1 is the default, and prints terse information.
21#               0 means quiet, and 2 prints the full compiler commands.
22#
23#   FIXED       "y" means use fixed point math (for FPU-less platforms)
24#
25#   LTO         "y" enables gcc's link-time optimization flag (experimental,
26#               requires gcc 4.5)
27#
28#   CLANG       "y" to use clang instead of gcc
29#
30
31.DEFAULT_GOAL := all
32
33topdir = .
34
35include $(topdir)/build/bool.mk
36include $(topdir)/build/common.mk
37include $(topdir)/build/targets.mk
38include $(topdir)/build/debug.mk
39include $(topdir)/build/coverage.mk
40include $(topdir)/build/options.mk
41include $(topdir)/build/sdl.mk
42include $(topdir)/build/gconf.mk
43
44CPPFLAGS += -DFLARM_AVERAGE
45
46ifeq ($(HAVE_WIN32),n)
47ifneq ($(TARGET),CYGWIN)
48  CPPFLAGS += -DHAVE_BOOST -DHAVE_VASPRINTF
49else
50  CPPFLAGS += -D__STDC_VERSION__=199901L
51endif
52endif
53
54include $(topdir)/build/flags.mk
55include $(topdir)/build/charset.mk
56include $(topdir)/build/warnings.mk
57include $(topdir)/build/compile.mk
58include $(topdir)/build/llvm.mk
59include $(topdir)/build/tools.mk
60include $(topdir)/build/resource.mk
61include $(topdir)/build/generate.mk
62include $(topdir)/build/doco.mk
63
64# Create libraries for zzip, jasper and compatibility stuff
65include $(topdir)/build/libutil.mk
66include $(topdir)/build/zzip.mk
67include $(topdir)/build/jasper.mk
68include $(topdir)/build/compat.mk
69include $(topdir)/build/driver.mk
70include $(topdir)/build/io.mk
71include $(topdir)/build/shapelib.mk
72include $(topdir)/build/task.mk
73include $(topdir)/build/datafield.mk
74include $(topdir)/build/screen.mk
75include $(topdir)/build/form.mk
76include $(topdir)/build/harness.mk
77
78include $(topdir)/build/setup.mk
79include $(topdir)/build/launch.mk
80include $(topdir)/build/vali.mk
81include $(topdir)/build/test.mk
82
83######## output files
84
85OUTPUTS := $(TARGET_BIN_DIR)/XCSoar$(TARGET_EXEEXT) $(VALI_XCS)
86OUTPUTS += $(XCSOARSETUP_DLL) $(XCSOARLAUNCH_DLL)
87
88include $(topdir)/build/dist.mk
89include $(topdir)/build/cab.mk
90
91######## compiler flags
92
93INCLUDES += -I$(SRC) -I$(ENGINE_SRC_DIR) -I$(SRC)/WayPoint
94CPPFLAGS += $(GCONF_CPPFLAGS)
95
96####### linker configuration
97
98LDFLAGS = $(TARGET_LDFLAGS) $(FLAGS_PROFILE)
99LDLIBS = $(TARGET_LDLIBS) $(GCONF_LDLIBS)
100
101####### sources
102
103DIALOG_SOURCES = \
104        $(SRC)/Dialogs/XML.cpp \
105        $(SRC)/Dialogs/Message.cpp \
106        $(SRC)/Dialogs/dlgAirspace.cpp \
107        $(SRC)/Dialogs/dlgAirspaceColours.cpp \
108        $(SRC)/Dialogs/dlgAirspacePatterns.cpp \
109        $(SRC)/Dialogs/dlgAirspaceDetails.cpp \
110        $(SRC)/Dialogs/dlgAirspaceSelect.cpp \
111        $(SRC)/Dialogs/dlgAirspaceWarning.cpp \
112        $(SRC)/Dialogs/dlgAnalysis.cpp \
113        $(SRC)/Dialogs/dlgBasicSettings.cpp \
114        $(SRC)/Dialogs/dlgBrightness.cpp \
115        $(SRC)/Dialogs/dlgChecklist.cpp \
116        $(SRC)/Dialogs/dlgComboPicker.cpp \
117        $(SRC)/Dialogs/dlgConfiguration.cpp \
118        $(SRC)/Dialogs/dlgConfiguration2.cpp \
119        $(SRC)/Dialogs/dlgConfigurationVario.cpp \
120        $(SRC)/Dialogs/dlgFlarmTraffic.cpp \
121        $(SRC)/Dialogs/dlgFlarmTrafficDetails.cpp \
122        $(SRC)/Dialogs/dlgHelp.cpp \
123        $(SRC)/Dialogs/dlgLoggerReplay.cpp \
124        $(SRC)/Dialogs/dlgSimulatorPrompt.cpp \
125        $(SRC)/Dialogs/dlgStartup.cpp \
126        $(SRC)/Dialogs/dlgStatus.cpp \
127        $(SRC)/Dialogs/dlgSwitches.cpp \
128        \
129        $(SRC)/Dialogs/dlgTaskManager.cpp \
130        $(SRC)/Dialogs/dlgTaskEdit.cpp \
131        $(SRC)/Dialogs/dlgTaskProperties.cpp \
132        $(SRC)/Dialogs/dlgTaskList.cpp \
133        $(SRC)/Dialogs/dlgTaskType.cpp \
134        $(SRC)/Dialogs/dlgTaskPoint.cpp \
135        $(SRC)/Dialogs/dlgTaskPointType.cpp \
136        $(SRC)/Dialogs/dlgTaskHelpers.cpp \
137        $(SRC)/Dialogs/dlgTaskCalculator.cpp \
138        \
139        $(SRC)/Dialogs/dlgTeamCode.cpp \
140        $(SRC)/Dialogs/dlgTextEntry.cpp \
141        $(SRC)/Dialogs/dlgTextEntry_Keyboard.cpp \
142        $(SRC)/Dialogs/dlgHelpers.cpp \
143        $(SRC)/Dialogs/dlgVegaDemo.cpp \
144        $(SRC)/Dialogs/dlgVoice.cpp \
145        $(SRC)/Dialogs/dlgWeather.cpp \
146        $(SRC)/Dialogs/dlgWaypointOutOfTerrain.cpp \
147        $(SRC)/Dialogs/dlgWayPointDetails.cpp \
148        $(SRC)/Dialogs/dlgWaypointEdit.cpp \
149        $(SRC)/Dialogs/dlgWayPointSelect.cpp \
150        $(SRC)/Dialogs/dlgWindSettings.cpp \
151        $(SRC)/Dialogs/dlgFontEdit.cpp \
152
153
154XCSOAR_SOURCES := \
155        $(IO_SRC_DIR)/ConfiguredFile.cpp \
156        $(IO_SRC_DIR)/DataFile.cpp \
157        $(SRC)/AirspaceClient.cpp \
158        $(SRC)/AirspaceClientUI.cpp \
159        $(SRC)/AirspaceClientCalc.cpp \
160        $(SRC)/TaskClient.cpp \
161        $(SRC)/TaskClientMap.cpp \
162        $(SRC)/TaskClientUI.cpp \
163        $(SRC)/TaskClientCalc.cpp \
164        $(SRC)/TaskStore.cpp \
165        \
166        $(SRC)/Poco/RWLock.cpp \
167        \
168        $(SRC)/AirspaceGlue.cpp \
169        $(SRC)/AirspaceParser.cpp \
170        $(SRC)/AirspaceVisibility.cpp \
171        \
172        $(SRC)/Atmosphere.cpp \
173        $(SRC)/ClimbAverageCalculator.cpp \
174        $(SRC)/ConditionMonitor.cpp \
175        $(SRC)/Calibration.cpp \
176        $(SRC)/DateTime.cpp \
177        $(SRC)/FLARM/FlarmId.cpp \
178        $(SRC)/FLARM/State.cpp \
179        $(SRC)/FLARM/FLARMNet.cpp \
180        $(SRC)/FLARM/Traffic.cpp \
181        $(SRC)/FlarmCalculations.cpp \
182        $(SRC)/GlideComputer.cpp \
183        $(SRC)/GlideComputerBlackboard.cpp \
184        $(SRC)/GlideComputerAirData.cpp \
185        $(SRC)/GlideComputerInterface.cpp \
186        $(SRC)/GlideComputerStats.cpp \
187        $(SRC)/GlideComputerTask.cpp \
188        $(SRC)/GlideRatio.cpp \
189        $(SRC)/Terrain/GlideTerrain.cpp \
190        $(SRC)/Logger/Logger.cpp \
191        $(SRC)/Logger/LoggerFRecord.cpp \
192        $(SRC)/Logger/LoggerGRecord.cpp \
193        $(SRC)/Logger/LoggerEPE.cpp \
194        $(SRC)/Logger/LoggerImpl.cpp \
195        $(SRC)/Logger/LoggerSign.cpp \
196        $(SRC)/Logger/MD5.cpp \
197        $(SRC)/Logger/NMEALogger.cpp \
198        $(SRC)/NMEA/ThermalBand.cpp \
199        $(SRC)/Replay/Replay.cpp \
200        $(SRC)/Replay/IgcReplay.cpp \
201        $(SRC)/Replay/IgcReplayGlue.cpp \
202        $(SRC)/Replay/NmeaReplay.cpp \
203        $(SRC)/Replay/NmeaReplayGlue.cpp \
204        $(SRC)/TeamCodeCalculation.cpp \
205        $(SRC)/ThermalLocator.cpp \
206        $(SRC)/ThermalBase.cpp \
207        $(SRC)/WayPoint/WayPointGlue.cpp \
208        $(SRC)/WayPoint/WayPointFile.cpp \
209        $(SRC)/WayPoint/WayPointFileWinPilot.cpp \
210        $(SRC)/WayPoint/WayPointFileSeeYou.cpp \
211        $(SRC)/WayPoint/WayPointFileZander.cpp \
212        $(SRC)/WindAnalyser.cpp \
213        $(SRC)/WindMeasurementList.cpp \
214        $(SRC)/WindStore.cpp \
215        $(SRC)/WindZigZag.cpp \
216        \
217        $(SRC)/Gauge/FlarmTrafficWindow.cpp \
218        $(SRC)/Gauge/GaugeCDI.cpp \
219        $(SRC)/Gauge/GaugeFLARM.cpp \
220        $(SRC)/Gauge/GaugeVario.cpp \
221        \
222        $(SRC)/AirfieldDetails.cpp \
223        $(SRC)/MenuData.cpp \
224        $(SRC)/MenuBar.cpp \
225        $(SRC)/ButtonLabel.cpp \
226        $(SRC)/Dialogs.cpp \
227        $(SRC)/ExpandMacros.cpp \
228        $(SRC)/Formatter/Base.cpp \
229        $(SRC)/Formatter/TeamCode.cpp \
230        $(SRC)/Formatter/WayPoint.cpp \
231        $(SRC)/Formatter/LowWarning.cpp \
232        $(SRC)/Formatter/Time.cpp \
233        $(SRC)/InfoBox.cpp \
234        $(SRC)/InfoBoxLayout.cpp \
235        $(SRC)/InfoBoxEvents.cpp \
236        $(SRC)/InfoBoxManager.cpp \
237        $(SRC)/InputEvents.cpp \
238        $(SRC)/InputEventsActions.cpp \
239        $(SRC)/StatusMessage.cpp \
240        $(SRC)/PopupMessage.cpp \
241        $(SRC)/Message.cpp \
242        $(SRC)/LogFile.cpp \
243        \
244        $(SRC)/MapDrawHelper.cpp \
245        $(SRC)/BackgroundDrawHelper.cpp \
246        $(SRC)/Projection.cpp \
247        $(SRC)/RenderObservationZone.cpp \
248        $(SRC)/RenderTaskPoint.cpp \
249        $(SRC)/RenderTask.cpp \
250        $(SRC)/ChartProjection.cpp \
251        $(SRC)/MapWindow.cpp \
252        $(SRC)/MapWindowAirspace.cpp \
253        $(SRC)/MapWindowEvents.cpp \
254        $(SRC)/MapWindowGlideRange.cpp \
255        $(SRC)/MapWindowLabels.cpp \
256        $(SRC)/MapWindowProjection.cpp \
257        $(SRC)/MapWindowRender.cpp \
258        $(SRC)/MapWindowScale.cpp \
259        $(SRC)/MapWindowSymbols.cpp \
260        $(SRC)/MapWindowTask.cpp \
261        $(SRC)/MapWindowTarget.cpp \
262        $(SRC)/MapWindowThermal.cpp \
263        $(SRC)/MapWindowTimer.cpp \
264        $(SRC)/MapWindowTraffic.cpp \
265        $(SRC)/MapWindowTrail.cpp \
266        $(SRC)/MapWindowWaypoints.cpp \
267        $(SRC)/GlueMapWindow.cpp \
268        $(SRC)/GlueMapWindowAirspace.cpp \
269        $(SRC)/GlueMapWindowEvents.cpp \
270        $(SRC)/GestureManager.cpp \
271        $(SRC)/DrawThread.cpp \
272        \
273        $(SRC)/DeviceBlackboard.cpp \
274        $(SRC)/InstrumentBlackboard.cpp \
275        $(SRC)/InterfaceBlackboard.cpp \
276        $(SRC)/MapProjectionBlackboard.cpp \
277        $(SRC)/MapWindowBlackboard.cpp \
278        $(SRC)/SettingsMapBlackboard.cpp \
279        $(SRC)/SettingsComputerBlackboard.cpp \
280        $(SRC)/CalculationThread.cpp \
281        $(SRC)/InstrumentThread.cpp \
282        \
283        $(SRC)/Topology/Topology.cpp \
284        $(SRC)/Topology/TopologyStore.cpp \
285        $(SRC)/Topology/XShape.cpp \
286        $(SRC)/Terrain/RasterMap.cpp \
287        $(SRC)/Terrain/RasterMapJPG2000.cpp \
288        $(SRC)/Terrain/RasterTerrain.cpp \
289        $(SRC)/Terrain/RasterWeather.cpp \
290        $(SRC)/Terrain/HeightMatrix.cpp \
291        $(SRC)/Terrain/TerrainRenderer.cpp \
292        $(SRC)/Terrain/WeatherTerrainRenderer.cpp \
293        $(SRC)/Marks.cpp \
294        \
295        $(SRC)/Persist.cpp \
296        $(SRC)/FlightStatistics.cpp \
297        \
298        $(SRC)/Simulator.cpp \
299        $(SRC)/Asset.cpp \
300        $(SRC)/Appearance.cpp \
301        $(SRC)/Hardware/Battery.c \
302        $(SRC)/Hardware/Display.cpp \
303        $(SRC)/Language.cpp \
304        $(SRC)/LocalPath.cpp \
305        $(SRC)/Interface.cpp \
306        $(SRC)/ProgressGlue.cpp \
307        $(SRC)/LocalTime.cpp \
308        $(SRC)/Units.cpp \
309        $(SRC)/UtilsFLARM.cpp \
310        $(SRC)/UtilsFile.cpp \
311        $(SRC)/UtilsFont.cpp \
312        $(SRC)/UtilsSettings.cpp \
313        $(SRC)/UtilsSystem.cpp \
314        $(SRC)/UtilsText.cpp \
315        $(SRC)/Version.cpp \
316        $(SRC)/Audio/Sound.cpp \
317        $(SRC)/Audio/VegaVoice.cpp \
318        $(SRC)/Compatibility/fmode.c \
319        $(SRC)/Compatibility/string.c   \
320        $(SRC)/Registry.cpp \
321        $(SRC)/Profile.cpp \
322        $(SRC)/ProfileGlue.cpp \
323        $(SRC)/ProfileKeys.cpp \
324        $(SRC)/xmlParser.cpp \
325        $(SRC)/Thread/Thread.cpp \
326        $(SRC)/Thread/WorkerThread.cpp \
327        $(SRC)/Thread/Mutex.cpp \
328        $(SRC)/Thread/Debug.cpp \
329        \
330        $(SRC)/Math/FastRotation.cpp \
331        $(SRC)/Math/leastsqs.cpp \
332        $(SRC)/Math/LowPassFilter.cpp \
333        $(SRC)/Math/Screen.cpp \
334        $(SRC)/Math/SunEphemeris.cpp \
335        \
336        $(SRC)/Screen/Blank.cpp \
337        $(SRC)/Screen/Chart.cpp \
338        $(SRC)/Screen/Fonts.cpp \
339        $(SRC)/Screen/Layout.cpp \
340        $(SRC)/Screen/UnitSymbol.cpp \
341        $(SRC)/Screen/Graphics.cpp \
342        $(SRC)/Screen/Ramp.cpp \
343        $(SRC)/Screen/LabelBlock.cpp \
344        $(SRC)/Screen/ProgressWindow.cpp \
345        $(SRC)/ResourceLoader.cpp \
346        \
347        $(SRC)/Polar/Polar.cpp \
348        $(SRC)/Polar/Loader.cpp \
349        $(SRC)/Polar/WinPilot.cpp \
350        $(SRC)/Polar/BuiltIn.cpp \
351        $(SRC)/Polar/Historical.cpp \
352        \
353        $(SRC)/Blackboard.cpp \
354        $(SRC)/Protection.cpp \
355        $(SRC)/ProcessTimer.cpp \
356        $(SRC)/MainWindow.cpp \
357        $(SRC)/Components.cpp \
358        $(SRC)/XCSoar.cpp \
359        \
360        $(SRC)/Device/Driver.cpp \
361        $(SRC)/Device/Declaration.cpp \
362        $(SRC)/Device/Register.cpp \
363        $(SRC)/Device/List.cpp \
364        $(SRC)/Device/device.cpp \
365        $(SRC)/Device/Descriptor.cpp \
366        $(SRC)/Device/All.cpp \
367        $(SRC)/Device/Geoid.cpp \
368        $(SRC)/Device/Parser.cpp \
369        $(SRC)/Device/Port.cpp \
370        $(SRC)/Device/FLARM.cpp \
371        $(SRC)/Device/Internal.cpp \
372        $(DIALOG_SOURCES)
373
374#       $(SRC)/VarioSound.cpp \
375#       $(SRC)/WaveThread.cpp \
376
377
378XCSOAR_OBJS = $(call SRC_TO_OBJ,$(XCSOAR_SOURCES))
379XCSOAR_LDADD = \
380        $(IO_LIBS) \
381        $(DATA_FIELD_LIBS) \
382        $(FORM_LIBS) \
383        $(SCREEN_LIBS) \
384        $(DRIVER_LIBS) \
385        $(ENGINE_LIBS) \
386        $(SHAPELIB_LIBS) \
387        $(JASPER_LIBS) \
388        $(ZZIP_LIBS) \
389        $(COMPAT_LIBS) \
390        $(UTIL_LIBS) \
391        $(RESOURCE_BINARY)
392
393all: all-$(TARGET)
394
395# if no TARGET is set, build all targets
396all-: $(addprefix call-,$(DEFAULT_TARGETS))
397call-%:
398        $(MAKE) TARGET=$(patsubst call-%,%,$@) DEBUG=$(DEBUG) V=$(V)
399
400$(addprefix all-,$(TARGETS)): all-%: $(OUTPUTS)
401
402EVERYTHING = $(OUTPUTS) debug-$(TARGET) build-check
403ifeq ($(TARGET),UNIX)
404EVERYTHING += $(TESTS)
405endif
406
407everything-: $(addprefix call-everything-,$(DEFAULT_TARGETS))
408call-everything-%:
409        $(MAKE) everything TARGET=$(patsubst call-everything-%,%,$@) EVERYTHING=$(EVERYTHING) V=$(V)
410
411$(addprefix everything-,$(TARGETS)): everything-%: $(EVERYTHING)
412
413everything: everything-$(TARGET)
414
415####### products
416
417SYNCE_PCP = synce-pcp
418
419install: XCSoar.exe
420        @echo Copying to device...
421        $(SYNCE_PCP) -f XCSoar.exe ':/Program Files/XCSoar/XCSoar.exe'
422
423#       wine ezsetup.exe -l english -i XCSoar$(TARGET).ini -r installmsg.txt -e gpl.txt -o InstallXCSoar-$(TARGET).exe
424
425ifneq ($(NOSTRIP_SUFFIX),)
426$(TARGET_BIN_DIR)/XCSoar$(TARGET_EXEEXT): $(TARGET_BIN_DIR)/XCSoar$(NOSTRIP_SUFFIX)$(TARGET_EXEEXT)
427        @$(NQ)echo "  STRIP   $@"
428        $(Q)$(STRIP) $< -o $@
429        $(Q)$(SIZE) $@
430endif
431
432$(TARGET_BIN_DIR)/XCSoar$(NOSTRIP_SUFFIX)$(TARGET_EXEEXT): CPPFLAGS += $(SCREEN_CPPFLAGS)
433$(TARGET_BIN_DIR)/XCSoar$(NOSTRIP_SUFFIX)$(TARGET_EXEEXT): $(XCSOAR_OBJS) $(XCSOAR_LDADD) | $(TARGET_BIN_DIR)/dirstamp
434        @$(NQ)echo "  LINK    $@"
435        $(Q)$(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) $(SCREEN_LDLIBS) -o $@
436
437IGNORE  := \( -name .svn -o -name CVS -o -name .git \) -prune -o
438
439clean: cleancov FORCE
440        @$(NQ)echo "cleaning all"
441        $(Q)rm -rf output
442        $(RM) $(BUILDTESTS)
443
444cleancov: FORCE
445        @$(NQ)echo "cleaning cov"
446        $(Q)find ./ $(IGNORE) \( \
447                   -name '*.bb' \
448                -o -name '*.bbg' \
449                -o -name '*.gcda' \
450                -o -name '*.gcda.info' \
451                -o -name '*.gcno' \
452                -o -name '*.gcno.info' \
453        \) -type f -print | xargs -r $(RM)
454
455.PHONY: FORCE
456
457ifneq ($(wildcard $(TARGET_OUTPUT_DIR)/src/*.d),)
458include $(wildcard $(TARGET_OUTPUT_DIR)/src/*.d)
459endif
460ifneq ($(wildcard $(TARGET_OUTPUT_DIR)/src/*/*.d),)
461include $(wildcard $(TARGET_OUTPUT_DIR)/src/*/*.d)
462endif
463ifneq ($(wildcard $(TARGET_OUTPUT_DIR)/src/*/*/*.d),)
464include $(wildcard $(TARGET_OUTPUT_DIR)/src/*/*/*.d)
465endif
Note: See TracBrowser for help on using the browser.