1e7fbf007c
Add patch to split libzstd install target into pc, static, shared and includes target. Call only the needed ones for the buildroot staging/target install steps (respect the static/shared configuration). Signed-off-by: Peter Seiderer <ps.report@gmx.net> [Thomas: as suggested by Yann E. Morin, refactor the build/install commands to use only one invocation, with intermediate ZSTD_BUILD_LIBS and ZSTD_INSTALL_LIBS variables, defined depending on whether static/shared/static+shared is selected.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
52 lines
1.7 KiB
Diff
52 lines
1.7 KiB
Diff
From 2623a12bff19049b6ad5bc066e3ef9c6259d415c Mon Sep 17 00:00:00 2001
|
|
From: Peter Seiderer <ps.report@gmx.net>
|
|
Date: Mon, 16 Apr 2018 20:44:49 +0200
|
|
Subject: [PATCH] Split library install target into pc, static, shared and
|
|
include only target
|
|
|
|
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
|
---
|
|
lib/Makefile | 15 ++++++++++++---
|
|
1 file changed, 12 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/lib/Makefile b/lib/Makefile
|
|
index cdfdc5c..b592aa6 100644
|
|
--- a/lib/Makefile
|
|
+++ b/lib/Makefile
|
|
@@ -159,20 +159,29 @@ libzstd.pc: libzstd.pc.in
|
|
-e 's|@VERSION@|$(VERSION)|' \
|
|
$< >$@
|
|
|
|
-install: libzstd.a libzstd libzstd.pc
|
|
+install: install-pc install-static install-shared install-includes
|
|
+ @echo zstd static and shared library installed
|
|
+
|
|
+install-pc: libzstd.pc
|
|
@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
|
|
@$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
|
|
- @echo Installing libraries
|
|
+
|
|
+install-static: libzstd.a
|
|
+ @echo Installing static library
|
|
@$(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR)
|
|
+
|
|
+install-shared: libzstd
|
|
+ @echo Installing shared library
|
|
@$(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR)
|
|
@ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
|
|
@ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
|
|
+
|
|
+install-includes:
|
|
@echo Installing includes
|
|
@$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
|
|
@$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
|
|
@$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR) # prototypes generate deprecation warnings
|
|
@$(INSTALL_DATA) dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)
|
|
- @echo zstd static and shared library installed
|
|
|
|
uninstall:
|
|
@$(RM) $(DESTDIR)$(LIBDIR)/libzstd.a
|
|
--
|
|
2.16.3
|
|
|