diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-26 16:42:10 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-26 16:42:10 +0200 |
commit | fcb540ab6978d3d5a55f08120c78d8e03b1e13c7 (patch) | |
tree | 16b2acf4adbaf54fafd7dd489e33d33c3a188c46 /src | |
parent | a2fa544ac6a75f93d809e3457432618dd89376dd (diff) | |
download | apk-tools-fcb540ab6978d3d5a55f08120c78d8e03b1e13c7.tar.gz apk-tools-fcb540ab6978d3d5a55f08120c78d8e03b1e13c7.tar.bz2 apk-tools-fcb540ab6978d3d5a55f08120c78d8e03b1e13c7.tar.xz apk-tools-fcb540ab6978d3d5a55f08120c78d8e03b1e13c7.zip |
build: lua module build fixes
- do not link with -llua. We should not link apk or lua module with it.
- default to lua 5.2
- allow override the lua version with LUA_VERSION
- allow override the lua pkg-config package with LUA_PC
- only add the pkg-config lua --cflags to the lua module
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index bd58fd1..4487007 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,11 +4,14 @@ LUAAPK ?= yes # lua module ifneq ($(LUAAPK),) +LUA_VERSION ?= 5.2 +LUA_PC ?= lua$(LUA_VERSION) +LUA_LIBDIR ?= /usr/lib/lua/$(LUA_VERSION) LIBAPK := YesPlease -PKGDEPS += lua shlibs-y += apk.so apk.so-objs := lua-apk.o -CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" +CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" \ + $(shell $(PKG_CONFIG) $(LUA_PC) --cflags) LUA_LIB-y := $(obj)/apk.so install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) && \ $(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR) |