Fix Makefile dependency

This commit is contained in:
Yuxuan Shui 2018-08-22 15:25:55 +01:00
parent 571a6cf15f
commit c37c6c41ed
1 changed files with 2 additions and 2 deletions

View File

@ -134,9 +134,9 @@ src/.clang_complete: Makefile
@(for i in $(filter-out -O% -DNDEBUG, $(CFG) $(CPPFLAGS) $(INCS)); do echo "$$i"; done) > $@ @(for i in $(filter-out -O% -DNDEBUG, $(CFG) $(CPPFLAGS) $(INCS)); do echo "$$i"; done) > $@
.deps: .deps:
mkdir -p .deps mkdir -p $@
%.o: src/%.c .deps %.o: src/%.c | .deps
$(eval DEP=$(addprefix .deps/,$(@:.o=.d))) $(eval DEP=$(addprefix .deps/,$(@:.o=.d)))
@set -e; rm -f $(DEP); \ @set -e; rm -f $(DEP); \
$(CC) -M $(CPPFLAGS) $< > $@.$$$$; \ $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \