You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/06 12:03:13 UTC

[incubator-nuttx-apps] 01/02: Generate c source code dependence with c compiler and flags

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 9b7fe15bfbe80ce77187fc16c960839e8db10c64
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Jul 6 14:03:57 2021 +0800

    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 <xi...@xiaomi.com>
    Change-Id: I2536daa764275221ca530fd5abfc7568af921570
---
 Application.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Application.mk b/Application.mk
index f051eb5..798120e 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