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