diff options
author | Kelvie Wong <kwong@wurldtech.com> | 2011-02-02 16:13:42 -0800 |
---|---|---|
committer | Kelvie Wong <kwong@wurldtech.com> | 2011-02-02 16:13:42 -0800 |
commit | 46e8134ab5b7dbf27e401d6d90df041b139217dd (patch) | |
tree | 6130736496f27916d03fe846caf5fe75577d89f4 /lua/Linux.mak | |
parent | bdfd8f58d6cc159dbd8531c92ca9b0c1ab209a0f (diff) | |
download | libnet-46e8134ab5b7dbf27e401d6d90df041b139217dd.tar.gz |
lua: Use pkg-config for the Linux Makefile.
This makes it auto-detect the build and link flags on Linux. This is
useful especially for cross-compiling.
This also enables selection of lua interpreters, e.g. luajit or newer/older
versions of lua e.g.
make LUA=luajit
make LUA=lua5.2
Signed-off-by: Kelvie Wong <kwong@wurldtech.com>
Diffstat (limited to 'lua/Linux.mak')
-rw-r--r-- | lua/Linux.mak | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/Linux.mak b/lua/Linux.mak index b432563..730d43d 100644 --- a/lua/Linux.mak +++ b/lua/Linux.mak @@ -2,8 +2,9 @@ CC = gcc LDFLAGS = -fPIC -fno-common -shared BINDING += nfq.so -CLUA=-I/usr/include/lua5.1 -LLUA=-llua5.1 +LUA = lua5.1 +CLUA=$(shell pkg-config --cflags ${LUA}) +LLUA=$(shell pkg-config --libs ${LUA}) # Example: # cc -Wall -Werror -g -I wurldtech/rst `libnet-config --cflags --defines` |