-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
56 lines (45 loc) · 1.29 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
MCU=atmega8
CC=avr-gcc
OBJCOPY=avr-objcopy
# optimize for size:
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues
PORT=/dev/ttyUSB0
PART=ATmega8
UISP = uisp -dprog=stk500 -dserial=/dev/ttyUSB0 -dpart=$(PART)
GITHUBNAME = 'xnormidi'
VERSION = 0.2.develop
DISTDIR = avr-midi.${VERSION}
#-------------------
current: implementations
#-------------------
implementations:
cd implementations && make
.c.o:
@echo CC $<
@$(CC) -c $(CFLAGS) -Os -o $*.o $<
dist: clean
mkdir -p ${DISTDIR}
cp -R COPYING Makefile *.c *.h README implementations/ test/ bytequeue/ ${DISTDIR}
tar -czf ${DISTDIR}.tar.gz ${DISTDIR}
rm -rf ${DISTDIR}
post: dist
scp ${DISTDIR}.tar.gz x37v.info:x37v.info/projects/microcontroller/avr-midi/files/
scp basic.c x37v.info:x37v.info/projects/microcontroller/avr-midi/
clean:
rm -f *.o *.map *.out *.hex *.tar.gz */*.o
cd implementations/ && make clean
cd test/ && make clean
rm -rf tmp
doc:
@cd doc && doxygen Doxyfile
doc-post: doc
mkdir tmp/ && cd tmp/ && \
git clone [email protected]:x37v/${GITHUBNAME}.git && \
cd ${GITHUBNAME} && git co gh-pages
cp -r doc/html/* tmp/${GITHUBNAME}
cd tmp/${GITHUBNAME} && git add . && \
git ci -a -m 'auto updated docs' && \
git push origin gh-pages
rm -rf tmp
.PHONY: implementations doc post-doc
all: implementations