• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH := $(call my-dir)
2
3# We build up to 4 armeabi binaries
4# To check for thumb/arm build modes, either with the .arm extension
5# or using LOCAL_ARM_MODE
6#
7ifeq ($(TARGET_ARCH_ABI),armeabi)
8
9include $(CLEAR_VARS)
10LOCAL_MODULE := test_build_mode_thumb
11LOCAL_CFLAGS += -DCHECK_THUMB
12LOCAL_SRC_FILES := main.c
13include $(BUILD_EXECUTABLE)
14
15include $(CLEAR_VARS)
16LOCAL_MODULE := test_build_mode_thumb_b
17LOCAL_CFLAGS += -DCHECK_THUMB
18LOCAL_SRC_FILES := main.c
19LOCAL_ARM_MODE := thumb
20include $(BUILD_EXECUTABLE)
21
22include $(CLEAR_VARS)
23LOCAL_MODULE := test_build_mode_arm
24LOCAL_CFLAGS += -DCHECK_ARM
25LOCAL_SRC_FILES := main.c.arm
26include $(BUILD_EXECUTABLE)
27
28include $(CLEAR_VARS)
29LOCAL_MODULE := test_build_mode_arm_b
30LOCAL_CFLAGS += -DCHECK_ARM
31LOCAL_SRC_FILES := main.c
32LOCAL_ARM_MODE := arm
33include $(BUILD_EXECUTABLE)
34
35endif # TARGET_ARCH == arm
36
37# We build 8 armeabi-v7a binaries because we need to check neon as well
38#
39ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
40
41include $(CLEAR_VARS)
42LOCAL_MODULE := test_build_mode_thumb2
43LOCAL_CFLAGS += -DCHECK_THUMB2
44LOCAL_SRC_FILES := main.c
45include $(BUILD_EXECUTABLE)
46
47include $(CLEAR_VARS)
48LOCAL_MODULE := test_build_mode_thumb2_b
49LOCAL_CFLAGS += -DCHECK_THUMB2
50LOCAL_SRC_FILES := main.c
51LOCAL_ARM_MODE := thumb
52include $(BUILD_EXECUTABLE)
53
54include $(CLEAR_VARS)
55LOCAL_MODULE := test_build_mode_armv7
56LOCAL_CFLAGS += -DCHECK_ARM
57LOCAL_SRC_FILES := main.c.arm
58include $(BUILD_EXECUTABLE)
59
60include $(CLEAR_VARS)
61LOCAL_MODULE := test_build_mode_armv7_b
62LOCAL_CFLAGS += -DCHECK_ARM
63LOCAL_SRC_FILES := main.c
64LOCAL_ARM_MODE := arm
65include $(BUILD_EXECUTABLE)
66
67include $(CLEAR_VARS)
68LOCAL_MODULE := test_build_mode_thumb2_neon
69LOCAL_CFLAGS += -DCHECK_THUMB2 -DCHECK_NEON
70LOCAL_SRC_FILES := main.c.neon
71include $(BUILD_EXECUTABLE)
72
73include $(CLEAR_VARS)
74LOCAL_MODULE := test_build_mode_thumb2_neon_b
75LOCAL_CFLAGS += -DCHECK_THUMB2 -DCHECK_NEON
76LOCAL_SRC_FILES := main.c
77LOCAL_ARM_NEON := true
78include $(BUILD_EXECUTABLE)
79
80include $(CLEAR_VARS)
81LOCAL_MODULE := test_build_mode_thumb2_neon_c
82LOCAL_CFLAGS += -DCHECK_THUMB2 -DCHECK_NEON
83LOCAL_SRC_FILES := main.c
84LOCAL_ARM_MODE := thumb
85LOCAL_ARM_NEON := true
86include $(BUILD_EXECUTABLE)
87
88include $(CLEAR_VARS)
89LOCAL_MODULE := test_build_mode_armv7_neon
90LOCAL_CFLAGS += -DCHECK_ARM -DCHECK_NEON
91LOCAL_SRC_FILES := main.c.arm.neon
92include $(BUILD_EXECUTABLE)
93
94include $(CLEAR_VARS)
95LOCAL_MODULE := test_build_mode_armv7_neon_b
96LOCAL_CFLAGS += -DCHECK_ARM -DCHECK_NEON
97LOCAL_SRC_FILES := main.c.arm
98LOCAL_ARM_NEON := true
99include $(BUILD_EXECUTABLE)
100
101include $(CLEAR_VARS)
102LOCAL_MODULE := test_build_mode_armv7_neon_c
103LOCAL_CFLAGS += -DCHECK_ARM -DCHECK_NEON
104LOCAL_SRC_FILES := main.c
105LOCAL_ARM_MODE := arm
106LOCAL_ARM_NEON := true
107include $(BUILD_EXECUTABLE)
108
109endif # TARGET_ARCH_ABI == armeabi-v7a
110
111# We only build a single binary for x86
112#
113ifeq ($(TARGET_ARCH),x86)
114
115include $(CLEAR_VARS)
116LOCAL_MODULE := test_build_mode_x86
117LOCAL_CFLAGS += -DCHECK_X86
118LOCAL_SRC_FILES := main.c
119include $(BUILD_EXECUTABLE)
120
121endif # TARGET_ARCH == x86
122
123