summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 18 insertions, 1 deletions
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