1 # Makefile for installing Lua
2 # See doc/readme.html for installation and customization instructions.
4 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
6 # Your platform. See PLATS for possible values.
9 # Where to install. The installation starts in the src and doc directories,
10 # so take care if INSTALL_TOP is not an absolute path. See the local target.
11 # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
12 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
13 INSTALL_TOP= /usr/local
14 INSTALL_BIN= $(INSTALL_TOP)/bin
15 INSTALL_INC= $(INSTALL_TOP)/include
16 INSTALL_LIB= $(INSTALL_TOP)/lib
17 INSTALL_MAN= $(INSTALL_TOP)/man/man1
18 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
19 INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
21 # How to install. If your install program does not support "-p", then
22 # you may have to run ranlib on the installed liblua.a.
24 INSTALL_EXEC= $(INSTALL) -m 0755
25 INSTALL_DATA= $(INSTALL) -m 0644
27 # If you don't have "install" you can use "cp" instead.
29 # INSTALL_EXEC= $(INSTALL)
30 # INSTALL_DATA= $(INSTALL)
36 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
38 # Convenience platforms targets.
39 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
43 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
47 # Lua version and release.
61 cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
62 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
63 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
64 cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
65 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
68 cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
69 cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC)
70 cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB)
71 cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN)
74 $(MAKE) install INSTALL_TOP=../install
77 @echo "Please do 'make PLATFORM' where PLATFORM is one of these:"
79 @echo "See doc/readme.html for complete instructions."
81 # make may get confused with test/ and install/
84 # echo config parameters
86 @cd src && $(MAKE) -s echo
90 @echo "TO_BIN= $(TO_BIN)"
91 @echo "TO_INC= $(TO_INC)"
92 @echo "TO_LIB= $(TO_LIB)"
93 @echo "TO_MAN= $(TO_MAN)"
94 @echo "INSTALL_TOP= $(INSTALL_TOP)"
95 @echo "INSTALL_BIN= $(INSTALL_BIN)"
96 @echo "INSTALL_INC= $(INSTALL_INC)"
97 @echo "INSTALL_LIB= $(INSTALL_LIB)"
98 @echo "INSTALL_MAN= $(INSTALL_MAN)"
99 @echo "INSTALL_LMOD= $(INSTALL_LMOD)"
100 @echo "INSTALL_CMOD= $(INSTALL_CMOD)"
101 @echo "INSTALL_EXEC= $(INSTALL_EXEC)"
102 @echo "INSTALL_DATA= $(INSTALL_DATA)"
104 # echo pkg-config data
107 @echo "prefix=$(INSTALL_TOP)"
108 @echo "libdir=$(INSTALL_LIB)"
109 @echo "includedir=$(INSTALL_INC)"
111 # list targets that do not create files (but not all makes understand .PHONY)
112 #.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho