diff 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
line wrap: on
line diff
--- a/src/Makefile	Sat Feb 21 23:06:50 2009 +0800
+++ b/src/Makefile	Sun Feb 22 01:40:36 2009 +0800
@@ -1,4 +1,4 @@
-CFLAGS =	-DF_CPU=16000000UL -mmcu=atmega168 -I../include -O2
+CFLAGS =	-DF_CPU=16000000UL -mmcu=atmega168 -I../include -O
 AVR_JTAG_OBJS =	\
 	avr_jtag.o	\
 	avriotools.o	\
@@ -13,8 +13,8 @@
 avr_jtag.hex: avr_jtag
 	$(OBJCOPY) -O ihex -R .eeprom $(.ALLSRC) $@
 
-avr_jtag: $(AVR_JTAG_OBJS)
-	$(CC) -o $@ $(.ALLSRC)
+avr_jtag: $(AVR_JTAG_OBJS:C/\.o/.c/)
+	$(CC) $(CFLAGS) -o $@ $(.ALLSRC)
 
 $(AVR_JTAG_OBJS): ${@:C/\.o/.c/}
 	$(CC) $(CFLAGS) -c $(.ALLSRC)
@@ -30,4 +30,4 @@
 			echo "delete $$f"; \
 			rm -f $$f; \
 		fi; \
-	done
\ No newline at end of file
+	done