Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fesily committed Mar 4, 2024
2 parents 4681ac7 + 8245bb3 commit f6c4311
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
Binary file modified Mod/bin64/linux/liblua51.so
100644 → 100755
Binary file not shown.
8 changes: 4 additions & 4 deletions src/lua51/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/" ]
RUN cd /home/lua51 && make linux
CMD [ "cp", "/home/lua51/src/liblua.so", "/home/output/liblua51.so" ]
14 changes: 9 additions & 5 deletions src/lua51/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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) $@
Expand Down

0 comments on commit f6c4311

Please sign in to comment.