module build:replace BUILD_LOADABLE with MODULES
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
d1fc46d978
commit
d3942fa1b0
@ -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::
|
||||
|
4
Makefile
4
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user