1 # Copyright (c) 2005-2019 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.
15 ####### Detections and Commands ###############################################
17 ifeq (icc,$(compiler))
18 export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
19 ifneq (,$(findstring running on IA-32, $(COMPILER_VERSION)))
22 ifneq (,$(findstring running on Intel(R) 64, $(COMPILER_VERSION)))
27 $(warning "Unknown Intel compiler")
32 ifeq ($(shell /usr/sbin/sysctl -n hw.machine),Power Macintosh)
33 ifeq ($(shell /usr/sbin/sysctl -n hw.optional.64bitops),1)
39 ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
48 clang_version:=$(shell clang -v 2>&1 >/dev/null | grep version | sed -e "s/.*version \(.*[0-9]\) .*/\1/")
50 os_version:=$(shell /usr/bin/sw_vers -productVersion)
52 export runtime:=cc$(clang_version)_os$(os_version)
55 native_compiler := clang
56 export compiler ?= clang
59 export stdlib ?= libc++
68 MAKE_VERSIONS=sh $(tbb_root)/build/version_info_macos.sh $(VERSION_FLAGS) >version_string.ver
69 MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh DY
71 ifdef DYLD_LIBRARY_PATH
72 export DYLD_LIBRARY_PATH := .:$(DYLD_LIBRARY_PATH)
74 export DYLD_LIBRARY_PATH := .
77 ####### Build settings ########################################################
84 def_prefix = $(if $(findstring 64,$(arch)),mac64,mac32)
86 TBB.LST = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.lst
87 TBB.DEF = $(TBB.LST:.lst=.def)
88 TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
90 LINK_TBB.LIB = $(TBB.LIB)
92 MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
93 MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(MALLOC_DLL)
94 MALLOC.LIB = $(MALLOC.DLL)
95 LINK_MALLOC.LIB = $(MALLOC.LIB)
97 MALLOCPROXY.DLL = libtbbmalloc_proxy$(DEBUG_SUFFIX).$(MALLOC_DLL)
98 MALLOCPROXY.LIB = $(MALLOCPROXY.DLL)
99 LINK_MALLOCPROXY.LIB = $(MALLOCPROXY.LIB)
101 TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh $(largs)
103 OPENCL.LIB = -framework OpenCL
105 MACOSX_DEPLOYMENT_TARGET ?= 10.11