Debian Codegraph @

doc/examples/twitest/Makefile

raw
1 #
2 # $Id$
3 #
4 CC= avr-gcc
5 #MCU=atmega8
6 #MCU=atmega16
7 #MCU=atmega32
8 #MCU=atmega163
9 #MCU=atmega323
10 MCU=atmega128
11
12 CFLAGS= -O -g -Wall -ffreestanding -mmcu=$(MCU)
13
14 .SUFFIXES: .s .bin .out .hex .srec
15
16 .c.s:
17 $(CC) $(CFLAGS) -S $<
18
19 .S.o:
20 $(CC) $(ASFLAGS) -c $<
21
22 .o.out:
23 $(CC) $(CFLAGS) -o $@ $<
24
25 .out.bin:
26 avr-objcopy -O binary $< $@
27
28 .out.hex:
29 avr-objcopy -O ihex $< $@
30
31 .out.srec:
32 avr-objcopy -O srec $< $@
33
34 all: twitest.bin
35
36 OBJS=twitest.o
37 twitest.out: $(OBJS)
38 $(CC) -o twitest.out $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS)
39
40 clean:
41 rm -f *~ *.out *.bin *.hex *.srec *.s *.o *.pdf *core