fiatlux/pcb/Makefile
jedi b48bd52722
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
add drill files to production file archive
2022-06-12 20:07:09 +02:00

61 lines
2.3 KiB
Makefile

.NOTPARALLEL: gen/fab/$(BOARD)-F_Cu.gbr gen/fab/$(BOARD)-B_Cu.gbr gen/fab/$(BOARD)-F_Mask.gbr gen/fab/$(BOARD)-B_Mask.gbr gen/fab/$(BOARD)-F_Paste.gbr gen/fab/$(BOARD)-B_Paste.gbr gen/fab/$(BOARD)-F_SilkS.gbr gen/fab/$(BOARD)-B_SilkS.gbr
all: test fab doc pcb
test: gen/$(BOARD)-drc.txt gen/$(BOARD)-erc.txt
pcb: $(BOARD)_pcb.zip
doc: gen/$(BOARD).pdf gen/$(BOARD)-front.svg gen/$(BOARD)-back.svg
fab: test gen/$(BOARD)_fab.zip gen/$(BOARD).csv gen/$(BOARD)-top-pos.csv
$(BOARD)_pcb.zip: fab doc
@mkdir -p gen
cd gen; zip -r ../$(BOARD)_pcb.zip $(BOARD)_fab.zip $(BOARD).csv $(BOARD)-top-pos.csv $(BOARD)-front.svg $(BOARD)-back.svg $(BOARD).pdf
cd gen; zip -r ../$(BOARD)_debug.zip .
gen/$(BOARD)_fab.zip: gen/fab/$(BOARD)-F_Cu.gbr gen/fab/$(BOARD)-B_Cu.gbr gen/fab/$(BOARD)-F_Mask.gbr gen/fab/$(BOARD)-B_Mask.gbr
gen/$(BOARD)_fab.zip: gen/fab/$(BOARD)-F_Paste.gbr gen/fab/$(BOARD)-B_Paste.gbr gen/fab/$(BOARD)-F_SilkS.gbr gen/fab/$(BOARD)-B_SilkS.gbr
gen/$(BOARD)_fab.zip: gen/fab/$(BOARD).drl
@mkdir -p gen/fab
cd gen/fab; zip -r ../$(BOARD)_fab.zip $(BOARD)*.gbr $(BOARD).drl
gen/$(BOARD)-erc.txt: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_pcb
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s update_xml,run_drc -i
gen/$(BOARD)-drc.txt: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_sch
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s update_xml,run_erc -i
gen/fab/%.gbr: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_pcb
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s all print_front gerbers
gen/fab/$(BOARD).drl: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_pcb
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s all drill
gen/$(BOARD)-top-pos.csv: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_pcb
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s all position
gen/$(BOARD).csv: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_pcb
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s all bom
gen/$(BOARD).pdf: $(BOARD).kiplot.yaml $(BOARD).kicad_pro $(BOARD).kicad_sch
@mkdir -p gen
kibot -d gen -c $(BOARD).kiplot.yaml -s run_drc,run_erc print_sch
gen/$(BOARD)-front.svg: $(BOARD).kicad_pcb
@mkdir -p gen
pcbdraw --libs default $< $@
gen/$(BOARD)-back.svg: $(BOARD).kicad_pcb
@mkdir -p gen
pcbdraw --libs default --back $< $@
clean:
@rm -rf gen