summaryrefslogtreecommitdiff
path: root/lua53/liblua.so.patch
blob: f9e24f3285876129863dd7b02c21217377ccdb30 (plain)
    1 diff --git a/Makefile b/Makefile
    2 index 7fa91c8..dccf485 100644
    3 --- a/Makefile
    4 +++ b/Makefile
    5 @@ -52,7 +52,7 @@ R= $V.0
    6  all:	$(PLAT)
    7  
    8  $(PLATS) clean:
    9 -	cd src && $(MAKE) $@
   10 +	cd src && $(MAKE) $@ V=$(V) R=$(R)
   11  
   12  test:	dummy
   13  	src/lua -v
   14 diff --git a/src/Makefile b/src/Makefile
   15 index 2e7a412..fa5769f 100644
   16 --- a/src/Makefile
   17 +++ b/src/Makefile
   18 @@ -29,6 +29,7 @@ MYOBJS=
   19  PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
   20  
   21  LUA_A=	liblua.a
   22 +LUA_SO= liblua.so
   23  CORE_O=	lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
   24  	lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
   25  	ltm.o lundump.o lvm.o lzio.o
   26 @@ -43,7 +44,7 @@ LUAC_T=	luac
   27  LUAC_O=	luac.o
   28  
   29  ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
   30 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
   31 +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
   32  ALL_A= $(LUA_A)
   33  
   34  # Targets start here.
   35 @@ -59,6 +60,12 @@ $(LUA_A): $(BASE_O)
   36  	$(AR) $@ $(BASE_O)
   37  	$(RANLIB) $@
   38  
   39 +$(LUA_SO): $(CORE_O) $(LIB_O)
   40 +	$(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
   41 +	ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
   42 +	ln -sf $(LUA_SO).$(R) $(LUA_SO)
   43 +
   44 +
   45  $(LUA_T): $(LUA_O) $(LUA_A)
   46  	$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
   47  
   48 diff --git a/src/luaconf.h b/src/luaconf.h
   49 index fd28d21..e2662cc 100644
   50 --- a/src/luaconf.h
   51 +++ b/src/luaconf.h
   52 @@ -175,7 +175,7 @@
   53  
   54  #else			/* }{ */
   55  
   56 -#define LUA_ROOT	"/usr/local/"
   57 +#define LUA_ROOT	"/usr/"
   58  #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR "/"
   59  #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR "/"
   60  #define LUA_PATH_DEFAULT  \

Generated by cgit