blob: 832db6d50a9ebc2b3e0e57b8e7b09d9aa18e3301 [file] [log] [blame]
Jason Sams709a0972012-11-15 18:18:04 -08001LOCAL_PATH:=$(call my-dir)
2
Chris Wailesf3712132014-07-16 15:18:30 -07003rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable \
4 -fno-exceptions -std=c++11
Jason Sams709a0972012-11-15 18:18:04 -08005ifeq ($(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)
Logan Chien8d501742014-05-26 23:07:47 +080014ifneq ($(HOST_OS),windows)
Jason Sams709a0972012-11-15 18:18:04 -080015LOCAL_CLANG := true
Logan Chien8d501742014-05-26 23:07:47 +080016endif
Jason Sams709a0972012-11-15 18:18:04 -080017LOCAL_MODULE := libRSCpuRef
Duane Sande8e408a2014-05-13 16:46:02 -070018LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64
Jason Sams709a0972012-11-15 18:18:04 -080019
20LOCAL_SRC_FILES:= \
Tim Murrayaff74452015-03-30 15:14:36 -070021 rsCpuCore.cpp \
22 rsCpuExecutable.cpp \
23 rsCpuScript.cpp \
24 rsCpuRuntimeMath.cpp \
25 rsCpuRuntimeMathFuncs.cpp \
Tim Murrayaff74452015-03-30 15:14:36 -070026 rsCpuScriptGroup.cpp \
27 rsCpuScriptGroup2.cpp \
28 rsCpuIntrinsic.cpp \
29 rsCpuIntrinsic3DLUT.cpp \
30 rsCpuIntrinsicBLAS.cpp \
31 rsCpuIntrinsicBlend.cpp \
32 rsCpuIntrinsicBlur.cpp \
33 rsCpuIntrinsicColorMatrix.cpp \
34 rsCpuIntrinsicConvolve3x3.cpp \
35 rsCpuIntrinsicConvolve5x5.cpp \
36 rsCpuIntrinsicHistogram.cpp \
37 rsCpuIntrinsicResize.cpp \
38 rsCpuIntrinsicLUT.cpp \
39 rsCpuIntrinsicYuvToRGB.cpp
Jason Sams709a0972012-11-15 18:18:04 -080040
Tim Murraybee48d72014-06-13 12:44:47 -070041LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
Ian Rogers3cdd1fb2014-03-19 15:41:32 -070042
Tim Murray358ffb82014-12-09 11:53:06 -080043ifeq ($(RS_DISABLE_A53_WORKAROUND),true)
44LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND
45endif
46
Jason Sams074424a2014-05-22 13:30:03 -070047LOCAL_SRC_FILES_arm64 += \
48 rsCpuIntrinsics_advsimd_3DLUT.S \
49 rsCpuIntrinsics_advsimd_Convolve.S \
50 rsCpuIntrinsics_advsimd_Blur.S \
51 rsCpuIntrinsics_advsimd_ColorMatrix.S \
Simon Hosie3a983662014-11-26 17:21:00 -080052 rsCpuIntrinsics_advsimd_Resize.S \
Jason Sams074424a2014-05-22 13:30:03 -070053 rsCpuIntrinsics_advsimd_YuvToRGB.S
Tim Murraye195a3f2014-03-13 15:04:58 -070054# rsCpuIntrinsics_advsimd_Blend.S \
Jason Sams06b0f7d2013-03-22 13:43:01 -070055
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070056# Clang does not compile rsCpuIntrinsics_advsimd_3DLUT.S.
57LOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
58
Ying Wang02170e62014-03-04 15:33:24 -080059ifeq ($(ARCH_ARM_HAVE_NEON),true)
60 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
61endif
62
63ifeq ($(ARCH_ARM_HAVE_VFP),true)
Jason Sams074424a2014-05-22 13:30:03 -070064 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
Ying Wang02170e62014-03-04 15:33:24 -080065 LOCAL_SRC_FILES_arm += \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070066 rsCpuIntrinsics_neon_3DLUT.S \
Ying Wang02170e62014-03-04 15:33:24 -080067 rsCpuIntrinsics_neon_Blend.S \
68 rsCpuIntrinsics_neon_Blur.S \
Simon Hosie4e5c4142014-03-15 21:45:49 -070069 rsCpuIntrinsics_neon_Convolve.S \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070070 rsCpuIntrinsics_neon_ColorMatrix.S \
Simon Hosie3a983662014-11-26 17:21:00 -080071 rsCpuIntrinsics_neon_Resize.S \
Jason Sams83f304c2014-03-05 16:38:24 -080072 rsCpuIntrinsics_neon_YuvToRGB.S \
Jason Sams79a9dac2014-09-30 11:06:16 -070073
Ying Wang02170e62014-03-04 15:33:24 -080074 LOCAL_ASFLAGS_arm := -mfpu=neon
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070075 # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S.
76 LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
Jason Sams709a0972012-11-15 18:18:04 -080077endif
78
Rose, James7b7060c2014-04-22 12:08:06 +080079ifeq ($(ARCH_X86_HAVE_SSSE3),true)
80 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3
81 LOCAL_SRC_FILES+= \
Stephen Hines7de19202014-08-19 22:05:26 -070082 rsCpuIntrinsics_x86.cpp
Rose, James7b7060c2014-04-22 12:08:06 +080083endif
84
Pirama Arumuga Nainaraa6757f2015-02-13 20:02:50 -080085LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ libdl libz
Tim Murraye195a3f2014-03-13 15:04:58 -070086
David Grossb043df02015-05-29 11:38:15 -070087LOCAL_SHARED_LIBRARIES += libbcinfo libblas
Tim Murraye195a3f2014-03-13 15:04:58 -070088
Jason Sams709a0972012-11-15 18:18:04 -080089
90LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
91LOCAL_C_INCLUDES += frameworks/rs
Tim Murray64c682b2015-01-09 12:08:43 -080092LOCAL_C_INCLUDES += external/cblas/include
Pirama Arumuga Nainaraa6757f2015-02-13 20:02:50 -080093LOCAL_C_INCLUDES += external/zlib
Jason Sams709a0972012-11-15 18:18:04 -080094
Stephen Hines82e0a672014-05-05 15:40:56 -070095include frameworks/compile/libbcc/libbcc-targets.mk
Stephen Hines00511322014-01-31 11:20:23 -080096
Stephen Hines4b2bea32014-08-13 17:32:10 +000097LOCAL_CFLAGS += $(rs_base_CFLAGS)
Jason Sams709a0972012-11-15 18:18:04 -080098
Jason Sams709a0972012-11-15 18:18:04 -080099LOCAL_MODULE_TAGS := optional
100
101include $(BUILD_SHARED_LIBRARY)