File: Makefile

package info (click to toggle)
avr-libc 1%3A1.6.2.cvs20080610-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,848 kB
  • ctags: 55,619
  • sloc: ansic: 92,267; asm: 6,692; sh: 4,131; makefile: 2,481; python: 976; pascal: 426; perl: 116
file content (41 lines) | stat: -rw-r--r-- 640 bytes parent folder | download | duplicates (4)
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
#
# $Id: Makefile,v 1.1 2002/12/18 22:35:38 joerg_wunsch Exp $
#
CC= avr-gcc
#MCU=atmega8
#MCU=atmega16
#MCU=atmega32
#MCU=atmega163
#MCU=atmega323
MCU=atmega128

CFLAGS=  -O -g -Wall -ffreestanding -mmcu=$(MCU)

.SUFFIXES: .s .bin .out .hex .srec

.c.s:
	$(CC) $(CFLAGS) -S $<

.S.o:
	$(CC) $(ASFLAGS) -c $<

.o.out:
	$(CC) $(CFLAGS) -o $@ $<

.out.bin:
	avr-objcopy -O binary $< $@

.out.hex:
	avr-objcopy -O ihex $< $@

.out.srec:
	avr-objcopy -O srec $< $@

all:	twitest.bin

OBJS=twitest.o
twitest.out: $(OBJS)
	$(CC) -o twitest.out $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS)

clean:
	rm -f *~ *.out *.bin *.hex *.srec *.s *.o *.pdf *core