mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Application: fix multiple main target mismatch during incremental compile
MAINSRC will fail to match with PROGNAME if one of main source is changed in incremental compilation this PR will correct this issue. Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
b13f70ca59
commit
7ad9525c35
1 changed files with 6 additions and 6 deletions
|
|
@ -203,16 +203,16 @@ else
|
|||
MAINNAME := $(addsuffix _main,$(PROGNAME))
|
||||
|
||||
$(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
||||
$(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(firstword $(MAINNAME))})
|
||||
$(eval $<_CXXELFFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(firstword $(MAINNAME))})
|
||||
$(eval MAINNAME=$(filter-out $(firstword $(MAINNAME)),$(MAINNAME)))
|
||||
$(eval MAIN=$(word $(call GETINDEX,$<,$(MAINCXXSRCS)),$(MAINNAME)))
|
||||
$(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(MAIN)})
|
||||
$(eval $<_CXXELFFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(MAIN)})
|
||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
|
||||
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
||||
|
||||
$(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
|
||||
$(eval $<_CFLAGS += ${DEFINE_PREFIX}main=$(firstword $(MAINNAME)))
|
||||
$(eval $<_CELFFLAGS += ${DEFINE_PREFIX}main=$(firstword $(MAINNAME)))
|
||||
$(eval MAINNAME=$(filter-out $(firstword $(MAINNAME)),$(MAINNAME)))
|
||||
$(eval MAIN=$(word $(call GETINDEX,$<,$(MAINCSRCS)),$(MAINNAME)))
|
||||
$(eval $<_CFLAGS += ${DEFINE_PREFIX}main=$(MAIN))
|
||||
$(eval $<_CELFFLAGS += ${DEFINE_PREFIX}main=$(MAIN))
|
||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
||||
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue