+
+schematics.png: lights.sch
+ gschem -s image.scm lights.sch -o schematics.png
+
+handlebar-big.png: handlebar.sch
+ gschem -s image.scm handlebar.sch -o handlebar-big.png
+
+handlebar.png: handlebar-big.png
+ convert -crop 450x300+320+170 handlebar-big.png handlebar.png
+
+gerber: $(GERBER_FILES)
+
+$(GERBER_FILES): lights.pcb
+ pcb -x gerber lights.pcb
+
+fab: $(GERBER_FILES)
+ @sh -c 'D=bike-lights-`date +\%Y\%m\%d-\%H\%M` && mkdir $$D && \
+ cp lights.top.gbr $$D/bike-lights.gtl && \
+ cp lights.bottom.gbr $$D/bike-lights.gbl && \
+ cp lights.topmask.gbr $$D/bike-lights.gts && \
+ cp lights.bottommask.gbr $$D/bike-lights.gbs && \
+ cp lights.topsilk.gbr $$D/bike-lights.gto && \
+ cp lights.bottomsilk.gbr $$D/bike-lights.gbo && \
+ cp lights.plated-drill.cnc $$D/bike-lights.txt && \
+ zip -r $$D.zip $$D && \
+ echo "Done. Output in $$D.zip."; \
+ echo "You may also want to do git tag gerber-fab-$$D" '
+
+.PHONY: gerber