aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-28 16:42:05 +0200
committerMattias Andrée <maandree@kth.se>2024-08-28 16:42:05 +0200
commita24071ae913b223487df78859c8d830f9e69f580 (patch)
treee2ec712cc29461c82cfdd477e8b1ba961b50018d /Makefile
parentFirst commit (diff)
downloadanysum-a24071ae913b223487df78859c8d830f9e69f580.tar.gz
anysum-a24071ae913b223487df78859c8d830f9e69f580.tar.bz2
anysum-a24071ae913b223487df78859c8d830f9e69f580.tar.xz
Second commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 25 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index ab1b4e4..f061ffa 100644
--- a/Makefile
+++ b/Makefile
@@ -10,24 +10,28 @@ include mk/after-config.mk
OBJ =\
anysum.o\
- patheq.o\
- openfile.o\
- hex.o\
- writeall.o\
- barrierwait.o\
- barriersend.o\
- format_result.o\
- feedbuffer.o\
- createbarriergroup.o\
- killbarriergroup.o\
- inithashers.o\
- destroyhashers.o\
- shiftbuffer.o\
- calculate.o
+ get.o\
+ check.o\
+ barrier.o\
+ hash.o\
+ write.o\
+ open.o\
+ read.o\
+ proc.o\
+ command.o\
+ opts.o\
+ cmdline_bsum.o\
+ cmdline_sha3sum.o\
+ cmdline_other.o\
+ cmdline.o
HDR =\
common.h
+MAN1 =\
+ anysum.1\
+ $(ALIASES:=.1)
+
all: anysum
$(OBJ): $(HDR)
@@ -41,11 +45,16 @@ install: anysum
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
cp -- anysum "$(DESTDIR)$(PREFIX)/bin/"
- cp -- anysum.1 "$(DESTDIR)$(MANPREFIX)/man1/"
+ cp -- $(MAN1) "$(DESTDIR)$(MANPREFIX)/man1/"
+ set -e; for a in $(ALIASES); do\
+ test ! -d "$(DESTDIR)$(PREFIX)/bin/$$a";\
+ ln -sf -- anysum "$(DESTDIR)$(PREFIX)/bin/$$a";\
+ done
uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/bin/anysum"
- -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/anysum.1"
+ -cd -- "$(DESTDIR)$(MANPREFIX)/man1/" && rm -f -- $(MAN1)
+ -cd -- "$(DESTDIR)$(PREFIX)/bin/" && rm -f -- $(ALIASES)
clean:
-rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda