2017-03-22 16:20:07 +01:00
|
|
|
# application name
|
|
|
|
APPLICATION = riot_javascript
|
|
|
|
|
|
|
|
# default BOARD environment
|
|
|
|
BOARD ?= native
|
|
|
|
|
2017-10-12 19:09:53 +02:00
|
|
|
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 bluepill calliope-mini \
|
2017-09-20 10:59:37 +02:00
|
|
|
cc2650-launchpad cc2650stk maple-mini \
|
2017-03-22 16:20:07 +01:00
|
|
|
microbit nrf51dongle nrf6310 nucleo-f030 nucleo-f070 \
|
|
|
|
nucleo-f072 nucleo-f103 nucleo-f302 nucleo-f334 nucleo-f410 \
|
|
|
|
nucleo-l053 nucleo-l073 nucleo32-f031 nucleo32-f042 \
|
|
|
|
nucleo32-f303 nucleo32-l031 opencm904 pca10000 \
|
2017-08-24 17:10:27 +02:00
|
|
|
pca10005 spark-core stm32f0discovery yunjia-nrf51822 \
|
2017-03-22 16:20:07 +01:00
|
|
|
|
2017-11-07 20:59:07 +01:00
|
|
|
BOARD_WHITELIST := native samr21-xpro
|
2017-03-22 16:20:07 +01:00
|
|
|
|
|
|
|
# Comment this out to disable code in RIOT that does safety checking
|
|
|
|
# which is not needed in a production environment but helps in the
|
|
|
|
# development process:
|
|
|
|
CFLAGS += -DDEVELHELP
|
|
|
|
|
|
|
|
# Set stack size to something (conservatively) enormous
|
|
|
|
CFLAGS += -DTHREAD_STACKSIZE_MAIN=9092
|
|
|
|
|
|
|
|
# Add the package for Jerryscript
|
|
|
|
USEPKG += jerryscript
|
|
|
|
|
|
|
|
include $(CURDIR)/../../Makefile.include
|
2017-08-30 12:35:24 +02:00
|
|
|
|
|
|
|
JS_PATH := $(BINDIR)/js/$(MODULE)
|
|
|
|
# add directory of generated *.js.h files to include path
|
|
|
|
CFLAGS += -I$(JS_PATH)
|
|
|
|
|
|
|
|
# generate .js.h header files of .js files
|
|
|
|
JS = $(wildcard *.js)
|
|
|
|
JS_H := $(JS:%.js=$(JS_PATH)/%.js.h)
|
|
|
|
|
|
|
|
$(JS_PATH)/:
|
|
|
|
@mkdir -p $@
|
|
|
|
|
|
|
|
$(JS_H): | $(JS_PATH)/
|
|
|
|
$(JS_H): $(JS_PATH)/%.js.h: %.js
|
|
|
|
xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
|
|
|
|
|
|
|
|
$(RIOTBUILD_CONFIG_HEADER_C): $(JS_H)
|