We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f87df8a + c57a95f commit 4844d2fCopy full SHA for 4844d2f
Makefile
@@ -23,13 +23,16 @@ CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
23
CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
24
-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
25
26
-OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=native src/opt.c -c \
+OPTTARGET ?= native
27
+OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
28
-o /dev/null 2>/dev/null; echo $$?)
29
# Detect compatible platform
30
ifneq ($(OPTTEST), 0)
31
+$(info Building without optimizations)
32
SRC += src/ref.c
33
else
- CFLAGS += -march=native
34
+$(info Building with optimizations for $(OPTTARGET))
35
+ CFLAGS += -march=$(OPTTARGET)
36
SRC += src/opt.c
37
endif
38
0 commit comments