2013-03-12 11:06:10 +01:00
|
|
|
CC=gcc
|
2016-10-12 16:19:55 +02:00
|
|
|
CFLAGS=-O2 -I../testvectors -Wall -Wextra -std=c89 -pedantic -Wno-long-long
|
2016-10-11 14:54:09 +02:00
|
|
|
BLAKEBINS=blake2s blake2b blake2sp blake2bp blake2xs blake2xb
|
2013-02-01 16:44:36 +01:00
|
|
|
|
2016-10-11 14:54:09 +02:00
|
|
|
all: $(BLAKEBINS) check
|
2013-02-01 16:44:36 +01:00
|
|
|
|
|
|
|
blake2s: blake2s-ref.c
|
|
|
|
$(CC) blake2s-ref.c -o $@ $(CFLAGS) -DBLAKE2S_SELFTEST
|
|
|
|
|
|
|
|
blake2b: blake2b-ref.c
|
|
|
|
$(CC) blake2b-ref.c -o $@ $(CFLAGS) -DBLAKE2B_SELFTEST
|
|
|
|
|
|
|
|
blake2sp: blake2sp-ref.c blake2s-ref.c
|
2014-08-06 12:31:37 +02:00
|
|
|
$(CC) blake2sp-ref.c blake2s-ref.c -o $@ $(CFLAGS) -DBLAKE2SP_SELFTEST
|
2013-02-01 16:44:36 +01:00
|
|
|
|
|
|
|
blake2bp: blake2bp-ref.c blake2b-ref.c
|
2014-08-06 12:31:37 +02:00
|
|
|
$(CC) blake2bp-ref.c blake2b-ref.c -o $@ $(CFLAGS) -DBLAKE2BP_SELFTEST
|
2013-02-01 16:44:36 +01:00
|
|
|
|
2016-10-11 14:54:09 +02:00
|
|
|
blake2xs: blake2xs-ref.c blake2s-ref.c
|
|
|
|
$(CC) blake2xs-ref.c blake2s-ref.c -o $@ $(CFLAGS) -DBLAKE2XS_SELFTEST
|
|
|
|
|
|
|
|
blake2xb: blake2xb-ref.c blake2b-ref.c
|
|
|
|
$(CC) blake2xb-ref.c blake2b-ref.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
|
|
|
|
2013-02-01 16:44:36 +01:00
|
|
|
kat:
|
2016-10-11 20:48:16 +02:00
|
|
|
$(CC) $(CFLAGS) -o genkat-c genkat-c.c blake2b-ref.c blake2s-ref.c blake2sp-ref.c blake2bp-ref.c blake2xs-ref.c blake2xb-ref.c
|
|
|
|
$(CC) $(CFLAGS) -o genkat-json genkat-json.c blake2b-ref.c blake2s-ref.c blake2sp-ref.c blake2bp-ref.c blake2xs-ref.c blake2xb-ref.c
|
2016-04-22 22:12:08 +02:00
|
|
|
./genkat-c > blake2-kat.h
|
|
|
|
./genkat-json > blake2-kat.json
|
2013-02-01 16:44:36 +01:00
|
|
|
|
2016-06-11 11:29:09 +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)
|