61 lines
1.5 KiB
Diff
61 lines
1.5 KiB
Diff
diff -r -u ../lua-5.3.3/src/Makefile ./src/Makefile
|
|
--- ../lua-5.3.3/src/Makefile 2015-05-27 13:10:11.000000000 +0200
|
|
+++ ./src/Makefile 2017-01-18 00:26:04.985042439 +0100
|
|
@@ -4,31 +4,20 @@
|
|
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
|
|
|
|
# Your platform. See PLATS for possible values.
|
|
-PLAT= none
|
|
+PLAT= linux
|
|
|
|
-CC= gcc -std=gnu99
|
|
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
|
|
+CFLAGS+= $(SYSCFLAGS)
|
|
-LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
+LDFLAGS+= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
|
|
|
-AR= ar rcu
|
|
-RANLIB= ranlib
|
|
RM= rm -f
|
|
|
|
-SYSCFLAGS=
|
|
-SYSLDFLAGS=
|
|
-SYSLIBS=
|
|
-
|
|
-MYCFLAGS=
|
|
-MYLDFLAGS=
|
|
-MYLIBS=
|
|
-MYOBJS=
|
|
-
|
|
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
|
|
|
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
|
|
|
|
LUA_A= liblua.a
|
|
+LUA_SO= liblua.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
|
|
@@ -43,7 +32,7 @@
|
|
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.
|
|
@@ -59,6 +48,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)
|
|
|