diff --git a/cpu/6502/Makefile.6502 b/cpu/6502/Makefile.6502 index 961f714c5e6..ade64d75aec 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 00000000000..ce810a352c3 --- /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 00000000000..a9f8d8b1f3d --- /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 00000000000..a9f8d8b1f3d --- /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 00000000000..a9f8d8b1f3d --- /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 00000000000..a9f8d8b1f3d --- /dev/null +++ b/platform/c64/Makefile.customrules-c64 @@ -0,0 +1 @@ +include $(CONTIKI_CPU)/Makefile.customrules-6502