merge with kernels from MH's master thesis
[LbmBenchmarkKernelsPublic.git] / src / config.linux-intel.mk
CommitLineData
10988083
MW
1# --------------------------------------------------------------------------
2#
3# Copyright
4# Markus Wittmann, 2016, 2017
5# RRZE, University of Erlangen-Nuremberg, Germany
6# markus.wittmann -at- fau.de or hpc -at- rrze.fau.de
7#
8# Viktor Haag, 2016
9# LSS, University of Erlangen-Nuremberg, Germany
10#
8cafd9ea
MW
11# Michael Hussnaetter, 2017-2018
12# University of Erlangen-Nuremberg, Germany
13# michael.hussnaetter -at- fau.de
14#
10988083
MW
15# This file is part of the Lattice Boltzmann Benchmark Kernels (LbmBenchKernels).
16#
17# LbmBenchKernels is free software: you can redistribute it and/or modify
18# it under the terms of the GNU General Public License as published by
19# the Free Software Foundation, either version 3 of the License, or
20# (at your option) any later version.
21#
22# LbmBenchKernels is distributed in the hope that it will be useful,
23# but WITHOUT ANY WARRANTY; without even the implied warranty of
24# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25# GNU General Public License for more details.
26#
27# You should have received a copy of the GNU General Public License
28# along with LbmBenchKernels. If not, see <http://www.gnu.org/licenses/>.
29#
30# --------------------------------------------------------------------------
31
32
33# ------------------------------------------------------------------------
34# C compiler/linker to use.
35# Flags are specified at the end of the file.
36# ------------------------------------------------------------------------
37CC = icc
38LD = icc
39
40# ------------------------------------------------------------------------
41
42# Preprocessing variables.
43D = -D
44I = -I
45PP_FLAGS +=
46
47# Architecture to optimize for.
48TARCH ?= -xAVX
49
50# Generated dependencies, can be left empty.
51MAKE_DEPEND = $(CC) -MM -MQ'$(OBJECT_DIR)/$(<:%.c=%.o)' -MF'$(DEP_DIR)/$(<:%.c=%.d)' $(PP_FLAGS) $< > /dev/null
52
53# Generates dependencies, can be left empty.
54# $(call make_depend,<source-file>,<source-file-to-generate-dependency-for)
55define make_depend
56 $(CC) -MM -MQ'$(OBJECT_DIR)/$(2:%.c=%.o)' -MF'$(DEP_DIR)/$(2:%.c=%.d)' $(PP_FLAGS) $1 > /dev/null
57endef
58
59ifeq (on,$(OPENMP))
60 OPENMP_C_FLAGS += -qopenmp
61 OPENMP_LD_FLAGS += -qopenmp
62endif
63
64ifeq (release,$(BUILD))
65
66 C_FLAGS += -O3 $(TARCH)
67 LD_FLAGS += -O3 $(TARCH)
68
69 PP_FLAGS +=
70
71else
72ifeq (debug,$(BUILD))
73
74 C_FLAGS += -O0 $(TARCH) -g -fstack-protector -debug inline-debug-info -debug extended -debug variable-locations
75 LD_FLAGS += -O0 $(TARCH) -g -fstack-protector -debug inline-debug-info -debug extended -debug variable-locations
76
77 # Intel compiler intrinsic reference:
78 # debugging: compile with -D__INTEL_COMPILER_USE_INTRINSIC_PROTOTYPES for
79 # improved compile-time checking
80 # release: remove this option as it significantly increases compile time
81
82 PP_FLAGS += $(D)DEBUG $(D)__INTEL_COMPILER_USE_INTRINSIC_PROTOTYPES
83
84else
85 $(error unknown BUILD=$(BUILD), specify release or debug)
86endif
87endif
88
89ifeq (on,$(DEBUG_SYMBOLS))
90 C_FLAGS += -g
91 LD_FLAGS += -g
92endif
93
94
95# ------------------------------------------------------------------------
96# C compiler/linker flags to use.
97# ------------------------------------------------------------------------
98C_FLAGS += -Wall -Wcheck -Wabi -Wdeprecated -Wextra-tokens -Wformat -Wformat-security -Wshadow -Wuninitialized -Wunused-variable \
99 -fno-alias -fargument-noalias -fno-fnalias -std=c99 \
100 -MT $@ -MF $(patsubst $(OBJECT_DIR)/%.o,$(DEP_DIR)/%.d,$@) -MMD -diag-disable 10010 $(OPENMP_C_FLAGS)
101LD_FLAGS += -Wall -Wcheck $(OPENMP_LD_FLAGS)
102LD_LIBS +=
103
104
This page took 0.337162 seconds and 5 git commands to generate.