Makefile: support DESTDIR (#275)

This commit is contained in:
aabacchus 2021-12-08 14:52:39 +00:00 committed by GitHub
parent b58a520ac1
commit be2fe883cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,15 +21,15 @@ clean:
.PHONY: install
install: amfora amfora.desktop
$(INSTALL) -d $(PREFIX)/bin/
$(INSTALL) -m 755 amfora $(PREFIX)/bin/amfora
$(INSTALL) -d $(PREFIX)/share/applications/
$(INSTALL) -m 644 amfora.desktop $(PREFIX)/share/applications/amfora.desktop
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) -m 755 amfora $(DESTDIR)$(PREFIX)/bin/amfora
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/applications/
$(INSTALL) -m 644 amfora.desktop $(DESTDIR)$(PREFIX)/share/applications/amfora.desktop
.PHONY: uninstall
uninstall:
$(RM) -f $(PREFIX)/bin/amfora
$(RM) -f $(PREFIX)/share/applications/amfora.desktop
$(RM) -f $(DESTDIR)$(PREFIX)/bin/amfora
$(RM) -f $(DESTDIR)$(PREFIX)/share/applications/amfora.desktop
# Development helpers