2019-01-15 15:03:38 +00:00
|
|
|
|
2019-01-15 15:14:21 +00:00
|
|
|
# assumes a SCHEME variable; e.g. make functest_kem SCHEME=crypto_kem/kyber768
|
2019-01-15 15:03:38 +00:00
|
|
|
ifndef SCHEME
|
|
|
|
# TODO make this more granular, i.e. make clean should not require SCHEME
|
|
|
|
$(error SCHEME variable is not set)
|
|
|
|
endif
|
|
|
|
|
2019-01-15 15:09:32 +00:00
|
|
|
CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99
|
|
|
|
|
2019-01-15 15:14:21 +00:00
|
|
|
functest_kem: crypto_kem/test.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h)
|
2019-01-15 15:03:38 +00:00
|
|
|
mkdir -p bin
|
|
|
|
$(CC) $(CFLAGS)\
|
|
|
|
-I"./common/"\
|
2019-01-15 15:14:21 +00:00
|
|
|
-I"$(SCHEME)/clean/"\
|
2019-01-15 15:03:38 +00:00
|
|
|
-o bin/functest_kem_$(SCHEME)\
|
|
|
|
common/*.c\
|
2019-01-15 15:14:21 +00:00
|
|
|
$(SCHEME)/clean/*.c\
|
2019-01-15 15:03:38 +00:00
|
|
|
crypto_kem/test.c
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf bin
|