diff --git a/Makefile b/Makefile index b1316fe..0794b0e 100644 --- a/Makefile +++ b/Makefile @@ -91,14 +91,16 @@ lib: $(KIBOM) $< $@ # generate panel -PANEL_DIR := panel -panel: panel.kicad_pcb -panel.kicad_pcb: ${NAME}.versioned.kicad_pcb ${NAME}.versioned.kicad_pro ${NAME}.versioned.kicad_sch ${NAME}.versioned.json - kikit panelize -p ${NAME}.versioned.json ${NAME}.versioned.kicad_pcb $@ +PANEL_DIR := panel_fab + +panel: panel.kicad_pcb panel.brd-top.svg panel.brd-bot.svg panel.brd-top.png panel.brd-bot.png ${PANEL_DIR} + +panel.kicad_pcb: ${NAME}.versioned.kicad_pcb ${NAME}.versioned.kicad_pro ${NAME}.versioned.kicad_sch panel.versioned.json + kikit panelize -p panel.versioned.json ${NAME}.versioned.kicad_pcb $@ sed --in-place 's/\"missing_courtyard\": \"warning\"/\"missing_courtyard\": \"ignore\"/g' $(patsubst %.kicad_pcb,%.kicad_pro,$@) # the mouse bites don't have a courtyard - kikit fab jlcpcb --assembly --missingError --field JLCPCB,LCSC --schematic ${NAME}.versioned.kicad_sch $@ ${PANEL_DIR} - pcbdraw --silent $@ --dpi 600 panel.brd-top.png - pcbdraw --silent $@ --dpi 600 --back panel.brd-bot.png + +${PANEL_DIR}: ${NAME}.versioned.kicad_sch panel.kicad_pcb + kikit fab jlcpcb --assembly --missingError --field JLCPCB,LCSC --schematic $^ $@ clean: rm -f $(foreach EXT,$(VERSIONED_EXT),${NAME}.versioned.$(EXT)) @@ -106,5 +108,5 @@ clean: rm -f ${NAME}.versioned.kicad_prl ${NAME}.versioned.kicad_pro-bak ${NAME}.versioned.xml ${NAME}.versioned.csv rm -f ${IBOM} rm -rf ${FABRICATION_DIR} - rm -f panel.kicad_pcb panel.kicad_pro + rm -f panel.versioned.json panel.kicad_pcb panel.kicad_pro panel.brd-top.svg panel.brd-bot.svg panel.brd-top.png panel.brd-bot.png rm -rf ${PANEL_DIR}