Committing TBB 2019 Update 9 source code
[platform/upstream/tbb.git] / build / BSD.inc
1 # Copyright (c) 2005-2019 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 ifndef arch
16         ifeq ($(shell uname -m),i386)
17                 export arch:=ia32
18         endif
19         ifeq ($(shell uname -m),ia64)
20                 export arch:=ia64
21         endif
22         ifeq ($(shell uname -m),amd64)
23                 export arch:=intel64
24         endif
25 endif
26
27 ifndef runtime
28         clang_version:=$(shell clang --version | sed -n "1s/.*version \(.*[0-9]\) .*/\1/p")
29         os_version:=$(shell uname -r)
30         os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
31         export runtime:=cc$(clang_version)_kernel$(os_kernel_version)
32 endif
33
34 native_compiler := clang
35 export compiler ?= clang
36 debugger ?= gdb
37
38 CMD=$(SHELL) -c
39 CWD=$(shell pwd)
40 RM?=rm -f
41 RD?=rmdir
42 MD?=mkdir -p
43 NUL= /dev/null
44 SLASH=/
45 MAKE_VERSIONS=sh $(tbb_root)/build/version_info_linux.sh $(VERSION_FLAGS) >version_string.ver
46 MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
47
48 ifdef LD_LIBRARY_PATH
49         export LD_LIBRARY_PATH := .:$(LD_LIBRARY_PATH)
50 else
51         export LD_LIBRARY_PATH := .
52 endif
53
54 ####### Build settings ########################################################
55
56 OBJ = o
57 DLL = so
58 LIBEXT=so
59
60 TBB.LST =
61 TBB.DEF =
62 TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
63 TBB.LIB = $(TBB.DLL)
64 LINK_TBB.LIB = $(TBB.LIB)
65
66 MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
67 MALLOC.LIB = $(MALLOC.DLL)
68 LINK_MALLOC.LIB = $(MALLOC.LIB)
69
70 TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh $(largs)