From 32dd70a7e01ff258f65043dc23d2d9a86731f69e Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 6 Jan 2025 20:14:25 +0100 Subject: pcb: Add BOM generation with GNU Make This allows to export the BOM as CSV file via the Make build system. --- pcb/pcb.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pcb/pcb.mk (limited to 'pcb/pcb.mk') diff --git a/pcb/pcb.mk b/pcb/pcb.mk new file mode 100644 index 0000000..cde5d47 --- /dev/null +++ b/pcb/pcb.mk @@ -0,0 +1,13 @@ +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' \ + $< -- cgit v1.2.3-70-g09d2