From 44f19a02cb254e8b39cae9784e98f07f507119fa Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Tue, 30 Apr 2013 17:23:12 -0600 Subject: [PATCH] update Makefile to best practices --- Makefile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index a2b8c65..1dd8f2f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +AM=../altusmetrum +SCHEME=$(AM)/scheme + # intentionally want to rebuild drc and bom on every invocation all: drc partslist partslist.csv pcb @@ -11,7 +14,7 @@ partslist: telemini.sch Makefile rm -f telemini.unsorted partslist.csv: telemini.sch Makefile - gnetlist -L ../altusmetrum/scheme -g partslistgag \ + gnetlist -L $(SCHEME) -g partslistgag \ -o telemini.unsorted telemini.sch head -n1 telemini.unsorted > partslist.csv tail -n+2 telemini.unsorted | sort -t \, -k 8 >> partslist.csv @@ -41,9 +44,8 @@ telemini.xy: telemini.pcb telemini.bottom.gbr: telemini.pcb pcb -x gerber telemini.pcb -zip: telemini.bottom.gbr telemini.bottommask.gbr telemini.fab.gbr telemini.top.gbr telemini.topmask.gbr telemini.toppaste.gbr telemini.plated-drill.cnc telemini.xy Makefile # telemini.xls +zip: telemini.bottom.gbr telemini.bottommask.gbr telemini.fab.gbr telemini.top.gbr telemini.topmask.gbr telemini.toppaste.gbr telemini.topsilk.gbr telemini.plated-drill.cnc telemini.xy Makefile # telemini.xls zip telemini.zip telemini.*.gbr telemini.*.cnc telemini.xy # telemini.xls -# zip -d telemini.zip telemini.topsilk.gbr oshpark: telemini.bottom.gbr telemini.bottommask.gbr telemini.top.gbr telemini.topmask.gbr telemini.topsilk.gbr telemini.plated-drill.cnc mv telemini.bottom.gbr bottom\ layer.ger @@ -54,15 +56,18 @@ oshpark: telemini.bottom.gbr telemini.bottommask.gbr telemini.top.gbr telemini.t mv telemini.topmask.gbr top\ solder\ mask.ger mv telemini.topsilk.gbr top\ silk\ screen.ger mv telemini.plated-drill.cnc drills.xln - mv telemini.group2.gbr internal\ plane\ 1.ger - mv telemini.group3.gbr internal\ plane\ 2.ger zip telemini-oshpark.zip *.ger *.xln -stencil: telemini.toppaste.gbr telemini.outline.gbr +stencil: telemini.bottom.gbr telemini.toppaste.gbr telemini.outline.gbr zip telemini-stencil.zip telemini.toppaste.gbr telemini.outline.gbr clean: rm -f *.bom *.drc *.log *~ telemini.ps *.gbr *.cnc *bak* *- *.zip - rm -f *.net *.xy *.cmd *.png partslist partslist.csv - rm -f *.partslist *.new.pcb *.unsorted telemini.xls *.ger *.xln + rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln + rm -f *.partslist *.new.pcb *.unsorted telemini.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 -- 2.30.2