diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 08:28:32 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 08:28:32 +0100 |
commit | 73778459c0ee01c6d201807fb2189c08fb0c106e (patch) | |
tree | fdb1255b6b8c665ffbb9983518be88af2574fcc1 | |
parent | 473ffedea1b5c5543e140562416537f434e394e9 (diff) |
Use native=0 to compile without -march=native (needed for, e.g., valgrind)
-rw-r--r-- | Makefile | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -1,24 +1,35 @@ EXTRA_CFLAGS = EXTRA_LIBS = -ifdef pthread + +native ?= 1 +pthread ?= 0 +numa ?= 0 +avx512 ?= 0 +debug ?= 0 + +ifeq (${native}, 1) + EXTRA_CFLAGS += -march=native +endif + +ifeq (${pthread}, 1) EXTRA_CFLAGS += -DMULTITHREADED -pthread endif -ifdef numa +ifeq (${numa}, 1) EXTRA_CFLAGS += -DNUMA EXTRA_LIBS += -lnuma endif -ifdef avx512 +ifeq (${avx512}, 1) EXTRA_CFLAGS += -DHAVE_AVX512 endif -ifdef debug +ifeq (${debug}, 1) EXTRA_CFLAGS += -ggdb endif mbw: mbw.c - gcc -Wall -Wextra -pedantic -O3 -march=native ${EXTRA_CFLAGS} -o mbw mbw.c ${EXTRA_LIBS} + gcc -Wall -Wextra -pedantic -O3 ${EXTRA_CFLAGS} -o mbw mbw.c ${EXTRA_LIBS} .PHONY: clean clean: |