3 # intentionally want to rebuild drc and bom on every invocation
4 all: drc partslist partslist.csv pcb
6 drc: $(PROJECT).sch Makefile
7 -gnetlist -g drc2 $(PROJECT).sch -o $(PROJECT).drc
9 partslist: $(PROJECT).sch Makefile
10 gnetlist -g bom -o $(PROJECT)-bom.unsorted $(PROJECT).sch
11 head -n1 $(PROJECT)-bom.unsorted > partslist
12 tail -n+2 $(PROJECT)-bom.unsorted | sort >> partslist
13 # rm -f $(PROJECT)-bom.unsorted
15 partslist.csv: $(PROJECT).sch Makefile
16 gnetlist -l gnet-partslist-keithp.scm -g partslist-keithp -o $(PROJECT)-list.unsorted $(PROJECT).sch
17 nickle ./retab < $(PROJECT)-list.unsorted > $@
19 pcb: $(PROJECT).sch project Makefile
22 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
23 # might be a really good idea for publishing designs to the web that others
24 # might review? Like this example from DJ:
27 # for i in channel.sch ethernet.sch power.sch mcu.sch; do \
29 # gschlas -e tmp.sch ; \
30 # mv tmp.sch ${WEB}/$$i; \
33 # this shoves local work out to the git.gag.com repository
37 $(PROJECT).xy: $(PROJECT).pcb
38 pcb -x bom $(PROJECT).pcb
40 $(PROJECT).back.gbr: $(PROJECT).pcb
41 pcb -x gerber $(PROJECT).pcb
43 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
44 zip $(PROJECT).zip $(PROJECT).*.gbr $(PROJECT).*.cnc $(PROJECT).xy # $(PROJECT).xls
47 rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr *.cnc *bak* *- *.zip
48 rm -f *.net *.xy *.cmd *.png partslist partslist.csv
49 rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls