1LOCAL_PATH:=$(call my-dir) 2 3rs_base_CFLAGS := -Werror -Wall -Wextra -Wno-unused-parameter \ 4 -Wno-unused-variable -fno-exceptions -std=c++11 5ifeq ($(TARGET_BUILD_PDK), true) 6 rs_base_CFLAGS += -D__RS_PDK__ 7endif 8 9ifneq ($(OVERRIDE_RS_DRIVER),) 10 rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER) 11endif 12 13include $(CLEAR_VARS) 14ifneq ($(HOST_OS),windows) 15LOCAL_CLANG := true 16endif 17LOCAL_MODULE := libRSCpuRef 18LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64 19 20LOCAL_SRC_FILES:= \ 21 rsCpuCore.cpp \ 22 rsCpuExecutable.cpp \ 23 rsCpuScript.cpp \ 24 rsCpuRuntimeMath.cpp \ 25 rsCpuScriptGroup.cpp \ 26 rsCpuScriptGroup2.cpp \ 27 rsCpuIntrinsic.cpp \ 28 rsCpuIntrinsic3DLUT.cpp \ 29 rsCpuIntrinsicBLAS.cpp \ 30 rsCpuIntrinsicBlend.cpp \ 31 rsCpuIntrinsicBlur.cpp \ 32 rsCpuIntrinsicColorMatrix.cpp \ 33 rsCpuIntrinsicConvolve3x3.cpp \ 34 rsCpuIntrinsicConvolve5x5.cpp \ 35 rsCpuIntrinsicHistogram.cpp \ 36 rsCpuIntrinsicResize.cpp \ 37 rsCpuIntrinsicLUT.cpp \ 38 rsCpuIntrinsicYuvToRGB.cpp 39 40LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON 41 42ifeq ($(RS_DISABLE_A53_WORKAROUND),true) 43LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND 44endif 45 46LOCAL_SRC_FILES_arm64 += \ 47 rsCpuIntrinsics_advsimd_3DLUT.S \ 48 rsCpuIntrinsics_advsimd_Convolve.S \ 49 rsCpuIntrinsics_advsimd_Blur.S \ 50 rsCpuIntrinsics_advsimd_ColorMatrix.S \ 51 rsCpuIntrinsics_advsimd_Resize.S \ 52 rsCpuIntrinsics_advsimd_YuvToRGB.S \ 53 rsCpuIntrinsics_advsimd_Blend.S 54 55ifeq ($(ARCH_ARM_HAVE_NEON),true) 56 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON 57endif 58 59ifeq ($(ARCH_ARM_HAVE_VFP),true) 60 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS 61 LOCAL_SRC_FILES_arm += \ 62 rsCpuIntrinsics_neon_3DLUT.S \ 63 rsCpuIntrinsics_neon_Blend.S \ 64 rsCpuIntrinsics_neon_Blur.S \ 65 rsCpuIntrinsics_neon_Convolve.S \ 66 rsCpuIntrinsics_neon_ColorMatrix.S \ 67 rsCpuIntrinsics_neon_Resize.S \ 68 rsCpuIntrinsics_neon_YuvToRGB.S \ 69 70 LOCAL_ASFLAGS_arm := -mfpu=neon 71endif 72 73ifeq ($(ARCH_X86_HAVE_SSSE3),true) 74 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3 75 LOCAL_SRC_FILES+= \ 76 rsCpuIntrinsics_x86.cpp 77endif 78 79LOCAL_SHARED_LIBRARIES += libRS_internal libcutils libutils liblog libsync libc++ libdl libz 80 81LOCAL_SHARED_LIBRARIES += libbcinfo libblas 82LOCAL_STATIC_LIBRARIES := libbnnmlowp 83 84LOCAL_C_INCLUDES += frameworks/compile/libbcc/include 85LOCAL_C_INCLUDES += frameworks/rs 86LOCAL_C_INCLUDES += external/cblas/include 87LOCAL_C_INCLUDES += external/gemmlowp/eight_bit_int_gemm 88LOCAL_C_INCLUDES += external/zlib 89 90include frameworks/compile/libbcc/libbcc-targets.mk 91 92LOCAL_CFLAGS += $(rs_base_CFLAGS) 93 94LOCAL_MODULE_TAGS := optional 95 96include $(BUILD_SHARED_LIBRARY) 97