AM=../altusmetrum
SCHEME=$(AM)/scheme
NICKLE=$(AM)/nickle
+RETAB=nickle $(NICKLE)/retab
# intentionally want to rebuild drc and bom on every invocation
all: hw
-hw: drc partslist partslist.csv partslist.dk partslist.mouser
+hw: drc partslist partslist.csv partslist.dk partslist.mouser muffin-5267.pdf
drc: $(PROJECT).sch
gnetlist -L $(SCHEME) -g drc2 $(PROJECT).sch -o $(PROJECT).drc
partslist: $(PROJECT).sch
gnetlist -L $(SCHEME) -g bom -o $(PROJECT).tabtmp $(PROJECT).sch
- (head -n1 $(PROJECT).tabtmp; tail -n+2 $(PROJECT).tabtmp | sort) | nickle $(NICKLE)/retab > $@ && rm -f $(PROJECT).tabtmp
+ (head -n1 $(PROJECT).tabtmp; tail -n+2 $(PROJECT).tabtmp | sort) | $(RETAB) > $@ && rm -f $(PROJECT).tabtmp
partslist.csv: $(PROJECT).sch Makefile
- gnetlist -L $(SCHEME) -g partslistgag -o $(PROJECT).unsorted $(PROJECT).sch
- head -n1 $(PROJECT).unsorted > partslist.csv
- tail -n+2 $(PROJECT).unsorted | sort -t \, -k 8 >> partslist.csv
- rm -f $(PROJECT).unsorted
+ gnetlist -L $(SCHEME) -g partslistgag -o $(PROJECT).csvtmp $(PROJECT).sch
+ (head -n1 $(PROJECT).csvtmp; tail -n+2 $(PROJECT).csvtmp | sort -t \, -k 8) > $@ && rm -f $(PROJECT).csvtmp
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
+muffin-5267.pdf: partslist.csv $(AM)/glabels/muffin-5267.glabels
+ glabels-3-batch $(AM)/glabels/muffin-5267.glabels -i partslist.csv -o muffin-5267.ps && ps2pdf muffin-5267.ps && rm muffin-5267.ps
+
pcb: $(PROJECT).sch project
gsch2pcb project
clean:
rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr *.cnc *bak* *- *.zip
- rm -f *.net *.xy *.cmd *.png partslist partslist.csv
+ rm -f *.net *.xy *.cmd *.png partslist partslist.csv partslist.dk partslist.mouser muffin-5267.pdf
rm -f *.partslist *.new.pcb *.unsorted
rm -f *.hex *.cod *.lst *.ps *.o *.asm
rm -f *.ger *.xln