Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/BLAKE2/BLAKE2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'b2sum/makefile')
-rw-r--r--b2sum/makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/b2sum/makefile b/b2sum/makefile
index 5b79ee2..4c75924 100644
--- a/b2sum/makefile
+++ b/b2sum/makefile
@@ -1,10 +1,20 @@
-CC=gcc
-CFLAGS=-std=c99 -O3 -march=native -I../sse -static -fopenmp
+PROG=b2sum
+PREFIX?=/usr/local
+MANDIR?=$(PREFIX)/man
+CC?=gcc
+CFLAGS?=-O3 -march=native -static
+CFLAGS+=-std=c99 -I../sse -fopenmp
LIBS=
#FILES=b2sum.c ../ref/blake2b-ref.c ../ref/blake2s-ref.c ../ref/blake2bp-ref.c ../ref/blake2sp-ref.c
FILES=b2sum.c ../sse/blake2b.c ../sse/blake2s.c ../sse/blake2bp.c ../sse/blake2sp.c
all: $(FILES)
- $(CC) $(FILES) $(CFLAGS) $(LIBS) -o b2sum
+ $(CC) $(FILES) $(CFLAGS) $(LIBS) -o $(PROG)
-clean:
- rm -f b2sum
+clean:
+ rm -f $(PROG)
+
+install:
+ install -d $(DESTDIR)$(PREFIX)/bin
+ install -d $(DESTDIR)$(MANDIR)/man1
+ install -m 755 $(PROG) $(DESTDIR)$(PREFIX)/bin
+ install -m 644 b2sum.1 $(DESTDIR)$(MANDIR)/man1/$(PROG).1