mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-12 14:16:06 +00:00
Makefile.include: Hide command invocation unless V=1
This commit is contained in:
parent
67852dcaba
commit
7949911748
5
Makefile
5
Makefile
@ -24,10 +24,13 @@ OBJS += gen/bitmaps.o
|
|||||||
OBJS += gen/fonts.o
|
OBJS += gen/fonts.o
|
||||||
|
|
||||||
libtrezor.a: $(OBJS)
|
libtrezor.a: $(OBJS)
|
||||||
$(AR) rcs libtrezor.a $(OBJS)
|
|
||||||
|
|
||||||
include Makefile.include
|
include Makefile.include
|
||||||
|
|
||||||
|
libtrezor.a:
|
||||||
|
@printf " AR $@\n"
|
||||||
|
$(Q)$(AR) rcs $@ $^
|
||||||
|
|
||||||
.PHONY: vendor
|
.PHONY: vendor
|
||||||
|
|
||||||
vendor:
|
vendor:
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
TOP_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
TOP_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
TOOLCHAIN_DIR ?= $(TOP_DIR)vendor/libopencm3
|
TOOLCHAIN_DIR ?= $(TOP_DIR)vendor/libopencm3
|
||||||
|
|
||||||
|
ifneq ($(V),1)
|
||||||
|
Q := @
|
||||||
|
endif
|
||||||
|
|
||||||
PYTHON ?= python
|
PYTHON ?= python
|
||||||
|
|
||||||
ifeq ($(EMULATOR),1)
|
ifeq ($(EMULATOR),1)
|
||||||
@ -152,34 +156,44 @@ release: $(NAME).bin
|
|||||||
xxd -p $(NAME)-$(APPVER).bin | tr -d '\n' > $(NAME)-$(APPVER).bin.hex
|
xxd -p $(NAME)-$(APPVER).bin | tr -d '\n' > $(NAME)-$(APPVER).bin.hex
|
||||||
|
|
||||||
$(NAME).bin: $(NAME).elf
|
$(NAME).bin: $(NAME).elf
|
||||||
$(OBJCOPY) -Obinary $(NAME).elf $(NAME).bin
|
@printf " OBJCOPY $@\n"
|
||||||
|
$(Q)$(OBJCOPY) -Obinary $(NAME).elf $(NAME).bin
|
||||||
|
|
||||||
$(NAME).hex: $(NAME).elf
|
$(NAME).hex: $(NAME).elf
|
||||||
$(OBJCOPY) -Oihex $(NAME).elf $(NAME).hex
|
@printf " OBJCOPY $@\n"
|
||||||
|
$(Q)$(OBJCOPY) -Oihex $(NAME).elf $(NAME).hex
|
||||||
|
|
||||||
$(NAME).srec: $(NAME).elf
|
$(NAME).srec: $(NAME).elf
|
||||||
$(OBJCOPY) -Osrec $(NAME).elf $(NAME).srec
|
@printf " OBJCOPY $@\n"
|
||||||
|
$(Q)$(OBJCOPY) -Osrec $(NAME).elf $(NAME).srec
|
||||||
|
|
||||||
$(NAME).list: $(NAME).elf
|
$(NAME).list: $(NAME).elf
|
||||||
$(OBJDUMP) -S $(NAME).elf > $(NAME).list
|
@printf " OBJDUMP $@\n"
|
||||||
|
$(Q)$(OBJDUMP) -S $(NAME).elf > $(NAME).list
|
||||||
|
|
||||||
$(NAME).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
|
$(NAME).elf: $(OBJS) $(LDSCRIPT) $(LIBDEPS)
|
||||||
$(LD) -o $(NAME).elf $(OBJS) $(LDLIBS) $(LDFLAGS)
|
@printf " LD $@\n"
|
||||||
|
$(Q)$(LD) -o $(NAME).elf $(OBJS) $(LDLIBS) $(LDFLAGS)
|
||||||
|
|
||||||
%.o: %.s Makefile
|
%.o: %.s Makefile
|
||||||
$(AS) $(CPUFLAGS) -o $@ $<
|
@printf " AS $@\n"
|
||||||
|
$(Q)$(AS) $(CPUFLAGS) -o $@ $<
|
||||||
|
|
||||||
%.o: %.c Makefile
|
%.o: %.c Makefile
|
||||||
$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
|
@printf " CC $@\n"
|
||||||
|
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
|
||||||
|
|
||||||
%.small.o: %.c Makefile
|
%.small.o: %.c Makefile
|
||||||
$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
|
@printf " CC $@\n"
|
||||||
|
$(Q)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
|
||||||
|
|
||||||
%.d: %.c Makefile
|
%.d: %.c Makefile
|
||||||
@$(CC) $(CFLAGS) -MM -MP -MG -o $@ $<
|
@printf " DEP $@\n"
|
||||||
|
$(Q)$(CC) $(CFLAGS) -MM -MP -MG -o $@ $<
|
||||||
|
|
||||||
%.small.d: %.c Makefile
|
%.small.d: %.c Makefile
|
||||||
@$(CC) $(CFLAGS) -MM -MP -MG -o $@ $<
|
@printf " DEP $@\n"
|
||||||
|
$(Q)$(CC) $(CFLAGS) -MM -MP -MG -o $@ $<
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
rm -f $(OBJS)
|
rm -f $(OBJS)
|
||||||
|
@ -114,7 +114,8 @@ define GENERATE_CODE
|
|||||||
# $(3) - Additional output files
|
# $(3) - Additional output files
|
||||||
|
|
||||||
$(1).h $(3): $(1).py $(2)
|
$(1).h $(3): $(1).py $(2)
|
||||||
$(PYTHON) $(1).py
|
@printf " PYTHON $(1).py\n"
|
||||||
|
$(Q)$(PYTHON) $(1).py
|
||||||
|
|
||||||
# Serialize build for parallel Make
|
# Serialize build for parallel Make
|
||||||
$(1).h: $(3)
|
$(1).h: $(3)
|
||||||
|
@ -1,18 +1,25 @@
|
|||||||
|
ifneq ($(V),1)
|
||||||
|
Q := @
|
||||||
|
endif
|
||||||
|
|
||||||
all: messages.pb.c types.pb.c messages_map.h
|
all: messages.pb.c types.pb.c messages_map.h
|
||||||
|
|
||||||
PYTHON ?= python
|
PYTHON ?= python
|
||||||
|
|
||||||
%.pb.c: %.pb %.options
|
%.pb.c: %.pb %.options
|
||||||
$(PYTHON) ../../vendor/nanopb/generator/nanopb_generator.py $< -L '#include "%s"' -T
|
@printf " NANOPB $@\n"
|
||||||
|
$(Q)$(PYTHON) ../../vendor/nanopb/generator/nanopb_generator.py $< -L '#include "%s"' -T
|
||||||
|
|
||||||
%.pb: %.proto
|
%.pb: %.proto
|
||||||
protoc -I/usr/include -I. $< -o $@
|
@printf " PROTOC $@\n"
|
||||||
|
$(Q)protoc -I/usr/include -I. $< -o $@
|
||||||
|
|
||||||
%_pb2.py: %.proto
|
%_pb2.py: %.proto
|
||||||
protoc -I/usr/include -I. $< --python_out=.
|
@printf " PROTOC $@\n"
|
||||||
|
$(Q)protoc -I/usr/include -I. $< --python_out=.
|
||||||
|
|
||||||
messages_map.h: messages_map.py messages_pb2.py types_pb2.py
|
messages_map.h: messages_map.py messages_pb2.py types_pb2.py
|
||||||
$(PYTHON) $< | grep -v -e MessageType_Lisk > $@
|
$(Q)$(PYTHON) $< | grep -v -e MessageType_Lisk > $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.pb *.o *.d *.pb.c *.pb.h *_pb2.py messages_map.h
|
rm -f *.pb *.o *.d *.pb.c *.pb.h *_pb2.py messages_map.h
|
||||||
|
Loading…
Reference in New Issue
Block a user