pkg: add jerryscript package
This commit is contained in:
parent
a344d6d48c
commit
6ce3abf6ed
13
pkg/jerryscript/Makefile
Normal file
13
pkg/jerryscript/Makefile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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
|
||||||
1
pkg/jerryscript/Makefile.include
Normal file
1
pkg/jerryscript/Makefile.include
Normal file
@ -0,0 +1 @@
|
|||||||
|
INCLUDES += -I$(PKGDIRBASE)/jerryscript/jerry-core/
|
||||||
31
pkg/jerryscript/Makefile.jerryscript
Normal file
31
pkg/jerryscript/Makefile.jerryscript
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
Loading…
x
Reference in New Issue
Block a user