diff options
Diffstat (limited to 'src/lua-5.3/makefile')
-rw-r--r-- | src/lua-5.3/makefile | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/src/lua-5.3/makefile b/src/lua-5.3/makefile new file mode 100644 index 0000000..0835d9c --- /dev/null +++ b/src/lua-5.3/makefile | |||
@@ -0,0 +1,177 @@ | |||
1 | # makefile for building Lua | ||
2 | # see INSTALL for installation instructions | ||
3 | # see ../Makefile and luaconf.h for further customization | ||
4 | |||
5 | # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= | ||
6 | |||
7 | # Warnings valid for both C and C++ | ||
8 | CWARNSCPP= \ | ||
9 | -pedantic \ | ||
10 | -Wextra \ | ||
11 | -Wshadow \ | ||
12 | -Wsign-compare \ | ||
13 | -Wundef \ | ||
14 | -Wwrite-strings \ | ||
15 | -Wredundant-decls \ | ||
16 | -Wdisabled-optimization \ | ||
17 | -Waggregate-return \ | ||
18 | -Wdouble-promotion \ | ||
19 | #-Wno-aggressive-loop-optimizations # not accepted by clang \ | ||
20 | #-Wlogical-op # not accepted by clang \ | ||
21 | # the next warnings generate too much noise, so they are disabled | ||
22 | # -Wconversion -Wno-sign-conversion \ | ||
23 | # -Wsign-conversion \ | ||
24 | # -Wconversion \ | ||
25 | # -Wstrict-overflow=2 \ | ||
26 | # -Wformat=2 \ | ||
27 | # -Wcast-qual \ | ||
28 | |||
29 | # The next warnings are neither valid nor needed for C++ | ||
30 | CWARNSC= -Wdeclaration-after-statement \ | ||
31 | -Wmissing-prototypes \ | ||
32 | -Wnested-externs \ | ||
33 | -Wstrict-prototypes \ | ||
34 | -Wc++-compat \ | ||
35 | -Wold-style-definition \ | ||
36 | |||
37 | |||
38 | CWARNS= $(CWARNSCPP) $(CWARNSC) | ||
39 | |||
40 | # -mtune=native -fomit-frame-pointer | ||
41 | # -fno-stack-protector | ||
42 | LOCAL = $(TESTS) $(CWARNS) -g | ||
43 | |||
44 | |||
45 | |||
46 | # enable Linux goodies | ||
47 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1 | ||
48 | MYLDFLAGS= $(LOCAL) -Wl | ||
49 | MYLIBS= -ldl -lreadline | ||
50 | |||
51 | |||
52 | CC= gcc | ||
53 | CFLAGS= -Wall -O2 $(MYCFLAGS) | ||
54 | AR= ar rc | ||
55 | RANLIB= ranlib | ||
56 | RM= rm -f | ||
57 | |||
58 | |||
59 | |||
60 | # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= | ||
61 | |||
62 | |||
63 | LIBS = -lm | ||
64 | |||
65 | CORE_T= liblua.a | ||
66 | CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ | ||
67 | lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ | ||
68 | ltm.o lundump.o lvm.o lzio.o | ||
69 | AUX_O= lauxlib.o | ||
70 | LIB_O= lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o \ | ||
71 | lutf8lib.o lbitlib.o loadlib.o lcorolib.o linit.o | ||
72 | |||
73 | ALL_T= $(CORE_T) | ||
74 | ALL_O= $(CORE_O) $(AUX_O) $(LIB_O) | ||
75 | ALL_A= $(CORE_T) | ||
76 | |||
77 | all: $(ALL_T) | ||
78 | |||
79 | o: $(ALL_O) | ||
80 | |||
81 | a: $(ALL_A) | ||
82 | |||
83 | $(CORE_T): $(CORE_O) $(AUX_O) $(LIB_O) | ||
84 | $(AR) $@ $? | ||
85 | $(RANLIB) $@ | ||
86 | |||
87 | $(LUA_T): $(LUA_O) $(CORE_T) | ||
88 | $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(CORE_T) $(LIBS) $(MYLIBS) $(DL) | ||
89 | |||
90 | $(LUAC_T): $(LUAC_O) $(CORE_T) | ||
91 | $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(CORE_T) $(LIBS) $(MYLIBS) | ||
92 | |||
93 | clean: | ||
94 | $(RM) $(ALL_T) $(ALL_O) | ||
95 | |||
96 | depend: | ||
97 | @$(CC) $(CFLAGS) -MM *.c | ||
98 | |||
99 | echo: | ||
100 | @echo "CC = $(CC)" | ||
101 | @echo "CFLAGS = $(CFLAGS)" | ||
102 | @echo "AR = $(AR)" | ||
103 | @echo "RANLIB = $(RANLIB)" | ||
104 | @echo "RM = $(RM)" | ||
105 | @echo "MYCFLAGS = $(MYCFLAGS)" | ||
106 | @echo "MYLDFLAGS = $(MYLDFLAGS)" | ||
107 | @echo "MYLIBS = $(MYLIBS)" | ||
108 | @echo "DL = $(DL)" | ||
109 | |||
110 | $(ALL_O): makefile | ||
111 | |||
112 | # DO NOT EDIT | ||
113 | # automatically made with 'gcc -MM l*.c' | ||
114 | |||
115 | lapi.o: lapi.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
116 | lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h \ | ||
117 | ltable.h lundump.h lvm.h | ||
118 | lauxlib.o: lauxlib.c lprefix.h lua.h luaconf.h lauxlib.h | ||
119 | lbaselib.o: lbaselib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
120 | lbitlib.o: lbitlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
121 | lcode.o: lcode.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \ | ||
122 | llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \ | ||
123 | ldo.h lgc.h lstring.h ltable.h lvm.h | ||
124 | lcorolib.o: lcorolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
125 | lctype.o: lctype.c lprefix.h lctype.h lua.h luaconf.h llimits.h | ||
126 | ldblib.o: ldblib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
127 | ldebug.o: ldebug.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
128 | lobject.h ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h \ | ||
129 | ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h lvm.h | ||
130 | ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
131 | lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \ | ||
132 | lparser.h lstring.h ltable.h lundump.h lvm.h | ||
133 | ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \ | ||
134 | ltm.h lzio.h lmem.h lundump.h | ||
135 | lfunc.o: lfunc.c lprefix.h lua.h luaconf.h lfunc.h lobject.h llimits.h \ | ||
136 | lgc.h lstate.h ltm.h lzio.h lmem.h | ||
137 | lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
138 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h | ||
139 | linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h | ||
140 | liolib.o: liolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
141 | llex.o: llex.c lprefix.h lua.h luaconf.h lctype.h llimits.h ldebug.h \ | ||
142 | lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lgc.h llex.h lparser.h \ | ||
143 | lstring.h ltable.h | ||
144 | lmathlib.o: lmathlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
145 | lmem.o: lmem.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
146 | llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h | ||
147 | loadlib.o: loadlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
148 | lobject.o: lobject.c lprefix.h lua.h luaconf.h lctype.h llimits.h \ | ||
149 | ldebug.h lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h \ | ||
150 | lvm.h | ||
151 | lopcodes.o: lopcodes.c lprefix.h lopcodes.h llimits.h lua.h luaconf.h | ||
152 | loslib.o: loslib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
153 | lparser.o: lparser.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \ | ||
154 | llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \ | ||
155 | ldo.h lfunc.h lstring.h lgc.h ltable.h | ||
156 | lstate.o: lstate.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
157 | lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h \ | ||
158 | lstring.h ltable.h | ||
159 | lstring.o: lstring.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \ | ||
160 | lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h | ||
161 | lstrlib.o: lstrlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
162 | ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
163 | llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h | ||
164 | ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
165 | ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
166 | llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h ltable.h lvm.h | ||
167 | lundump.o: lundump.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \ | ||
168 | lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h \ | ||
169 | lundump.h | ||
170 | lutf8lib.o: lutf8lib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
171 | lvm.o: lvm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
172 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h \ | ||
173 | ltable.h lvm.h | ||
174 | lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \ | ||
175 | lobject.h ltm.h lzio.h | ||
176 | |||
177 | # (end of Makefile) | ||