X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=Makefile;h=a27e22c493659e8e5fafe9ae8d5d8e26c1556f33;hb=8df7317d9cd2416414f0affcaccc4193b1600974;hp=1473f4833479bf9c7bf31321a21fb7cd323364b0;hpb=b347d479eb8f2902b72a723c8b7de593cc869571;p=hw%2Ftelegps diff --git a/Makefile b/Makefile index 1473f48..a27e22c 100644 --- a/Makefile +++ b/Makefile @@ -1,78 +1,13 @@ +# name of project, also used for PCB file PROJECT=telegps -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 partslist.mouser muffin-5267.pdf zip +# list of schematic files that make up this design +SCHEMATICS=telegps.sch -drc: $(PROJECT).sch - gnetlist -L $(SCHEME) -g drc2 $(PROJECT).sch -o $(PROJECT).drc +# number of PCB layers +LAYERS=4 -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 +# sides with silkscreen, can be none|top|bottom|both +SILK=bottom -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 >/dev/null && ps2pdf muffin-5267.ps && rm muffin-5267.ps - -$(PROJECT).pcb: pcb - -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 - -GERB_FILES=*.gbr *.ger *.cnc - -$(PROJECT).gerb: $(PROJECT).pcb - rm -f $(GERB_FILES) - pcb -x gerber $(PROJECT).pcb - mv $(PROJECT).group1.gbr "$(PROJECT).Internal Plane 1".ger - mv $(PROJECT).group2.gbr "$(PROJECT).Internal Plane 2".ger - touch $@ - -zip: $(PROJECT).zip $(PROJECT)-stencil.zip - -$(PROJECT).zip: $(PROJECT).gerb $(PROJECT).xy - rm -f $@ - zip $(PROJECT).zip $(GERB_FILES) - -$(PROJECT)-stencil.zip: $(PROJECT).gerb - rm -f $@ - zip $@ $(PROJECT).toppaste.gbr $(PROJECT).outline.gbr - -stencil: telegps.bottom.gbr telegps.toppaste.gbr telegps.outline.gbr - zip telegps-stencil.zip telegps.toppaste.gbr telegps.outline.gbr - -clean: - rm -f *.bom *.drc *.log *~ $(PROJECT).ps $(GERB_FILES) $(PROJECT).gerb *bak* *- *.zip - rm -f *.net *.cmd *.png partslist partslist.csv *.xy partslist.dk partslist.mouser muffin-5267.pdf - rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls +include ../altusmetrum/pcb.mk