1 # Copyright (c) 2005-2017 Intel Corporation
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
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.
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 #------------------------------------------------------------------------------
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
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?
36 # Note that usage of dynamic (shared) libraries is disabled
37 # (via -D__TBB_DYNAMIC_LOAD_ENABLED=0 and LIBDL emptied) primarily for performance.
39 # OS specific settings =>
45 ifeq ($(tbb_os),linux)
46 ifeq ($(compiler),clang)
49 ifeq ($(compiler),gcc)
57 override CXXFLAGS += -D__TBB_DYNAMIC_LOAD_ENABLED=0 -D__TBB_SOURCE_DIRECTLY_INCLUDED=1
63 # <= OS specific settings
65 TBB.DLL = $(LIBPREF)tbb$(DEBUG_SUFFIX).$(LIBEXT)
66 LINK_TBB.LIB = $(TBB.DLL)
71 MALLOC.DLL = $(LIBPREF)tbbmalloc$(DEBUG_SUFFIX).$(LIBEXT)
72 LINK_MALLOC.LIB = $(MALLOC.DLL)
74 MALLOC_NO_VERSION.DLL =