Commit 8e887db7 authored by Natanael Copa's avatar Natanael Copa

build: support building lua module without shared libapk

Use the build option SHARED_LIBAPK for building shared.
parent 3cdee6a4
......@@ -8,7 +8,6 @@ PKGDEPS += lua
shlibs-y += apk.so
apk.so-objs := lua-apk.o
CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
LIBS_apk.so := -L$(obj) -lapk
LUA_LIB-y := $(obj)/apk.so
install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) \
$(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR)
......@@ -34,12 +33,14 @@ endif
ifeq ($(SHARED_LIBAPK),)
apk-objs += $(libapk.so-objs)
apk.so-objs += $(libapk.so-objs)
else
LIBAPK := YesPlease
LIBS_apk := -lapk
LIBS_apk.so := -L$(obj) -lapk
endif
ifneq ($(LIBAPK),)
ifneq ($(SHARED_LIBAPK),)
shlibs-y += libapk.so
LIBAPK-y := $(obj)/libapk.so
install-LIBAPK-y := $(INSTALLDIR) $(DESTDIR)$(LIBDIR) \
......@@ -63,7 +64,7 @@ LIBS := -Wl,--as-needed \
$(obj)/apk: $(LIBAPK-y)
$(obj)/apk.so: $(obj)/libapk.so
$(obj)/apk.so: $(LIBAPK-y)
install: $(obj)/apk $(LIBAPK-y) $(LUA_LIB-y)
$(INSTALLDIR) $(DESTDIR)$(SBINDIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment