Instruct Make about #include dependencies

Change-Id: I5e87f31c0a67b9cd59271f25a213aa68ee99ce51
This commit is contained in:
Romain Goyet
2016-09-16 15:34:52 +02:00
parent 46c5353116
commit 5f2427aef2
2 changed files with 8 additions and 0 deletions

3
.gitignore vendored
View File

@@ -2,6 +2,9 @@
*.o
*.elf
# No dependency files
*.d
# No lex / yacc generated files.
poincare/src/expression_lexer.cpp
poincare/src/expression_lexer.hpp

View File

@@ -14,6 +14,9 @@ SFLAGS += -Ilib -I.
# Flags - Building options
SFLAGS += -Wall
# Flags - Header dependency tracking
SFLAGS += -MD -MP
# Flags - Optimizations
ifeq ($(DEBUG),1)
SFLAGS += -ggdb3 -DDEBUG=1 -O0
@@ -62,6 +65,8 @@ include escher/Makefile
include apps/Makefile
include quiz/Makefile # Quiz should be included at the end
-include $(objs:.o=.d)
%.elf: $(objs)
@echo "LD $@"
@$(LD) $^ $(LDFLAGS) -o $@