Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 689598 | Differences between
and this patch

Collapse All | Expand All

(-)old/Makefile (-3 / +10 lines)
Lines 22-28 Link Here
22
22
23
# How to install. If your install program does not support "-p", then you
23
# How to install. If your install program does not support "-p", then you
24
# may have to run ranlib on the installed liblua.a (do "make ranlib").
24
# may have to run ranlib on the installed liblua.a (do "make ranlib").
25
INSTALL= install -p
25
INSTALL?= install -p
26
INSTALL_LINK= ln -s
26
INSTALL_EXEC= $(INSTALL) -m 0755
27
INSTALL_EXEC= $(INSTALL) -m 0755
27
INSTALL_DATA= $(INSTALL) -m 0644
28
INSTALL_DATA= $(INSTALL) -m 0644
28
#
29
#
Lines 33-39 Link Here
33
34
34
# Utilities.
35
# Utilities.
35
MKDIR= mkdir -p
36
MKDIR= mkdir -p
36
RANLIB= ranlib
37
RANLIB?= ranlib
37
38
38
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
39
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
39
40
Lines 47-59 Link Here
47
TO_MAN= lua.1 luac.1
48
TO_MAN= lua.1 luac.1
48
49
49
# Lua version and release.
50
# Lua version and release.
51
M= 5
50
V= 5.1
52
V= 5.1
51
R= 5.1.5
53
R= 5.1.5
52
54
55
# Export to sub-make
56
export M R
57
53
all:	$(PLAT)
58
all:	$(PLAT)
54
59
55
$(PLATS) clean:
60
$(PLATS) clean:
56
	cd src && $(MAKE) $@
61
	cd src && $(MKDIR) .libs && $(MAKE) $@
57
62
58
test:	dummy
63
test:	dummy
59
	src/lua test/hello.lua
64
	src/lua test/hello.lua
Lines 61-66 Link Here
61
install: dummy
66
install: dummy
62
	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
67
	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
63
	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
68
	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
69
	cd src && $(INSTALL_EXEC) $(TO_LIB:.a=.so.$(R)) $(INSTALL_LIB)
70
	cd src && $(INSTALL_LINK) $(TO_LIB:.a=.so.$(R)) $(INSTALL_LIB)/$(TO_LIB:.a=.so.$(M))
64
	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
71
	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
65
	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
72
	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
66
	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
73
	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
(-)old/src/Makefile (-9 / +20 lines)
Lines 7-18 Link Here
7
# Your platform. See PLATS for possible values.
7
# Your platform. See PLATS for possible values.
8
PLAT= none
8
PLAT= none
9
9
10
CC= gcc
10
CC?= gcc
11
CFLAGS= -O2 -Wall $(MYCFLAGS)
11
CFLAGS?= -O2 -Wall $(MYCFLAGS)
12
AR= ar rcu
12
SOFLAGS= -shared -fPIC -DPIC -Wl,-O1 -Wl,--as-needed -Wl,-soname -Wl,$(LUA_A:.a=.so.$(M))
13
RANLIB= ranlib
13
AR?= ar
14
ARFLAGS?= rcu
15
RANLIB?= ranlib
14
RM= rm -f
16
RM= rm -f
15
LIBS= -lm $(MYLIBS)
17
LIBS?= -lm $(MYLIBS)
16
18
17
MYCFLAGS=
19
MYCFLAGS=
18
MYLDFLAGS=
20
MYLDFLAGS=
Lines 35-42 Link Here
35
LUAC_T=	luac
37
LUAC_T=	luac
36
LUAC_O=	luac.o print.o
38
LUAC_O=	luac.o print.o
37
39
38
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
40
LUAS_T=	$(LUA_A:.a=.so.$(R))
39
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
41
LUAS_O=	$(addprefix .libs/,$(CORE_O) $(LIB_O) $(LUA_O))
42
43
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) $(LUAS_O)
44
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUAS_T)
40
ALL_A= $(LUA_A)
45
ALL_A= $(LUA_A)
41
46
42
default: $(PLAT)
47
default: $(PLAT)
Lines 48-56 Link Here
48
a:	$(ALL_A)
53
a:	$(ALL_A)
49
54
50
$(LUA_A): $(CORE_O) $(LIB_O)
55
$(LUA_A): $(CORE_O) $(LIB_O)
51
	$(AR) $@ $(CORE_O) $(LIB_O)	# DLL needs all object files
56
	$(AR) $(ARFLAGS) $@ $(CORE_O) $(LIB_O)	# DLL needs all object files
52
	$(RANLIB) $@
57
	$(RANLIB) $@
53
58
59
$(LUAS_T): $(LUAS_O)
60
	$(CC) -o $@ $(SOFLAGS) $(LUAS_O) $(LIBS)
61
54
$(LUA_T): $(LUA_O) $(LUA_A)
62
$(LUA_T): $(LUA_O) $(LUA_A)
55
	$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
63
	$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
56
64
Lines 67-73 Link Here
67
	@echo "PLAT = $(PLAT)"
75
	@echo "PLAT = $(PLAT)"
68
	@echo "CC = $(CC)"
76
	@echo "CC = $(CC)"
69
	@echo "CFLAGS = $(CFLAGS)"
77
	@echo "CFLAGS = $(CFLAGS)"
70
	@echo "AR = $(AR)"
78
	@echo "AR = $(AR) $(ARFLAGS)"
71
	@echo "RANLIB = $(RANLIB)"
79
	@echo "RANLIB = $(RANLIB)"
72
	@echo "RM = $(RM)"
80
	@echo "RM = $(RM)"
73
	@echo "MYCFLAGS = $(MYCFLAGS)"
81
	@echo "MYCFLAGS = $(MYCFLAGS)"
Lines 120-125 Link Here
120
128
121
# DO NOT DELETE
129
# DO NOT DELETE
122
130
131
.libs/%o: %c
132
	$(CC) $(CFLAGS) -fPIC -DPIC -c -o $@ $<
133
123
lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \
134
lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \
124
  lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \
135
  lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \
125
  lundump.h lvm.h
136
  lundump.h lvm.h

Return to bug 689598