blob: 88fcef70248f90a355e9950c646934c0c8a643bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
NDK_ROOT := $(shell dirname $(CC))/../../../../..
ifeq "$(findstring 64, $(ARCH))" "64"
# lowest 64-bit API level
API_LEVEL := 21
else ifeq "$(ARCH)" "i386"
# clone(2) declaration is present only since this api level
API_LEVEL := 17
else
# lowest supported 32-bit API level
API_LEVEL := 9
endif
ifeq "$(ARCH)" "arm"
SYSROOT_ARCH := arm
STL_ARCH := armeabi-v7a
ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
else ifeq "$(ARCH)" "aarch64"
SYSROOT_ARCH := arm64
STL_ARCH := arm64-v8a
else ifeq "$(ARCH)" "i386"
SYSROOT_ARCH := x86
STL_ARCH := x86
else ifeq "$(ARCH)" "mips64r6"
SYSROOT_ARCH := mips64
STL_ARCH := mips64
else ifeq "$(ARCH)" "mips32"
SYSROOT_ARCH := mips
STL_ARCH := mips
else
SYSROOT_ARCH := $(ARCH)
STL_ARCH := $(ARCH)
endif
ARCH_CFLAGS += \
--sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) \
-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include \
-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/include \
-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
ARCH_LDFLAGS += -lm \
$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/libgnustl_static.a \
--sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH)
|