1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-08 06:36:11 +02:00
BLAKE3/c/Makefile
Jack O'Connor a7579d30ad merge BLAKE3-c into this repo
This is commit 4476d9da0e370993823e7ad17592b84e905afd76 of
https://github.com/veorq/BLAKE3-c.
2020-01-09 09:48:52 -05:00

25 lines
713 B
Makefile

NAME=blake3
CC=gcc
CFLAGS=-O3 -Wall -Wextra -std=c11 -pedantic
all: blake3.c blake3_dispatch.c blake3_portable.c main.c blake3_sse41.o blake3_avx2.o blake3_avx512.o
$(CC) $(CFLAGS) $^ -o $(NAME)
blake3_sse41.o: blake3_sse41.c
$(CC) $(CFLAGS) -c $^ -o $@ -msse4.1 -D BLAKE3_USE_SSE41
blake3_avx2.o: blake3_avx2.c # blake3_sse41.c
$(CC) $(CFLAGS) -c $^ -o $@ -mavx2 -D BLAKE3_USE_SSE41 -D BLAKE3_USE_AVX2
blake3_avx512.o: blake3_avx512.c
$(CC) $(CFLAGS) -c $^ -o $@ -mavx512f -mavx512vl -D BLAKE3_USE_SSE41 -D BLAKE3_USE_AVX2 -D BLAKE3_USE_AVX512
blake3_neon.o: blake3_neon.c
$(CC) $(CFLAGS) -c $^ -o $@ -D BLAKE3_USE_NEON
test: CFLAGS += -DBLAKE3_TESTING
test: all
./test.py
clean:
rm -f $(NAME) *.o