AM=../altusmetrum SCHEME=$(AM)/scheme PROJECT=usbrelay # intentionally want to rebuild drc and bom on every invocation all: drc partslist partslist.csv pcb drc: usbrelay.sch Makefile -gnetlist -g drc2 usbrelay.sch -o usbrelay.drc partslist: usbrelay.sch Makefile gnetlist -g bom -o usbrelay.unsorted usbrelay.sch head -n1 usbrelay.unsorted > partslist tail -n+2 usbrelay.unsorted | sort >> partslist rm -f usbrelay.unsorted partslist.csv: usbrelay.sch Makefile gnetlist -L $(SCHEME) -g partslistgag \ -o usbrelay.unsorted usbrelay.sch head -n1 usbrelay.unsorted > partslist.csv tail -n+2 usbrelay.unsorted | sort -t \, -k 8 >> partslist.csv rm -f usbrelay.unsorted partslist.dk: $(PROJECT).sch Makefile $(SCHEME)/gnet-partslist-bom.scm gnetlist -L $(SCHEME) -g partslist-bom -Ovendor=digikey -o $@ $(PROJECT).sch partslist.mouser: $(PROJECT).sch Makefile $(SCHEME)/gnet-partslist-bom.scm gnetlist -L $(SCHEME) -g partslist-bom -Ovendor=mouser -o $@ $(PROJECT).sch pcb: usbrelay.sch project Makefile gsch2pcb project # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this # might be a really good idea for publishing designs to the web that others # might review? Like this example from DJ: # #web : # for i in channel.sch ethernet.sch power.sch mcu.sch; do \ # cp $$i tmp.sch ; \ # gschlas -e tmp.sch ; \ # mv tmp.sch ${WEB}/$$i; \ # done # this shoves local work out to the git.gag.com repository push: git push --mirror usbrelay.xy: usbrelay.pcb pcb -x bom usbrelay.pcb usbrelay.bottom.gbr: usbrelay.pcb pcb -x gerber usbrelay.pcb zip: usbrelay.bottom.gbr usbrelay.bottommask.gbr usbrelay.fab.gbr usbrelay.top.gbr usbrelay.topmask.gbr usbrelay.toppaste.gbr usbrelay.topsilk.gbr usbrelay.plated-drill.cnc usbrelay.xy Makefile # usbrelay.xls zip usbrelay.zip usbrelay.*.gbr usbrelay.*.cnc usbrelay.xy # usbrelay.xls oshpark: usbrelay.bottom.gbr usbrelay.bottommask.gbr usbrelay.top.gbr usbrelay.topmask.gbr usbrelay.topsilk.gbr usbrelay.plated-drill.cnc mv usbrelay.bottom.gbr bottom\ layer.ger mv usbrelay.bottommask.gbr bottom\ solder\ mask.ger mv usbrelay.bottomsilk.gbr bottom\ silk\ screen.ger mv usbrelay.outline.gbr board\ outline.ger mv usbrelay.top.gbr top\ layer.ger mv usbrelay.topmask.gbr top\ solder\ mask.ger mv usbrelay.topsilk.gbr top\ silk\ screen.ger mv usbrelay.plated-drill.cnc drills.xln zip usbrelay-oshpark.zip *.ger *.xln stencil: usbrelay.bottom.gbr usbrelay.toppaste.gbr usbrelay.outline.gbr zip usbrelay-stencil.zip usbrelay.toppaste.gbr usbrelay.outline.gbr clean: rm -f *.bom *.drc *.log *~ usbrelay.ps *.gbr *.cnc *bak* *- *.zip rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln rm -f *.partslist *.new.pcb *.unsorted usbrelay.xls muffin-5267.pdf muffins: partslist.csv $(AM)/glabels/muffin-short-5267.glabels glabels-3-batch $(AM)/glabels/muffin-short-5267.glabels \ -i partslist.csv -o muffin-5267.ps >/dev/null && \ ps2pdf muffin-5267.ps && rm muffin-5267.ps