Moved the 6502 custom rules into its own Makefile.customrules-6502 file

This commit is contained in:
Adam Dunkels 2013-12-10 08:37:09 +01:00
parent cf32063c0b
commit 36a5aadc9e
6 changed files with 33 additions and 27 deletions

View file

@ -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

View file

@ -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

View file

@ -0,0 +1 @@
include $(CONTIKI_CPU)/Makefile.customrules-6502

View file

@ -0,0 +1 @@
include $(CONTIKI_CPU)/Makefile.customrules-6502

View file

@ -0,0 +1 @@
include $(CONTIKI_CPU)/Makefile.customrules-6502

View file

@ -0,0 +1 @@
include $(CONTIKI_CPU)/Makefile.customrules-6502