apps/Application.mk: Fix main redefine warning by using per file CFLAGS/CXXFLAGS.
This commit is contained in:
parent
8cb4896bdb
commit
1b2880ba46
@ -155,13 +155,15 @@ MAINNAME := $(addsuffix _main,$(PROGNAME))
|
||||
|
||||
ifeq ($(suffix $(MAINSRC)),$(CXXEXT))
|
||||
$(MAINOBJ): %$(OBJEXT): %$(CXXEXT)
|
||||
$(eval CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(firstword $(MAINNAME))})
|
||||
$(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(firstword $(MAINNAME))})
|
||||
$(eval $<_CXXELFFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(firstword $(MAINNAME))})
|
||||
$(eval MAINNAME=$(filter-out $(firstword $(MAINNAME)),$(MAINNAME)))
|
||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
|
||||
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
||||
else
|
||||
$(MAINOBJ): %$(OBJEXT): %.c
|
||||
$(eval CFLAGS += ${shell $(DEFINE) "$(CC)" main=$(firstword $(MAINNAME))})
|
||||
$(eval $<_CFLAGS += ${shell $(DEFINE) "$(CC)" main=$(firstword $(MAINNAME))})
|
||||
$(eval $<_CELFFLAGS += ${shell $(DEFINE) "$(CC)" main=$(firstword $(MAINNAME))})
|
||||
$(eval MAINNAME=$(filter-out $(firstword $(MAINNAME)),$(MAINNAME)))
|
||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
||||
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
||||
|
Loading…
Reference in New Issue
Block a user