forward-annotate resistor value changes, etc
[hw/telemega] / Makefile
index 483d575fb44f995dea97edcfd116ce6220c93db5..83070e1c451be45d8d90c027d8a9f9c257a69af8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,26 @@
+AM=../altusmetrum
+SCHEME=$(AM)/scheme
+
 # intentionally want to rebuild drc and bom on every invocation
 all:   drc partslist partslist.csv pcb
 
-drc:   megametrum.sch Makefile
-       -gnetlist -g drc2 megametrum.sch -o megametrum.drc
+drc:   telemega.sch Makefile
+       -gnetlist -g drc2 telemega.sch -o telemega.drc
 
-partslist:     megametrum.sch Makefile
-       gnetlist -g bom -o megametrum.unsorted megametrum.sch
-       head -n1 megametrum.unsorted > partslist
-       tail -n+2 megametrum.unsorted | sort >> partslist
-       rm -f megametrum.unsorted
+partslist:     telemega.sch Makefile
+       gnetlist -g bom -o telemega.unsorted telemega.sch
+       head -n1 telemega.unsorted > partslist
+       tail -n+2 telemega.unsorted | sort >> partslist
+       rm -f telemega.unsorted
 
-partslist.csv: megametrum.sch Makefile
-       gnetlist -g partslistgag -o megametrum.unsorted megametrum.sch
-       head -n1 megametrum.unsorted > partslist.csv
-       tail -n+2 megametrum.unsorted | sort -t \, -k 8 >> partslist.csv
-       rm -f megametrum.unsorted
+partslist.csv: telemega.sch Makefile
+       gnetlist -L $(SCHEME) -g partslistgag \
+               -o telemega.unsorted telemega.sch
+       head -n1 telemega.unsorted > partslist.csv
+       tail -n+2 telemega.unsorted | sort -t \, -k 8 >> partslist.csv
+       rm -f telemega.unsorted
 
-pcb:   megametrum.sch project Makefile
+pcb:   telemega.sch project Makefile
        gsch2pcb project
 
 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
@@ -34,17 +38,38 @@ pcb:        megametrum.sch project Makefile
 push:  
        git push --mirror
 
-megametrum.xy: megametrum.pcb
-       pcb -x bom megametrum.pcb
+telemega.xy:   telemega.pcb
+       pcb -x bom telemega.pcb
+
+telemega.bottom.gbr:   telemega.pcb
+       pcb -x gerber telemega.pcb
 
-megametrum.bottom.gbr: megametrum.pcb
-       pcb -x gerber megametrum.pcb
+zip:   telemega.bottom.gbr telemega.bottommask.gbr telemega.fab.gbr telemega.top.gbr telemega.topmask.gbr telemega.toppaste.gbr telemega.topsilk.gbr telemega.group2.gbr telemega.group3.gbr telemega.plated-drill.cnc telemega.xy  Makefile # telemega.xls
+       zip telemega.zip telemega.*.gbr telemega.*.cnc telemega.xy # telemega.xls
 
-zip:   megametrum.bottom.gbr megametrum.bottommask.gbr megametrum.fab.gbr megametrum.top.gbr megametrum.topmask.gbr megametrum.toppaste.gbr megametrum.topsilk.gbr megametrum.group2.gbr megametrum.group3.gbr megametrum.plated-drill.cnc megametrum.xy  Makefile # megametrum.xls
-       zip megametrum.zip megametrum.*.gbr megametrum.*.cnc megametrum.xy # megametrum.xls
+oshpark: telemega.bottom.gbr telemega.bottommask.gbr telemega.top.gbr telemega.topmask.gbr telemega.topsilk.gbr telemega.plated-drill.cnc
+       mv telemega.bottom.gbr bottom\ layer.ger
+       mv telemega.bottommask.gbr bottom\ solder\ mask.ger
+       mv telemega.bottomsilk.gbr bottom\ silk\ screen.ger
+       mv telemega.outline.gbr board\ outline.ger
+       mv telemega.top.gbr top\ layer.ger
+       mv telemega.topmask.gbr top\ solder\ mask.ger
+       mv telemega.topsilk.gbr top\ silk\ screen.ger
+       mv telemega.plated-drill.cnc drills.xln
+       mv telemega.group2.gbr internal\ plane\ 1.ger
+       mv telemega.group3.gbr internal\ plane\ 2.ger
+       zip telemega-oshpark.zip *.ger *.xln
+
+stencil:       telemega.bottom.gbr telemega.toppaste.gbr telemega.outline.gbr
+       zip telemega-stencil.zip telemega.toppaste.gbr telemega.outline.gbr
 
 clean:
-       rm -f *.bom *.drc *.log *~ megametrum.ps *.gbr *.cnc *bak* *- *.zip 
-       rm -f *.net *.xy *.cmd *.png partslist partslist.csv
-       rm -f *.partslist *.new.pcb *.unsorted megametrum.xls
+       rm -f *.bom *.drc *.log *~ telemega.ps *.gbr *.cnc *bak* *- *.zip 
+       rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln
+       rm -f *.partslist *.new.pcb *.unsorted telemega.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