use markdown syntax for images
[teliva.git] / Makefile
blob96c29862469ef66398cb7d2747f5b6449e7c8aab
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.
8 PLAT= none
10 # Where to install. The installation starts in the src and doc directories,
11 # so take care if INSTALL_TOP is not an absolute path.
12 INSTALL_TOP= /usr/local
13 INSTALL_BIN= $(INSTALL_TOP)/bin
14 INSTALL_INC= $(INSTALL_TOP)/include
15 INSTALL_LIB= $(INSTALL_TOP)/lib
16 INSTALL_MAN= $(INSTALL_TOP)/man/man1
18 # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
19 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
20 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
21 INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
23 # How to install. If your install program does not support "-p", then you
24 # may have to run ranlib on the installed liblua.a (do "make ranlib").
25 INSTALL= install -p
26 INSTALL_EXEC= $(INSTALL) -m 0755
27 INSTALL_DATA= $(INSTALL) -m 0644
29 # If you don't have install you can use cp instead.
30 # INSTALL= cp -p
31 # INSTALL_EXEC= $(INSTALL)
32 # INSTALL_DATA= $(INSTALL)
34 # Utilities.
35 MKDIR= mkdir -p
36 RANLIB= ranlib
38 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
40 # Keep this sync'd with src/Makefile
41 PLATS= freebsd linux macosx netbsd openbsd
43 # What to install.
44 TO_BIN= lua luac
45 TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
46 TO_LIB= liblua.a
47 TO_MAN= lua.1 luac.1
49 # Lua version and release.
50 V= 5.1
51 R= 5.1.5
53 all: $(PLAT)
55 $(PLATS) clean:
56 cd src && $(MAKE) $@
58 install: dummy
59 cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
60 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
61 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
62 cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
63 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
65 ranlib:
66 cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
68 local:
69 $(MAKE) install INSTALL_TOP=..
71 none:
72 @echo "Please do"
73 @echo " make PLATFORM"
74 @echo "where PLATFORM is one of these:"
75 @echo " $(PLATS)"
76 @echo "See INSTALL for complete instructions."
78 # make may get confused with test/ and INSTALL in a case-insensitive OS
79 dummy:
81 # echo config parameters
82 echo:
83 @echo ""
84 @echo "These are the parameters currently set in src/Makefile to build Lua $R:"
85 @echo ""
86 @cd src && $(MAKE) -s echo
87 @echo ""
88 @echo "These are the parameters currently set in Makefile to install Lua $R:"
89 @echo ""
90 @echo "PLAT = $(PLAT)"
91 @echo "INSTALL_TOP = $(INSTALL_TOP)"
92 @echo "INSTALL_BIN = $(INSTALL_BIN)"
93 @echo "INSTALL_INC = $(INSTALL_INC)"
94 @echo "INSTALL_LIB = $(INSTALL_LIB)"
95 @echo "INSTALL_MAN = $(INSTALL_MAN)"
96 @echo "INSTALL_LMOD = $(INSTALL_LMOD)"
97 @echo "INSTALL_CMOD = $(INSTALL_CMOD)"
98 @echo "INSTALL_EXEC = $(INSTALL_EXEC)"
99 @echo "INSTALL_DATA = $(INSTALL_DATA)"
100 @echo ""
101 @echo "See also src/luaconf.h ."
102 @echo ""
104 # echo private config parameters
105 pecho:
106 @echo "V = $(V)"
107 @echo "R = $(R)"
108 @echo "TO_BIN = $(TO_BIN)"
109 @echo "TO_INC = $(TO_INC)"
110 @echo "TO_LIB = $(TO_LIB)"
111 @echo "TO_MAN = $(TO_MAN)"
113 # echo config parameters as Lua code
114 # uncomment the last sed expression if you want nil instead of empty strings
115 lecho:
116 @echo "-- installation parameters for Lua $R"
117 @echo "VERSION = '$V'"
118 @echo "RELEASE = '$R'"
119 @$(MAKE) echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/'
120 @echo "-- EOF"
122 # list targets that do not create files (but not all makes understand .PHONY)
123 .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
125 # (end of Makefile)