Make OpenMP support a config option

This commit is contained in:
Jan Eitzinger
2019-03-13 16:24:59 +01:00
parent d87d668dcd
commit cb45dd74d0
5 changed files with 22 additions and 10 deletions

View File

@@ -1,5 +1,3 @@
# Supported: GCC, CLANG, ICC
TAG ?= GCC
#CONFIGURE BUILD SYSTEM
TARGET = bwbench-$(TAG)
@@ -9,8 +7,8 @@ MAKE_DIR = ./
Q ?= @
#DO NOT EDIT BELOW
include $(MAKE_DIR)/include_$(TAG).mk
include $(MAKE_DIR)/config.mk
include $(MAKE_DIR)/include_$(TAG).mk
INCLUDES += -I./src/includes
VPATH = $(SRC_DIR)

View File

@@ -1,3 +1,8 @@
# Supported: GCC, CLANG, ICC
TAG ?= GCC
ENABLE_OPENMP = false
#Feature options
OPTIONS = -DSIZE=40000000ull
OPTIONS += -DNTIMES=10
OPTIONS += -DARRAY_ALIGNMENT=64

View File

@@ -1,7 +1,10 @@
CC = clang
LINKER = $(CC)
OPENMP = #-fopenmp
ifeq ($(ENABLE_OPENMP),true)
OPENMP = -fopenmp
endif
CFLAGS = -Ofast -std=c99 -pthread $(OPENMP)
LFLAGS = -pthread $(OPENMP)
DEFINES = -D_GNU_SOURCE

View File

@@ -1,9 +1,12 @@
CC = gcc
LINKER = $(CC)
OPENMP = # -fopenmp
CFLAGS = -Ofast -std=c11 -pthread $(OPENMP)
ifeq ($(ENABLE_OPENMP),true)
OPENMP = -fopenmp
endif
CFLAGS = -Ofast -std=c99 -pthread $(OPENMP)
LFLAGS = -pthread $(OPENMP)
DEFINES = -D_GNU_SOURCE
INCLUDES =
LIBS = -lpthread
LIBS =

View File

@@ -1,9 +1,12 @@
CC = icc
LINKER = $(CC)
OPENMP = #-qopenmp
CFLAGS = -Ofast -xhost -std=c11 -pthread $(OPENMP)
ifeq ($(ENABLE_OPENMP),true)
OPENMP = -qopenmp
endif
CFLAGS = -Ofast -xhost -std=c99 -pthread $(OPENMP)
LFLAGS = -pthread $(OPENMP)
DEFINES = -D_GNU_SOURCE
INCLUDES =
LIBS = -lpthread
LIBS =