aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStepets <stepa.alimov.93@gmail.com>2014-04-26 14:26:31 +0400
committerStepets <stepa.alimov.93@gmail.com>2014-04-26 14:26:31 +0400
commit8da7b226def76b14b18cb29c4a9d41316ae6cfcd (patch)
treee4f49c966bd8588973c6a041b9c73461041e04cb
parentf33e4e68f5877a35e4952e1f53704464c18a53ed (diff)
downloadlanes-8da7b226def76b14b18cb29c4a9d41316ae6cfcd.tar.gz
lanes-8da7b226def76b14b18cb29c4a9d41316ae6cfcd.tar.bz2
lanes-8da7b226def76b14b18cb29c4a9d41316ae6cfcd.zip
LuaJIT auto detect part 2
now one may just type "make" without specifing flags and libs and get luajit compatible lanes build !!pkg-config required!!
-rw-r--r--src/Makefile36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile
index b50c10d..539f56e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -41,24 +41,32 @@ ifeq "$(LUAROCKS)" ""
41 # Autodetect LUA_FLAGS and/or LUA_LIBS 41 # Autodetect LUA_FLAGS and/or LUA_LIBS
42 # 42 #
43 ifneq "$(shell which pkg-config)" "" 43 ifneq "$(shell which pkg-config)" ""
44 ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1" 44 ifeq "$(shell pkg-config --exists luajit && echo 1)" "1"
45 LUA_FLAGS:=$(shell pkg-config --cflags lua5.1) 45 LUA_FLAGS:=$(shell pkg-config --cflags luajit)
46 LUA_LIBS:=$(shell pkg-config --libs lua5.1) 46 LUA_LIBS:=$(shell pkg-config --libs luajit)
47 # 47 #
48 # Ubuntu: -I/usr/include/lua5.1 48 # Debian: -I/usr/include/luajit-2.0
49 # -llua5.1 49 # -lluajit-5.1
50 else 50 else
51 ifeq "$(shell pkg-config --exists lua && echo 1)" "1" 51 ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1"
52 LUA_FLAGS:=$(shell pkg-config --cflags lua) 52 LUA_FLAGS:=$(shell pkg-config --cflags lua5.1)
53 LUA_LIBS:=$(shell pkg-config --libs lua) 53 LUA_LIBS:=$(shell pkg-config --libs lua5.1)
54 # 54 #
55 # OS X fink with pkg-config: 55 # Ubuntu: -I/usr/include/lua5.1
56 # -I/sw/include 56 # -llua5.1
57 # -L/sw/lib -llua -lm
58 else 57 else
59 $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!) 58 ifeq "$(shell pkg-config --exists lua && echo 1)" "1"
60 LUA_FLAGS:= 59 LUA_FLAGS:=$(shell pkg-config --cflags lua)
61 LUA_LIBS:=-llua 60 LUA_LIBS:=$(shell pkg-config --libs lua)
61 #
62 # OS X fink with pkg-config:
63 # -I/sw/include
64 # -L/sw/lib -llua -lm
65 else
66 $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!)
67 LUA_FLAGS:=
68 LUA_LIBS:=-llua
69 endif
62 endif 70 endif
63 endif 71 endif
64 else 72 else