diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -427,10 +427,10 @@ DOCS/man/en/mpv.1 DOCS/man/en/mpv.pdf: DOCS/man/en/af.rst \ ###### installation / clean / generic rules ####### -install: $(INSTALL_BIN) $(INSTALL_MAN) $(INSTALL_PDF) -install-no-man: $(INSTALL_BIN) -install-strip: $(INSTALL_BIN_STRIP) $(INSTALL_MAN) $(INSTALL_PDF) -install-strip-no-man: $(INSTALL_BIN_STRIP) +install: $(INSTALL_BIN) install-data $(INSTALL_MAN) $(INSTALL_PDF) +install-no-man: $(INSTALL_BIN) install-data +install-strip: $(INSTALL_BIN_STRIP) install-data $(INSTALL_MAN) $(INSTALL_PDF) +install-strip-no-man: $(INSTALL_BIN_STRIP) install-data install-dirs: if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi @@ -453,11 +453,31 @@ install-mpv-pdf-en: DOCS/man/en/mpv.pdf if test ! -d $(DOCDIR)/mpv ; then $(INSTALL) -d $(DOCDIR)/mpv ; fi $(INSTALL) -m 644 DOCS/man/en/mpv.pdf $(DOCDIR)/mpv/ +ICONSIZES = 16x16 32x32 64x64 + +define ICON_INSTALL_RULE +install-mpv-icon-$(size): etc/mpv-icon-8bit-$(size).png + $(INSTALL) -d $(prefix)/share/icons/hicolor/$(size)/apps + $(INSTALL) -m 644 etc/mpv-icon-8bit-$(size).png $(prefix)/share/icons/hicolor/$(size)/apps/mpv.png +endef + +$(foreach size,$(ICONSIZES),$(eval $(ICON_INSTALL_RULE))) + +install-mpv-icons: $(foreach size,$(ICONSIZES),install-mpv-icon-$(size)) + +install-mpv-desktop: etc/mpv.desktop + $(INSTALL) -d $(prefix)/share/applications + $(INSTALL) -m 644 etc/mpv.desktop $(prefix)/share/applications/ + +install-data: install-mpv-icons install-mpv-desktop + uninstall: $(RM) $(BINDIR)/mpv$(EXESUF) $(RM) $(MANDIR)/man1/mpv.1 $(RM) $(MANDIR)/en/man1/mpv.1 $(RM) $(DOCDIR)/mpv/mpv.pdf + $(RM) $(prefix)/share/applications/mpv.desktop + $(RM) $(foreach size,$(ICONSIZES),$(prefix)/share/icons/hicolor/$(size)/apps/mpv.png) clean: -$(RM) $(call ADD_ALL_DIRS,/*.o /*.d /*.a /*.ho /*~) |