aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-06-22 22:57:20 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-06-22 22:57:20 -0700
commit34271c906a2de43a68d2fa764d31e6f5b2c3299f (patch)
tree61c86fbd59c9ef204dbaea056e2f4206de75486c
parentce65b24fd10ec85f46e946470d1d5cae055f4562 (diff)
downloadconfconf-34271c906a2de43a68d2fa764d31e6f5b2c3299f.tar.gz
add install / uninstall to Makefile
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 78b271a..3fbe574 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ CC = cc
CFLAGS = -O2
CFLAGSDEBUG = -std=c99 -Wall -pedantic -ggdb3 -O0 -DDEBUG
PREFIX = /usr/local
+MANPREFIX = /usr/local/share/man
all: confconf
@@ -12,9 +13,15 @@ debug: dbg_confconf
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
- mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f confconf $(DESTDIR)$(PREFIX)/bin
- gzip < confconf.1 > $(DESTDIR)$(PREFIX)/share/man/man1/confconf.1.gz
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/confconf
+ cp -f doc/man/confconf.1 $(DESTDIR)$(MANPREFIX)/man1/confconf.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/confconf.1
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/confconf
+ rm -f $(DESTDIR)$(MANPREFIX)/man1/confconf.1
confconf: build/release build/release/opt.o build/release/tok.o build/release/main.o build/release/analyse.o build/release/parse.o build/release/gen.o
$(CC) $(LDFLAGS) -o confconf build/release/opt.o build/release/tok.o build/release/main.o build/release/analyse.o build/release/parse.o build/release/gen.o $(LDLIBS)
@@ -74,3 +81,5 @@ clean:
rm -f confconf
rm -f dbg_confconf
rm -rf build
+
+.PHONY: all debug install uninstall confconf dbg_confconf clean