1 WEB_DIR=/home/kas/html/heater/
2 WEB_FILES=pcb-back.png pcb-front.png schematics.png
5 heater-panel.bottom.gbr \
6 heater-panel.topmask.gbr \
7 heater-panel.bottommask.gbr \
8 heater-panel.topsilk.gbr \
9 heater-panel.bottomsilk.gbr \
10 heater-panel.plated-drill.cnc
13 @echo "Usage: make [clean|web|gerber|fab|heater.pcb]"
16 rm -f heater.cmd heater.jpg heater.net heater.new.pcb heater.pcb- \
17 heater.png heater.ps heater.sch~ pcb-back.png pcb-front.png \
18 schematics.png *.gbr *.cnc
21 test -d $(WEB_DIR) && install -m 644 $(WEB_FILES) $(WEB_DIR)
23 heater.pcb: heater.sch heater.prj
26 pcb-front.png: heater.pcb
27 pcb -x png --dpi 200 --photo-mode heater.pcb \
30 pcb-back.png: heater.pcb
31 pcb -x png --dpi 200 --photo-mode --photo-flip-y heater.pcb \
34 schematics.png: heater.sch
35 gschem -s image.scm heater.sch -o schematics.png
37 gerber: $(GERBER_FILES)
39 $(GERBER_FILES): heater-panel.pcb
40 pcb -x gerber heater-panel.pcb
43 @sh -c 'D=heater-`date +\%Y\%m\%d-\%H\%M` && mkdir $$D && \
44 cp heater-panel.top.gbr $$D/heater.gtl && \
45 cp heater-panel.bottom.gbr $$D/heater.gbl && \
46 cp heater-panel.topmask.gbr $$D/heater.gts && \
47 cp heater-panel.bottommask.gbr $$D/heater.gbs && \
48 cp heater-panel.topsilk.gbr $$D/heater.gto && \
49 cp heater-panel.bottomsilk.gbr $$D/heater.gbo && \
50 cp heater-panel.plated-drill.cnc $$D/heater.txt && \
51 zip -r $$D.zip $$D && \
52 echo "Done. Output in $$D.zip."; \
53 echo "You may also want to do git tag gerber-fab-$$D" '