diff options
author | Li Jin <dragon-fly@qq.com> | 2020-06-22 16:50:40 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-06-22 16:50:40 +0800 |
commit | cd2b60b101a398cb9356d746364e70eaed1860f1 (patch) | |
tree | a1fe71b76faabc4883f16905a94164ce5c23e692 /src/lua/makefile | |
parent | 88c1052e700f38cf3d8ad82d469da4c487760b7e (diff) | |
download | yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.tar.gz yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.tar.bz2 yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.zip |
add support for local variable declared with attribute 'close' and 'const' for Lua 5.4.
Diffstat (limited to 'src/lua/makefile')
-rw-r--r-- | src/lua/makefile | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/src/lua/makefile b/src/lua/makefile new file mode 100644 index 0000000..397c817 --- /dev/null +++ b/src/lua/makefile | |||
@@ -0,0 +1,176 @@ | |||
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 | ||
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 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 | lcode.o: lcode.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \ | ||
121 | llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \ | ||
122 | ldo.h lgc.h lstring.h ltable.h lvm.h | ||
123 | lcorolib.o: lcorolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
124 | lctype.o: lctype.c lprefix.h lctype.h lua.h luaconf.h llimits.h | ||
125 | ldblib.o: ldblib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
126 | ldebug.o: ldebug.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
127 | lobject.h ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h \ | ||
128 | ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h lvm.h | ||
129 | ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
130 | lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \ | ||
131 | lparser.h lstring.h ltable.h lundump.h lvm.h | ||
132 | ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \ | ||
133 | ltm.h lzio.h lmem.h lundump.h | ||
134 | lfunc.o: lfunc.c lprefix.h lua.h luaconf.h lfunc.h lobject.h llimits.h \ | ||
135 | lgc.h lstate.h ltm.h lzio.h lmem.h | ||
136 | lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
137 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h | ||
138 | linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h | ||
139 | liolib.o: liolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
140 | llex.o: llex.c lprefix.h lua.h luaconf.h lctype.h llimits.h ldebug.h \ | ||
141 | lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lgc.h llex.h lparser.h \ | ||
142 | lstring.h ltable.h | ||
143 | lmathlib.o: lmathlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
144 | lmem.o: lmem.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
145 | llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h | ||
146 | loadlib.o: loadlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
147 | lobject.o: lobject.c lprefix.h lua.h luaconf.h lctype.h llimits.h \ | ||
148 | ldebug.h lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h \ | ||
149 | lvm.h | ||
150 | lopcodes.o: lopcodes.c lprefix.h lopcodes.h llimits.h lua.h luaconf.h | ||
151 | loslib.o: loslib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
152 | lparser.o: lparser.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \ | ||
153 | llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \ | ||
154 | ldo.h lfunc.h lstring.h lgc.h ltable.h | ||
155 | lstate.o: lstate.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | ||
156 | lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h \ | ||
157 | lstring.h ltable.h | ||
158 | lstring.o: lstring.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \ | ||
159 | lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h | ||
160 | lstrlib.o: lstrlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
161 | ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
162 | llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h | ||
163 | ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
164 | ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
165 | llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h ltable.h lvm.h | ||
166 | lundump.o: lundump.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \ | ||
167 | lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h \ | ||
168 | lundump.h | ||
169 | lutf8lib.o: lutf8lib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | ||
170 | lvm.o: lvm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | ||
171 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h \ | ||
172 | ltable.h lvm.h | ||
173 | lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \ | ||
174 | lobject.h ltm.h lzio.h | ||
175 | |||
176 | # (end of Makefile) | ||