Tentative Randomless-Entropy variant.
[tagua/yd.git] / lua / src / Makefile
blobcd7f6ba2ab67112be72d3c7de73d0d05930c59a9
1 # makefile for building Lua
2 # see ../INSTALL for installation instructions
3 # see ../Makefile and luaconf.h for further customization
5 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
7 # Your platform. See PLATS for possible values.
8 PLAT= none
10 CC= gcc
11 CFLAGS= -O2 -Wall $(MYCFLAGS)
12 AR= ar rcu
13 RANLIB= ranlib
14 RM= rm -f
15 LIBS= -lm $(MYLIBS)
17 MYCFLAGS=
18 MYLDFLAGS=
19 MYLIBS=
21 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
23 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
25 LUA_A= liblua.a
26 CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
27 lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
28 lundump.o lvm.o lzio.o
29 LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
30 lstrlib.o loadlib.o linit.o
32 LUA_T= lua
33 LUA_O= lua.o
35 LUAC_T= luac
36 LUAC_O= luac.o print.o
38 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
39 ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
40 ALL_A= $(LUA_A)
42 default: $(PLAT)
44 all: $(ALL_T)
46 o: $(ALL_O)
48 a: $(ALL_A)
50 $(LUA_A): $(CORE_O) $(LIB_O)
51 $(AR) $@ $?
52 $(RANLIB) $@
54 $(LUA_T): $(LUA_O) $(LUA_A)
55 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
57 $(LUAC_T): $(LUAC_O) $(LUA_A)
58 $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
60 clean:
61 $(RM) $(ALL_T) $(ALL_O)
63 depend:
64 @$(CC) $(CFLAGS) -MM l*.c print.c
66 echo:
67 @echo "PLAT = $(PLAT)"
68 @echo "CC = $(CC)"
69 @echo "CFLAGS = $(CFLAGS)"
70 @echo "AR = $(AR)"
71 @echo "RANLIB = $(RANLIB)"
72 @echo "RM = $(RM)"
73 @echo "MYCFLAGS = $(MYCFLAGS)"
74 @echo "MYLDFLAGS = $(MYLDFLAGS)"
75 @echo "MYLIBS = $(MYLIBS)"
77 # convenience targets for popular platforms
79 none:
80 @echo "Please choose a platform:"
81 @echo " $(PLATS)"
83 aix:
84 $(MAKE) all CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" MYLDFLAGS="-brtl -bexpall"
86 ansi:
87 $(MAKE) all MYCFLAGS=-DLUA_ANSI
89 bsd:
90 $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
92 freebsd:
93 $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
95 generic:
96 $(MAKE) all MYCFLAGS=
98 linux:
99 $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
101 macosx:
102 $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
103 # use this on Mac OS X 10.4
104 # $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" MYLIBS="-lreadline"
106 mingw:
107 $(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \
108 "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
109 "MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
110 $(MAKE) "LUAC_T=luac.exe" luac.exe
112 posix:
113 $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX
115 solaris:
116 $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl"
118 # list targets that do not create files (but not all makes understand .PHONY)
119 .PHONY: all $(PLATS) default o a clean depend echo none
121 # DO NOT DELETE
123 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 \
125 lundump.h lvm.h
126 lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h
127 lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h
128 lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
129 lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \
130 ltable.h
131 ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h
132 ldebug.o: ldebug.c lua.h luaconf.h lapi.h lobject.h llimits.h lcode.h \
133 llex.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \
134 lfunc.h lstring.h lgc.h ltable.h lvm.h
135 ldo.o: ldo.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
136 lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h lstring.h \
137 ltable.h lundump.h lvm.h
138 ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \
139 lzio.h lmem.h lundump.h
140 lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \
141 lstate.h ltm.h lzio.h
142 lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
143 lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
144 linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h
145 liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h
146 llex.o: llex.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h ltm.h \
147 lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h
148 lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h
149 lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
150 ltm.h lzio.h lmem.h ldo.h
151 loadlib.o: loadlib.c lauxlib.h lua.h luaconf.h lobject.h llimits.h \
152 lualib.h
153 lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \
154 ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h
155 lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h
156 loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h
157 lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
158 lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \
159 lfunc.h lstring.h lgc.h ltable.h
160 lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
161 ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h
162 lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \
163 ltm.h lzio.h lstring.h lgc.h
164 lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h
165 ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
166 ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h
167 ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h
168 ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \
169 lmem.h lstring.h lgc.h ltable.h
170 lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h
171 luac.o: luac.c lua.h luaconf.h lauxlib.h ldo.h lobject.h llimits.h \
172 lstate.h ltm.h lzio.h lmem.h lfunc.h lopcodes.h lstring.h lgc.h \
173 lundump.h
174 lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \
175 llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h
176 lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
177 lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h
178 lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
179 lzio.h
180 print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \
181 ltm.h lzio.h lmem.h lopcodes.h lundump.h
183 # (end of Makefile)