1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

examples/javascript: make use of blob.inc.mk

This commit is contained in:
Kaspar Schleiser 2019-11-18 21:12:49 +01:00
parent 76b9642e5f
commit b0796d246f
2 changed files with 2 additions and 16 deletions

View File

@ -20,21 +20,7 @@ endif
# Add the package for Jerryscript
USEPKG += jerryscript
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)
BUILDDEPS += $(JS_H) $(JS_PATH)/
BLOBS += $(wildcard *.js)
include $(RIOTBASE)/Makefile.include
$(JS_PATH)/:
$(Q)mkdir -p $@
$(JS_H): $(JS_PATH)/%.js.h: %.js | $(JS_PATH)/
$(Q)xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@

View File

@ -27,7 +27,7 @@
#include "jerryscript-ext/handler.h"
/* include header generated from main.js */
#include "main.js.h"
#include "blob/main.js.h"
int js_run(const jerry_char_t *script, size_t script_size)
{