Checked in list of disparage parts.
[kokare.git] / Makefile
... / ...
CommitLineData
1# Hardware definitions
2PART=atmega88
3FREQ=1000000
4
5CFLAGS=-Os
6
7MLDFLAGS=$(LDFLAGS) -mmcu=$(PART)
8MCFLAGS=$(CFLAGS) -DF_CPU=$(FREQ)UL -mmcu=$(PART)
9
10.SUFFIXES: .hex .elf
11
12default: kokare.hex # kokare.ehex
13
14program: kokare.hex
15 avrdude -q -p m88 -U flash:w:kokare.hex
16
17.elf.hex:
18 avr-objcopy -O ihex -R .eeprom $> $@
19
20#%.ehex: %.elf
21# avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 $< $@
22
23kokare.elf: kokare.o
24 avr-gcc $> -o $@ $(MLDFLAGS) -lm
25
26.c.o:
27 avr-gcc -c $(MCFLAGS) $< -o $@
28
29clean:
30 rm -f *.o *.elf *.hex *.ehex