25 lines
565 B
Makefile
25 lines
565 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 . | (cd "$(DESTDIR)$(TEMPLATEDIR)" && tar xf -)
|
||
|
|
||
|
install: install-bin install-template
|