summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-14 14:16:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-14 14:18:23 +0000
commit8e887db746ef605cc38196d14500e1c28eddd79a (patch)
tree843c50ea86a5404dfab508bce4412453db5f56db
parent3cdee6a406cb19b750754379e360140bcf068234 (diff)
downloadapk-tools-8e887db746ef605cc38196d14500e1c28eddd79a.tar.gz
apk-tools-8e887db746ef605cc38196d14500e1c28eddd79a.tar.bz2
apk-tools-8e887db746ef605cc38196d14500e1c28eddd79a.tar.xz
apk-tools-8e887db746ef605cc38196d14500e1c28eddd79a.zip
build: support building lua module without shared libapk
Use the build option SHARED_LIBAPK for building shared.
-rw-r--r--src/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 45f3415..41a3b32 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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)