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
|
endef
|
||||||
|
|
||||||
$(RAOBJS): %.s$(SUFFIX)$(OBJEXT): %.s
|
$(RAOBJS): %.s$(SUFFIX)$(OBJEXT): %.s
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(AELFFLAGS)), \
|
||||||
$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))
|
$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))
|
||||||
|
|
||||||
$(CAOBJS): %.S$(SUFFIX)$(OBJEXT): %.S
|
$(CAOBJS): %.S$(SUFFIX)$(OBJEXT): %.S
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(AELFFLAGS)), \
|
||||||
$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))
|
$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))
|
||||||
|
|
||||||
$(COBJS): %.c$(SUFFIX)$(OBJEXT): %.c
|
$(COBJS): %.c$(SUFFIX)$(OBJEXT): %.c
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
||||||
|
|
||||||
$(CXXOBJS): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
$(CXXOBJS): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CXXELFFLAGS)), \
|
||||||
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
||||||
|
|
||||||
$(RUSTOBJS): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT)
|
$(RUSTOBJS): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@))
|
$(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@))
|
||||||
|
|
||||||
$(ZIGOBJS): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
|
$(ZIGOBJS): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES), $(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
|
$(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
|
||||||
|
|
||||||
$(DOBJS): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT)
|
$(DOBJS): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES), $(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@))
|
$(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@))
|
||||||
|
|
||||||
$(SWIFTOBJS): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT)
|
$(SWIFTOBJS): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES), $(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@))
|
$(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@))
|
||||||
|
|
||||||
AROBJS :=
|
AROBJS :=
|
||||||
@ -263,23 +263,23 @@ endif
|
|||||||
ifeq ($(BUILD_MODULE),y)
|
ifeq ($(BUILD_MODULE),y)
|
||||||
|
|
||||||
$(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
$(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CXXELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CXXELFFLAGS)), \
|
||||||
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
||||||
|
|
||||||
$(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
|
$(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
||||||
|
|
||||||
$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
|
$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
|
$(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
|
||||||
|
|
||||||
$(MAINDOBJ): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT)
|
$(MAINDOBJ): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@))
|
$(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@))
|
||||||
|
|
||||||
$(MAINSWIFTOBJ): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT)
|
$(MAINSWIFTOBJ): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@))
|
$(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@))
|
||||||
|
|
||||||
$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ) $(MAINDOBJ) $(MAINSWIFTOBJ)
|
$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ) $(MAINDOBJ) $(MAINSWIFTOBJ)
|
||||||
@ -298,31 +298,31 @@ else
|
|||||||
$(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
$(MAINCXXOBJ): %$(CXXEXT)$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
||||||
$(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(addsuffix _main,$(PROGNAME_$@))})
|
$(eval $<_CXXFLAGS += ${shell $(DEFINE) "$(CXX)" main=$(addsuffix _main,$(PROGNAME_$@))})
|
||||||
$(eval $<_CXXELFFLAGS += ${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, $<, $@))
|
$(call ELFCOMPILEXX, $<, $@), $(call COMPILEXX, $<, $@))
|
||||||
|
|
||||||
$(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
|
$(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
|
||||||
$(eval $<_CFLAGS += ${DEFINE_PREFIX}main=$(addsuffix _main,$(PROGNAME_$@)))
|
$(eval $<_CFLAGS += ${DEFINE_PREFIX}main=$(addsuffix _main,$(PROGNAME_$@)))
|
||||||
$(eval $<_CELFFLAGS += ${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, $<, $@))
|
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
|
||||||
|
|
||||||
$(MAINRUSTOBJ): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT)
|
$(MAINRUSTOBJ): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@))
|
$(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@))
|
||||||
|
|
||||||
$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
|
$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
|
||||||
$(Q) $(call RENAMEMAIN, $<, $(basename $<)_tmp.zig)
|
$(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, $@))
|
$(call ELFCOMPILEZIG, $(basename $<)_tmp.zig, $@), $(call COMPILEZIG, $(basename $<)_tmp.zig, $@))
|
||||||
$(Q) rm -f $(basename $<)_tmp.zig
|
$(Q) rm -f $(basename $<)_tmp.zig
|
||||||
|
|
||||||
$(MAINDOBJ): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT)
|
$(MAINDOBJ): %$(DEXT)$(SUFFIX)$(OBJEXT): %$(DEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@))
|
$(call ELFCOMPILED, $<, $@), $(call COMPILED, $<, $@))
|
||||||
|
|
||||||
$(MAINSWIFTOBJ): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT)
|
$(MAINSWIFTOBJ): %$(SWIFTEXT)$(SUFFIX)$(OBJEXT): %$(SWIFTEXT)
|
||||||
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
|
$(if $(and $(CONFIG_MODULES),$(CELFFLAGS)), \
|
||||||
$(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@))
|
$(call ELFCOMPILESWIFT, $<, $@), $(call COMPILESWIFT, $<, $@))
|
||||||
|
|
||||||
install::
|
install::
|
||||||
|
4
Makefile
4
Makefile
@ -107,7 +107,7 @@ else
|
|||||||
# In FLAT and protected modes, the modules have already been created. A
|
# In FLAT and protected modes, the modules have already been created. A
|
||||||
# symbol table is required.
|
# symbol table is required.
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_LOADABLE),)
|
ifeq ($(CONFIG_MODULES),)
|
||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
$(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
|
$(BIN): $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_all)
|
||||||
else
|
else
|
||||||
@ -134,7 +134,7 @@ $(BIN): $(SYMTABOBJ)
|
|||||||
$(call ARLOCK, $(call CONVERT_PATH,$(BIN)), $^)
|
$(call ARLOCK, $(call CONVERT_PATH,$(BIN)), $^)
|
||||||
$(call LINK_WASM)
|
$(call LINK_WASM)
|
||||||
|
|
||||||
endif # !CONFIG_BUILD_LOADABLE
|
endif # !CONFIG_MODULES
|
||||||
|
|
||||||
install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
|
install: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_install)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user