2017-03-22 16:19:49 +01:00
|
|
|
BUILD_DIR ?= $(CURDIR)/riot
|
|
|
|
|
|
|
|
JERRYHEAP ?= 16
|
|
|
|
|
2017-12-19 12:22:48 +01:00
|
|
|
EXT_CFLAGS :=-D__TARGET_RIOT
|
2017-03-22 16:19:49 +01:00
|
|
|
|
|
|
|
.PHONY: libjerry riot-jerry flash clean
|
|
|
|
|
|
|
|
# all: libjerry riot-jerry
|
|
|
|
|
|
|
|
libjerry:
|
|
|
|
mkdir -p $(BUILD_DIR)
|
|
|
|
cmake -B$(BUILD_DIR) -H./ \
|
2017-12-19 12:22:48 +01:00
|
|
|
-DCMAKE_SYSTEM_NAME=RIOT \
|
|
|
|
-DCMAKE_SYSTEM_PROCESSOR="$(MCPU)" \
|
|
|
|
-DCMAKE_C_COMPILER=$(CC) \
|
|
|
|
-DCMAKE_C_COMPILER_WORKS=TRUE \
|
2017-03-22 16:19:49 +01:00
|
|
|
-DENABLE_LTO=OFF \
|
|
|
|
-DFEATURE_VALGRIND=OFF \
|
2017-12-19 12:22:48 +01:00
|
|
|
-DENABLE_ALL_IN_ONE=OFF \
|
2017-03-22 16:19:49 +01:00
|
|
|
-DJERRY_LIBC=OFF \
|
2017-04-28 14:15:53 +02:00
|
|
|
-DJERRY_LIBM=OFF \
|
2017-12-19 12:22:48 +01:00
|
|
|
-DJERRY_CMDLINE=OFF \
|
2018-08-21 18:44:58 +02:00
|
|
|
-DHAVE_TIME_H=0 \
|
2017-03-22 16:19:49 +01:00
|
|
|
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
|
|
|
|
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)
|
|
|
|
|
2017-12-15 14:57:49 +01:00
|
|
|
"$(MAKE)" -C $(BUILD_DIR) jerry-core jerry-ext jerry-port-default-minimal
|
2017-03-22 16:19:49 +01:00
|
|
|
cp $(BUILD_DIR)/lib/libjerry-core.a $(BINDIR)/jerryscript.a
|
2017-08-30 12:34:50 +02:00
|
|
|
cp $(BUILD_DIR)/lib/libjerry-ext.a $(BINDIR)/jerryscript-ext.a
|
2017-04-28 14:15:53 +02:00
|
|
|
cp $(BUILD_DIR)/lib/libjerry-port-default-minimal.a $(BINDIR)/jerryport-minimal.a
|
2017-03-22 16:19:49 +01:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.base
|