NAME=photos2pdf DESTDIR= PREFIX=/usr INSTALL=install BINDIR=$(PREFIX)/bin LIBDIR=/var/lib/$(NAME) TEMPLATEDIR=$(LIBDIR)/template .PHONY: all install-bin install-template install all: @echo "Use \"sudo $(MAKE) install\" to install $(NAME)" install-bin: $(INSTALL) -d -m 0755 "$(BINDIR)" $(INSTALL) -m 0755 "$(NAME)" "$(BINDIR)/$(NAME)" install-template: $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)" $(INSTALL) -d -m 0755 "$(DESTDIR)$(TEMPLATEDIR)" tar cf - -C template --exclude "*.svg" . | (cd "$(DESTDIR)$(TEMPLATEDIR)" && tar xf -) install: install-bin install-template