Initial PSTL commit
[lldb.git] / pstl / build / jni / Android.mk
1 #===-- Android.mk --------------------------------------------------------===##
2 #
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file is dual licensed under the MIT and the University of Illinois Open
6 # Source Licenses. See LICENSE.TXT for details.
7 #
8 #===----------------------------------------------------------------------===##
9
10 export proj_root?=$(NDK_PROJECT_PATH)/..
11
12 ifeq (armeabi-v7a,$(APP_ABI))
13         export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm
14 else ifeq (arm64-v8a,$(APP_ABI))
15         export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm64
16 else
17         export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-$(APP_ABI)
18 endif
19
20 ifeq (windows,$(os_name))
21         export CPATH_SEPARATOR :=;
22 else
23         export CPATH_SEPARATOR :=:
24 endif
25
26 export ANDROID_NDK_ROOT:=$(NDK_ROOT)
27 export ndk_version:=$(lastword $(subst -, ,$(ANDROID_NDK_ROOT)))
28 ndk_version:= $(firstword $(subst /, ,$(ndk_version)))
29 ndk_version:= $(firstword $(subst \, ,$(ndk_version)))
30
31 ifeq (clang,$(compiler))
32         # "TBB_RTL :=llvm-libc++/libcxx" should be used for ndk_version r13 r13b r14.
33         TBB_RTL :=llvm-libc++
34         TBB_RTL_LIB :=llvm-libc++
35         TBB_RTL_FILE :=libc++_shared.so
36 else
37         TBB_RTL :=gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)
38         TBB_RTL_LIB :=$(TBB_RTL)
39         TBB_RTL_FILE :=libgnustl_shared.so
40 endif
41
42 export CPATH := $(INCLUDE)$(CPATH_SEPARATOR)$(SYSROOT)/usr/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/cxx-stl/$(TBB_RTL)/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/cxx-stl/$(TBB_RTL)/libs/$(APP_ABI)/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/android/support/include
43
44 LIB_STL_ANDROID_DIR := $(NDK_ROOT)/sources/cxx-stl/$(TBB_RTL_LIB)/libs/$(APP_ABI)
45 #LIB_STL_ANDROID is required to be set up for copying Android specific library to a device next to test
46 export LIB_STL_ANDROID := $(LIB_STL_ANDROID_DIR)/$(TBB_RTL_FILE)
47 export CPLUS_LIB_PATH := $(SYSROOT)/usr/lib -L$(LIB_STL_ANDROID_DIR)
48 export target_os_version:=$(APP_PLATFORM)
49 export tbb_tool_prefix:=$(TOOLCHAIN_PREFIX)
50 export TARGET_CXX
51 export TARGET_CC
52 export TARGET_CFLAGS
53
54 include $(proj_root)/build/Makefile