Added include files as dependencies for object building

This commit is contained in:
Thomas Touhey 2016-04-22 00:43:28 +02:00
parent 38002d66cb
commit 10474e765b
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ include $(CURDIR)/Makefile.cfg
# DEDUCED VARIABLES
ALLOBJ = $(SRC:%=$(OBJDIR)/%.o)
ALLINC = $(INC:%=$(INCDIR)/%.h)
# RULES
## Make everything (default)
@ -22,7 +23,7 @@ $(OBJDIR):
$(MKDIR) $@
## Make an object file out of a C source file
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(ALLINC)
$(CC) -c -o $@ $< $(CFLAGS)
## Make the library