header file modification now takes into account in makefile

This commit is contained in:
King Kévin 2013-10-17 16:53:49 +02:00
parent 2d2c25a6fe
commit d4def49a30
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ PROGRAMMER=usbtiny
FLASHER=avrdude -p $(DEVICE) -c $(PROGRAMMER) FLASHER=avrdude -p $(DEVICE) -c $(PROGRAMMER)
# source files to compile # source files to compile
SRC = main.c uart.c ir_nec.c settings.c SRC = main.c uart.c ir_nec.c settings.c
# header files.
HEADER = $(SRC:.c=.h)
# object files. # object files.
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)
# listing files. # listing files.
@ -73,7 +75,7 @@ flash:
program: $(TARGET).hex program: $(TARGET).hex
# compile # compile
%.o: %.c %.o: %.c %.h
$(CC) $(CFLAGS) -I. -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) -c -o $@ $< $(CC) $(CFLAGS) -I. -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) -c -o $@ $<
# link # link