From 9b7fe15bfbe80ce77187fc16c960839e8db10c64 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 6 Jul 2021 14:03:57 +0800 Subject: [PATCH] Generate c source code dependence with c compiler and flags It's wrong to invoke the c++ compiler with c++ flags Signed-off-by: Xiang Xiao Change-Id: I2536daa764275221ca530fd5abfc7568af921570 --- Application.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Application.mk b/Application.mk index f051eb5fa..798120e3e 100644 --- a/Application.mk +++ b/Application.mk @@ -216,11 +216,8 @@ register:: endif .depend: Makefile $(wildcard $(foreach SRC, $(SRCS), $(addsuffix /$(SRC), $(subst :, ,$(VPATH))))) $(DEPCONFIG) -ifeq ($(filter %$(CXXEXT),$(SRCS)),) - $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out Makefile,$(filter-out $(DEPCONFIG),$^)) >Make.dep -else - $(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out Makefile,$(filter-out $(DEPCONFIG),$^)) >Make.dep -endif + $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(filter-out %$(CXXEXT) Makefile $(DEPCONFIG),$^) >Make.dep + $(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(filter-out %.c Makefile $(DEPCONFIG),$^) >>Make.dep $(Q) touch $@ depend:: .depend