make: Reduce build output
Default to silent builds, only outputting the file being generated. This gives output similar to Linux/coreboot output when building. `VERBOSE=1` can be passed to show the actual commands. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Tim Crawford
parent
2056d4d5e0
commit
b03c960b4f
@@ -31,22 +31,26 @@ sim: $(BUILD)/ec.rom
|
||||
|
||||
# Convert from Intel Hex file to binary file
|
||||
$(BUILD)/ec.rom: $(BUILD)/ec.ihx
|
||||
@mkdir -p $(@D)
|
||||
@echo " OBJCOPY $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
objcopy -I ihex -O binary --gap-fill=0xFF $< $@
|
||||
|
||||
# Link object files into Intel Hex file
|
||||
$(BUILD)/ec.ihx: $(OBJ)
|
||||
@mkdir -p $(@D)
|
||||
@echo " LINK $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
||||
# Compile ASM files into object files
|
||||
$(ASM_OBJ): $(BUILD)/%.rel: src/%.asm
|
||||
@mkdir -p $(@D)
|
||||
@echo " AS $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(AS) $(ASFLAGS) $@ $<
|
||||
|
||||
# Compile C files into object files
|
||||
$(C_OBJ): $(BUILD)/%.rel: src/%.c $(INCLUDE)
|
||||
@mkdir -p $(@D)
|
||||
@echo " CC $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
# Add dependency rules
|
||||
|
@@ -19,22 +19,26 @@ sim: $(BUILD)/ec.elf
|
||||
|
||||
# Convert from Intel Hex file to binary file
|
||||
$(BUILD)/ec.rom: $(BUILD)/ec.ihx
|
||||
@mkdir -p $(@D)
|
||||
@echo " OBJCOPY $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(OBJCOPY) -I ihex -O binary --gap-fill 0xFF $< $@
|
||||
|
||||
# Convert from ELF file to Intel Hex file
|
||||
$(BUILD)/ec.ihx: $(BUILD)/ec.elf
|
||||
@mkdir -p $(@D)
|
||||
@echo " OBJCOPY $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(OBJCOPY) -j .text -j .data -O ihex $< $@
|
||||
|
||||
# Link object files into ELF file
|
||||
$(BUILD)/ec.elf: $(OBJ)
|
||||
@mkdir -p $(@D)
|
||||
@echo " LINK $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(CC) -o $@ $^
|
||||
|
||||
# Compile C files into object files
|
||||
$(BUILD)/%.o: src/%.c $(INCLUDE)
|
||||
@mkdir -p $(@D)
|
||||
@echo " CC $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
# Add dependency rules
|
||||
|
@@ -33,22 +33,26 @@ FLASH_CC=\
|
||||
|
||||
# Convert from binary file to C header
|
||||
$(BUILD)/include/flash.h: $(FLASH_BUILD)/flash.rom
|
||||
@mkdir -p $(@D)
|
||||
@echo " XXD $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
xxd -include < $< > $@
|
||||
|
||||
# Convert from Intel Hex file to binary file
|
||||
$(FLASH_BUILD)/flash.rom: $(FLASH_BUILD)/flash.ihx
|
||||
@mkdir -p $(@D)
|
||||
@echo " OBJCOPY $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
objcopy -I ihex -O binary $< $@
|
||||
|
||||
# Link object files into Intel Hex file
|
||||
$(FLASH_BUILD)/flash.ihx: $(FLASH_OBJ)
|
||||
@mkdir -p $(@D)
|
||||
@echo " LINK $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(FLASH_CC) -o $@ $^
|
||||
|
||||
# Compile C files into object files
|
||||
$(FLASH_OBJ): $(FLASH_BUILD)/%.rel: src/%.c $(FLASH_INCLUDE)
|
||||
@mkdir -p $(@D)
|
||||
@echo " CC $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(FLASH_CC) $(FLASH_CFLAGS) -o $@ -c $<
|
||||
|
||||
# Include flash header in main firmware
|
||||
|
@@ -32,22 +32,26 @@ SCRATCH_CC=\
|
||||
|
||||
# Convert from binary file to C header
|
||||
$(BUILD)/include/scratch.h: $(SCRATCH_BUILD)/scratch.rom
|
||||
@mkdir -p $(@D)
|
||||
@echo " XXD $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
xxd -include < $< > $@
|
||||
|
||||
# Convert from Intel Hex file to binary file
|
||||
$(SCRATCH_BUILD)/scratch.rom: $(SCRATCH_BUILD)/scratch.ihx
|
||||
@mkdir -p $(@D)
|
||||
@echo " OBJCOPY $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
objcopy -I ihex -O binary $< $@
|
||||
|
||||
# Link object files into Intel Hex file
|
||||
$(SCRATCH_BUILD)/scratch.ihx: $(SCRATCH_OBJ)
|
||||
@mkdir -p $(@D)
|
||||
@echo " LINK $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(SCRATCH_CC) -o $@ $^
|
||||
|
||||
# Compile C files into object files
|
||||
$(SCRATCH_OBJ): $(SCRATCH_BUILD)/%.rel: src/%.c $(SCRATCH_INCLUDE)
|
||||
@mkdir -p $(@D)
|
||||
@echo " CC $(subst $(obj)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(SCRATCH_CC) $(SCRATCH_CFLAGS) -o $@ -c $<
|
||||
|
||||
# Include scratch header in main firmware
|
||||
|
Reference in New Issue
Block a user