aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-10 18:09:37 +0100
committerMattias Andrée <maandree@kth.se>2019-02-10 18:09:37 +0100
commitdbad0c3027a170e51a4a33c381bc24ec2ec8b09b (patch)
tree02bfae57552f0ad114a6a5c644c68cb46b162b06 /Makefile
parentAdd tests for HMAC (diff)
downloadlibsha2-1.0.tar.gz
libsha2-1.0.tar.bz2
libsha2-1.0.tar.xz
Improve makefile1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 14be91d..491e31c 100644
--- a/Makefile
+++ b/Makefile
@@ -2,12 +2,15 @@
CONFIGFILE = config.mk
+OSCONFIGFILE = linux.mk
+# Change to macos.mk for Mac OS
+
LIB_MAJOR = 1
LIB_MINOR = 0
LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR)
include $(CONFIGFILE)
-
+include $(OSCONFIGFILE)
HDR =\
libsha2.h\
@@ -87,9 +90,9 @@ install:
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man0"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man3"
cp -- libsha2.a "$(DESTDIR)$(PREFIX)/lib"
- cp -- libsha2.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT).$(LIB_MAJOR).$(LIB_MINOR)"
- ln -sf -- "libsha2.$(LIBEXT).$(LIB_MAJOR).$(LIB_MINOR)" "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT).$(LIB_MAJOR)"
- ln -sf -- "libsha2.$(LIBEXT).$(LIB_MAJOR)" "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT)"
+ cp -- libsha2.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBMINOREXT)"
+ ln -sf -- "libsha2.$(LIBMINOREXT).$(LIB_MINOR)" "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBMAJOREXT)"
+ ln -sf -- "libsha2.$(LIBMAJOREXT)" "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT)"
cp -- libsha2.h "$(DESTDIR)$(PREFIX)/include"
cp -- $(MAN0) "$(DESTDIR)$(MANPREFIX)/man0"
cp -- $(MAN3) "$(DESTDIR)$(MANPREFIX)/man3"
@@ -98,8 +101,8 @@ install:
uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsha2.a"
-rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT)"
- -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT).$(LIB_MAJOR)"
- -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBEXT).$(LIB_MAJOR).$(LIB_MINOR)"
+ -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBMAJOREXT)"
+ -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsha2.$(LIBMINOREXT)"
-rm -f -- "$(DESTDIR)$(PREFIX)/include/libsha2.h"
-cd -- "$(DESTDIR)$(MANPREFIX)/man0" && rm -f -- $(MAN0)
-cd -- "$(DESTDIR)$(MANPREFIX)/man3" && rm -f -- $(MAN3)