From 36a5aadc9e4d3d1e0aace1cc8f9f4cc05c26f545 Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Tue, 10 Dec 2013 08:37:09 +0100 Subject: [PATCH] Moved the 6502 custom rules into its own Makefile.customrules-6502 file --- cpu/6502/Makefile.6502 | 29 ++----------------- cpu/6502/Makefile.customrules-6502 | 27 +++++++++++++++++ .../apple2enh/Makefile.customrules-apple2enh | 1 + platform/atarixl/Makefile.customrules-atarixl | 1 + platform/c128/Makefile.customrules-c128 | 1 + platform/c64/Makefile.customrules-c64 | 1 + 6 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 cpu/6502/Makefile.customrules-6502 create mode 100644 platform/apple2enh/Makefile.customrules-apple2enh create mode 100644 platform/atarixl/Makefile.customrules-atarixl create mode 100644 platform/c128/Makefile.customrules-c128 create mode 100644 platform/c64/Makefile.customrules-c64 diff --git a/cpu/6502/Makefile.6502 b/cpu/6502/Makefile.6502 index 961f714c5..ade64d75a 100644 --- a/cpu/6502/Makefile.6502 +++ b/cpu/6502/Makefile.6502 @@ -68,30 +68,5 @@ CFLAGS += -t $(TARGET) -Or -W -unused-param,-unused-var,-const-comparison LDFLAGS = $(STARTADDR_FLAG) -t $(TARGET) -m contiki-$(TARGET).map -D __STACKSIZE__=0x200 AROPTS = a -### Compilation rules - -.SUFFIXES: - -CUSTOM_RULE_C_TO_OBJECTDIR_O = 1 -$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR) - $(TRACE_CC) - $(Q)$(CC) -c -o $@ $(CFLAGS) --create-dep $(@:.o=.d) $< - -CUSTOM_RULE_C_TO_CO = 1 -%.co: %.c - $(TRACE_CC) - $(Q)$(CC) -c -o $@ $(CFLAGS) -DAUTOSTART_ENABLE --create-dep $(@:.o=.d) $< - -CUSTOM_RULE_LINK = 1 -%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a - $(TRACE_LD) - $(Q)$(LD) -o $@ $(LDFLAGS) -u _main $^ $(TARGET).lib - -%.eth: $(OBJECTDIR)/%.o - $(TRACE_LD) - $(Q)$(LD) -o $@ -t module -m $@.map $< - -ifdef ETHERNET -$(ETHERNET)-eth.S: $(ETHERNET).eth - co65 -o $@ --code-label _$(ETHERNET) $< -endif +## Default modules +MODULES += core/net/ipv4 diff --git a/cpu/6502/Makefile.customrules-6502 b/cpu/6502/Makefile.customrules-6502 new file mode 100644 index 000000000..ce810a352 --- /dev/null +++ b/cpu/6502/Makefile.customrules-6502 @@ -0,0 +1,27 @@ +### Compilation rules + +.SUFFIXES: + +CUSTOM_RULE_C_TO_OBJECTDIR_O = 1 +$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR) + $(TRACE_CC) + $(Q)$(CC) -c -o $@ $(CFLAGS) --create-dep $(@:.o=.d) $< + +CUSTOM_RULE_C_TO_CO = 1 +%.co: %.c + $(TRACE_CC) + $(Q)$(CC) -c -o $@ $(CFLAGS) -DAUTOSTART_ENABLE --create-dep $(@:.o=.d) $< + +CUSTOM_RULE_LINK = 1 +%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a + $(TRACE_LD) + $(Q)$(LD) -o $@ $(LDFLAGS) -u _main $^ $(TARGET).lib + +%.eth: $(OBJECTDIR)/%.o + $(TRACE_LD) + $(Q)$(LD) -o $@ -t module -m $@.map $< + +ifdef ETHERNET +$(ETHERNET)-eth.S: $(ETHERNET).eth + co65 -o $@ --code-label _$(ETHERNET) $< +endif diff --git a/platform/apple2enh/Makefile.customrules-apple2enh b/platform/apple2enh/Makefile.customrules-apple2enh new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/apple2enh/Makefile.customrules-apple2enh @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/atarixl/Makefile.customrules-atarixl b/platform/atarixl/Makefile.customrules-atarixl new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/atarixl/Makefile.customrules-atarixl @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/c128/Makefile.customrules-c128 b/platform/c128/Makefile.customrules-c128 new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/c128/Makefile.customrules-c128 @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502 diff --git a/platform/c64/Makefile.customrules-c64 b/platform/c64/Makefile.customrules-c64 new file mode 100644 index 000000000..a9f8d8b1f --- /dev/null +++ b/platform/c64/Makefile.customrules-c64 @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502