Only support building a single board at a time
As a follow up toc461e20df3
("make: Remove version from build output path"), only support building a single version of a single board by default. The build directory can still be specified by passing `BUILD`. Fixes running the `clean` target when `BUILD` is a custom value or `BOARD` isn't set. Fixes:b03c960b4f
("make: Reduce build output") Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Tim Crawford
parent
946415f3a7
commit
01be30f107
@@ -32,25 +32,25 @@ SCRATCH_CC=\
|
||||
|
||||
# Convert from binary file to C header
|
||||
$(BUILD)/include/scratch.h: $(SCRATCH_BUILD)/scratch.rom
|
||||
@echo " XXD $(subst $(obj)/,,$@)"
|
||||
@echo " XXD $(subst $(BUILD)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
xxd -include < $< > $@
|
||||
|
||||
# Convert from Intel Hex file to binary file
|
||||
$(SCRATCH_BUILD)/scratch.rom: $(SCRATCH_BUILD)/scratch.ihx
|
||||
@echo " OBJCOPY $(subst $(obj)/,,$@)"
|
||||
@echo " OBJCOPY $(subst $(BUILD)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
objcopy -I ihex -O binary $< $@
|
||||
|
||||
# Link object files into Intel Hex file
|
||||
$(SCRATCH_BUILD)/scratch.ihx: $(SCRATCH_OBJ)
|
||||
@echo " LINK $(subst $(obj)/,,$@)"
|
||||
@echo " LINK $(subst $(BUILD)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(SCRATCH_CC) -o $@ $^
|
||||
|
||||
# Compile C files into object files
|
||||
$(SCRATCH_OBJ): $(SCRATCH_BUILD)/%.rel: src/%.c $(SCRATCH_INCLUDE)
|
||||
@echo " CC $(subst $(obj)/,,$@)"
|
||||
@echo " CC $(subst $(BUILD)/,,$@)"
|
||||
mkdir -p $(@D)
|
||||
$(SCRATCH_CC) $(SCRATCH_CFLAGS) -o $@ -c $<
|
||||
|
||||
|
Reference in New Issue
Block a user