projects/aports·blob master · refs

60 lines · 2.0 KiB

1--- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200
2+++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100
3@@ -127,3 +127,18 @@
4 .PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer
5
6 # (end of Makefile)
7+
8+# Use libtool for binary installs, etc.
9+
10+export V
11+export LIBTOOL = ../libtool --quiet --tag=CC
12+# See libtool manual about how to set this
13+
14+alpine_clean:
15+ cd src; $(MAKE) $@
16+
17+alpine_install:
18+ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
19+ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN)
20+ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
21+ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB)
22--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100
23+++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100
24@@ -54,1 +54,1 @@
25-$(LUA_T): $(LUA_O) $(LUA_A)
26+origin$(LUA_T): $(LUA_O) $(LUA_A)
27@@ -57,1 +57,1 @@
28-$(LUAC_T): $(LUAC_O) $(LUA_A)
29+origin$(LUAC_T): $(LUAC_O) $(LUA_A)
30@@ -185,3 +185,30 @@
31 lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
32 lzio.h
33
34+
35+export LIBTOOL = ../libtool --quiet --tag=CC
36+export LIB_VERSION = 0:0:0
37+
38+# The following rules use libtool for compiling and linking in order to
39+# provide shared library support.
40+
41+LIB_NAME = liblua.la
42+LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
43+
44+%.lo %.o: %.c
45+ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
46+
47+$(LIB_NAME): $(LIB_OBJS)
48+ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) -release 5.2 \
49+ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
50+
51+$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
52+ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
53+
54+$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
55+ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
56+
57+alpine_clean:
58+ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac
59+
60+alpine_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)