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 |