merge with kernels from MH's master thesis
[LbmBenchmarkKernelsPublic.git] / src / config.linux-intel.mk
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 #   Michael Hussnaetter, 2017-2018
12 #   University of Erlangen-Nuremberg, Germany
13 #   michael.hussnaetter -at- fau.de
14 #
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 # ------------------------------------------------------------------------
37 CC              = icc
38 LD              = icc
39
40 # ------------------------------------------------------------------------
41
42 # Preprocessing variables.
43 D          = -D
44 I          = -I
45 PP_FLAGS  +=
46
47 # Architecture to optimize for.
48 TARCH      ?= -xAVX
49
50 # Generated dependencies, can be left empty.
51 MAKE_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)
55 define make_depend
56         $(CC) -MM -MQ'$(OBJECT_DIR)/$(2:%.c=%.o)' -MF'$(DEP_DIR)/$(2:%.c=%.d)' $(PP_FLAGS) $1 > /dev/null
57 endef
58
59 ifeq (on,$(OPENMP))
60   OPENMP_C_FLAGS  += -qopenmp
61   OPENMP_LD_FLAGS += -qopenmp
62 endif
63
64 ifeq (release,$(BUILD))
65
66   C_FLAGS      += -O3 $(TARCH)
67   LD_FLAGS     += -O3 $(TARCH)
68
69   PP_FLAGS     +=
70
71 else
72 ifeq (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
84 else
85   $(error unknown BUILD=$(BUILD), specify release or debug)
86 endif
87 endif
88
89 ifeq (on,$(DEBUG_SYMBOLS))
90   C_FLAGS      += -g
91   LD_FLAGS     += -g
92 endif
93
94
95 # ------------------------------------------------------------------------
96 # C compiler/linker flags to use.
97 # ------------------------------------------------------------------------
98 C_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)
101 LD_FLAGS       += -Wall -Wcheck $(OPENMP_LD_FLAGS)
102 LD_LIBS        +=
103
104
This page took 0.074489 seconds and 4 git commands to generate.