-# 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=telemini
-drc: telenanodd.sch Makefile
- -gnetlist -g drc2 telenanodd.sch -o telenanodd.drc
+# list of schematic files that make up this design
+SCHEMATICS=telemini.sch
-partslist: telenanodd.sch Makefile
- gnetlist -g bom -o telenanodd.unsorted telenanodd.sch
- head -n1 telenanodd.unsorted > partslist
- tail -n+2 telenanodd.unsorted | sort >> partslist
- rm -f telenanodd.unsorted
+# number of PCB layers
+LAYERS=4
-partslist.csv: telenanodd.sch Makefile
- gnetlist -g partslist4 -o telenanodd.unsorted telenanodd.sch
- head -n1 telenanodd.unsorted > partslist.csv
- tail -n+2 telenanodd.unsorted | sort -t \, -k 8 >> partslist.csv
- rm -f telenanodd.unsorted
-
-pcb: telenanodd.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
-
-zip: telenanodd.back.gbr telenanodd.backmask.gbr telenanodd.fab.gbr telenanodd.front.gbr telenanodd.frontmask.gbr telenanodd.frontpaste.gbr telenanodd.frontsilk.gbr telenanodd.group2.gbr telenanodd.group3.gbr telenanodd.plated-drill.cnc telenanodd.xy Makefile # telenanodd.xls
- zip telenanodd.zip telenanodd.*.gbr telenanodd.*.cnc telenanodd.xy # telenanodd.xls
-
-clean:
- rm -f *.bom *.drc *.log *~ telenanodd.ps *.gbr *.cnc *bak* *- *.zip
- rm -f *.net *.xy *.cmd *.png partslist partslist.csv
- rm -f *.partslist *.new.pcb *.unsorted telenanodd.xls
+# sides with silkscreen, can be none|top|bottom|both
+SILK=both
+include ../altusmetrum/pcb.mk