Use tyco 6-pin header for all switches
[hw/telelco] / Makefile
1 PROJECT=telelco
2
3 # intentionally want to rebuild drc and bom on every invocation
4 all:    drc partslist partslist.csv pcb
5
6 drc:    $(PROJECT).sch Makefile
7         -gnetlist -g drc2 $(PROJECT).sch -o $(PROJECT).drc
8
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
14
15 partslist.csv:  $(PROJECT).sch Makefile
16         gnetlist -l gnet-partslist-keithp.scm -g partslist-keithp -o $@ $(PROJECT).sch
17
18 pcb:    $(PROJECT).sch project Makefile
19         gsch2pcb project
20
21 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
22 # might be a really good idea for publishing designs to the web that others
23 # might review?  Like this example from DJ:
24 #
25 #web :
26 #        for i in channel.sch ethernet.sch power.sch mcu.sch; do \
27 #          cp $$i tmp.sch ; \
28 #          gschlas -e tmp.sch ; \
29 #          mv tmp.sch ${WEB}/$$i; \
30 #        done
31
32 # this shoves local work out to the git.gag.com repository
33 push:   
34         git push --mirror
35
36 $(PROJECT).xy:  $(PROJECT).pcb
37         pcb -x bom $(PROJECT).pcb
38
39 $(PROJECT).bottom.gbr:  $(PROJECT).pcb
40         pcb -x gerber $(PROJECT).pcb
41
42 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
43         zip $(PROJECT).zip $(PROJECT).*.gbr $(PROJECT).*.cnc $(PROJECT).xy # $(PROJECT).xls
44
45 clean:
46         rm -f *.bom *.drc *.log *~ $(PROJECT).ps *.gbr *.cnc *bak* *- *.zip 
47         rm -f *.net *.xy *.cmd *.png partslist partslist.csv
48         rm -f *.partslist *.new.pcb *.unsorted $(PROJECT).xls
49