mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-24 13:28:58 +00:00
Merge pull request #309 from frtos-wpan/verbosity-v2
Makefile.include: revised verbosity control
This commit is contained in:
commit
26ebb5fea5
@ -131,6 +131,21 @@ ifdef PLATFORMAPPS
|
|||||||
APPDS += $(PLATFORMAPPDS)
|
APPDS += $(PLATFORMAPPDS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### Verbosity control. Use make V=1 to get verbose builds.
|
||||||
|
|
||||||
|
ifeq ($(V),1)
|
||||||
|
TRACE_CC =
|
||||||
|
TRACE_LD =
|
||||||
|
TRACE_AR =
|
||||||
|
TRACE_AS =
|
||||||
|
Q=
|
||||||
|
else
|
||||||
|
TRACE_CC = @echo " CC " $<
|
||||||
|
TRACE_LD = @echo " LD " $@
|
||||||
|
TRACE_AR = @echo " AR " $@
|
||||||
|
TRACE_AS = @echo " AS " $<
|
||||||
|
Q=@
|
||||||
|
endif
|
||||||
|
|
||||||
### Forward comma-separated list of arbitrary defines to the compiler
|
### Forward comma-separated list of arbitrary defines to the compiler
|
||||||
|
|
||||||
@ -189,29 +204,35 @@ distclean: clean
|
|||||||
|
|
||||||
ifndef CUSTOM_RULE_C_TO_CE
|
ifndef CUSTOM_RULE_C_TO_CE
|
||||||
%.ce: %.c
|
%.ce: %.c
|
||||||
$(CC) $(CFLAGS) -DAUTOSTART_ENABLE -c $< -o $@
|
$(TRACE_CC)
|
||||||
|
$(Q)$(CC) $(CFLAGS) -DAUTOSTART_ENABLE -c $< -o $@
|
||||||
$(STRIP) --strip-unneeded -g -x $@
|
$(STRIP) --strip-unneeded -g -x $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef CUSTOM_RULE_C_TO_OBJECTDIR_O
|
ifndef CUSTOM_RULE_C_TO_OBJECTDIR_O
|
||||||
$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR)
|
$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR)
|
||||||
$(CC) $(CFLAGS) -MMD -c $< -o $@
|
$(TRACE_CC)
|
||||||
|
$(Q)$(CC) $(CFLAGS) -MMD -c $< -o $@
|
||||||
@$(FINALIZE_DEPENDENCY)
|
@$(FINALIZE_DEPENDENCY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef CUSTOM_RULE_S_TO_OBJECTDIR_O
|
ifndef CUSTOM_RULE_S_TO_OBJECTDIR_O
|
||||||
$(OBJECTDIR)/%.o: %.S | $(OBJECTDIR)
|
$(OBJECTDIR)/%.o: %.S | $(OBJECTDIR)
|
||||||
$(AS) $(ASFLAGS) -o $@ $<
|
$(TRACE_AS)
|
||||||
|
$(Q)$(AS) $(ASFLAGS) -o $@ $<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef CUSTOM_RULE_C_TO_O
|
ifndef CUSTOM_RULE_C_TO_O
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(TRACE_CC)
|
||||||
|
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifndef CUSTOM_RULE_C_TO_CO
|
ifndef CUSTOM_RULE_C_TO_CO
|
||||||
%.co: %.c
|
%.co: %.c
|
||||||
$(CC) $(CFLAGS) -DAUTOSTART_ENABLE -c $< -o $@
|
$(TRACE_CC)
|
||||||
|
$(Q)$(CC) $(CFLAGS) -DAUTOSTART_ENABLE -c $< -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef AROPTS
|
ifndef AROPTS
|
||||||
@ -220,7 +241,8 @@ endif
|
|||||||
|
|
||||||
ifndef CUSTOM_RULE_ALLOBJS_TO_TARGETLIB
|
ifndef CUSTOM_RULE_ALLOBJS_TO_TARGETLIB
|
||||||
contiki-$(TARGET).a: $(CONTIKI_OBJECTFILES)
|
contiki-$(TARGET).a: $(CONTIKI_OBJECTFILES)
|
||||||
$(AR) $(AROPTS) $@ $^
|
$(TRACE_AR)
|
||||||
|
$(Q)$(AR) $(AROPTS) $@ $^
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef LD
|
ifndef LD
|
||||||
@ -229,7 +251,9 @@ endif
|
|||||||
|
|
||||||
ifndef CUSTOM_RULE_LINK
|
ifndef CUSTOM_RULE_LINK
|
||||||
%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
|
%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
|
||||||
$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} ${filter %.a,$^} $(TARGET_LIBFILES) -o $@
|
$(TRACE_LD)
|
||||||
|
$(Q)$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} \
|
||||||
|
${filter %.a,$^} $(TARGET_LIBFILES) -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.ramprof: %.$(TARGET)
|
%.ramprof: %.$(TARGET)
|
||||||
|
Loading…
Reference in New Issue
Block a user