From a24071ae913b223487df78859c8d830f9e69f580 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 28 Aug 2024 16:42:05 +0200 Subject: Second commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2