X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=Makefile;h=73156aa0417418d4949e004b1ed1a1d705c70c2d;hb=0f0c0c06cfa10ca708143b2eda337c2fda4d4696;hp=cacb2bb5ef4c54ad711ba4759628173d76517e2f;hpb=9ee0be307877c85106c9d464dc0c78bf15a5fd12;p=hw%2Fmpserial diff --git a/Makefile b/Makefile index cacb2bb..73156aa 100644 --- a/Makefile +++ b/Makefile @@ -1,58 +1,13 @@ +# name of project, also used for PCB file PROJECT=mpserial -# intentionally want to rebuild drc and bom on every invocation -all: drc pcb partslist partslist.csv partslist.dk zip +# list of schematic files that make up this design +SCHEMATICS=mpserial.sch -drc: $(PROJECT).sch Makefile - -gnetlist -g drc2 $(PROJECT).sch -o $(PROJECT).drc +# number of PCB layers +LAYERS=2 -partslist: $(PROJECT).sch Makefile - gnetlist -g bom -o $(PROJECT)-bom.unsorted $(PROJECT).sch - (head -n1 $(PROJECT)-bom.unsorted && tail -n+2 $(PROJECT)-bom.unsorted | sort) | nickle ./retab > partslist - rm -f $(PROJECT)-bom.unsorted +# sides with silkscreen, can be none|top|bottom|both +SILK=both -partslist.csv: $(PROJECT).sch Makefile gnet-partslist-csv.scm - gnetlist -l gnet-partslist-csv.scm -g partslist-csv -o $@ $(PROJECT).sch - -partslist.dk: $(PROJECT).sch Makefile gnet-partslist-bom.scm - gnetlist -m ./gnet-partslist-bom.scm -g partslist-bom -Ovendor=digikey -o $@ $(PROJECT).sch - -partslist.pdf: partslist.csv smt-labels.glabels - glabels-3-batch smt-labels.glabels -i partslist.csv -o partslist.ps && ps2pdf partslist.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 $@ - -zip: $(PROJECT).zip - -$(PROJECT).zip: $(PROJECT).gerb $(PROJECT).xy - rm -f $(PROJECT).zip - zip $(PROJECT).zip *.gbr *.cnc *.xy - -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 +include ../altusmetrum/pcb.mk