From b80cc9366e5f5a44c9f7279cea002f26b85ed162 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 29 Aug 2021 21:27:57 +0200 Subject: Added installation targets to makefile --- Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 163233a..d3dc23d 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,11 @@ CFLAGS += -DFUSE_USE_VERSION=31 CFLAGS += `pkg-config --cflags fuse3 xcb xcb-util` LDLIBS += `pkg-config --libs fuse3 xcb xcb-util` +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +DATADIR ?= $(PREFIX)/share +MANDIR ?= $(DATADIR)/man/man1 + all: clipfs clipfs: @@ -10,4 +15,16 @@ clipfs: clean: rm -f *.o clipfs -.PHONY: all clean +install: clipfs + mkdir -p $(DESTDIR)$(MANDIR) + mkdir -p $(DESTDIR)$(BINDIR) + cp -f clipfs $(DESTDIR)$(BINDIR)/clipfs + cp -f clipfs.1 $(DESTDIR)$(MANDIR)/clipfs.1 + chmod 755 $(DESTDIR)$(BINDIR)/clipfs + chmod 644 $(DESTDIR)$(MANDIR)/clipfs.1 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/clipfs + rm -f $(DESTDIR)$(MANDIR)/clipfs.1 + +.PHONY: all clean install uninstall -- cgit v1.1