CC = /usr/bin/gcc
CFLAGS = -Wall -g -O3 -msse2avx -march=corei7-avx -fomit-frame-pointer

all: test/test_sign \
		 test/speed\

test/test_sign: test/test_sign.c crypto_hash_sha512.c poly.c sign.c randombytes.c fastrandombytes.c cpucycles.c ntt_transform.c crypto_stream_salsa20_amd64_xmm6.s api.h crypto_hash_sha512.h crypto_sign.h ntt_const512.h params.h poly.h randombytes.h crypto_int16.h cpucycles.h fastrandombytes.h 
	$(CC) $(CFLAGS) test/test_sign.c crypto_hash_sha512.c poly.c sign.c randombytes.c fastrandombytes.c cpucycles.c ntt_transform.c crypto_stream_salsa20_amd64_xmm6.s -lm -o $@ 


test/speed: test/speed.c crypto_hash_sha512.c poly.c sign.c randombytes.c fastrandombytes.c cpucycles.c ntt_transform.c crypto_stream_salsa20_amd64_xmm6.s api.h crypto_hash_sha512.h crypto_sign.h ntt_const512.h params.h poly.h randombytes.h fastrandombytes.h crypto_int16.h cpucycles.h
	$(CC) $(CFLAGS) test/speed.c crypto_hash_sha512.c poly.c sign.c randombytes.c fastrandombytes.c cpucycles.c ntt_transform.c crypto_stream_salsa20_amd64_xmm6.s -lm -o $@ 


.PHONY: clean

clean:
	-rm test/test_sign
	-rm test/speed
