mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
8c346dd762
The default gcc .co file rule doesn't support dependency generation too.
23 lines
530 B
Makefile
23 lines
530 B
Makefile
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 $<
|
|
|
|
CUSTOM_RULE_LINK = 1
|
|
%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
|
|
$(TRACE_LD)
|
|
$(Q)$(LD) -o $@ $(LDFLAGS) -u _main $^ $(TARGET).lib
|
|
|
|
%.o: %.S
|
|
$(TRACE_AS)
|
|
$(Q)$(AS) $(ASFLAGS) -o $@ $<
|
|
|
|
%.eth: %.o
|
|
$(TRACE_LD)
|
|
$(Q)$(LD) -o $@ -t module -m $@.map $<
|