update Makefile to centralized version
authorBdale Garbee <bdale@gag.com>
Wed, 14 Oct 2015 19:50:02 +0000 (13:50 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 14 Oct 2015 19:50:02 +0000 (13:50 -0600)
Makefile

index e35e1e2128d2910fe5f70f8570ef55db3446d0ab..b11d5cbe4110649bd9a2e72ba689b23228f48259 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,85 +1,13 @@
+# name of project, also used for PCB file
 PROJECT=telebt
-AM=../altusmetrum
-SCHEME=$(AM)/scheme
-NICKLE=$(AM)/nickle
-RETAB=nickle $(NICKLE)/retab
 
-# intentionally want to rebuild drc and bom on every invocation
-all:   drc partslist partslist.csv pcb
+# list of schematic files that make up this design
+SCHEMATICS=telebt.sch
 
-drc:   telebt.sch Makefile
-       -gnetlist -g drc2 telebt.sch -o telebt.drc
+# number of PCB layers
+LAYERS=4
 
-partslist:     telebt.sch Makefile
-       gnetlist -g bom -o telebt.unsorted telebt.sch
-       head -n1 telebt.unsorted > partslist
-       tail -n+2 telebt.unsorted | sort >> partslist
-       rm -f telebt.unsorted
-
-partslist.csv: telebt.sch Makefile
-       gnetlist -L ../altusmetrum/scheme -g partslistgag \
-               -o telebt.unsorted telebt.sch
-       head -n1 telebt.unsorted > partslist.csv
-       tail -n+2 telebt.unsorted | sed -e 's/unknown//g' | sort -t \, -k 8 >> partslist.csv
-       rm -f telebt.unsorted
-
-pcb:   telebt.sch project Makefile
-       gsch2pcb project
-
-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
-
-# 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
-
-telebt.xy:     telebt.pcb
-       pcb -x bom telebt.pcb
-
-telebt.bottom.gbr:     telebt.pcb
-       pcb -x gerber telebt.pcb
-
-zip:   telebt.bottom.gbr telebt.bottommask.gbr telebt.fab.gbr telebt.top.gbr telebt.topmask.gbr telebt.toppaste.gbr telebt.topsilk.gbr telebt.plated-drill.cnc telebt.xy  Makefile # telebt.xls
-       zip telebt.zip telebt.*.gbr telebt.*.cnc telebt.xy # telebt.xls
-
-oshpark: $(PROJECT).bottom.gbr $(PROJECT).bottommask.gbr $(PROJECT).top.gbr $(PROJECT).topmask.gbr $(PROJECT).topsilk.gbr $(PROJECT).plated-drill.cnc
-       mv $(PROJECT).bottom.gbr bottom\ layer.ger
-       mv $(PROJECT).bottommask.gbr bottom\ solder\ mask.ger
-       mv $(PROJECT).bottomsilk.gbr bottom\ silk\ screen.ger
-       mv $(PROJECT).outline.gbr board\ outline.ger
-       mv $(PROJECT).top.gbr top\ layer.ger
-       mv $(PROJECT).topmask.gbr top\ solder\ mask.ger
-       mv $(PROJECT).topsilk.gbr top\ silk\ screen.ger
-       mv $(PROJECT).plated-drill.cnc drills.xln
-       mv $(PROJECT).group2.gbr internal\ plane\ 1.ger
-       mv $(PROJECT).group3.gbr internal\ plane\ 2.ger
-       zip $(PROJECT)-oshpark.zip *.ger *.xln
-
-muffins: partslist.csv $(AM)/glabels/muffin-5267.glabels
-       glabels-3-batch $(AM)/glabels/muffin-5267.glabels \
-               -i partslist.csv -o muffin-5267.ps >/dev/null && \
-               ps2pdf muffin-5267.ps && rm muffin-5267.ps
-
-stencil:       $(PROJECT).pcb
-       pcb -x gerber --paste-adjust -0.075 $(PROJECT).pcb
-       mv $(PROJECT).toppaste.gbr stencil.gbr
-
-clean:
-       rm -f *.bom *.drc *.log *~ telebt.ps *.gbr *.cnc *bak* *- *.zip 
-       rm -f *.net *.xy *.cmd *.png partslist partslist.csv partslist.dk partslist.mouser
-       rm -f *.partslist *.new.pcb *.unsorted telebt.xls *.ger *.xln
+# sides with silkscreen, can be none|top|bottom|both
+SILK=both
 
+include ../altusmetrum/pcb.mk