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