2020-11-26 16:18:48 +01:00
|
|
|
APPLICATION = wasm-example
|
|
|
|
# If no BOARD is defined in the environment, use this default:
|
|
|
|
BOARD ?= native
|
|
|
|
|
|
|
|
# This has to be the absolute path to the RIOT base directory:
|
|
|
|
RIOTBASE ?= $(CURDIR)/../..
|
|
|
|
|
|
|
|
USEPKG += wamr
|
|
|
|
|
2024-02-01 13:55:02 +01:00
|
|
|
ifeq (,$(filter native native64,$(BOARD)))
|
2022-01-21 21:02:23 +01:00
|
|
|
CFLAGS += -DTHREAD_STACKSIZE_MAIN='(6 * 1024)'
|
|
|
|
endif
|
2020-11-26 16:18:48 +01:00
|
|
|
|
|
|
|
export WAMR_CONFIG := $(abspath config.cmake)
|
|
|
|
|
2022-01-21 21:02:23 +01:00
|
|
|
BLOBS += test.wasm hello.wasm
|
2020-11-26 16:18:48 +01:00
|
|
|
|
|
|
|
# Comment this out to disable code in RIOT that does safety checking
|
|
|
|
# which is not needed in a production environment but helps in the
|
|
|
|
# development process:
|
|
|
|
DEVELHELP ?= 1
|
|
|
|
|
|
|
|
# Change this to 0 show compiler invocation lines by default:
|
|
|
|
QUIET ?= 1
|
|
|
|
|
2022-01-21 21:02:23 +01:00
|
|
|
all: hello.wasm
|
|
|
|
|
2022-02-07 01:17:52 +01:00
|
|
|
hello.wasm: wasm_sample/hello.c wasm_sample/Makefile
|
2022-01-21 21:02:23 +01:00
|
|
|
make -C wasm_sample hello.wasm
|
|
|
|
mv wasm_sample/hello.wasm .
|
|
|
|
|
2021-09-23 00:17:43 +02:00
|
|
|
#######################################################
|
|
|
|
# Load the rest of the usual RIOT make infrastructure #
|
|
|
|
#######################################################
|
2020-11-26 16:18:48 +01:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|