photos2pdf/Makefile
2023-12-10 23:14:02 +01:00

25 lines
583 B
Makefile

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