1# Copyright (c) 2005-2020 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####### Detections and Commands ###############################################
16
17# Must set def_prefix according to target architecture detected above
18ifeq (ia32,$(arch))
19    def_prefix = lin32
20endif
21ifeq (arm,$(findstring arm,$(arch)))
22    def_prefix = lin32
23endif
24ifeq (64,$(findstring 64,$(arch)))
25    def_prefix = lin64
26endif
27
28ifdef ndk_version
29    $(warning "NDK version $(ndk_version)")
30else
31    $(warning "NDK version not set in environment, using \'unknown\' instead.")
32    ndk_version:=unknown
33endif
34
35export runtime:=$(target)_NDK$(ndk_version)_version_$(target_os_version)
36
37AR = $(tbb_tool_prefix)ar
38MAKE_VERSIONS=sh $(tbb_root)/build/version_info_android.sh $(VERSION_FLAGS) >version_string.ver
39
40####### Build settings ########################################################
41
42# No SONAME_SUFFIX for Android allowed in library names
43TBB.LST = $(tbb_root)/src/tbb/$(def_prefix)-tbb-export.lst
44TBB.DEF = $(TBB.LST:.lst=.def)
45TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
46TBB.LIB = $(TBB.DLL)
47TBB_NO_VERSION.DLL=
48LINK_TBB.LIB = $(TBB.LIB)
49
50MALLOC.DEF = $(MALLOC_ROOT)/$(def_prefix)-tbbmalloc-export.def
51MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
52MALLOC.LIB = $(MALLOC.DLL)
53MALLOC_NO_VERSION.DLL=
54LINK_MALLOC.LIB = $(MALLOC.LIB)
55
56MALLOCPROXY.DEF = $(MALLOC_ROOT)/$(def_prefix)-proxy-export.def
57MALLOCPROXY.DLL = libtbbmalloc_proxy$(DEBUG_SUFFIX).$(DLL)
58MALLOCPROXY_NO_VERSION.DLL=
59MALLOCPROXY.LIB = $(MALLOCPROXY.DLL)
60LINK_MALLOCPROXY.LIB = $(MALLOCPROXY.LIB)
61
62TEST_LAUNCHER=
63run_cmd ?= -sh $(tbb_root)/build/android.linux.launcher.sh $(largs)
64