X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=Makefile;h=c3e7105172fcca0d9c94f8f8457f7dc6d9111deb;hb=0fd76414c0400a8e56f0a222e83e51c59ca3e5a0;hp=88bf839b2000671d326da89b98a49c2870a18b8f;hpb=e3d72953f031a42089f88828b13b32a38d576ad4;p=hw%2Ftelelco diff --git a/Makefile b/Makefile index 88bf839..c3e7105 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,27 @@ +PROJECT=telelco + # intentionally want to rebuild drc and bom on every invocation -all: drc partslist partslist.csv pcb +all: drc pcb partslist partslist.csv partslist.dk + +drc: $(PROJECT).sch Makefile + -gnetlist -g drc2 $(PROJECT).sch -o $(PROJECT).drc -drc: telelco.sch Makefile - -gnetlist -g drc2 telelco.sch -o telelco.drc +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 -partslist: telelco.sch Makefile - gnetlist -g bom -o telelco.unsorted telelco.sch - head -n1 telelco.unsorted > partslist - tail -n+2 telelco.unsorted | sort >> partslist - rm -f telelco.unsorted +partslist.tab: $(PROJECT).sch Makefile + gnetlist -l gnet-partslist-keithp.scm -g partslist-keithp -o $(PROJECT)-list.unsorted $(PROJECT).sch + nickle ./retab < $(PROJECT)-list.unsorted > $@ -partslist.csv: telelco.sch Makefile - gnetlist -g partslist3 -o telelco.unsorted telelco.sch - head -n1 telelco.unsorted > partslist.csv - tail -n+2 telelco.unsorted | sort -t \, -k 8 >> partslist.csv - rm -f telelco.unsorted +partslist.csv: $(PROJECT).sch Makefile gnet-partslist-csv.scm + gnetlist -l gnet-partslist-csv.scm -g partslist-csv -o $@ $(PROJECT).sch -pcb: telelco.sch project Makefile +partslist.dk: $(PROJECT).sch Makefile gnet-partslist-bom.scm + gnetlist -m ./gnet-partslist-bom.scm -g partslist-bom -Ovendor=digikey -o $@ $(PROJECT).sch + +pcb: $(PROJECT).sch project Makefile gsch2pcb project # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this @@ -34,17 +39,22 @@ pcb: telelco.sch project Makefile push: git push --mirror -telelco.xy: telelco.pcb - pcb -x bom telelco.pcb +$(PROJECT).xy: $(PROJECT).pcb + pcb -x bom $(PROJECT).pcb + +$(PROJECT).gerb: $(PROJECT).pcb + rm -f *.gbr *.cnc + pcb -x gerber $(PROJECT).pcb + touch $@ -telelco.back.gbr: telelco.pcb - pcb -x gerber telelco.pcb +zip: $(PROJECT).zip -zip: telelco.bottom.gbr telelco.bottommask.gbr telelco.fab.gbr telelco.top.gbr telelco.topmask.gbr telelco.toppaste.gbr telelco.topsilk.gbr telelco.plated-drill.cnc telelco.xy Makefile # telelco.xls - zip telelco.zip telelco.*.gbr telelco.*.cnc telelco.xy # telelco.xls +$(PROJECT).zip: $(PROJECT).gerb $(PROJECT).xy + rm -f $(PROJECT).zip + zip $(PROJECT).zip *.gbr *.cnc *.xy clean: - rm -f *.bom *.drc *.log *~ telelco.ps *.gbr *.cnc *bak* *- *.zip + 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 telelco.xls + rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls