75 lines
1.9 KiB
Diff
75 lines
1.9 KiB
Diff
diff -uNr lua-5.4.0/src/Makefile lua-5.4.0.mod/src/Makefile
|
|
--- lua-5.4.0/src/Makefile 2020-04-15 16:00:29.000000000 +0300
|
|
+++ lua-5.4.0.mod/src/Makefile 2020-10-01 15:51:28.586656828 +0300
|
|
@@ -4,27 +4,18 @@
|
|
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
|
|
|
|
# Your platform. See PLATS for possible values.
|
|
-PLAT= guess
|
|
+PLAT= linux
|
|
|
|
-CC= gcc -std=gnu99
|
|
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
|
|
-LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
+CC ?= gcc -std=gnu99
|
|
+CFLAGS += $(SYSCFLAGS)
|
|
+LDFLAGS += $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
|
|
|
-AR= ar rcu
|
|
-RANLIB= ranlib
|
|
+AR ?= ar rcu
|
|
+RANLIB ?= ranlib
|
|
RM= rm -f
|
|
UNAME= uname
|
|
|
|
-SYSCFLAGS=
|
|
-SYSLDFLAGS=
|
|
-SYSLIBS=
|
|
-
|
|
-MYCFLAGS=
|
|
-MYLDFLAGS=
|
|
-MYLIBS=
|
|
-MYOBJS=
|
|
-
|
|
# Special flags for compiler modules; -Os reduces code size.
|
|
CMCFLAGS= -Os
|
|
|
|
@@ -32,19 +23,20 @@
|
|
|
|
PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
|
|
|
|
-LUA_A= liblua.a
|
|
+LUA_A= liblua5.4.a
|
|
+LUA_SO= liblua5.4.so
|
|
CORE_O= lapi.o lcode.o lctype.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
|
|
LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
|
|
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
|
|
|
-LUA_T= lua
|
|
+LUA_T= lua5.4
|
|
LUA_O= lua.o
|
|
|
|
-LUAC_T= luac
|
|
+LUAC_T= luac5.4
|
|
LUAC_O= luac.o
|
|
|
|
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
|
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
|
|
ALL_A= $(LUA_A)
|
|
|
|
# Targets start here.
|
|
@@ -60,6 +52,11 @@
|
|
$(AR) $@ $(BASE_O)
|
|
$(RANLIB) $@
|
|
|
|
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
|
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
|
|
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
|
|
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
|
|
+
|
|
$(LUA_T): $(LUA_O) $(LUA_A)
|
|
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
|