-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
31 lines (26 loc) · 842 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.PHONY: test clean
DESTDIR := ./build
BLAKE3_SRCS := blake3.c blake3_dispatch.c blake3_portable.c
BLAKE3_FLAGS := -I $(BLAKE3_CSRC)
ifneq ($(filter aarch64-%, $(system)),)
BLAKE3_SRCS += blake3_neon.c
else
BLAKE3_FLAGS += -DBLAKE3_USE_NEON=0
endif
ifneq ($(filter x86_64-%, $(system)),)
BLAKE3_SRCS += blake3_sse2_x86-64_unix.S \
blake3_sse41_x86-64_unix.S \
blake3_avx2_x86-64_unix.S \
blake3_avx512_x86-64_unix.S
else
BLAKE3_FLAGS += -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 \
-DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512
endif
$(DESTDIR)/trace-nix.so: trace-nix.c Makefile
@mkdir -p $(DESTDIR)
$(CC) -fPIC -shared -o $@ $< \
$(BLAKE3_FLAGS) $(addprefix $(BLAKE3_CSRC)/, $(BLAKE3_SRCS))
test: build/trace-nix.so
./test.sh
clean:
rm -rf build test-tmp