[x264-devel] [PATCH 2/3] build: Add separate targets to (un)install import lib and shared object

Diego Biurrun diego at biurrun.de
Sun Apr 27 22:54:00 CEST 2014


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 5301529..80b36e8 100644
--- a/Makefile
+++ b/Makefile
@@ -240,22 +240,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
 
-- 
1.8.3.2



More information about the x264-devel mailing list