Browse Source

muting compiler and binutils optionally

Instead of muting all compiler and other binutils output by default,
introduce a variable to make this behaviour configurable.
dev/timer
Oleg Hahm 9 years ago
parent
commit
9df07f9238
  1. 12
      Makefile.base
  2. 6
      Makefile.include
  3. 6
      boards/chronos/Makefile.include
  4. 4
      boards/mbed_lpc1768/Makefile.include
  5. 6
      boards/msb-430-common/Makefile.include
  6. 8
      boards/msba2-common/Makefile.include
  7. 4
      boards/native/Makefile.include
  8. 6
      boards/redbee-econotag/Makefile.include
  9. 6
      boards/telosb/Makefile.include
  10. 6
      boards/wsn430-common/Makefile.include
  11. 2
      cpu/native/Makefile
  12. 8
      dist/Makefile
  13. 2
      sys/shell/Makefile

12
Makefile.base

@ -24,24 +24,24 @@ export CFLAGS += -DVERSION=\"$(GIT_VERSION)\"
.PHONY: clean
$(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ)
@$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ)
$(AD)$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ)
# pull in dependency info for *existing* .o files
-include $(OBJ:.o=.d)
# compile and generate dependency info
$(BINDIR)%.o: %.c
@$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
@$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d
@printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
$(BINDIR)%.o: %.s
@$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$*.o
$(AD)$(AS) $(ASFLAGS) $*.s -o $(BINDIR)$*.o
$(BINDIR)%.o: %.S
@$(CC) -c $(CFLAGS) $*.S -o $(BINDIR)$*.o
$(AD)$(CC) -c $(CFLAGS) $*.S -o $(BINDIR)$*.o
# remove compilation products
clean::
@rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ)
$(AD)rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ)

6
Makefile.include

@ -54,7 +54,7 @@ all: $(BINDIR)$(PROJECT).a
"$(MAKE)" -C $(RIOTBASE)
@for i in $(EXTERNAL_MODULES) ; do "$(MAKE)" -C $$i ; done ;
ifeq ($(BUILDOSXNATIVE),1)
@$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie
$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie
else
@$(LINK) $(UNDEF) -o $(BINDIR)$(PROJECT).elf -Wl,--start-group $(BASELIBS) -lm -Wl,--end-group -Wl,-Map=$(BINDIR)$(PROJECT).map $(LINKFLAGS)
@$(SIZE) $(BINDIR)$(PROJECT).elf
@ -73,7 +73,7 @@ SRC = $(wildcard *.c)
OBJ = $(SRC:%.c=${BINDIR}%.o)
$(BINDIR)$(PROJECT).a: $(OBJ)
$(AR) -rc $(BINDIR)$(PROJECT).a $(OBJ)
$(AD)$(AR) -rc $(BINDIR)$(PROJECT).a $(OBJ)
# pull in dependency info for *existing* .o files
-include $(OBJ:.o=.d)
@ -81,7 +81,7 @@ $(BINDIR)$(PROJECT).a: $(OBJ)
$(BINDIR)%.o: %.c $(PROJDEPS)
@echo; echo "Compiling.... $*.c"; echo
@test -d $(BINDIR) || mkdir -p $(BINDIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
$(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
clean:
"$(MAKE)" -C $(RIOTBOARD)/$(BOARD) clean

6
boards/chronos/Makefile.include

@ -5,9 +5,9 @@ export CPU = cc430
export MCU = cc430f6137
# toolchain config
export PREFIX = @msp430-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export PREFIX = msp430-
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU) -D CC430
export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2
export AS = $(PREFIX)as

4
boards/mbed_lpc1768/Makefile.include

@ -3,8 +3,8 @@ export CPU = lpc1768
# toolchain config
export PREFIX = arm-none-eabi-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -DUSE_STDPERIPH_DRIVER -ggdb -g3 -std=gnu99 -O0 -Wall -Wstrict-prototypes -mcpu=cortex-m3 $(FPU_USAGE) -mlittle-endian -mthumb -mthumb-interwork -nostartfiles
export ASFLAGS = -ggdb -g3 -mcpu=cortex-m3 $(FPU_USAGE) -mlittle-endian
export AS = $(PREFIX)as

6
boards/msb-430-common/Makefile.include

@ -3,9 +3,9 @@ export CPU = msp430x16x
export MCU = msp430f1612
# toolchain config
export PREFIX = @msp430-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export PREFIX = msp430-
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU)
export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2
export AS = $(PREFIX)as

8
boards/msba2-common/Makefile.include

@ -2,10 +2,10 @@
export CPU = lpc2387
# toolchain config
export PREFIX = @arm-none-eabi-
#export PREFIX = @arm-elf-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export PREFIX = arm-none-eabi-
#export PREFIX = arm-elf-
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -O2 -Wall -Wstrict-prototypes -mcpu=arm7tdmi-s -gdwarf-2
export ASFLAGS = -gdwarf-2 -mcpu=arm7tdmi-s
export AS = $(PREFIX)as

4
boards/native/Makefile.include

@ -3,8 +3,8 @@ export CPU = native
# toolchain config
export PREFIX =
#export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
#export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -Wall -Wextra -pedantic -m32
export ASFLAGS =
export AS = $(PREFIX)as

6
boards/redbee-econotag/Makefile.include

@ -2,9 +2,9 @@
export CPU = mc1322x
# toolchain config
export PREFIX = @arm-none-eabi-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export PREFIX = arm-none-eabi-
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -march=armv4t -mtune=arm7tdmi-s -mlong-calls \
-msoft-float -mthumb-interwork -fno-strict-aliasing -fno-common \
-ffixed-r8 -ffunction-sections -ffreestanding -fno-builtin \

6
boards/telosb/Makefile.include

@ -4,9 +4,9 @@ export CPU = msp430x16x
export MCU = msp430f1611
# toolchain config
export PREFIX = @msp430-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export PREFIX = msp430-
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU)
export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2
export AS = $(PREFIX)as

6
boards/wsn430-common/Makefile.include

@ -3,9 +3,9 @@ export CPU = msp430x16x
export MCU = msp430f1611
# toolchain config
export PREFIX = @msp430-
export CC = @$(PREFIX)gcc
export AR = @$(PREFIX)ar
export PREFIX = msp430-
export CC = $(PREFIX)gcc
export AR = $(PREFIX)ar
export CFLAGS += -std=gnu99 -Wstrict-prototypes -gdwarf-2 -Os -Wall -mmcu=$(MCU)
export ASFLAGS += -mmcu=$(MCU) --defsym $(MCU)=1 --gdwarf-2
export AS = $(PREFIX)as

2
cpu/native/Makefile

@ -16,7 +16,7 @@ all: $(BINDIR)$(MODULE).a
include $(RIOTBASE)/Makefile.base
$(BINDIR)%.o: %.c
$(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
$(AD)$(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
@$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
@printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d

8
dist/Makefile vendored

@ -35,4 +35,12 @@ export RIOTBASE =$(CURDIR)/../../RIOT
export INCLUDES = -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/
QUITE := 1
ifeq($(QUITE),1)
AD=@
else
AD=
endif
export AD
include $(RIOTBASE)/Makefile.include

2
sys/shell/Makefile

@ -12,7 +12,7 @@ $(BINDIR)$(MODULE).a: $(OBJ)
# compile and generate dependency info
$(BINDIR)%.o: %.c
@$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$*.o
@$(CC) $(CFLAGS) $(INCLUDES) -MM $*.c > $(BINDIR)$*.d
@printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d

Loading…
Cancel
Save