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