5 # intentionally want to rebuild drc and bom on every invocation
6 all: drc partslist partslist.csv pcb
8 drc: usbrelay.sch Makefile
9 -gnetlist -g drc2 usbrelay.sch -o usbrelay.drc
11 partslist: usbrelay.sch Makefile
12 gnetlist -g bom -o usbrelay.unsorted usbrelay.sch
13 head -n1 usbrelay.unsorted > partslist
14 tail -n+2 usbrelay.unsorted | sort >> partslist
15 rm -f usbrelay.unsorted
17 partslist.csv: usbrelay.sch Makefile
18 gnetlist -L $(SCHEME) -g partslistgag \
19 -o usbrelay.unsorted usbrelay.sch
20 head -n1 usbrelay.unsorted > partslist.csv
21 tail -n+2 usbrelay.unsorted | sort -t \, -k 8 >> partslist.csv
22 rm -f usbrelay.unsorted
24 partslist.dk: $(PROJECT).sch Makefile $(SCHEME)/gnet-partslist-bom.scm
25 gnetlist -L $(SCHEME) -g partslist-bom -Ovendor=digikey -o $@ $(PROJECT).sch
27 partslist.mouser: $(PROJECT).sch Makefile $(SCHEME)/gnet-partslist-bom.scm
28 gnetlist -L $(SCHEME) -g partslist-bom -Ovendor=mouser -o $@ $(PROJECT).sch
30 pcb: usbrelay.sch project Makefile
33 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
34 # might be a really good idea for publishing designs to the web that others
35 # might review? Like this example from DJ:
38 # for i in channel.sch ethernet.sch power.sch mcu.sch; do \
40 # gschlas -e tmp.sch ; \
41 # mv tmp.sch ${WEB}/$$i; \
44 # this shoves local work out to the git.gag.com repository
48 usbrelay.xy: usbrelay.pcb
49 pcb -x bom usbrelay.pcb
51 usbrelay.bottom.gbr: usbrelay.pcb
52 pcb -x gerber usbrelay.pcb
54 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
55 zip usbrelay.zip usbrelay.*.gbr usbrelay.*.cnc usbrelay.xy # usbrelay.xls
57 oshpark: usbrelay.bottom.gbr usbrelay.bottommask.gbr usbrelay.top.gbr usbrelay.topmask.gbr usbrelay.topsilk.gbr usbrelay.plated-drill.cnc
58 mv usbrelay.bottom.gbr bottom\ layer.ger
59 mv usbrelay.bottommask.gbr bottom\ solder\ mask.ger
60 mv usbrelay.bottomsilk.gbr bottom\ silk\ screen.ger
61 mv usbrelay.outline.gbr board\ outline.ger
62 mv usbrelay.top.gbr top\ layer.ger
63 mv usbrelay.topmask.gbr top\ solder\ mask.ger
64 mv usbrelay.topsilk.gbr top\ silk\ screen.ger
65 mv usbrelay.plated-drill.cnc drills.xln
66 zip usbrelay-oshpark.zip *.ger *.xln
68 stencil: usbrelay.bottom.gbr usbrelay.toppaste.gbr usbrelay.outline.gbr
69 zip usbrelay-stencil.zip usbrelay.toppaste.gbr usbrelay.outline.gbr
72 rm -f *.bom *.drc *.log *~ usbrelay.ps *.gbr *.cnc *bak* *- *.zip
73 rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln
74 rm -f *.partslist *.new.pcb *.unsorted usbrelay.xls muffin-5267.pdf
76 muffins: partslist.csv $(AM)/glabels/muffin-short-5267.glabels
77 glabels-3-batch $(AM)/glabels/muffin-short-5267.glabels \
78 -i partslist.csv -o muffin-5267.ps >/dev/null && \
79 ps2pdf muffin-5267.ps && rm muffin-5267.ps