mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Emscripten build strange as ever.
This commit is contained in:
parent
d186aae1f8
commit
c9f76d2673
9
Makefile
9
Makefile
@ -31,7 +31,8 @@ JANET_VERSION?="\"commit-$(shell git log --pretty=format:'%h' -n 1)\""
|
|||||||
|
|
||||||
#CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -g
|
#CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -g
|
||||||
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \
|
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \
|
||||||
-DJANET_VERSION=$(JANET_VERSION)
|
-DJANET_VERSION=$(JANET_VERSION) \
|
||||||
|
-DJANET_NONANBOX
|
||||||
CLIBS=-lm -ldl
|
CLIBS=-lm -ldl
|
||||||
JANET_TARGET=janet
|
JANET_TARGET=janet
|
||||||
JANET_LIBRARY=libjanet.so
|
JANET_LIBRARY=libjanet.so
|
||||||
@ -110,8 +111,10 @@ $(JANET_LIBRARY): $(JANET_CORE_OBJECTS)
|
|||||||
######################
|
######################
|
||||||
|
|
||||||
EMCC=emcc
|
EMCC=emcc
|
||||||
EMCCFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' \
|
EMCCFLAGS=-std=c99 -Wall -Wextra -Isrc/include -O2 \
|
||||||
-s ALLOW_MEMORY_GROWTH=1 -s WASM=1
|
-s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' \
|
||||||
|
-s ALLOW_MEMORY_GROWTH=1 -s WASM=1 \
|
||||||
|
-DJANET_VERSION=$(JANET_VERSION)
|
||||||
JANET_EMTARGET=janet.js
|
JANET_EMTARGET=janet.js
|
||||||
JANET_WEB_SOURCES=$(JANET_CORE_SOURCES) $(JANET_WEBCLIENT_SOURCES)
|
JANET_WEB_SOURCES=$(JANET_CORE_SOURCES) $(JANET_WEBCLIENT_SOURCES)
|
||||||
JANET_EMOBJECTS=$(patsubst %.c,%.bc,$(JANET_WEB_SOURCES))
|
JANET_EMOBJECTS=$(patsubst %.c,%.bc,$(JANET_WEB_SOURCES))
|
||||||
|
@ -98,7 +98,6 @@ extern "C" {
|
|||||||
/* Check emscripten */
|
/* Check emscripten */
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
#define JANET_NO_DYNAMIC_MODULES
|
#define JANET_NO_DYNAMIC_MODULES
|
||||||
#define JANET_NO_NANBOX
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define how global janet state is declared */
|
/* Define how global janet state is declared */
|
||||||
|
Loading…
Reference in New Issue
Block a user