1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-12-04 21:34:01 +00:00
pqcrypto/crypto_sign/dilithium4/avx2/Makefile

41 lines
1.1 KiB
Makefile
Raw Normal View History

2019-12-06 15:16:41 +00:00
# This Makefile can be used with GNU Make or BSD Make
LIB=libdilithium4_avx2.a
2019-12-11 14:47:38 +00:00
SOURCES = fips202x4.c invntt.S nttconsts.c ntt.S packing.c pointwise.S poly.c \
polyvec.c reduce.S rejsample.c rounding.c sign.c stream.c
2019-12-06 15:16:41 +00:00
OBJECTS = fips202x4.o invntt.o nttconsts.o ntt.o packing.o pointwise.o poly.o \
polyvec.o reduce.o rejsample.o rounding.o sign.o stream.o
HEADERS = alignment.h api.h params.h sign.h polyvec.h poly.h packing.h ntt.h \
nttconsts.h reduce.h rounding.h rejsample.h symmetric.h stream.h \
2019-12-11 14:47:38 +00:00
fips202x4.h shuffle.inc cdecl.inc
2019-12-06 15:16:41 +00:00
CFLAGS=-O3 -Wall -Wextra -Wpedantic -Wvla -Werror \
-Wmissing-prototypes -Wredundant-decls -std=c99 \
2020-03-27 06:24:29 +00:00
-Wcast-align -Werror=shadow\
2019-12-06 15:16:41 +00:00
-mavx2 -mbmi -mpopcnt -I../../../common $(EXTRAFLAGS)
all: $(LIB)
KECCAK4XDIR=../../../common/keccak4x
KECCAK4XOBJ=KeccakP-1600-times4-SIMD256.o
KECCAK4X=$(KECCAK4XDIR)/$(KECCAK4XOBJ)
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c -o $@ $<
%.o: %.S $(HEADERS)
2019-12-11 14:06:02 +00:00
$(CC) -c -o $@ $<
2019-12-06 15:16:41 +00:00
$(LIB): $(OBJECTS) $(KECCAK4X)
$(AR) -r $@ $^
$(KECCAK4X):
$(MAKE) -C $(KECCAK4XDIR) $(KECCAK4XOBJ)
clean:
$(RM) $(OBJECTS)
$(RM) $(LIB)
$(MAKE) -C $(KECCAK4XDIR) clean