-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
base_rules
58 lines (48 loc) · 2.69 KB
/
base_rules
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
include $(DEVKITPRO)/devkitARM/base_tools
#---------------------------------------------------------------------------------
%.a:
#---------------------------------------------------------------------------------
$(SILENTMSG) $(notdir $@)
@rm -f $@
$(SILENTCMD)$(AR) -rc $@ $^
#---------------------------------------------------------------------------------
%.arm.o: CFLAGS += -marm
%.arm.o: CXXFLAGS += -marm
%.arm.o: OBJCFLAGS += -marm
#---------------------------------------------------------------------------------
%.thumb.o: CFLAGS += -mthumb
%.thumb.o: CXXFLAGS += -mthumb
%.thumb.o: OBJCFLAGS += -mthumb
#---------------------------------------------------------------------------------
%.iwram.o: CFLAGS += -marm -mlong-calls
%.iwram.o: CXXFLAGS += -marm -mlong-calls
%.iwram.o: OBJCFLAGS += -marm -mlong-calls
#---------------------------------------------------------------------------------
%.itcm.o: CFLAGS += -marm -mlong-calls
%.itcm.o: CXXFLAGS += -marm -mlong-calls
%.itcm.o: OBJCFLAGS += -marm -mlong-calls
#---------------------------------------------------------------------------------
%.o: %.cpp
$(SILENTMSG) $(notdir $<)
$(ADD_COMPILE_COMMAND) add $(CXX) "$(_EXTRADEFS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@" $<
$(SILENTCMD)$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(_EXTRADEFS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
#---------------------------------------------------------------------------------
%.o: %.c
$(SILENTMSG) $(notdir $<)
$(ADD_COMPILE_COMMAND) add $(CC) "$(_EXTRADEFS) $(CPPFLAGS) $(CFLAGS) -c $< -o $@" $<
$(SILENTCMD)$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d $(_EXTRADEFS) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ $(ERROR_FILTER)
#---------------------------------------------------------------------------------
%.o: %.m
$(SILENTMSG) $(notdir $<)
$(ADD_COMPILE_COMMAND) add $(CC) "$(_EXTRADEFS) $(CPPFLAGS) $(OBJCFLAGS) -c $< -o $@" $<
$(SILENTCMD)$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d $(_EXTRADEFS) $(CPPFLAGS) $(OBJCFLAGS) -c $< -o $@ $(ERROR_FILTER)
#---------------------------------------------------------------------------------
%.o: %.s
$(SILENTMSG) $(notdir $<)
$(ADD_COMPILE_COMMAND) add $(CC) "-x assembler-with-cpp $(_EXTRADEFS) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@" $<
$(SILENTCMD)$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(_EXTRADEFS) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)
#---------------------------------------------------------------------------------
%.o: %.S
$(SILENTMSG) $(notdir $<)
$(ADD_COMPILE_COMMAND) add $(CC) "-x assembler-with-cpp $(_EXTRADEFS) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@" $<
$(SILENTCMD)$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(_EXTRADEFS) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)