tools: Merge WASM_BUILD and WASM_BUILD_ONLY
By make WASM_BUILD as a three state variable: y , n or both. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
ff276e422f
commit
3d5183f404
@ -18,6 +18,9 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
|
# Include Wasm specific definitions
|
||||||
|
include $(APPDIR)/tools/Wasm.mk
|
||||||
|
|
||||||
# If this is an executable program (with MAINSRC), we must build it as a
|
# If this is an executable program (with MAINSRC), we must build it as a
|
||||||
# loadable module for the KERNEL build (always) or if the tristate module
|
# loadable module for the KERNEL build (always) or if the tristate module
|
||||||
# has the value "m"
|
# has the value "m"
|
||||||
@ -95,17 +98,15 @@ endif
|
|||||||
|
|
||||||
# Condition flags
|
# Condition flags
|
||||||
|
|
||||||
DO_REGISTRATION = y
|
DO_REGISTRATION ?= y
|
||||||
|
|
||||||
ifeq ($(PROGNAME),)
|
ifeq ($(PROGNAME),)
|
||||||
DO_REGISTRATION = n
|
DO_REGISTRATION = n
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(WASM_BUILD),y)
|
ifeq ($(WASM_BUILD),y)
|
||||||
ifeq ($(WASM_BUILD_ONLY),y)
|
|
||||||
DO_REGISTRATION = n
|
DO_REGISTRATION = n
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# Compile flags, notice the default flags only suitable for flat build
|
# Compile flags, notice the default flags only suitable for flat build
|
||||||
|
|
||||||
@ -284,13 +285,3 @@ distclean:: clean
|
|||||||
$(call DELFILE, .depend)
|
$(call DELFILE, .depend)
|
||||||
|
|
||||||
-include Make.dep
|
-include Make.dep
|
||||||
|
|
||||||
# Default values for WASM_BUILD from Application.mk
|
|
||||||
|
|
||||||
WASM_BUILD ?= n
|
|
||||||
|
|
||||||
ifeq ($(WASM_BUILD),y)
|
|
||||||
ifneq ($(CONFIG_INTERPRETERS_WAMR)$(CONFIG_INTERPRETERS_WASM)$(CONFIG_INTERPRETERS_TOYWASM),)
|
|
||||||
include $(APPDIR)/tools/Wasm.mk
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
|
# Only build wasm if one of the following runtime is enabled
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_INTERPRETERS_WAMR)$(CONFIG_INTERPRETERS_WASM)$(CONFIG_INTERPRETERS_TOYWASM),)
|
||||||
include $(APPDIR)$(DELIM)interpreters$(DELIM)wamr$(DELIM)Toolchain.defs
|
include $(APPDIR)$(DELIM)interpreters$(DELIM)wamr$(DELIM)Toolchain.defs
|
||||||
|
|
||||||
# wasi-sdk toolchain setting
|
# wasi-sdk toolchain setting
|
||||||
@ -87,9 +90,14 @@ endef
|
|||||||
|
|
||||||
endif # WASM_BUILD
|
endif # WASM_BUILD
|
||||||
|
|
||||||
# If called from Application.mk, WASM_BUILD is defined (y or n)
|
# Default values for WASM_BUILD, it's a three state variable:
|
||||||
|
# y - build wasm module only
|
||||||
|
# n - don't build wasm module
|
||||||
|
# both - build wasm module and native module
|
||||||
|
|
||||||
ifeq ($(WASM_BUILD),y)
|
WASM_BUILD ?= n
|
||||||
|
|
||||||
|
ifneq ($(WASM_BUILD),n)
|
||||||
|
|
||||||
WASM_INITIAL_MEMORY ?= 65536
|
WASM_INITIAL_MEMORY ?= 65536
|
||||||
STACKSIZE ?= $(CONFIG_DEFAULT_TASK_STACKSIZE)
|
STACKSIZE ?= $(CONFIG_DEFAULT_TASK_STACKSIZE)
|
||||||
@ -134,3 +142,4 @@ clean::
|
|||||||
endif # WASM_BUILD
|
endif # WASM_BUILD
|
||||||
|
|
||||||
endif # WCC
|
endif # WCC
|
||||||
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user