approaching v0.1 schematic, initial hack on an assembler source for firmware
[hw/teleterra] / Makefile
1 # intentionally want to rebuild drc and bom on every invocation
2 all:    hw sw
3
4 hw:     drc bom 
5
6 sw:     teleterra.hex
7
8 teleterra.hex:  teleterra.asm
9         gpasm teleterra.asm
10
11 drc:    teleterra.sch
12         -gnetlist -g drc2 teleterra.sch -o teleterra.drc
13
14 bom:    teleterra.sch
15         gnetlist -g bom -o teleterra.unsorted teleterra.sch
16         head -n1 teleterra.unsorted > teleterra.bom
17         tail -n+2 teleterra.unsorted | sort >> teleterra.bom
18         rm -f teleterra.unsorted
19
20 pcb:    teleterra.sch project
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 zip:    teleterra.back.gbr teleterra.backmask.gbr teleterra.fab.gbr teleterra.front.gbr teleterra.frontmask.gbr teleterra.frontpaste.gbr teleterra.frontsilk.gbr teleterra.group2.gbr teleterra.group3.gbr teleterra.plated-drill.cnc
39         zip teleterra.zip *.gbr *.cnc
40
41 clean:
42         rm -f *.bom *.drc *.log *~ teleterra.ps *.gbr *.cnc *bak* *- *.zip 
43         rm -f *.net *.xy *.cmd *.png
44         rm -f *.partslist *.new.pcb *.unsorted
45         rm -f *.hex *.cod *.lst
46