summary refs log tree commit diff
path: root/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'gfx')
-rw-r--r--gfx/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/gfx/Makefile b/gfx/Makefile
index df71a8aa..28ade67d 100644
--- a/gfx/Makefile
+++ b/gfx/Makefile
@@ -1,5 +1,8 @@
-BINS = brot gfxx
 GFX ?= cocoa
+PREFIX = ~/.local
+
+BINS = brot gfxx
+MAN1 = $(BINS:%=%.1)
 
 CFLAGS += -Wall -Wextra -Wpedantic
 LDLIBS = -lm -lz
@@ -28,8 +31,10 @@ clean:
 	rm -f tags *.o $(BINS)
 
 link:
-	mkdir -p ~/.local/bin
-	ln -s -f $(BINS:%=$(PWD)/%) ~/.local/bin
+	mkdir -p $(PREFIX)/bin $(PREFIX)/share/man/man1
+	ln -s -f $(BINS:%=$(PWD)/%) $(PREFIX)/bin
+	ln -s -f $(MAN1:%=$(PWD)/%) $(PREFIX)/share/man/man1
 
 unlink:
-	rm -f $(BINS:%=~/.local/bin/%)
+	rm -f $(BINS:%=$(PREFIX)/bin/%)
+	rm -f $(MAN1:%=$(PREFIX)/share/man/man1/%)