-
Notifications
You must be signed in to change notification settings - Fork 0
/
lua.diff
31 lines (24 loc) · 1.09 KB
/
lua.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/makefile b/makefile
index 9be23925..c00c47b5 100644
--- a/makefile
+++ b/makefile
@@ -52,7 +52,7 @@ LOCAL = $(TESTS) $(CWARNS)
# enable Linux goodies
-MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE
+MYCFLAGS= $(LOCAL) -DLUA_USE_LINUX -DLUA_USE_READLINE
MYLDFLAGS= $(LOCAL) -Wl,-E
MYLIBS= -ldl -lreadline
@@ -78,7 +78,7 @@ AUX_O= lauxlib.o
LIB_O= lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o \
lutf8lib.o loadlib.o lcorolib.o linit.o
-LUA_T= lua
+LUA_T= ../build/lua-web-bin.js
LUA_O= lua.o
# LUAC_T= luac
@@ -100,7 +100,7 @@ $(CORE_T): $(CORE_O) $(AUX_O) $(LIB_O)
$(RANLIB) $@
$(LUA_T): $(LUA_O) $(CORE_T)
- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(CORE_T) $(LIBS) $(MYLIBS) $(DL)
+ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(CORE_T) $(LIBS) $(MYLIBS) $(DL) -s EXPORTED_FUNCTIONS="['_lua_init', '_lua_run', '_lua_destroy']" -s EXTRA_EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap']" -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=128MB -s DISABLE_EXCEPTION_CATCHING=0
$(LUAC_T): $(LUAC_O) $(CORE_T)
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(CORE_T) $(LIBS) $(MYLIBS)