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 modulecute-signatures
parent
a2fa544ac6
commit
fcb540ab69
3
Makefile
3
Makefile
|
@ -15,9 +15,8 @@ LIBDIR := /lib
|
|||
CONFDIR := /etc/apk
|
||||
MANDIR := /usr/share/man
|
||||
DOCDIR := /usr/share/doc/apk
|
||||
LUA_LIBDIR := /usr/lib/lua/5.1
|
||||
|
||||
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR LUA_LIBDIR
|
||||
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR
|
||||
|
||||
##
|
||||
# Top-level rules and targets
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue