-# intentionally want to rebuild drc and bom on every invocation
-all: drc partslist partslist.csv pcb
+# name of project, also used for PCB file
+PROJECT=telefire
-drc: telefire.sch Makefile
- -gnetlist -g drc2 telefire.sch -o telefire.drc
+# list of schematic files that make up this design
+SCHEMATICS=telefire.sch
-partslist: telefire.sch Makefile
- gnetlist -g bom -o telefire.unsorted telefire.sch
- head -n1 telefire.unsorted > partslist
- tail -n+2 telefire.unsorted | sort >> partslist
- rm -f telefire.unsorted
+# number of PCB layers
+LAYERS=4
-partslist.csv: telefire.sch Makefile
- gnetlist -g partslist3 -o telefire.unsorted telefire.sch
- head -n1 telefire.unsorted > partslist.csv
- tail -n+2 telefire.unsorted | sort -t \, -k 8 >> partslist.csv
- rm -f telefire.unsorted
-
-pcb: telefire.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
-
-telefire.xy: telefire.pcb
- pcb -x bom telefire.pcb
-
-telefire.back.gbr: telefire.pcb
- pcb -x gerber telefire.pcb
-
-zip: telefire.back.gbr telefire.backmask.gbr telefire.fab.gbr telefire.front.gbr telefire.frontmask.gbr telefire.frontpaste.gbr telefire.frontsilk.gbr telefire.plated-drill.cnc telefire.xy Makefile # telefire.xls
- zip telefire.zip telefire.*.gbr telefire.*.cnc telefire.xy # telefire.xls
-
-clean:
- rm -f *.bom *.drc *.log *~ telefire.ps *.gbr *.cnc *bak* *- *.zip
- rm -f *.net *.xy *.cmd *.png partslist partslist.csv
- rm -f *.partslist *.new.pcb *.unsorted telefire.xls
+# sides with silkscreen, can be none|top|bottom|both
+SILK=both
+include ../altusmetrum/pcb.mk