NEWS: prepare for 6.6.1
[xcsoar.git] / build / generate.mk
blob6ae8bdf08773dea7eb2e8548d70525662cadfb81
1 INCLUDES += -I$(OUT)/include
3 PERL = perl
5 $(OUT)/include/MathTables.h: $(HOST_OUTPUT_DIR)/tools/GenerateSineTables$(HOST_EXEEXT) | $(OUT)/include/dirstamp
6 @$(NQ)echo " GEN $@"
7 $(Q)$(HOST_OUTPUT_DIR)/tools/GenerateSineTables$(HOST_EXEEXT) >$@
9 $(call SRC_TO_OBJ,$(SRC)/Math/FastMath.cpp): $(OUT)/include/MathTables.h
10 $(call SRC_TO_OBJ,$(SRC)/Math/FastTrig.cpp): $(OUT)/include/MathTables.h
12 $(OUT)/include/InputEvents_Text2Event.cpp: $(SRC)/Input/InputEvents.hpp \
13 $(topdir)/tools/Text2Event.pl | $(OUT)/include/dirstamp
14 @$(NQ)echo " GEN $@"
15 $(Q)$(PERL) $(topdir)/tools/Text2Event.pl $< >$@.tmp
16 @mv $@.tmp $@
18 $(OUT)/include/InputEvents_Text2GCE.cpp: $(SRC)/Input/InputQueue.hpp \
19 $(topdir)/tools/Text2GCE.pl | $(OUT)/include/dirstamp
20 @$(NQ)echo " GEN $@"
21 $(Q)$(PERL) $(topdir)/tools/Text2GCE.pl $< >$@.tmp
22 @mv $@.tmp $@
24 $(OUT)/include/InputEvents_Text2NE.cpp: $(SRC)/Input/InputQueue.hpp \
25 $(topdir)/tools/Text2NE.pl | $(OUT)/include/dirstamp
26 @$(NQ)echo " GEN $@"
27 $(Q)$(PERL) $(topdir)/tools/Text2NE.pl $< >$@.tmp
28 @mv $@.tmp $@
30 XCI_LIST = altair default
31 XCI_HEADERS = $(patsubst %,$(OUT)/include/InputEvents_%.cpp,$(XCI_LIST))
33 $(OUT)/include/InputEvents_default.cpp: $(topdir)/Data/Input/default.xci \
34 $(topdir)/tools/xci2cpp.pl \
35 $(OUT)/include/dirstamp
36 @$(NQ)echo " GEN $@"
37 $(Q)$(PERL) $(topdir)/tools/xci2cpp.pl $< >$@.tmp
38 @mv $@.tmp $@
40 $(OUT)/include/InputEvents_altair.cpp: $(topdir)/Data/Input/altair.xci \
41 $(topdir)/Data/Input/default.xci \
42 $(topdir)/tools/xci2cpp.pl \
43 $(OUT)/include/dirstamp
44 @$(NQ)echo " GEN $@"
45 $(Q)$(PERL) $(topdir)/tools/xci2cpp.pl $(topdir)/Data/Input/default.xci $(topdir)/Data/Input/altair.xci >$@.tmp
46 @mv $@.tmp $@
48 $(call SRC_TO_OBJ,$(SRC)/Input/InputDefaults.cpp): $(XCI_HEADERS)
49 $(call SRC_TO_OBJ,$(SRC)/Input/InputLookup.cpp): $(OUT)/include/InputEvents_Text2Event.cpp $(OUT)/include/InputEvents_Text2GCE.cpp $(OUT)/include/InputEvents_Text2NE.cpp
51 $(OUT)/include/Status_defaults.cpp: Data/Status/default.xcs \
52 tools/xcs2cpp.pl $(OUT)/include/dirstamp
53 @$(NQ)echo " GEN $@"
54 $(Q)$(PERL) tools/xcs2cpp.pl $< >$@.tmp
55 @mv $@.tmp $@
57 SM_OBJ = $(call SRC_TO_OBJ,$(SRC)/StatusMessage.cpp)
58 $(SM_OBJ): $(OUT)/include/Status_defaults.cpp
60 # UNIX resources
62 ifeq ($(HAVE_WIN32),n)
64 $(TARGET_OUTPUT_DIR)/XCSoar.rc: Data/XCSoar.rc src/resource.h | $(TARGET_OUTPUT_DIR)/dirstamp
65 @$(NQ)echo " CPP $@"
66 $(Q)$(HOSTCPP) -o $@ $< -I$(SRC) $(TARGET_CPPFLAGS)
68 $(TARGET_OUTPUT_DIR)/include/resource_data.h: $(TARGET_OUTPUT_DIR)/XCSoar.rc \
69 $(RESOURCE_FILES) \
70 tools/GenerateResources.pl | $(TARGET_OUTPUT_DIR)/include/dirstamp
71 @$(NQ)echo " GEN $@"
72 $(Q)$(PERL) tools/GenerateResources.pl $< >$@.tmp
73 @mv $@.tmp $@
75 $(TARGET_OUTPUT_DIR)/XCSoar-drawable.rc: Data/XCSoar.rc src/resource.h | $(TARGET_OUTPUT_DIR)/dirstamp
76 @$(NQ)echo " CPP $@"
77 $(Q)$(HOSTCPP) -o $@ $< -I$(SRC) $(TARGET_CPPFLAGS) -DANDROID_DRAWABLE
79 $(TARGET_OUTPUT_DIR)/include/android_drawable.h: $(TARGET_OUTPUT_DIR)/XCSoar-drawable.rc \
80 $(RESOURCE_FILES) \
81 tools/GenerateAndroidResources.pl | $(TARGET_OUTPUT_DIR)/include/dirstamp
82 @$(NQ)echo " GEN $@"
83 $(Q)$(PERL) tools/GenerateAndroidResources.pl $< >$@.tmp
84 @mv $@.tmp $@
86 $(call SRC_TO_OBJ,$(SRC)/ResourceLoader.cpp): $(TARGET_OUTPUT_DIR)/include/resource_data.h
88 ifeq ($(TARGET),ANDROID)
89 $(call SRC_TO_OBJ,$(SRC)/Screen/Android/Bitmap.cpp): $(TARGET_OUTPUT_DIR)/include/android_drawable.h
90 endif
92 endif