SMA connector is loaded
[hw/telefirefour] / Makefile
index 1a7ad13aaedae839cfdf3335c046345a81f24e23..6be79bfbdb2248a467fdbad337b3fb98ed2047b6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,24 @@
+PROJECT=telefire
+
 # intentionally want to rebuild drc and bom on every invocation
 all:   drc partslist partslist.csv pcb
 
-drc:   telepad.sch Makefile
-       -gnetlist -g drc2 telepad.sch -o telepad.drc
+drc:   $(PROJECT).sch Makefile
+       -gnetlist -g drc2 $(PROJECT).sch -o $(PROJECT).drc
 
-partslist:     telepad.sch Makefile
-       gnetlist -g bom -o telepad.unsorted telepad.sch
-       head -n1 telepad.unsorted > partslist
-       tail -n+2 telepad.unsorted | sort >> partslist
-       rm -f telepad.unsorted
+partslist:     $(PROJECT).sch Makefile
+       gnetlist -g bom -o $(PROJECT)-bom.unsorted $(PROJECT).sch
+       head -n1 $(PROJECT)-bom.unsorted > partslist
+       tail -n+2 $(PROJECT)-bom.unsorted | sort >> partslist
+#      rm -f $(PROJECT)-bom.unsorted
 
-partslist.csv: telepad.sch Makefile
-       gnetlist -g partslist4 -o telepad.unsorted telepad.sch
-       head -n1 telepad.unsorted > partslist.csv
-       tail -n+2 telepad.unsorted | sort -t \, -k 8 >> partslist.csv
-       rm -f telepad.unsorted
+partslist.csv: $(PROJECT).sch Makefile
+       gnetlist -g partslist3 -o $(PROJECT)-list.unsorted $(PROJECT).sch
+       head -n1 $(PROJECT)-list.unsorted > partslist.csv
+       tail -n+2 $(PROJECT)-list.unsorted | sort -t \, -k 8 >> partslist.csv
+#      rm -f $(PROJECT)-list.unsorted
 
-pcb:   telepad.sch project Makefile
+pcb:   $(PROJECT).sch project Makefile
        gsch2pcb project
 
 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
@@ -34,17 +36,17 @@ pcb:        telepad.sch project Makefile
 push:  
        git push --mirror
 
-telepad.xy:    telepad.pcb
-       pcb -x bom telepad.pcb
+$(PROJECT).xy: $(PROJECT).pcb
+       pcb -x bom $(PROJECT).pcb
 
-telepad.back.gbr:      telepad.pcb
-       pcb -x gerber telepad.pcb
+$(PROJECT).back.gbr:   $(PROJECT).pcb
+       pcb -x gerber $(PROJECT).pcb
 
-zip:   telepad.back.gbr telepad.backmask.gbr telepad.fab.gbr telepad.front.gbr telepad.frontmask.gbr telepad.frontpaste.gbr telepad.frontsilk.gbr telepad.plated-drill.cnc telepad.xy  Makefile # telepad.xls
-       zip telepad.zip telepad.*.gbr telepad.*.cnc telepad.xy # telepad.xls
+zip:   $(PROJECT).bottom.gbr $(PROJECT).bottommask.gbr $(PROJECT).fab.gbr $(PROJECT).top.gbr $(PROJECT).topmask.gbr $(PROJECT).toppaste.gbr $(PROJECT).topsilk.gbr $(PROJECT).plated-drill.cnc $(PROJECT).xy  Makefile # $(PROJECT).xls
+       zip $(PROJECT).zip $(PROJECT).*.gbr $(PROJECT).*.cnc $(PROJECT).xy # $(PROJECT).xls
 
 clean:
-       rm -f *.bom *.drc *.log *~ telepad.ps *.gbr *.cnc *bak* *- *.zip 
+       rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr *.cnc *bak* *- *.zip 
        rm -f *.net *.xy *.cmd *.png partslist partslist.csv
-       rm -f *.partslist *.new.pcb *.unsorted telepad.xls
+       rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls