Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save qyot27/9299437 to your computer and use it in GitHub Desktop.
Save qyot27/9299437 to your computer and use it in GitHub Desktop.
x264-0002-Extend-silent-rules-to-install-uninstall-clean-distc.patch
From 974af90fcec3251387b7053e761a95e5476bf706 Mon Sep 17 00:00:00 2001
From: Stephen Hutchinson <[email protected]>
Date: Fri, 21 Feb 2014 11:12:12 -0500
Subject: [PATCH 2/2] Extend silent rules to install/uninstall/clean/distclean
---
Makefile | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/Makefile b/Makefile
index 3bac43d..27a0593 100644
--- a/Makefile
+++ b/Makefile
@@ -259,30 +259,103 @@ fprofiled:
endif
clean:
+ifeq ($(V), 0)
+ @printf "RM\t*.o\n";
+ @printf "RM\t*.o\n";
+ @printf "RM\t*.a\n";
+ @printf "RM\t*.lib\n";
+ @printf "RM\t*.exp\n";
+ @printf "RM\t*.pdb\n";
+ @printf "RM\tx264\n";
+ @printf "RM\tx264.exe\n";
+ @printf "RM\t.depend\n";
+ @printf "RM\tTAGS\n";
+ @rm -f $(OBJS) $(OBJASM) $(OBJCLI) $(OBJSO) $(SONAME) *.a *.lib *.exp *.pdb x264 x264.exe .depend TAGS
+ @printf "RM\tcheckasm\n";
+ @printf "RM\tcheckasm.exe\n";
+ @printf "RM\tx264_lookahead.clbin\n";
+ @rm -f checkasm checkasm.exe $(OBJCHK) $(GENERATED) x264_lookahead.clbin
+ @printf "RM\t*.gcda\n";
+ @printf "RM\t*.gcno\n";
+ @printf "RM\t*.dyn\n";
+ @printf "RM\tpgopti.dpi\n";
+ @printf "RM\tpgopti.dpi.lock\n";
+ @rm -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock
+else
rm -f $(OBJS) $(OBJASM) $(OBJCLI) $(OBJSO) $(SONAME) *.a *.lib *.exp *.pdb x264 x264.exe .depend TAGS
rm -f checkasm checkasm.exe $(OBJCHK) $(GENERATED) x264_lookahead.clbin
rm -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) *.dyn pgopti.dpi pgopti.dpi.lock
+endif
distclean: clean
+ifeq ($(V), 0)
+ @printf "RM\tconfig.mak\n";
+ @printf "RM\tx264_config.h\n";
+ @printf "RM\tconfig.h\n";
+ @printf "RM\tconfig.log\n";
+ @printf "RM\tx264.pc\n";
+ @printf "RM\tx264.def\n";
+ @rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
+else
rm -f config.mak x264_config.h config.h config.log x264.pc x264.def
+endif
install-cli: cli
+ifeq ($(V), 0)
+ @$(INSTALL) -d $(DESTDIR)$(bindir)
+ @printf "INSTALL\tx264$(EXE)\n";
+ @$(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
+else
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
+endif
install-lib-dev:
+ifeq ($(V), 0)
+ @$(INSTALL) -d $(DESTDIR)$(includedir)
+ @$(INSTALL) -d $(DESTDIR)$(libdir)
+ @$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
+ @printf "INSTALL\tx264.h\n";
+ @$(INSTALL) -m 644 $(SRCPATH)/x264.h $(DESTDIR)$(includedir)
+ @printf "INSTALL\tx264_config.h\n";
+ @$(INSTALL) -m 644 x264_config.h $(DESTDIR)$(includedir)
+ @printf "INSTALL\tx264.pc\n";
+ @$(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+else
$(INSTALL) -d $(DESTDIR)$(includedir)
$(INSTALL) -d $(DESTDIR)$(libdir)
$(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 $(SRCPATH)/x264.h $(DESTDIR)$(includedir)
$(INSTALL) -m 644 x264_config.h $(DESTDIR)$(includedir)
$(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+endif
install-lib-static: lib-static install-lib-dev
+ifeq ($(V), 0)
+ @printf "INSTALL\t$(LIBX264)\n";
+ @$(INSTALL) -m 644 $(LIBX264) $(DESTDIR)$(libdir)
+ @printf "RANLIB\t$(LIBX264)\n";
+ @$(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264))
+else
$(INSTALL) -m 644 $(LIBX264) $(DESTDIR)$(libdir)
$(if $(RANLIB), $(RANLIB_VERBOSE) $(DESTDIR)$(libdir)/$(LIBX264))
+endif
install-lib-shared: lib-shared install-lib-dev
+ifeq ($(V), 0)
+ifneq ($(IMPLIBNAME),)
+ @$(INSTALL) -d $(DESTDIR)$(bindir)
+ @printf "INSTALL\t$(SONAME)\n";
+ @$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
+ @printf "INSTALL\t$(IMPLIBNAME)\n";
+ @$(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
+else ifneq ($(SONAME),)
+ @printf "INSTALL\tlibx264.$(SOSUFFIX)\n";
+ @ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
+ @printf "INSTALL\t$(SONAME)\n";
+ @$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
+endif
+else
ifneq ($(IMPLIBNAME),)
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
@@ -291,8 +364,26 @@ else ifneq ($(SONAME),)
ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
$(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
endif
+endif
uninstall:
+ifeq ($(V), 0)
+ @printf "RM\tx264.h\n";
+ @printf "RM\tx264_config.h\n";
+ @printf "RM\tlibx264.a\n";
+ @rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
+ @printf "RM\tx264.pc\n";
+ @rm -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc
+ifneq ($(IMPLIBNAME),)
+ @printf "RM\t$(SONAME)\n";
+ @printf "RM\t$(IMPLIBNAME)\n";
+ @rm -f $(DESTDIR)$(bindir)/$(SONAME) $(DESTDIR)$(libdir)/$(IMPLIBNAME)
+else ifneq ($(SONAME),)
+ @printf "RM\t$(SONAME)\n";
+ @printf "RM\tlibx264.$(SOSUFFIX)\n";
+ @rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
+endif
+else
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),)
@@ -300,6 +391,7 @@ ifneq ($(IMPLIBNAME),)
else ifneq ($(SONAME),)
rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
endif
+endif
etags: TAGS
--
1.8.3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment