From 87437d71b36518dac5086f8cc92480935e4cf60b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 30 Aug 2024 17:20:30 +0200 Subject: m + add man pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bd67c36..8845858 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,12 @@ LIB_NAME = hashsum OBJ =\ + $(OBJ_PUBLIC)\ + $(OBJ_HIDDEN) + +OBJ_PUBLIC =\ libhashsum_init_hasher.o\ - libhashsum_get_algorithm_string.o\ + libhashsum_get_algorithm_from_string.o\ libhashsum_init_hasher_from_string.o\ libhashsum_init_md2_hasher.o\ libhashsum_init_md4_hasher.o\ @@ -64,13 +68,19 @@ OBJ =\ libhashsum_init_blake384_hasher.o\ libhashsum_init_blake512_hasher.o\ libhashsum_init_blakeb_hasher.o\ - libhashsum_init_blake_hasher.o\ + libhashsum_init_blake_hasher.o + +OBJ_HIDDEN =\ libhashsum_reverse_byte__.o\ libhashsum_init_keccak__.o HDR =\ libhashsum.h\ - common.h + common.h\ + $(SUBHDR) + +SUBHDR =\ + libhashsum/internal.h TEST =\ md2.t\ @@ -104,6 +114,9 @@ TEST =\ LOBJ = $(OBJ:.o=.lo) TOBJ = $(TEST:.t=.o) +MAN3 = $(OBJ_PUBLIC:.o=.3) +MAN7 = libhashsum.7 + all: libhashsum.a libhashsum.$(LIBEXT) $(TEST) $(OBJ): $(HDR) @@ -140,13 +153,18 @@ check: $(TEST) install: libhashsum.a libhashsum.$(LIBEXT) mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" - mkdir -p -- "$(DESTDIR)$(PREFIX)/include" + mkdir -p -- "$(DESTDIR)$(PREFIX)/include/libhashsum" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man3" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man7" cp -- libhashsum.a "$(DESTDIR)$(PREFIX)/lib/" cp -- libhashsum.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libhashsum.$(LIBMINOREXT)" $(FIX_INSTALL_NAME) "$(DESTDIR)$(PREFIX)/lib/libhashsum.$(LIBMINOREXT)" ln -sf -- libhashsum.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libhashsum.$(LIBMAJOREXT)" ln -sf -- libhashsum.$(LIBMAJOREXT) "$(DESTDIR)$(PREFIX)/lib/libhashsum.$(LIBEXT)" cp -- libhashsum.h "$(DESTDIR)$(PREFIX)/include/" + cp -- $(SUBHDR) "$(DESTDIR)$(PREFIX)/include/libhashsum/" + cp -- $(MAN3) "$(DESTDIR)$(MANPREFIX)/man3/" + cp -- $(MAN7) "$(DESTDIR)$(MANPREFIX)/man7/" uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libhashsum.a" @@ -154,6 +172,10 @@ uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libhashsum.$(LIBMINOREXT)" -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libhashsum.$(LIBEXT)" -rm -f -- "$(DESTDIR)$(PREFIX)/include/libhashsum.h" + -cd -- "$(DESTDIR)$(PREFIX)/include/libhashsum/" && rm -f -- $(SUBHDR) + -rmdir -- "$(DESTDIR)$(PREFIX)/include/libhashsum" + -cd -- "$(DESTDIR)$(MANPREFIX)/man3/" && rm -f -- $(MAN3) + -cd -- "$(DESTDIR)$(MANPREFIX)/man7/" && rm -f -- $(MAN7) clean: -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.dll *.dylib *.t -- cgit v1.2.3-70-g09d2