forked from pchote/Eluant
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathliblua.linux.patch
More file actions
30 lines (25 loc) · 834 Bytes
/
liblua.linux.patch
File metadata and controls
30 lines (25 loc) · 834 Bytes
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
--- lua-5.1.5-orig/src/Makefile 2022-12-18 16:31:11
+++ lua-5.1.5/src/Makefile 2022-12-18 17:26:07
@@ -8,7 +8,7 @@
PLAT= none
CC= gcc
-CFLAGS= -O2 -Wall $(MYCFLAGS)
+CFLAGS= -fPIC -O2 -Wall $(MYCFLAGS)
AR= ar rcu
RANLIB= ranlib
RM= rm -f
@@ -22,7 +22,7 @@
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-LUA_A= liblua.a
+LUA_A= 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
@@ -48,8 +48,7 @@
a: $(ALL_A)
$(LUA_A): $(CORE_O) $(LIB_O)
- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
- $(RANLIB) $@
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO) -o $@ $? -lm $(MYLDFLAGS)
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)