Superficial tweak of Makefiles

This commit is contained in:
Michael Hayes
2013-10-08 15:44:44 +13:00
parent 2ad9152c57
commit be074c97b9
21 changed files with 33 additions and 38 deletions
+3 -9
View File
@@ -5,7 +5,7 @@
# Definitions.
CC = avr-gcc
CFLAGS = -mmcu=atmega32u2 -Os -Wall -Wstrict-prototypes -Wextra -g -I../../drivers/avr -I../../drivers -I../../utils
CFLAGS = -mmcu=atmega32u2 -Os -Wall -Wstrict-prototypes -Wextra -g -I../../drivers/avr -I../../utils
OBJCOPY = avr-objcopy
SIZE = avr-size
DEL = rm
@@ -16,7 +16,7 @@ all: beep1.out
# Compile: create object files from C source files.
beep1.o: beep1.c ../../drivers/avr/delay.h ../../drivers/avr/pio.h ../../drivers/avr/system.h ../../drivers/button.h ../../drivers/led.h ../../utils/pacer.h
beep1.o: beep1.c ../../drivers/avr/pio.h ../../drivers/avr/system.h ../../utils/pacer.h
$(CC) -c $(CFLAGS) $< -o $@
pio.o: ../../drivers/avr/pio.c ../../drivers/avr/pio.h ../../drivers/avr/system.h
@@ -28,12 +28,6 @@ system.o: ../../drivers/avr/system.c ../../drivers/avr/system.h
timer.o: ../../drivers/avr/timer.c ../../drivers/avr/system.h ../../drivers/avr/timer.h
$(CC) -c $(CFLAGS) $< -o $@
button.o: ../../drivers/button.c ../../drivers/avr/pio.h ../../drivers/avr/system.h ../../drivers/button.h
$(CC) -c $(CFLAGS) $< -o $@
led.o: ../../drivers/led.c ../../drivers/avr/pio.h ../../drivers/avr/system.h ../../drivers/led.h
$(CC) -c $(CFLAGS) $< -o $@
pacer.o: ../../utils/pacer.c ../../drivers/avr/system.h ../../drivers/avr/timer.h ../../utils/pacer.h
$(CC) -c $(CFLAGS) $< -o $@
@@ -41,7 +35,7 @@ pacer.o: ../../utils/pacer.c ../../drivers/avr/system.h ../../drivers/avr/timer.
# Link: create output file (executable) from object files.
beep1.out: beep1.o pio.o system.o timer.o button.o led.o pacer.o
beep1.out: beep1.o pio.o system.o timer.o pacer.o
$(CC) $(CFLAGS) $^ -o $@ -lm
$(SIZE) $@