switch to PIC16F722, add pull-up on MCLR as Microchip suggests
[hw/teleterra] / Makefile
1 # intentionally want to rebuild drc and bom on every invocation
2 all:    hw sw
3
4 hw:     drc partslist 
5
6 sw:     teleterra.hex
7
8 CC=             sdcc
9 CFLAGS=         -mpic14 -p16f886
10 LDFLAGS=        
11
12 teleterra.o:    teleterra.c
13         $(CC) -c $(CFLAGS) $<
14
15 teleterra.hex:  teleterra.o
16         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ teleterra.o
17
18 drc:    teleterra.sch
19         -gnetlist -g drc2 teleterra.sch -o teleterra.drc
20
21 partslist:      teleterra.sch
22         gnetlist -g bom -o teleterra.unsorted teleterra.sch
23         head -n1 teleterra.unsorted > partslist
24         tail -n+2 teleterra.unsorted | sort >> partslist
25         rm -f teleterra.unsorted
26
27 pcb:    teleterra.sch project
28         gsch2pcb project
29
30 # note that 'gschlas -e foo.sch' will embed all symbols in the schematic, this
31 # might be a really good idea for publishing designs to the web that others
32 # might review?  Like this example from DJ:
33 #
34 #web :
35 #        for i in channel.sch ethernet.sch power.sch mcu.sch; do \
36 #          cp $$i tmp.sch ; \
37 #          gschlas -e tmp.sch ; \
38 #          mv tmp.sch ${WEB}/$$i; \
39 #        done
40
41 # this shoves local work out to the git.gag.com repository
42 push:   
43         git push --mirror
44
45 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
46         zip teleterra.zip *.gbr *.cnc
47
48 clean:
49         rm -f *.bom *.drc *.log *~ teleterra.ps *.gbr *.cnc *bak* *- *.zip 
50         rm -f *.net *.xy *.cmd *.png partslist
51         rm -f *.partslist *.new.pcb *.unsorted
52         rm -f *.hex *.cod *.lst *.ps *.o *.asm
53