summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/makefile b/makefile
index 6fbd1c1..e857d33 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,5 @@
PREFIX = /usr/local
+MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
@@ -6,7 +7,7 @@ X11LIB = /usr/X11R6/lib
INCS = -I$(X11INC)
LIBS = -L$(X11LIB) -lX11
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L
+CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os $(INCS) $(CPPFLAGS)
LDFLAGS = $(LIBS)
@@ -24,8 +25,12 @@ install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f piss $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/piss
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ cp -f src/piss.1 $(DESTDIR)$(MANPREFIX)/man1/piss.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/piss.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/piss
+ rm -f $(DESTDIR)$(MANPREFIX)/man1/piss.1
.PHONY: all clean install uninstall