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
Martine Lenders dde802f528 jerryscript: disable HAVE_TIME_H
Without this disabled `nanosleep()` is used, which isn't provided for
most our platforms (though the header `<time.h>` is).

Furthermore, that macro is only used in that instance throughout the
JerryScript codebase.
2018-08-22 13:50:57 +02:00

34 lines
900 B
Makefile

BUILD_DIR ?= $(CURDIR)/riot
JERRYHEAP ?= 16
EXT_CFLAGS :=-D__TARGET_RIOT
.PHONY: libjerry riot-jerry flash clean
# all: libjerry riot-jerry
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
include $(RIOTBASE)/Makefile.base