2015-11-05 09:23:40 +01:00
|
|
|
diff --git a/Makefile b/Makefile
|
2020-07-13 14:55:07 +02:00
|
|
|
index 416f444..eeaff03 100644
|
2015-11-05 09:23:40 +01:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -52,7 +52,7 @@ R= $V.0
|
2014-02-17 03:03:38 +01:00
|
|
|
all: $(PLAT)
|
|
|
|
|
2020-07-13 14:55:07 +02:00
|
|
|
$(PLATS) help test clean:
|
|
|
|
- @cd src && $(MAKE) $@
|
|
|
|
+ @cd src && $(MAKE) $@ V=$(V) R=$(R)
|
2014-02-17 03:03:38 +01:00
|
|
|
|
2020-07-13 14:55:07 +02:00
|
|
|
install: dummy
|
|
|
|
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
2015-11-05 09:23:40 +01:00
|
|
|
diff --git a/src/Makefile b/src/Makefile
|
2020-07-13 14:55:07 +02:00
|
|
|
index 514593d..372a6dc 100644
|
2015-11-05 09:23:40 +01:00
|
|
|
--- a/src/Makefile
|
|
|
|
+++ b/src/Makefile
|
2020-07-13 14:55:07 +02:00
|
|
|
@@ -33,6 +33,7 @@ CMCFLAGS= -Os
|
|
|
|
PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
|
2014-02-17 03:03:38 +01:00
|
|
|
|
|
|
|
LUA_A= liblua.a
|
|
|
|
+LUA_SO= liblua.so
|
2020-07-13 14:55:07 +02:00
|
|
|
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)
|
|
|
|
@@ -44,7 +45,7 @@ LUAC_T= luac
|
2014-02-17 03:03:38 +01:00
|
|
|
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.
|
2020-07-13 14:55:07 +02:00
|
|
|
@@ -60,6 +61,12 @@ $(LUA_A): $(BASE_O)
|
2014-02-17 03:03:38 +01:00
|
|
|
$(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)
|
|
|
|
|
2015-11-05 09:23:40 +01:00
|
|
|
diff --git a/src/luaconf.h b/src/luaconf.h
|
2020-07-13 14:55:07 +02:00
|
|
|
index bdf927e..7e15198 100644
|
2015-11-05 09:23:40 +01:00
|
|
|
--- a/src/luaconf.h
|
|
|
|
+++ b/src/luaconf.h
|
2020-07-13 14:55:07 +02:00
|
|
|
@@ -227,7 +227,7 @@
|
2015-11-05 09:23:40 +01:00
|
|
|
|
|
|
|
#else /* }{ */
|
|
|
|
|
|
|
|
-#define LUA_ROOT "/usr/local/"
|
|
|
|
+#define LUA_ROOT "/usr/"
|
|
|
|
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
|
|
|
|
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
|
2020-07-13 14:55:07 +02:00
|
|
|
|