Skip to content

Commit

Permalink
Generate c source code dependence with c compiler and flags
Browse files Browse the repository at this point in the history
It's wrong to invoke the c++ compiler with c++ flags

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2536daa764275221ca530fd5abfc7568af921570
  • Loading branch information
xiaoxiang781216 committed Jul 6, 2021
1 parent 931a873 commit 9b7fe15
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b7fe15

Please sign in to comment.