aboutsummaryrefslogtreecommitdiff
path: root/libcap
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2020-07-29 18:50:07 +0200
committerAndrew G. Morgan <morgan@kernel.org>2020-07-29 19:39:23 -0700
commit786b64b72b5ba3d4b6195f40c0096932d2c72b57 (patch)
treecb6be64daa259c45defb860035763a350b39dd07 /libcap
parent3e59821395bfd1a806a5dedceed321d4a9b6a803 (diff)
downloadlibcap-786b64b72b5ba3d4b6195f40c0096932d2c72b57.tar.gz
libcap: split install into install-shared/install-static
In order to support static only builds, split the install target into install-shared and install-static targets. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [yann.morin.1998@free.fr: install the .pc file in the common rule] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Fabrice: update for 2.41] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'libcap')
-rw-r--r--libcap/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/libcap/Makefile b/libcap/Makefile
index 4321c2f..7c84e15 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -91,22 +91,28 @@ cap_test: cap_test.c libcap.h
test: cap_test
./cap_test
-install: all
+install: install-shared install-static
+
+install-common:
mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
install -m 0644 include/sys/capability.h $(FAKEROOT)$(INCDIR)/sys
install -m 0644 include/sys/psx_syscall.h $(FAKEROOT)$(INCDIR)/sys
+ mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
+ install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
+ install -m 0644 libpsx.pc $(FAKEROOT)$(PKGCONFIGDIR)/libpsx.pc
+
+install-static: $(STACAPLIBNAME) $(STAPSXLIBNAME) install-common
mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)
install -m 0644 $(STACAPLIBNAME) $(FAKEROOT)$(LIBDIR)/$(STACAPLIBNAME)
install -m 0644 $(STAPSXLIBNAME) $(FAKEROOT)$(LIBDIR)/$(STAPSXLIBNAME)
+
+install-shared: $(MINLIBNAME) install-common
install -m 0644 $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINLIBNAME)
ln -sf $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJLIBNAME)
ln -sf $(MAJLIBNAME) $(FAKEROOT)$(LIBDIR)/$(LIBNAME)
ifeq ($(FAKEROOT),)
-/sbin/ldconfig
endif
- mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
- install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
- install -m 0644 libpsx.pc $(FAKEROOT)$(PKGCONFIGDIR)/libpsx.pc
clean:
$(LOCALCLEAN)