aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-30 17:20:30 +0200
committerMattias Andrée <maandree@kth.se>2024-08-30 17:20:30 +0200
commit87437d71b36518dac5086f8cc92480935e4cf60b (patch)
tree8cabd9b8871320216d371aa7c0e8774fd06d91f4 /Makefile
parentm + add support for z parameter for keccak (diff)
downloadlibhashsum-87437d71b36518dac5086f8cc92480935e4cf60b.tar.gz
libhashsum-87437d71b36518dac5086f8cc92480935e4cf60b.tar.bz2
libhashsum-87437d71b36518dac5086f8cc92480935e4cf60b.tar.xz
m + add man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 26 insertions, 4 deletions
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