Switch to shared build infra
authorKeith Packard <keithp@keithp.com>
Thu, 2 Nov 2017 16:16:59 +0000 (09:16 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 2 Nov 2017 16:33:14 +0000 (09:33 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
Makefile

index 429b9896c8e8e379ca8d9aa58171e4df4091de46..188ce4c7d6ba80292a3d6ebb4e2b3e8f87e2a2f7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,88 +1,8 @@
 PROJECT=telelco
-AM=../altusmetrum
-SCHEME=$(AM)/scheme
-NICKLE=$(AM)/nickle
-RETAB=nickle $(NICKLE)/retab
 
-# intentionally want to rebuild drc and bom on every invocation
-all:   drc pcb partslist partslist.csv partslist.dk zip pdf
+SCHEMATICS=telelco.sch
+LAYERS=2
 
-drc:   $(PROJECT).sch Makefile
-       -gnetlist -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) | $(RETAB) > $@ && rm -f $(PROJECT).tabtmp
-
-partslist.csv: $(PROJECT).sch Makefile
-       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 Makefile
-       gsch2pcb project
-
-# 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
-
-$(PROJECT).xy: $(PROJECT).pcb
-       pcb -x bom $(PROJECT).pcb
-
-$(PROJECT).gerb: $(PROJECT).pcb
-       rm -f *.gbr *.cnc
-       pcb -x gerber $(PROJECT).pcb
-       touch $@
-
-PDF=$(PROJECT)-sch.pdf $(PROJECT)-pcb.pdf
-
-PS=$(PROJECT)-sch.ps $(PROJECT)-pcb.ps
-
-pdf: $(PDF)
-
-$(PROJECT)-sch.pdf: $(PROJECT)-sch.ps
-       ps2pdf $(PROJECT)-sch.ps
-
-$(PROJECT)-pcb.pdf: $(PROJECT)-pcb.ps
-       ps2pdf $(PROJECT)-pcb.ps
-
-$(PROJECT)-sch.ps: $(PROJECT).sch
-       gschem -p -o $@ -s /usr/share/gEDA/scheme/print.scm  $(PROJECT).sch
-
-$(PROJECT)-pcb.ps: $(PROJECT).pcb
-       pcb -x ps --ps-color --psfile $(PROJECT)-pcb.ps --media Letter $(PROJECT).pcb
-
-zip: $(PROJECT).zip $(PROJECT)-stencil.zip
-
-$(PROJECT).zip: $(PROJECT).gerb $(PROJECT).xy
-       rm -f $(PROJECT).zip
-       zip $(PROJECT).zip *.gbr *.cnc *.xy
-
-$(PROJECT)-stencil.zip: $(PROJECT).gerb
-       rm -f $(PROJECT)-stencil.zip
-       zip $(PROJECT)-stencil.zip $(PROJECT).toppaste.gbr $(PROJECT).outline.gbr
-
-clean:
-       rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr $(PROJECT).gerb *.cnc *bak* *- *.zip 
-       rm -f *.net *.xy *.cmd *.png partslist partslist.csv
-       rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls
-       rm -f $(PDF) $(PS)
+SILK=both
 
+include ../altusmetrum/pcb.mk