Add support for verbosity control

This commit is contained in:
George Oikonomou 2013-08-06 16:46:57 +01:00
parent aa2f3510be
commit c3b5d4f5e3

View File

@ -60,13 +60,15 @@ CONTIKI_SOURCEFILES += $(USB_CORE_SOURCEFILES) $(USB_ARCH_SOURCEFILES)
FORCE: FORCE:
$(OBJECTDIR)/ieee-addr.o: ieee-addr.c FORCE | $(OBJECTDIR) $(OBJECTDIR)/ieee-addr.o: ieee-addr.c FORCE | $(OBJECTDIR)
$(CC) $(CFLAGS) -c $< -o $@ $(TRACE_CC)
$(Q)$(CC) $(CFLAGS) -c $< -o $@
### Compilation rules ### Compilation rules
CUSTOM_RULE_LINK=1 CUSTOM_RULE_LINK=1
%.elf: $(TARGET_STARTFILES) %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a $(LDSCRIPT) %.elf: $(TARGET_STARTFILES) %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a $(LDSCRIPT)
$(LD) $(LDFLAGS) ${filter-out $(LDSCRIPT) %.a,$^} ${filter %.a,$^} -o $@ $(TRACE_LD)
$(Q)$(LD) $(LDFLAGS) ${filter-out $(LDSCRIPT) %.a,$^} ${filter %.a,$^} -o $@
%.bin: %.elf %.bin: %.elf
$(OBJCOPY) $(OBJCOPY_FLAGS) $< $@ $(OBJCOPY) $(OBJCOPY_FLAGS) $< $@
@ -80,8 +82,9 @@ CUSTOM_RULE_LINK=1
LDGENFLAGS += $(addprefix -D,$(subst $(COMMA), ,$(DEFINES))) LDGENFLAGS += $(addprefix -D,$(subst $(COMMA), ,$(DEFINES)))
LDGENFLAGS += $(addprefix -I,$(SOURCEDIRS)) LDGENFLAGS += $(addprefix -I,$(SOURCEDIRS))
LDGENFLAGS += -imacros "contiki-conf.h" LDGENFLAGS += -imacros "contiki-conf.h"
LDGENFLAGS += -P -E LDGENFLAGS += -x c -P -E
# NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR) # NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR)
$(LDSCRIPT): $(CONTIKI_CPU)/cc2538.lds FORCE | $(OBJECTDIR) $(LDSCRIPT): $(CONTIKI_CPU)/cc2538.lds FORCE | $(OBJECTDIR)
$(CPP) $(LDGENFLAGS) $< -o $@ $(TRACE_CC)
$(Q)$(CC) $(LDGENFLAGS) $< -o $@