interplane.Get Omega
Read in your language

lua

[Ported from github.com/lua/lua] Cast in 'rl_readline_name'

Brought by drakestapleton

branch master Branches Tags History

lua / makefile

224 lines · 8014 bytes Raw Blame History
1# Developer's makefile for building Lua
2# see luaconf.h for further customization
3
4# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
5
6# Warnings valid for both C and C++
7CWARNSCPP= \
8 -Wfatal-errors \
9 -Wextra \
10 -Wshadow \
11 -Wundef \
12 -Wwrite-strings \
13 -Wredundant-decls \
14 -Wdisabled-optimization \
15 -Wdouble-promotion \
16 -Wmissing-declarations \
17 -Wconversion \
18 # the next warnings might be useful sometimes,
19 # but usually they generate too much noise
20 # -Wstrict-overflow=2 \
21 # -Werror \
22 # -pedantic # warns if we use jump tables \
23 # -Wformat=2 \
24 # -Wcast-qual \
25
26
27# Warnings for gcc, not valid for clang
28CWARNGCC= \
29 -Wlogical-op \
30 -Wno-aggressive-loop-optimizations \
31
32
33# The next warnings are neither valid nor needed for C++
34CWARNSC= -Wdeclaration-after-statement \
35 -Wmissing-prototypes \
36 -Wnested-externs \
37 -Wstrict-prototypes \
38 -Wc++-compat \
39 -Wold-style-definition \
40
41
42CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC)
43
44# Some useful compiler options for internal tests:
45# -DLUAI_ASSERT turns on all assertions inside Lua.
46# -DHARDSTACKTESTS forces a reallocation of the stack at every point where
47# the stack can be reallocated.
48# -DHARDMEMTESTS forces a full collection at all points where the collector
49# can run.
50# -DEMERGENCYGCTESTS forces an emergency collection at every single allocation.
51# -DEXTERNMEMCHECK removes internal consistency checking of blocks being
52# deallocated (useful when an external tool like valgrind does the check).
53# -DMAXINDEXRK=k limits range of constants in RK instruction operands.
54# -DLUA_COMPAT_5_3
55
56# -pg -malign-double
57# -DLUA_USE_CTYPE -DLUA_USE_APICHECK
58
59# The following options help detect "undefined behavior"s that seldom
60# create problems; some are only available in newer gcc versions. To
61# use some of them, we also have to define an environment variable
62# ASAN_OPTIONS="detect_invalid_pointer_pairs=2".
63# -fsanitize=undefined (you may need to add "-lubsan" to libs)
64# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare
65
66# Test mode: Add test library, turn on asserts, redefine several
67# constants ("to give some bugs a chance"), track memory use, and add
68# debug information.
69# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
70
71LOCAL = $(TESTS) $(CWARNS)
72
73
74# To enable Linux goodies, -DLUA_USE_LINUX
75# For C89, "-std=c89 -DLUA_USE_C89"
76# Note that Linux/Posix options are not compatible with C89
77# (For 32-bit, add option "-m32" to MYCFLAGS and MYLDFLAGS.)
78MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
79MYLDFLAGS= -Wl,-E
80MYLIBS= -ldl
81
82
83CC= gcc
84# (Optionally we can use -march=native -mno-avx512f.)
85CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common
86AR= ar rc
87RANLIB= ranlib
88RM= rm -f
89
90
91
92# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
93
94
95LIBS = -lm
96
97CORE_T= liblua.a
98CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
99 lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
100 ltm.o lundump.o lvm.o lzio.o ltests.o
101AUX_O= lauxlib.o
102LIB_O= lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o \
103 lutf8lib.o loadlib.o lcorolib.o linit.o
104
105LUA_T= lua
106LUA_O= lua.o
107
108
109ALL_T= $(CORE_T) $(LUA_T)
110ALL_O= $(CORE_O) $(LUA_O) $(AUX_O) $(LIB_O)
111ALL_A= $(CORE_T)
112
113all: $(ALL_T)
114 touch all
115
116o: $(ALL_O)
117
118a: $(ALL_A)
119
120$(CORE_T): $(CORE_O) $(AUX_O) $(LIB_O)
121 $(AR) $@ $?
122 $(RANLIB) $@
123
124$(LUA_T): $(LUA_O) $(CORE_T)
125 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(CORE_T) $(LIBS) $(MYLIBS) $(DL)
126
127
128clean:
129 $(RM) $(ALL_T) $(ALL_O)
130
131depend:
132 @$(CC) $(CFLAGS) -MM *.c
133
134echo:
135 @echo "CC = $(CC)"
136 @echo "CFLAGS = $(CFLAGS)"
137 @echo "AR = $(AR)"
138 @echo "RANLIB = $(RANLIB)"
139 @echo "RM = $(RM)"
140 @echo "MYCFLAGS = $(MYCFLAGS)"
141 @echo "MYLDFLAGS = $(MYLDFLAGS)"
142 @echo "MYLIBS = $(MYLIBS)"
143 @echo "DL = $(DL)"
144
145$(ALL_O): makefile ltests.h
146
147# DO NOT EDIT
148# automatically made with 'gcc -MM l*.c'
149
150lapi.o: lapi.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
151 lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h \
152 ltable.h lundump.h lvm.h
153lauxlib.o: lauxlib.c lprefix.h lua.h luaconf.h lauxlib.h llimits.h
154lbaselib.o: lbaselib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
155 llimits.h
156lcode.o: lcode.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
157 llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
158 ldo.h lgc.h lstring.h ltable.h lvm.h lopnames.h
159lcorolib.o: lcorolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
160 llimits.h
161lctype.o: lctype.c lprefix.h lctype.h lua.h luaconf.h llimits.h
162ldblib.o: ldblib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h llimits.h
163ldebug.o: ldebug.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
164 lobject.h ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h \
165 ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h lvm.h
166ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
167 lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \
168 lparser.h lstring.h ltable.h lundump.h lvm.h
169ldump.o: ldump.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
170 lobject.h ltm.h lzio.h lmem.h lgc.h ltable.h lundump.h
171lfunc.o: lfunc.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
173lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
174 llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
175linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h llimits.h
176liolib.o: liolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h llimits.h
177llex.o: llex.c lprefix.h lua.h luaconf.h lctype.h llimits.h ldebug.h \
178 lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lgc.h llex.h lparser.h \
179 lstring.h ltable.h
180lmathlib.o: lmathlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
181 llimits.h
182lmem.o: lmem.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
183 llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h
184loadlib.o: loadlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
185 llimits.h
186lobject.o: lobject.c lprefix.h lua.h luaconf.h lctype.h llimits.h \
187 ldebug.h lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h \
188 lvm.h
189lopcodes.o: lopcodes.c lprefix.h lopcodes.h llimits.h lua.h luaconf.h \
190 lobject.h
191loslib.o: loslib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h llimits.h
192lparser.o: lparser.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
193 llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
194 ldo.h lfunc.h lstring.h lgc.h ltable.h
195lstate.o: lstate.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
196 lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h \
197 lstring.h ltable.h
198lstring.o: lstring.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
199 lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h
200lstrlib.o: lstrlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
201 llimits.h
202ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
203 llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
204ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
205 llimits.h
206ltests.o: ltests.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
207 lobject.h ltm.h lzio.h lmem.h lauxlib.h lcode.h llex.h lopcodes.h \
208 lparser.h lctype.h ldebug.h ldo.h lfunc.h lopnames.h lstring.h lgc.h \
209 ltable.h lualib.h
210ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
211 llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
212lua.o: lua.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h llimits.h
213lundump.o: lundump.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
214 lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h \
215 ltable.h lundump.h
216lutf8lib.o: lutf8lib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h \
217 llimits.h
218lvm.o: lvm.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
219 lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \
220 lstring.h ltable.h lvm.h ljumptab.h
221lzio.o: lzio.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
222 lobject.h ltm.h lzio.h lmem.h
223
224# (end of Makefile)