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:
parent
76b9642e5f
commit
b0796d246f
@ -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' > $@
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user