File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 2
2
3
3
DESTDIR := ./build
4
4
5
- BLAKE3_FLAGS := \
6
- -I "${BLAKE3_CSRC}" \
7
- -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512 \
8
- -DBLAKE3_USE_NEON=0 \
9
- $(addprefix ${BLAKE3_CSRC}/,blake3.c blake3_dispatch.c blake3_portable.c)
5
+ BLAKE3_SRCS := blake3.c blake3_dispatch.c blake3_portable.c
6
+ BLAKE3_FLAGS := -I $(BLAKE3_CSRC )
7
+ ifneq ($(filter aarch64-% , $(system ) ) ,)
8
+ BLAKE3_SRCS += blake3_neon.c
9
+ else
10
+ BLAKE3_FLAGS += -DBLAKE3_USE_NEON=0
11
+ endif
12
+ ifneq ($(filter x86_64-% , $(system ) ) ,)
13
+ BLAKE3_SRCS += blake3_sse2_x86-64_unix.S \
14
+ blake3_sse41_x86-64_unix.S \
15
+ blake3_avx2_x86-64_unix.S \
16
+ blake3_avx512_x86-64_unix.S
17
+ else
18
+ BLAKE3_FLAGS += -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 \
19
+ -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512
20
+ endif
10
21
11
- ${DESTDIR}/trace-nix.so : trace-nix.c
12
- @mkdir -p ${DESTDIR}
13
- ${CC} -fPIC -shared -o $@ $< ${BLAKE3_FLAGS}
22
+ $(DESTDIR ) /trace-nix.so : trace-nix.c Makefile
23
+ @mkdir -p $(DESTDIR )
24
+ $(CC ) -fPIC -shared -o $@ $< \
25
+ $(BLAKE3_FLAGS ) $(addprefix $(BLAKE3_CSRC ) /, $(BLAKE3_SRCS ) )
14
26
15
27
test : build/trace-nix.so
16
28
./test.sh
You can’t perform that action at this time.
0 commit comments