From: Keith Packard Date: Mon, 16 May 2016 07:25:33 +0000 (-0500) Subject: Switch to shared makefile X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a18260da6d7f477ca721be7c72289f9003aa81f1;p=hw%2Ftelegps Switch to shared makefile Signed-off-by: Keith Packard --- diff --git a/Makefile b/Makefile index d0243a6..0ad365f 100644 --- a/Makefile +++ b/Makefile @@ -1,79 +1,13 @@ +# name of project, also used for PCB file PROJECT=telegps-hp -AM=../altusmetrum -SCHEME=$(AM)/scheme -# 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=telegps-hp.sch -drc: $(PROJECT).sch Makefile - -gnetlist -g drc2 $(PROJECT).sch -o $(PROJECT).drc +# number of PCB layers +LAYERS=4 -partslist: $(PROJECT).sch Makefile - gnetlist -g bom -o $(PROJECT).unsorted $(PROJECT).sch - head -n1 $(PROJECT).unsorted > partslist - tail -n+2 $(PROJECT).unsorted | sort >> partslist - rm -f $(PROJECT).unsorted - -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 - -pcb: $(PROJECT).sch project Makefile - gsch2pcb project - -$(PROJECT).xy: $(PROJECT).pcb - pcb -x bom $(PROJECT).pcb - -$(PROJECT).bottom.gbr: $(PROJECT).pcb - pcb -x gerber $(PROJECT).pcb - -zip: $(PROJECT).bottom.gbr $(PROJECT).bottommask.gbr $(PROJECT).fab.gbr $(PROJECT).top.gbr $(PROJECT).topmask.gbr $(PROJECT).toppaste.gbr $(PROJECT).group2.gbr $(PROJECT).group3.gbr $(PROJECT).plated-drill.cnc $(PROJECT).xy Makefile # $(PROJECT).xls - rm -f $(PROJECT).topsilk.gbr - zip $(PROJECT).zip $(PROJECT).*.gbr $(PROJECT).*.cnc $(PROJECT).xy # $(PROJECT).xls - -oshpark: $(PROJECT).bottom.gbr $(PROJECT).bottommask.gbr $(PROJECT).top.gbr $(PROJECT).topmask.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).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 - -stencil: $(PROJECT).bottom.gbr $(PROJECT).toppaste.gbr $(PROJECT).outline.gbr - zip $(PROJECT)-stencil.zip $(PROJECT).toppaste.gbr $(PROJECT).outline.gbr - -clean: - rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr *.cnc *bak* *- *.zip - rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln - rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).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 - -$(PROJECT)-sch.ps: $(PROJECT).sch - gschem -p -o $(PROJECT)-sch.ps -s /usr/share/gEDA/scheme/print.scm $(PROJECT).sch - -$(PROJECT)-sch.pdf: $(PROJECT)-sch.ps - ps2pdf $(PROJECT)-sch.ps - -$(PROJECT)-pcb.ps: $(PROJECT).pcb - pcb -x ps --psfile $(PROJECT)-pcb.ps --media Letter $(PROJECT).pcb - -$(PROJECT)-pcb.pdf: $(PROJECT)-pcb.ps - ps2pdf $(PROJECT)-pcb.ps - -pdf: $(PROJECT)-sch.pdf $(PROJECT)-pcb.pdf +# sides with silkscreen, can be none|top|bottom|both +SILK=bottom +include ../altusmetrum/pcb.mk diff --git a/attribs b/attribs index 92a91e7..d7af178 100644 --- a/attribs +++ b/attribs @@ -1,6 +1,8 @@ +device value -vendor -vendor_part_number footprint loadstatus -device +provided +mfg_part_number +vendor +vendor_part_number