diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 10:23:41 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 10:23:41 +0100 |
commit | 871ab174f5edc761adc0e21bf8fb9ce82b898d26 (patch) | |
tree | fec338717fd36c5d5ba551d870c8e6a4b7bd98ed /TRNS/baselines/cpu/Makefile | |
parent | ffc37b5f40278ff6b736fb2aeaa407171bd103da (diff) |
TRNS: Support compilation without -march=native
Diffstat (limited to 'TRNS/baselines/cpu/Makefile')
-rw-r--r-- | TRNS/baselines/cpu/Makefile | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/TRNS/baselines/cpu/Makefile b/TRNS/baselines/cpu/Makefile index 236f7bb..438b9fb 100644 --- a/TRNS/baselines/cpu/Makefile +++ b/TRNS/baselines/cpu/Makefile @@ -32,16 +32,23 @@ # THE SOFTWARE. # -NUMA ?= 0 -NUMA_MEMCPY ?= 0 -FLAGS = +native ?= 1 +numa ?= 0 +numa_memcpy ?= 0 -ifeq (${NUMA}, 1) +CFLAGS = +LDFLAGS = + +ifeq (${native}, 1) + CFLAGS += -march=native +endif + +ifeq (${numa}, 1) FLAGS += -lnuma endif CXX=g++ -CXX_FLAGS=-std=c++11 -Wall -Wextra -pedantic -DNUMA=${NUMA} -DNUMA_MEMCPY=${NUMA_MEMCPY} +CXX_FLAGS=-std=c++11 -Wall -Wextra -pedantic -DNUMA=${numa} -DNUMA_MEMCPY=${numa_memcpy} LIB=-L/usr/lib/ -lm -pthread @@ -52,7 +59,7 @@ EXE=trns all: trns trns: ${SRC} - $(CXX) -O2 $(CXX_FLAGS) $(SRC) $(LIB) -o $(EXE) $(FLAGS) + $(CXX) -O3 $(CXX_FLAGS) ${CFLAGS} $(SRC) $(LIB) -o $(EXE) ${LDFLAGS} trns_O0: ${SRC} $(CXX) $(CXX_FLAGS) $(SRC) $(LIB) -o $(EXE)_O0 |