lose the "pad" in the GPS patch footprint
[hw/telemetrum] / Makefile
index ef83c11c6647899c01d9849054f45c8c6fe853f2..12fe2d456f1bb0b056cf8c288ff2404495440a67 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,82 @@
+AM=../altusmetrum
+SCHEME=$(AM)/scheme
+PROJECT=telemetrum
+
 # intentionally want to rebuild drc and bom on every invocation
-all:   drc bom
+all:   drc partslist partslist.csv pcb
+
+drc:   telemetrum.sch Makefile
+       -gnetlist -g drc2 telemetrum.sch -o telemetrum.drc
+
+partslist:     telemetrum.sch Makefile
+       gnetlist -g bom -o telemetrum.unsorted telemetrum.sch
+       head -n1 telemetrum.unsorted > partslist
+       tail -n+2 telemetrum.unsorted | sort >> partslist
+       rm -f telemetrum.unsorted
 
-drc:   beacon.sch
-       -gnetlist -g drc2 beacon.sch -o beacon.drc
+partslist.csv: telemetrum.sch Makefile
+       gnetlist -L $(SCHEME) -g partslistgag \
+               -o telemetrum.unsorted telemetrum.sch
+       head -n1 telemetrum.unsorted > partslist.csv
+       tail -n+2 telemetrum.unsorted | sort -t \, -k 8 >> partslist.csv
+       rm -f telemetrum.unsorted
 
-bom:   beacon.sch
-       gnetlist -g bom -o beacon.unsorted beacon.sch
-       head -n1 beacon.unsorted > beacon.bom
-       tail -n+2 beacon.unsorted | sort >> beacon.bom
-       rm -f beacon.unsorted
+partslist.dk: $(PROJECT).sch Makefile $(SCHEME)/gnet-partslist-bom.scm
+       gnetlist -L $(SCHEME) -g partslist-bom -Ovendor=digikey -o $@ $(PROJECT).sch
 
-pcb:   beacon.sch project
+partslist.mouser: $(PROJECT).sch Makefile $(SCHEME)/gnet-partslist-bom.scm
+       gnetlist -L $(SCHEME) -g partslist-bom -Ovendor=mouser -o $@ $(PROJECT).sch
+
+pcb:   telemetrum.sch project Makefile
        gsch2pcb project
 
-zip:   beacon.plated-drill.cnc beacon.back.gbr beacon.front.gbr beacon.fab.gbr
-       zip beacon.zip beacon.plated-drill.cnc beacon.back.gbr beacon.front.gbr beacon.fab.gbr
+# 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
+
+telemetrum.xy: telemetrum.pcb
+       pcb -x bom telemetrum.pcb
+
+telemetrum.bottom.gbr: telemetrum.pcb
+       pcb -x gerber telemetrum.pcb
+
+zip:   telemetrum.bottom.gbr telemetrum.bottommask.gbr telemetrum.fab.gbr telemetrum.top.gbr telemetrum.topmask.gbr telemetrum.toppaste.gbr telemetrum.topsilk.gbr telemetrum.group2.gbr telemetrum.group3.gbr telemetrum.plated-drill.cnc telemetrum.xy  Makefile # telemetrum.xls
+       zip telemetrum.zip telemetrum.*.gbr telemetrum.*.cnc telemetrum.xy # telemetrum.xls
+
+oshpark: telemetrum.bottom.gbr telemetrum.bottommask.gbr telemetrum.top.gbr telemetrum.topmask.gbr telemetrum.topsilk.gbr telemetrum.plated-drill.cnc
+       mv telemetrum.bottom.gbr bottom\ layer.ger
+       mv telemetrum.bottommask.gbr bottom\ solder\ mask.ger
+       mv telemetrum.bottomsilk.gbr bottom\ silk\ screen.ger
+       mv telemetrum.outline.gbr board\ outline.ger
+       mv telemetrum.top.gbr top\ layer.ger
+       mv telemetrum.topmask.gbr top\ solder\ mask.ger
+       mv telemetrum.topsilk.gbr top\ silk\ screen.ger
+       mv telemetrum.plated-drill.cnc drills.xln
+       mv telemetrum.group2.gbr internal\ plane\ 1.ger
+       mv telemetrum.group3.gbr internal\ plane\ 2.ger
+       zip telemetrum-oshpark.zip *.ger *.xln
+
+stencil:       telemetrum.bottom.gbr telemetrum.toppaste.gbr telemetrum.outline.gbr
+       zip telemetrum-stencil.zip telemetrum.toppaste.gbr telemetrum.outline.gbr
 
 clean:
-       rm -f *.bom *.drc *.log *~ beacon.ps *.gbr *.cnc *bak* *- *.zip 
-       rm -f *.net *.xy *.cmd
-       rm -f *.partslist *.new.pcb *.unsorted
+       rm -f *.bom *.drc *.log *~ telemetrum.ps *.gbr *.cnc *bak* *- *.zip 
+       rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln
+       rm -f *.partslist *.new.pcb *.unsorted telemetrum.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
+