Skip to content
Snippets Groups Projects
Commit 6ce3abf6 authored by Emmanuel Baccelli's avatar Emmanuel Baccelli
Browse files

pkg: add jerryscript package

parent a344d6d4
No related branches found
No related tags found
No related merge requests found
PKG_NAME=jerryscript
PKG_URL=https://github.com/jerryscript-project/jerryscript.git
PKG_VERSION=b140158104064ef082ddb58052f8c7c7cee9675c
PKG_LICENSE=Apache-2.0
.PHONY: all
all: git-download
@cp Makefile.jerryscript $(PKG_BUILDDIR)/Makefile
$(MAKE) -C $(PKG_BUILDDIR)
cp $(PKG_BUILDDIR)/riot/lib/libjerry-core.a ${BINDIR}/libjerrycore.a
include $(RIOTBASE)/pkg/pkg.mk
INCLUDES += -I$(PKGDIRBASE)/jerryscript/jerry-core/
BUILD_DIR ?= $(CURDIR)/riot
JERRYHEAP ?= 16
EXT_CFLAGS :=-D__TARGET_RIOT
EXT_CFLAGS += $(CFLAGS)
.PHONY: libjerry riot-jerry flash clean
# all: libjerry riot-jerry
libjerry:
mkdir -p $(BUILD_DIR)
cmake -B$(BUILD_DIR) -H./ \
-DENABLE_LTO=OFF \
-DFEATURE_VALGRIND=OFF \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain_external.cmake \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR="$(MCPU)" \
-DEXTERNAL_CMAKE_C_COMPILER=$(CC) \
-DEXTERNAL_CMAKE_C_COMPILER_ID=GNU \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)
make -C $(BUILD_DIR) jerry-core
cp $(BUILD_DIR)/lib/libjerry-core.a $(BINDIR)/jerryscript.a
include $(RIOTBASE)/Makefile.base
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment