aboutsummaryrefslogtreecommitdiff
path: root/tests/device/test-cpufeatures/jni/Android.mk
blob: 858423c6fac3edc9a889657f9849cd4d1c7304f0 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := test_cpufeatures
LOCAL_SRC_FILES := test_cpufeatures.c
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
LOCAL_MODULE := test_android_setCpu_1
LOCAL_SRC_FILES := test_android_setCpu_1.c
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
LOCAL_MODULE := test_android_setCpu_2
LOCAL_SRC_FILES := test_android_setCpu_2.c
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_EXECUTABLE)

ifeq ($(TARGET_ARCH),arm)
include $(CLEAR_VARS)
LOCAL_MODULE := test_android_setCpuArm_1
LOCAL_SRC_FILES := test_android_setCpuArm_1.c
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_EXECUTABLE)
endif

# Disable the following tests for GCC4.6/binutils-2.21 as well because
# platform libs are now built with the new default GCC4.8/binutils-2.24, and crt*.o
# generated by it can't be used by GCC4.6/binutils-2.21 due to inconsistency in
# usage of Tag involves DIV
#
ifeq ($(TARGET_ARCH),arm)
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
ifneq ($(NDK_TOOLCHAIN_VERSION),4.6)
include $(CLEAR_VARS)
LOCAL_MODULE := test_arm_idiv_support
LOCAL_SRC_FILES := test_arm_idiv.c
LOCAL_CFLAGS := -mcpu=cortex-a15
# filter-out -march=armv7-a which isn't compatible with -mcpu=cortex-a15
TARGET_CFLAGS := $(filter-out -march=armv7-a, $(TARGET_CFLAGS))
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)
LOCAL_MODULE := test_thumb_idiv_support
LOCAL_SRC_FILES := test_arm_idiv.c
LOCAL_CFLAGS := -mcpu=cortex-a15
# filter-out -march=armv7-a which isn't compatible with -mcpu=cortex-a15
TARGET_CFLAGS := $(filter-out -march=armv7-a, $(TARGET_CFLAGS))
LOCAL_ARM_MODE := thumb
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_EXECUTABLE)
endif
endif
endif

$(call import-module,android/cpufeatures)