PCB_BUILD_DIR := $(BUILD_DIR)/pcb BOM := $(PCB_BUILD_DIR)/bom.csv SCH := pcb/soundbox.kicad_sch .PHONY: pcb pcb: $(BOM) $(BOM): $(SCH) mkdir -p $(dir $@) kicad-cli sch export bom \ -o $@ \ --fields 'Reference,Description,Value,Manufacturer,MPN,Datasheet' \ $<