1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/jerryscript/Makefile.jerryscript
cladmi da3c075d1d
pkg/jerryscript: update rules
Remove unknown rules from .PHONY.
Make 'all' be the default target for jerryscript and execute `all` target.
This way no definition order issue could happen in the future.
2018-12-19 14:26:55 +01:00

36 lines
928 B
Makefile

BUILD_DIR ?= $(CURDIR)/riot
JERRYHEAP ?= 16
EXT_CFLAGS :=-D__TARGET_RIOT
ifeq ($(TOOLCHAIN)_$(BOARD),llvm_native)
EXT_CFLAGS :=-D__TARGET_RIOT -Wno-conversion
endif
.PHONY: all libjerry
all: libjerry
libjerry:
mkdir -p $(BUILD_DIR)
cmake -B$(BUILD_DIR) -H./ \
-DCMAKE_SYSTEM_NAME=RIOT \
-DCMAKE_SYSTEM_PROCESSOR="$(MCPU)" \
-DCMAKE_C_COMPILER=$(CC) \
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DFEATURE_VALGRIND=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DJERRY_LIBC=OFF \
-DJERRY_LIBM=OFF \
-DJERRY_CMDLINE=OFF \
-DHAVE_TIME_H=0 \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)
"$(MAKE)" -C $(BUILD_DIR) jerry-core jerry-ext jerry-port-default-minimal
cp $(BUILD_DIR)/lib/libjerry-core.a $(BINDIR)/jerryscript.a
cp $(BUILD_DIR)/lib/libjerry-ext.a $(BINDIR)/jerryscript-ext.a
cp $(BUILD_DIR)/lib/libjerry-port-default-minimal.a $(BINDIR)/jerryport-minimal.a