2017-03-22 16:20:07 +01:00
|
|
|
# application name
|
|
|
|
APPLICATION = riot_javascript
|
|
|
|
|
|
|
|
# default BOARD environment
|
|
|
|
BOARD ?= native
|
|
|
|
|
2018-04-25 17:13:46 +02:00
|
|
|
# This has to be the absolute path to the RIOT base directory:
|
|
|
|
RIOTBASE ?= $(CURDIR)/../..
|
|
|
|
|
2018-09-14 16:16:32 +02:00
|
|
|
BOARD_INSUFFICIENT_MEMORY := airfy-beacon b-l072z-lrwan1 blackpill bluepill calliope-mini \
|
2018-09-18 18:07:07 +02:00
|
|
|
cc2650-launchpad cc2650stk hifive1 lobaro-lorabox \
|
2018-11-17 09:55:54 +01:00
|
|
|
maple-mini microbit nrf51dk nrf51dongle nrf6310 \
|
2018-09-18 18:07:07 +02:00
|
|
|
nucleo-f030r8 nucleo-f070rb nucleo-f072rb \
|
|
|
|
nucleo-f103rb nucleo-f302r8 nucleo-f334r8 \
|
|
|
|
nucleo-f410rb nucleo-l053r8 nucleo-l073rz \
|
|
|
|
nucleo-f031k6 nucleo-f042k6 nucleo-f303k8 \
|
2019-01-21 17:11:05 +01:00
|
|
|
nucleo-l031k6 opencm904 saml10-xpro saml11-xpro \
|
|
|
|
spark-core stm32f0discovery yunjia-nrf51822
|
2017-03-22 16:20:07 +01:00
|
|
|
|
2019-03-14 12:10:05 +01:00
|
|
|
BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-nano \
|
|
|
|
arduino-uno chronos \
|
2017-11-15 11:31:49 +01:00
|
|
|
msb-430 msb-430h telosb waspmote-pro wsn430-v1_3b \
|
2018-03-24 04:09:50 +01:00
|
|
|
wsn430-v1_4 z1 pic32-wifire pic32-clicker jiminy-mega256rfr2 \
|
|
|
|
mega-xplained
|
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:
|
2017-11-19 14:12:25 +01:00
|
|
|
DEVELHELP ?= 1
|
2017-03-22 16:20:07 +01:00
|
|
|
|
2018-01-09 10:25:31 +01:00
|
|
|
ifneq ($(BOARD),native)
|
2017-03-22 16:20:07 +01:00
|
|
|
# Set stack size to something (conservatively) enormous
|
|
|
|
CFLAGS += -DTHREAD_STACKSIZE_MAIN=9092
|
2018-01-09 10:25:31 +01:00
|
|
|
endif
|
2017-03-22 16:20:07 +01:00
|
|
|
|
|
|
|
# Add the package for Jerryscript
|
|
|
|
USEPKG += jerryscript
|
|
|
|
|
2018-11-22 16:30:29 +01:00
|
|
|
JS_PATH = $(BINDIR)/js/$(MODULE)
|
2017-08-30 12:35:24 +02:00
|
|
|
|
|
|
|
# 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)
|
2018-11-22 16:30:29 +01:00
|
|
|
JS_H = $(JS:%.js=$(JS_PATH)/%.js.h)
|
2017-08-30 12:35:24 +02:00
|
|
|
|
2018-11-22 16:30:29 +01:00
|
|
|
BUILDDEPS += $(JS_H) $(JS_PATH)/
|
2017-08-30 12:35:24 +02:00
|
|
|
|
2018-11-22 16:30:29 +01:00
|
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
|
|
|
|
|
$(JS_PATH)/:
|
|
|
|
$(Q)mkdir -p $@
|
2017-08-30 12:35:24 +02:00
|
|
|
|
2018-11-22 16:30:29 +01:00
|
|
|
$(JS_H): $(JS_PATH)/%.js.h: %.js | $(JS_PATH)/
|
|
|
|
$(Q)xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
|