]> git.saurik.com Git - redis.git/blame - deps/lua/src/Makefile
Merge conflicts resolved.
[redis.git] / deps / lua / src / Makefile
CommitLineData
21d3294c 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# Your platform. See PLATS for possible values.
8PLAT= none
9
10CC= gcc
b28d0461 11CFLAGS= -O2 -Wall $(MYCFLAGS)
21d3294c 12AR= ar rcu
13RANLIB= ranlib
14RM= rm -f
15LIBS= -lm $(MYLIBS)
16
17MYCFLAGS=
18MYLDFLAGS=
19MYLIBS=
20
21# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
22
23PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
24
25LUA_A= liblua.a
26CORE_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 \
15108778 28 lundump.o lvm.o lzio.o strbuf.o
21d3294c 29LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
63505e0b 30 lstrlib.o loadlib.o linit.o lua_cjson.o lua_struct.o lua_cmsgpack.o
21d3294c 31
32LUA_T= lua
33LUA_O= lua.o
34
35LUAC_T= luac
36LUAC_O= luac.o print.o
37
38ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
39ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
40ALL_A= $(LUA_A)
41
42default: $(PLAT)
43
44all: $(ALL_T)
45
46o: $(ALL_O)
47
48a: $(ALL_A)
49
50$(LUA_A): $(CORE_O) $(LIB_O)
51 $(AR) $@ $?
52 $(RANLIB) $@
53
54$(LUA_T): $(LUA_O) $(LUA_A)
b28d0461 55 $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
21d3294c 56
57$(LUAC_T): $(LUAC_O) $(LUA_A)
b28d0461 58 $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
21d3294c 59
60clean:
61 $(RM) $(ALL_T) $(ALL_O)
62
63depend:
64 @$(CC) $(CFLAGS) -MM l*.c print.c
65
66echo:
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)"
76
77# convenience targets for popular platforms
78
79none:
80 @echo "Please choose a platform:"
81 @echo " $(PLATS)"
82
83aix:
84 $(MAKE) all CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" MYLDFLAGS="-brtl -bexpall"
85
86ansi:
b28d0461 87 $(MAKE) all MYCFLAGS=-DLUA_ANSI
21d3294c 88
89bsd:
90 $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
91
92freebsd:
93 $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
94
95generic:
96 $(MAKE) all MYCFLAGS=
97
98linux:
99 $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
100
101macosx:
102 $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
103# use this on Mac OS X 10.3-
104# $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
105
106mingw:
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
111
112posix:
113 $(MAKE) all MYCFLAGS=-DLUA_USE_POSIX
114
115solaris:
116 $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl"
117
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
120
121# DO NOT DELETE
122
123lapi.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
126lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h
127lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h
128lcode.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
131ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h
132ldebug.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
135ldo.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
138ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \
139 lzio.h lmem.h lundump.h
140lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \
141 lstate.h ltm.h lzio.h
142lgc.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
144linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h
145liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h
146llex.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
148lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h
149lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
150 ltm.h lzio.h lmem.h ldo.h
151loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h
152lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \
153 ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h
154lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h
155loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h
156lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
157 lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \
158 lfunc.h lstring.h lgc.h ltable.h
159lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
160 ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h
161lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \
162 ltm.h lzio.h lstring.h lgc.h
163lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h
164ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
165 ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h
166ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h
167ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \
168 lmem.h lstring.h lgc.h ltable.h
169lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h
170luac.o: luac.c lua.h luaconf.h lauxlib.h ldo.h lobject.h llimits.h \
171 lstate.h ltm.h lzio.h lmem.h lfunc.h lopcodes.h lstring.h lgc.h \
172 lundump.h
173lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \
174 llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h
175lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
176 lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h
177lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
178 lzio.h
179print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \
180 ltm.h lzio.h lmem.h lopcodes.h lundump.h
181
182# (end of Makefile)