1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00
pqcrypto/Makefile
2019-01-15 16:34:01 +01:00

28 lines
730 B
Makefile

# assumes a SCHEME variable; e.g. make functest_kem SCHEME=crypto_kem/kyber768
ifndef SCHEME
# TODO make this more granular, i.e. make clean should not require SCHEME
$(error SCHEME variable is not set)
endif
# This -Wall was supported by the European Commission through the ERC Starting Grant 805031 (EPOQUE)
CFLAGS=-Wall -Wextra -Wpedantic -Werror -std=c99
functest: $(dir $(SCHEME))test.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h)
mkdir -p bin
$(CC) $(CFLAGS)\
-I"./common/"\
-I"$(SCHEME)/clean/"\
-o bin/functest_$(subst /,_,$(SCHEME))\
common/*.c\
$(SCHEME)/clean/*.c\
$<
.PHONY: clean
clean:
rm -rf bin
format:
find . -iname *.h -o -iname *.c | xargs clang-format -i -style=file