summaryrefslogtreecommitdiff
path: root/ThirdParty/tolua_runtime/build_win64.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ThirdParty/tolua_runtime/build_win64.sh')
-rw-r--r--ThirdParty/tolua_runtime/build_win64.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/ThirdParty/tolua_runtime/build_win64.sh b/ThirdParty/tolua_runtime/build_win64.sh
new file mode 100644
index 0000000..967cce5
--- /dev/null
+++ b/ThirdParty/tolua_runtime/build_win64.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+# 64 Bit Version
+mkdir -p window/x86_64
+
+cd luajit-2.1
+mingw32-make clean
+
+mingw32-make BUILDMODE=static CC="gcc -m64 -O2" XCFLAGS=-DLUAJIT_ENABLE_GC64
+cp src/libluajit.a ../window/x86_64/libluajit.a
+mingw32-make clean
+
+cd ..
+
+gcc -m64 -O2 -std=gnu99 -shared \
+ tolua.c \
+ int64.c \
+ uint64.c \
+ pb.c \
+ lpeg.c \
+ struct.c \
+ cjson/strbuf.c \
+ cjson/lua_cjson.c \
+ cjson/fpconv.c \
+ luasocket/auxiliar.c \
+ luasocket/buffer.c \
+ luasocket/except.c \
+ luasocket/inet.c \
+ luasocket/io.c \
+ luasocket/luasocket.c \
+ luasocket/mime.c \
+ luasocket/options.c \
+ luasocket/select.c \
+ luasocket/tcp.c \
+ luasocket/timeout.c \
+ luasocket/udp.c \
+ luasocket/wsocket.c \
+ -o Plugins/x86_64/tolua.dll \
+ -I./ \
+ -Iluajit-2.1/src \
+ -Iluasocket \
+ -lws2_32 \
+ -Wl,--whole-archive window/x86_64/libluajit.a -Wl,--no-whole-archive -static-libgcc -static-libstdc++ \ No newline at end of file