diff --git a/cpu/x86/Makefile.x86 b/cpu/x86/Makefile.x86 index 46ab27817..899b78bd3 100644 --- a/cpu/x86/Makefile.x86 +++ b/cpu/x86/Makefile.x86 @@ -7,6 +7,7 @@ CC = gcc LD = gcc AS = as OBJCOPY = objcopy +SIZE = size STRIP = strip CFLAGSNO = -Wall -g -I/usr/local/include CFLAGS += $(CFLAGSNO) diff --git a/platform/galileo/Makefile.customrules-galileo b/platform/galileo/Makefile.customrules-galileo index 0ab0e662c..eceebb9c4 100644 --- a/platform/galileo/Makefile.customrules-galileo +++ b/platform/galileo/Makefile.customrules-galileo @@ -6,3 +6,10 @@ OPENOCD_SCRIPTS = $(CONTIKI)/platform/galileo/bsp/openocd-scripts debug: $(CONTIKI_PROJECT).$(TARGET) @openocd -s $(OPENOCD_SCRIPTS) -f debug.cfg &> $(shell pwd)/LOG_OPENOCD & @$(GDB) $< -ex "target remote :3333" + +CUSTOM_RULE_LINK=1 +%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} \ + ${filter %.a,$^} $(TARGET_LIBFILES) -o $@ + @$(SIZE) $@