]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/zstd/0001-Split-library-install-target-into-pc-static-shared-a.patch
zstd: add libzstd support
[coffee/buildroot.git] / package / zstd / 0001-Split-library-install-target-into-pc-static-shared-a.patch
1 From 2623a12bff19049b6ad5bc066e3ef9c6259d415c Mon Sep 17 00:00:00 2001
2 From: Peter Seiderer <ps.report@gmx.net>
3 Date: Mon, 16 Apr 2018 20:44:49 +0200
4 Subject: [PATCH] Split library install target into pc, static, shared and
5  include only target
6
7 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
8 ---
9  lib/Makefile | 15 ++++++++++++---
10  1 file changed, 12 insertions(+), 3 deletions(-)
11
12 diff --git a/lib/Makefile b/lib/Makefile
13 index cdfdc5c..b592aa6 100644
14 --- a/lib/Makefile
15 +++ b/lib/Makefile
16 @@ -159,20 +159,29 @@ libzstd.pc: libzstd.pc.in
17               -e 's|@VERSION@|$(VERSION)|' \
18               $< >$@
19  
20 -install: libzstd.a libzstd libzstd.pc
21 +install: install-pc install-static install-shared install-includes
22 +       @echo zstd static and shared library installed
23 +
24 +install-pc: libzstd.pc
25         @$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
26         @$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
27 -       @echo Installing libraries
28 +
29 +install-static: libzstd.a
30 +       @echo Installing static library
31         @$(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR)
32 +
33 +install-shared: libzstd
34 +       @echo Installing shared library
35         @$(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR)
36         @ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
37         @ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
38 +
39 +install-includes:
40         @echo Installing includes
41         @$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
42         @$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
43         @$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)     # prototypes generate deprecation warnings
44         @$(INSTALL_DATA) dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)
45 -       @echo zstd static and shared library installed
46  
47  uninstall:
48         @$(RM) $(DESTDIR)$(LIBDIR)/libzstd.a
49 -- 
50 2.16.3
51