summaryrefslogtreecommitdiff
path: root/pcb/pcb.mk
blob: 0d4376f3c0768d7a4a77fd7be9b1095271668c9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SOUNDBOX_KICAD_SCH := pcb/soundbox.kicad_sch
PCB_BUILD_DIR := $(BUILD_DIR)/pcb
BOM := $(PCB_BUILD_DIR)/bom.csv
SCHEMATIC_PDF := $(PCB_BUILD_DIR)/schematic.pdf

.PHONY: pcb
pcb: $(BOM) $(SCHEMATIC_PDF)

$(BOM): $(SOUNDBOX_KICAD_SCH)
	mkdir -p $(dir $@)
	kicad-cli sch export bom \
		--output $@ \
		--fields 'Reference,Description,Value,Manufacturer,MPN,Datasheet' \
		$<

$(SCHEMATIC_PDF): $(SOUNDBOX_KICAD_SCH)
	mkdir -p $(dir $@)
	kicad-cli sch export pdf --output $@ $<