summaryrefslogtreecommitdiff
path: root/BS/baselines/cpu/Makefile
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2025-01-10 09:54:52 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2025-01-10 09:54:52 +0100
commitb5b95dad5e2d80f06932fbe97e2c87f5ba4d9a5b (patch)
tree9c8a7af89b0a6265c740cef5347132fbffa9a52c /BS/baselines/cpu/Makefile
parentaacf0527a5ed4ef76be02243e011fb9c8bdcf319 (diff)
BS: Support CPU baseline compilation without -march=native
Diffstat (limited to 'BS/baselines/cpu/Makefile')
-rw-r--r--BS/baselines/cpu/Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/BS/baselines/cpu/Makefile b/BS/baselines/cpu/Makefile
index b67602f..735fe84 100644
--- a/BS/baselines/cpu/Makefile
+++ b/BS/baselines/cpu/Makefile
@@ -1,16 +1,23 @@
-NUMA ?= 0
-NUMA_MEMCPY ?= 0
-FLAGS =
+native ?= 1
+numa ?= 0
+numa_memcpy ?= 0
-ifeq (${NUMA}, 1)
- FLAGS += -lnuma
+CFLAGS =
+LDFLAGS =
+
+ifeq (${native}, 1)
+ CFLAGS += -march=native
+endif
+
+ifeq (${numa}, 1)
+ LDFLAGS += -lnuma
endif
.PHONY: all
all: bs_omp
bs_omp: bs_omp.c
- gcc -Wall -Wextra -pedantic -march=native -O2 -DNUMA=${NUMA} -DNUMA_MEMCPY=${NUMA_MEMCPY} bs_omp.c -o bs_omp -fopenmp ${FLAGS}
+ gcc -Wall -Wextra -pedantic -O3 ${CFLAGS} -DNUMA=${numa} -DNUMA_MEMCPY=${numa_memcpy} bs_omp.c -o bs_omp -fopenmp ${LDFLAGS}
bs_omp_O0: bs_omp.c
gcc bs_omp.c -o bs_omp_O0 -fopenmp