1 WEB_DIR=/home/kas/html/bike-lights/
2 WEB_FILES=pcb-back.png pcb-front.png schematics.png
7 lights.bottommask.gbr \
9 lights.bottomsilk.gbr \
10 lights.plated-drill.cnc
13 @echo "Usage: make [clean|web|gerber|fab|lights.pcb]"
16 rm -f lights.cmd lights.jpg lights.net lights.new.pcb lights.pcb- \
17 lights.png lights.ps lights.sch~ pcb-back.png pcb-front.png \
18 schematics.png *.gbr *.cnc
20 web: pcb-back.png pcb-front.png schematics.png
21 test -d $(WEB_DIR) && install -m 644 $(WEB_FILES) $(WEB_DIR)
23 lights.pcb: lights.sch lights.prj
26 pcb-front.png: lights.pcb
27 pcb -x png --dpi 150 --photo-mode lights.pcb \
30 pcb-back.png: lights.pcb
31 pcb -x png --dpi 150 --photo-mode --photo-flip-x lights.pcb \
34 schematics.png: lights.sch
35 gschem -s image.scm lights.sch -o schematics.png
37 gerber: $(GERBER_FILES)
39 $(GERBER_FILES): lights.pcb
40 pcb -x gerber lights.pcb
43 @sh -c 'D=bike-lights-`date +\%Y\%m\%d-\%H\%M` && mkdir $$D && \
44 cp lights.top.gbr $$D/bike-lights.gtl && \
45 cp lights.bottom.gbr $$D/bike-lights.gbl && \
46 cp lights.topmask.gbr $$D/bike-lights.gts && \
47 cp lights.bottommask.gbr $$D/bike-lights.gbs && \
48 cp lights.topsilk.gbr $$D/bike-lights.gto && \
49 cp lights.bottomsilk.gbr $$D/bike-lights.gbo && \
50 cp lights.plated-drill.cnc $$D/bike-lights.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" '