1
1
mirror of https://github.com/BLAKE2/BLAKE2 synced 2024-11-23 02:42:10 +01:00
BLAKE2/b2sum/makefile
Christian Heimes 81a1bcf245 Make BLAKE2 code C89 and MSVC friendly
This patch makes the BLAKE2 reference implementation compatible with C89
compilers and MSVC.

1) Use C comments (/* */) instead of C++ comments.
2) No declarations after statements. All variables are declared on the
   top of a block.
3) Optional inline with BLAKE2_LOCAL_INLINE() macro.

Signed-off-by: Christian Heimes <christian@python.org>
2016-04-22 12:07:57 +02:00

21 lines
630 B
Makefile

PROG=b2sum
PREFIX?=/usr/local
MANDIR?=$(PREFIX)/man
CC?=gcc
CFLAGS?=-O3 -march=native -static -Werror=declaration-after-statement
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 $(PROG)
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