2020-09-07 19:23:34 +01:00
|
|
|
# This Makefile can be used with GNU Make or BSD Make
|
|
|
|
|
|
|
|
LIB=libhqc-256_avx2.a
|
|
|
|
HEADERS=alpha_table.h api.h bch.h code.h fft.h gen_matrix.h gf2x.h gf.h hqc.h parameters.h parsing.h repetition.h vector.h
|
|
|
|
OBJECTS=bch.o code.o fft.o gf2x.o gf.o hqc.o kem.o parsing.o repetition.o vector.o
|
|
|
|
|
2020-10-23 13:26:41 +01:00
|
|
|
CFLAGS=-O3 -mavx2 -mbmi -mpclmul -Wall -Wextra -Wshadow -Wpedantic -Wvla -Werror -Wredundant-decls -Wmissing-prototypes -std=c99 -I../../../common $(EXTRAFLAGS)
|
2020-09-07 19:23:34 +01:00
|
|
|
|
|
|
|
all: $(LIB)
|
|
|
|
|
|
|
|
%.o: %.s $(HEADERS)
|
|
|
|
$(AS) -o $@ $<
|
|
|
|
|
|
|
|
%.o: %.c $(HEADERS)
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(LIB): $(OBJECTS)
|
|
|
|
$(AR) -r $@ $(OBJECTS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJECTS)
|
|
|
|
$(RM) $(LIB)
|