aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2012-05-11 15:33:47 +0800
committerDiego Nehab <diego.nehab@gmail.com>2012-05-11 15:33:47 +0800
commit05535a19f81d181b7e15d241892e794a00905bb9 (patch)
treef73f46fd534070f6d94d8eaa0fd0d56f3d4db895 /src/makefile
parent399bdb7f412bd9cc565090f30e3872d8b72d66d8 (diff)
downloadluasocket-05535a19f81d181b7e15d241892e794a00905bb9.tar.gz
luasocket-05535a19f81d181b7e15d241892e794a00905bb9.tar.bz2
luasocket-05535a19f81d181b7e15d241892e794a00905bb9.zip
Improve makefile to allow overriden variables
Before this change, it was difficult to set default directories for different platforms that would still work with different Lua versions.
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/makefile b/src/makefile
index 4df62bd..70425c4 100644
--- a/src/makefile
+++ b/src/makefile
@@ -25,26 +25,36 @@ LUAV?=5.1
25# for testing and debugging luasocket itself 25# for testing and debugging luasocket itself
26DEBUG?=NODEBUG 26DEBUG?=NODEBUG
27 27
28# prefix: /usr/local /usr /opt/local /sw
29# the top of the default install tree
30prefix?=/usr/local
31
32# where lua headers are found for macosx builds 28# where lua headers are found for macosx builds
33# LUAINC_macosx: /opt/local/include 29# LUAINC_macosx:
34LUAINC_macosx?=/opt/local/include 30# /opt/local/include
35# FIXME default should be where fink puts lua 31LUAINC_macosx_base?=/opt/local/include
36 32LUAINC_macosx?=$(LUAINC_macosx_base)$(LUAV)
37# LUAINC_linux: /usr/include/lua$(LUAV) /usr/local/include /usr/local/include/lua$(LUAV) 33# FIXME default should this default to fink or to macports?
34# What happens when more than one Lua version is installed?
35LUAPREFIX_macosx?=/opt/local/
36
37# LUAINC_linux:
38# /usr/include/lua$(LUAV)
39# /usr/local/include
40# /usr/local/include/lua$(LUAV)
38# where lua headers are found for linux builds 41# where lua headers are found for linux builds
39LUAINC_linux?=/usr/include/lua$(LUAV) 42LUAINC_linux_base?=/usr/include
43LUAINC_linux?=$(LUAINC_linux_base)$(LUAV)
44LUAPREFIX_linux?=/usr/local
40 45
41# LUAINC_win32: 46# LUAINC_win32:
42# LUALIB_win32: 47# LUALIB_win32:
43# where lua headers and libraries are found for win32 builds 48# where lua headers and libraries are found for win32 builds
44LUAINC_win32?="../../lua-5.1.3/src" 49LUAINC_win32?="../../lua-5.1.3/src"
45LUALIB_win32?="../../lua-5.1.3" 50LUALIB_win32?="../../lua-5.1.3"
51LUAPREFIX_win32?=
46# FIXME default should be where lua-for-windows puts lua 52# FIXME default should be where lua-for-windows puts lua
47 53
54# prefix: /usr/local /usr /opt/local /sw
55# the top of the default install tree
56prefix?=$(LUAPREFIX_$(PLAT))
57
48# DESTDIR: (no default) 58# DESTDIR: (no default)
49# used by package managers to install into a temporary destination 59# used by package managers to install into a temporary destination
50DESTDIR= 60DESTDIR=