comparison src/Makefile @ 3:e410832c3280

Issue of avr-ld. - For some unknown reason, avr-ld can not handle multiple objects well. - Fixed by compile all source at once.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 22 Feb 2009 01:40:36 +0800
parents abf221bf3ce4
children
comparison
equal deleted inserted replaced
2:abf221bf3ce4 3:e410832c3280
1 CFLAGS = -DF_CPU=16000000UL -mmcu=atmega168 -I../include -O2 1 CFLAGS = -DF_CPU=16000000UL -mmcu=atmega168 -I../include -O
2 AVR_JTAG_OBJS = \ 2 AVR_JTAG_OBJS = \
3 avr_jtag.o \ 3 avr_jtag.o \
4 avriotools.o \ 4 avriotools.o \
5 cmd_proto.o \ 5 cmd_proto.o \
6 jtag.o 6 jtag.o
11 all: avr_jtag.hex 11 all: avr_jtag.hex
12 12
13 avr_jtag.hex: avr_jtag 13 avr_jtag.hex: avr_jtag
14 $(OBJCOPY) -O ihex -R .eeprom $(.ALLSRC) $@ 14 $(OBJCOPY) -O ihex -R .eeprom $(.ALLSRC) $@
15 15
16 avr_jtag: $(AVR_JTAG_OBJS) 16 avr_jtag: $(AVR_JTAG_OBJS:C/\.o/.c/)
17 $(CC) -o $@ $(.ALLSRC) 17 $(CC) $(CFLAGS) -o $@ $(.ALLSRC)
18 18
19 $(AVR_JTAG_OBJS): ${@:C/\.o/.c/} 19 $(AVR_JTAG_OBJS): ${@:C/\.o/.c/}
20 $(CC) $(CFLAGS) -c $(.ALLSRC) 20 $(CC) $(CFLAGS) -c $(.ALLSRC)
21 21
22 install: 22 install: