From d3942fa1b06b389709c2dee41eaa40e507fc9744 Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Tue, 19 Mar 2024 17:37:09 +0800 Subject: [PATCH] module build:replace BUILD_LOADABLE with MODULES Signed-off-by: xuxin19 --- Application.mk | 38 +++++++++++++++++++------------------- Makefile | 4 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Application.mk b/Application.mk index 5e5a68446..1da445ee1 100644 --- a/Application.mk +++ b/Application.mk @@ -209,35 +209,35 @@ define RENAMEMAIN endef $(RAOBJS): %.s$(SUFFIX)$(OBJEXT): %.s - $(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(AELFFLAGS)), \ $(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@)) $(CAOBJS): %.S$(SUFFIX)$(OBJEXT): %.S - $(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(AELFFLAGS)), \ $(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@)) $(COBJS): %.c$(SUFFIX)$(OBJEXT): %.c - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@)) $(CXXOBJS): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CXXELFFLAGS)), \ $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@)) $(RUSTOBJS): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@)) $(ZIGOBJS): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES), $(CELFFLAGS)), \ $(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@)) $(DOBJS): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES), $(CELFFLAGS)), \ $(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@)) $(SWIFTOBJS): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES), $(CELFFLAGS)), \ $(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@)) AROBJS := @@ -263,23 +263,23 @@ endif ifeq ($(BUILD_MODULE),y) $(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CXXELFFLAGS)), \ $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@)) $(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@)) $(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@)) $(MAINDOBJ): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@)) $(MAINSWIFTOBJ): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@)) $(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ) $(MAINDOBJ) $(MAINSWIFTOBJ) @@ -298,31 +298,31 @@ else $(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT) $(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(addsuffix _main,$(PROGNAME_$@))}) $(eval $<_CXXELFFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(addsuffix _main,$(PROGNAME_$@))}) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CXXELFFLAGS)), \ $(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@)) $(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c $(eval $<_CFLAGS += ${DEFINE_PREFIX}main=$(addsuffix _main,$(PROGNAME_$@))) $(eval $<_CELFFLAGS += ${DEFINE_PREFIX}main=$(addsuffix _main,$(PROGNAME_$@))) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@)) $(MAINRUSTOBJ): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@)) $(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT) $(Q) $(call RENAMEMAIN, $<, $(basename $<)_tmp.zig) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILEZIG, $(basename $<)_tmp.zig, $@), $(call COMPILEZIG, $(basename $<)_tmp.zig, $@)) $(Q) rm -f $(basename $<)_tmp.zig $(MAINDOBJ): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@)) $(MAINSWIFTOBJ): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT) - $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \ + $(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \ $(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@)) install:: diff --git a/Makefile b/Makefile index e25e679d7..bf655a3d4 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ else # In FLAT and protected modes, the modules have already been created. A # symbol table is required. -ifeq ($(CONFIG_BUILD_LOADABLE),) +ifeq ($(CONFIG_MODULES),) ifeq ($(CONFIG_WINDOWS_NATIVE),y) $(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all) else @@ -134,7 +134,7 @@ $(BIN): $(SYMTABOBJ) $(call ARLOCK, $(call CONVERT_PATH,$(BIN)), $^) $(call LINK_WASM) -endif # !CONFIG_BUILD_LOADABLE +endif # !CONFIG_MODULES install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)