aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fea0d36..547d19d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
-PREFIX = $(HOME)/.local/bin
+PREFIX = $(HOME)/.local
+MANPREFIX = $(PREFIX)/share/man
all: dragon
@@ -6,5 +7,12 @@ dragon: dragon.c
$(CC) --std=c99 -Wall $(DEFINES) dragon.c -o dragon `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`
install: dragon
- mkdir -p $(PREFIX)
- cp dragon $(PREFIX)
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f dragon $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/dragon
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ cp -f dragon.1 $(DESTDIR)$(MANPREFIX)/man1/dragon.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dragon.1
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/dragon $(DESTDIR)$(MANPREFIX)/man1/dragon.1
bgstack15