diff --git a/Mod/bin64/linux/liblua51.so b/Mod/bin64/linux/liblua51.so old mode 100644 new mode 100755 index 92b48d3..5753fe1 Binary files a/Mod/bin64/linux/liblua51.so and b/Mod/bin64/linux/liblua51.so differ diff --git a/src/lua51/Dockerfile b/src/lua51/Dockerfile index 5a55a6d..b98841d 100644 --- a/src/lua51/Dockerfile +++ b/src/lua51/Dockerfile @@ -1,8 +1,8 @@ FROM ubuntu:14.04 -RUN apt-get update && apt-get install g++ cmake -y +RUN apt-get update && apt-get install gcc make libreadline-dev libncurses-dev -y RUN mkdir /home/output -COPY CMakeLists.txt /home/lua51/ +COPY Makefile /home/lua51/ COPY ./src /home/lua51/src -RUN cd /home/lua51 && cmake -DCMAKE_BUILD_TYPE=Release . && cmake --build . -CMD [ "cp", "/home/lua51/liblua51.so", "/home/output/" ] \ No newline at end of file +RUN cd /home/lua51 && make linux +CMD [ "cp", "/home/lua51/src/liblua.so", "/home/output/liblua51.so" ] \ No newline at end of file diff --git a/src/lua51/src/Makefile b/src/lua51/src/Makefile index 897cd80..e5c5e1f 100644 --- a/src/lua51/src/Makefile +++ b/src/lua51/src/Makefile @@ -7,12 +7,12 @@ # Your platform. See PLATS for possible values. PLAT= none -CC= gcc -m32 -CFLAGS= -O2 -Wall $(MYCFLAGS) -DDST +CC= gcc +CFLAGS= -O2 -Wall $(MYCFLAGS) -DDST -fPIC AR= ar rcu RANLIB= ranlib RM= rm -f -LIBS= -lm -fPIC -shared $(MYLIBS) +LIBS= -lm $(MYLIBS) MYCFLAGS= MYLDFLAGS= @@ -23,6 +23,7 @@ MYLIBS= PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris LUA_A= liblua.a +LUA_SO= liblua.so CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o @@ -35,8 +36,8 @@ LUA_O= lua.o LUAC_T= luac LUAC_O= luac.o print.o -ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_O= $(CORE_O) $(LIB_O) +ALL_T= $(LUA_SO) ALL_A= $(LUA_A) default: $(PLAT) @@ -47,6 +48,9 @@ o: $(ALL_O) a: $(ALL_A) +$(LUA_SO): $(CORE_O) $(LIB_O) + $(CC) -o $@ -shared $? + $(LUA_A): $(CORE_O) $(LIB_O) $(AR) $@ $? $(RANLIB) $@