Imported from ../lua-4.0.1.tar.gz.
[lua.git] / Makefile
blobadf018f2cbf724e8cfae6dc586ce8c2f678e268b
1 # makefile for Lua hierarchy
2 # see INSTALL for installation instructions
3 # see file "config" for customization instructions
5 LUA= .
7 include $(LUA)/config
9 # primary targets (only "all" and "clean" are useful after distribution)
10 all clean co klean:
11 cd include; $(MAKE) $@
12 cd src; $(MAKE) $@
13 cd src/luac; $(MAKE) $@
14 cd src/lib; $(MAKE) $@
15 cd src/lua; $(MAKE) $@
17 # remove debug information from binaries
18 strip:
19 strip bin/lua bin/luac
21 # official installation
22 install: all strip
23 mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN)
24 $(INSTALL_EXEC) bin/* $(INSTALL_BIN)
25 $(INSTALL_DATA) include/*.h $(INSTALL_INC)
26 $(INSTALL_DATA) lib/lib* $(INSTALL_LIB)
27 $(INSTALL_DATA) doc/*.1 $(INSTALL_MAN)
29 # shared libraries (for Linux)
30 so:
31 ld -o lib/liblua.so.$V -shared src/*.o
32 ld -o lib/liblualib.so.$V -shared src/lib/*.o
33 cd lib; ln -s liblua.so.$V liblua.so; ln -s liblualib.so.$V liblualib.so
35 # binaries using shared libraries
36 sobin:
37 rm -f bin/lua bin/luac
38 cd src/lua; $(MAKE)
39 cd src/luac; $(MAKE)
41 # (end of Makefile)