1 # makefile for installing Lua
2 # see INSTALL for installation instructions
3 # see src/Makefile and src/luaconf.h for further customization
5 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
7 # Your platform. See PLATS for possible values.
10 # Where to install. The installation starts in the src directory, so take care
11 # if INSTALL_TOP is not an absolute path. (Man pages are installed from the
12 # doc directory.) You may want to make these paths consistent with LUA_ROOT,
13 # LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
15 INSTALL_TOP
= /usr
/local
16 INSTALL_BIN
= $(INSTALL_TOP
)/bin
17 INSTALL_INC
= $(INSTALL_TOP
)/include
18 INSTALL_LIB
= $(INSTALL_TOP
)/lib
19 INSTALL_MAN
= $(INSTALL_TOP
)/man
/man1
20 INSTALL_LMOD
= $(INSTALL_TOP
)/share
/lua
/$V
21 INSTALL_CMOD
= $(INSTALL_TOP
)/lib
/lua
/$V
23 # How to install. You may prefer "install" instead of "cp" if you have it.
24 # To remove debug information from binaries, use "install -s" in INSTALL_EXEC.
28 #INSTALL_EXEC= $(INSTALL) -m 0755
29 #INSTALL_DATA= $(INSTALL) -m 0644
38 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
40 # Convenience platforms targets.
41 PLATS
= aix ansi bsd freebsd generic linux macosx mingw posix solaris
45 TO_INC
= lua.h luaconf.h lualib.h lauxlib.h ..
/etc
/lua.hpp
49 # Lua version and release.
59 src
/lua
test/hello.lua
62 cd src
&& $(MKDIR
) -p
$(INSTALL_BIN
) $(INSTALL_INC
) $(INSTALL_LIB
) $(INSTALL_MAN
) $(INSTALL_LMOD
) $(INSTALL_CMOD
)
63 cd src
&& $(INSTALL_EXEC
) $(TO_BIN
) $(INSTALL_BIN
)
64 cd src
&& $(INSTALL_DATA
) $(TO_INC
) $(INSTALL_INC
)
65 cd src
&& $(INSTALL_DATA
) $(TO_LIB
) $(INSTALL_LIB
)
66 cd doc
&& $(INSTALL_DATA
) $(TO_MAN
) $(INSTALL_MAN
)
67 # $(RANLIB) $(INSTALL_LIB)/$(TO_LIB)
70 $(MAKE
) install INSTALL_TOP
=.. INSTALL_EXEC
="cp -p" INSTALL_DATA
="cp -p"
74 @echo
" make PLATFORM"
75 @echo
"where PLATFORM is one of these:"
77 @echo
"See INSTALL for complete instructions."
79 # make may get confused with test/ and INSTALL in a case-insensitive OS
82 # echo config parameters
85 @echo
"These are the parameters currently set in src/Makefile to build Lua $R:"
87 @cd src
&& $(MAKE
) -s echo
89 @echo
"These are the parameters currently set in Makefile to install Lua $R:"
91 @echo
"PLAT = $(PLAT)"
92 @echo
"INSTALL_TOP = $(INSTALL_TOP)"
93 @echo
"INSTALL_BIN = $(INSTALL_BIN)"
94 @echo
"INSTALL_INC = $(INSTALL_INC)"
95 @echo
"INSTALL_LIB = $(INSTALL_LIB)"
96 @echo
"INSTALL_MAN = $(INSTALL_MAN)"
97 @echo
"INSTALL_LMOD = $(INSTALL_LMOD)"
98 @echo
"INSTALL_CMOD = $(INSTALL_CMOD)"
99 @echo
"INSTALL_EXEC = $(INSTALL_EXEC)"
100 @echo
"INSTALL_DATA = $(INSTALL_DATA)"
102 @echo
"See also src/luaconf.h ."
105 # echo private config parameters
109 @echo
"TO_BIN = $(TO_BIN)"
110 @echo
"TO_INC = $(TO_INC)"
111 @echo
"TO_LIB = $(TO_LIB)"
112 @echo
"TO_MAN = $(TO_MAN)"
114 # echo config parameters as Lua code
115 # uncomment the last sed expression if you want nil instead of empty strings
117 @echo
"-- installation parameters for Lua $R"
118 @echo
"VERSION = '$V'"
119 @echo
"RELEASE = '$R'"
120 @
$(MAKE
) echo | grep
= | sed
-e
's/= /= "/' -e
's/$$/"/' #-e 's/""/nil/'
123 # list targets that do not create files (but not all makes understand .PHONY)
124 .PHONY
: all $(PLATS
) clean test install local none dummy echo pecho lecho