Committing Intel(R) TBB 2018 source code
[platform/upstream/tbb.git] / build / big_iron.inc
1 # Copyright (c) 2005-2017 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 #
16 #
17 #
18
19 #------------------------------------------------------------------------------
20 # Defines settings for building the TBB run-time as a static library.
21 # Use these only on platforms where dynamic linking is impractical.
22 #
23 # IF YOU USE TBB AS A STATIC LIBRARY, YOU MUST GUARANTEE THAT ONLY ONE COPY OF 
24 # THE TBB RUN-TIME IS LINKED INTO AN APPLICATION!  LINKING IN MULTIPLE COPIES
25 # OF THE TBB RUN-TIME, DIRECTLY OR INDIRECTLY, MAY CAUSE PROGRAM FAILURE!
26 #------------------------------------------------------------------------------
27
28 # Note that ITT_NOTIFY allows to selectively remove the definition of
29 # DO_ITT_NOTIFY without sabotaging deferred expansion of CPLUS_FLAGS.
30 # TODO: currently only in linux.{gcc,xl}.inc
31
32 # Note that -pthread with xl gives "1501-210 (W) command option t contains an incorrect subargument";
33 # multithreading is instead achieved by using the _r affix in the compiler name.
34 # TODO: is -lpthread still relevant/needed with XL and _r affix?
35
36 # Note that usage of dynamic (shared) libraries is disabled
37 # (via -D__TBB_DYNAMIC_LOAD_ENABLED=0 and LIBDL emptied) primarily for performance.
38
39 # OS specific settings =>
40     LIB_LINK_CMD = ar rcs
41     LIB_LINK_FLAGS =
42     LIB_LINK_LIBS =
43     LIB_OUTPUT_KEY =
44     DYLIB_KEY =
45     ifeq ($(tbb_os),linux)
46         ifeq ($(compiler),clang)
47             LIBS = -pthread -lrt
48         endif
49         ifeq ($(compiler),gcc)
50             LIBS = -pthread -lrt
51         endif
52         ifeq ($(compiler),xl)
53             LIBS = -lpthread -lrt
54         endif
55         LINK_FLAGS =
56     endif
57     override CXXFLAGS += -D__TBB_DYNAMIC_LOAD_ENABLED=0 -D__TBB_SOURCE_DIRECTLY_INCLUDED=1
58     ITT_NOTIFY =
59     DLL = a
60     LIBEXT = a
61     LIBPREF = lib
62     LIBDL =
63 # <= OS specific settings
64
65 TBB.DLL = $(LIBPREF)tbb$(DEBUG_SUFFIX).$(LIBEXT)
66 LINK_TBB.LIB = $(TBB.DLL)
67 TBB.LST =
68 TBB.DEF =
69 TBB_NO_VERSION.DLL =
70
71 MALLOC.DLL = $(LIBPREF)tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT)
72 LINK_MALLOC.LIB = $(MALLOC.DLL)
73 MALLOC.DEF =
74 MALLOC_NO_VERSION.DLL =
75 MALLOCPROXY.DLL =
76 MALLOCPROXY.DEF =