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
|
||||
|
Reference in New Issue
Block a user