[x264-devel] [PATCH 04/11] build: Add separate targets to (un)install import lib and shared object
Diego Biurrun
diego at biurrun.de
Sun Feb 5 09:02:46 CET 2017
This allows eliminating some conditionals within the (un)install recipes.
---
Makefile | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 7763ce1..219cda6 100644
--- a/Makefile
+++ b/Makefile
@@ -283,22 +283,31 @@ install-lib-static: lib-static install-lib-dev
install-lib-shared: lib-shared install-lib-dev
ifneq ($(IMPLIBNAME),)
+install-lib-shared: install-implib
+uninstall: uninstall-implib
+else ifneq ($(SONAME),)
+install-lib-shared: install-soname
+uninstall: uninstall-soname
+endif
+
+install-implib:
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
$(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
-else ifneq ($(SONAME),)
+
+install-soname:
ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
-endif
uninstall:
rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
rm -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc
-ifneq ($(IMPLIBNAME),)
+
+uninstall-implib:
rm -f $(DESTDIR)$(bindir)/$(SONAME) $(DESTDIR)$(libdir)/$(IMPLIBNAME)
-else ifneq ($(SONAME),)
+
+uninstall-soname:
rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
-endif
etags: TAGS
--
2.1.4
More information about the x264-devel
mailing list