2013-02-01 16:44:36 +01:00
|
|
|
CC=gcc
|
2016-10-12 16:19:55 +02:00
|
|
|
CFLAGS=-O3 -I../testvectors -Wall -Wextra -std=c89 -pedantic -Wno-long-long
|
2016-10-11 22:54:18 +02:00
|
|
|
BLAKEBINS=blake2s blake2b blake2sp blake2bp blake2xs blake2xb
|
2013-02-01 16:44:36 +01:00
|
|
|
|
2016-10-11 22:54:18 +02:00
|
|
|
all: $(BLAKEBINS) check
|
2013-02-01 16:44:36 +01:00
|
|
|
|
|
|
|
blake2s: blake2s.c
|
|
|
|
$(CC) blake2s.c -o $@ $(CFLAGS) -DBLAKE2S_SELFTEST
|
|
|
|
|
|
|
|
blake2b: blake2b.c
|
|
|
|
$(CC) blake2b.c -o $@ $(CFLAGS) -DBLAKE2B_SELFTEST
|
|
|
|
|
|
|
|
blake2sp: blake2sp.c blake2s.c
|
|
|
|
$(CC) blake2sp.c blake2s.c -o $@ $(CFLAGS) -DBLAKE2SP_SELFTEST
|
|
|
|
|
|
|
|
blake2bp: blake2bp.c blake2b.c
|
|
|
|
$(CC) blake2bp.c blake2b.c -o $@ $(CFLAGS) -DBLAKE2BP_SELFTEST
|
|
|
|
|
2016-10-11 22:54:18 +02:00
|
|
|
blake2xs: blake2xs.c blake2s.c
|
|
|
|
$(CC) blake2xs.c blake2s.c -o $@ $(CFLAGS) -DBLAKE2XS_SELFTEST
|
|
|
|
|
|
|
|
blake2xb: blake2xb.c blake2b.c
|
|
|
|
$(CC) blake2xb.c blake2b.c -o $@ $(CFLAGS) -DBLAKE2XB_SELFTEST
|
|
|
|
|
|
|
|
check: blake2s blake2b blake2sp blake2bp blake2xs blake2xb
|
|
|
|
./blake2s
|
|
|
|
./blake2b
|
|
|
|
./blake2sp
|
|
|
|
./blake2bp
|
|
|
|
./blake2xs
|
|
|
|
./blake2xb
|
2016-06-11 11:29:09 +02:00
|
|
|
|
2016-04-22 22:12:08 +02:00
|
|
|
kat:
|
2016-10-11 22:54:18 +02:00
|
|
|
$(CC) $(CFLAGS) -o genkat-c genkat-c.c blake2b.c blake2s.c blake2sp.c blake2bp.c blake2xs.c blake2xb.c
|
|
|
|
$(CC) $(CFLAGS) -g -o genkat-json genkat-json.c blake2b.c blake2s.c blake2sp.c blake2bp.c blake2xs.c blake2xb.c
|
2016-04-22 22:12:08 +02:00
|
|
|
./genkat-c > blake2-kat.h
|
|
|
|
./genkat-json > blake2-kat.json
|
|
|
|
|
2016-06-10 12:37:44 +02:00
|
|
|
clean:
|
2016-10-12 10:15:41 +02:00
|
|
|
rm -rf *.o genkat-c genkat-json blake2-kat.h blake2-kat.json $(BLAKEBINS)
|