add mfg targets to makefile
[hw/remoteimu] / Makefile
1 # intentionally want to rebuild drc and bom on every invocation
2 all:    drc partslist partslist.csv pcb
3
4 drc:    remoteimu.sch Makefile
5         -gnetlist -g drc2 remoteimu.sch -o remoteimu.drc
6
7 partslist:      remoteimu.sch Makefile
8         gnetlist -g bom -o remoteimu.unsorted remoteimu.sch
9         head -n1 remoteimu.unsorted > partslist
10         tail -n+2 remoteimu.unsorted | sort >> partslist
11         rm -f remoteimu.unsorted
12
13 partslist.csv:  remoteimu.sch Makefile
14         gnetlist -L ../altusmetrum/scheme -g partslistgag \
15                 -o remoteimu.unsorted remoteimu.sch
16         head -n1 remoteimu.unsorted > partslist.csv
17         tail -n+2 remoteimu.unsorted | sort -t \, -k 8 >> partslist.csv
18         rm -f remoteimu.unsorted
19
20 pcb:    remoteimu.sch project Makefile
21         gsch2pcb project
22
23 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
24 # might be a really good idea for publishing designs to the web that others
25 # might review?  Like this example from DJ:
26 #
27 #web :
28 #        for i in channel.sch ethernet.sch power.sch mcu.sch; do \
29 #          cp $$i tmp.sch ; \
30 #          gschlas -e tmp.sch ; \
31 #          mv tmp.sch ${WEB}/$$i; \
32 #        done
33
34 # this shoves local work out to the git.gag.com repository
35 push:   
36         git push --mirror
37
38 remoteimu.xy:   remoteimu.pcb
39         pcb -x bom remoteimu.pcb
40
41 remoteimu.bottom.gbr:   remoteimu.pcb
42         pcb -x gerber remoteimu.pcb
43
44 zip:    remoteimu.bottom.gbr remoteimu.bottommask.gbr remoteimu.fab.gbr remoteimu.top.gbr remoteimu.topmask.gbr remoteimu.toppaste.gbr remoteimu.topsilk.gbr remoteimu.plated-drill.cnc remoteimu.xy  Makefile # remoteimu.xls
45         zip remoteimu.zip remoteimu.*.gbr remoteimu.*.cnc remoteimu.xy # remoteimu.xls
46
47 oshpark: remoteimu.bottom.gbr remoteimu.bottommask.gbr remoteimu.top.gbr remoteimu.topmask.gbr remoteimu.topsilk.gbr remoteimu.plated-drill.cnc
48         mv remoteimu.bottom.gbr bottom\ layer.ger
49         mv remoteimu.bottommask.gbr bottom\ solder\ mask.ger
50         mv remoteimu.bottomsilk.gbr bottom\ silk\ screen.ger
51         mv remoteimu.outline.gbr board\ outline.ger
52         mv remoteimu.top.gbr top\ layer.ger
53         mv remoteimu.topmask.gbr top\ solder\ mask.ger
54         mv remoteimu.topsilk.gbr top\ silk\ screen.ger
55         mv remoteimu.plated-drill.cnc drills.xln
56         zip remoteimu-oshpark.zip *.ger *.xln
57
58 stencil: remoteimu.toppaste.gbr remoteimu.outline.gbr
59         zip remoteimu-stencil.zip remoteimu.toppaste.gbr remoteimu.outline.gbr
60
61 clean:
62         rm -f *.bom *.drc *.log *~ remoteimu.ps *.gbr *.cnc *bak* *- *.zip 
63         rm -f *.net *.xy *.cmd *.png partslist partslist.csv *.ger *.xln
64         rm -f *.partslist *.new.pcb *.unsorted remoteimu.xls
65