Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 1 | LOCAL_PATH:=$(call my-dir) |
| 2 | |
Chris Wailes | f371213 | 2014-07-16 15:18:30 -0700 | [diff] [blame] | 3 | rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable \ |
| 4 | -fno-exceptions -std=c++11 |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 5 | ifeq ($(TARGET_BUILD_PDK), true) |
| 6 | rs_base_CFLAGS += -D__RS_PDK__ |
| 7 | endif |
| 8 | |
| 9 | ifneq ($(OVERRIDE_RS_DRIVER),) |
| 10 | rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER) |
| 11 | endif |
| 12 | |
| 13 | include $(CLEAR_VARS) |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 14 | ifneq ($(HOST_OS),windows) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 15 | LOCAL_CLANG := true |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 16 | endif |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 17 | LOCAL_MODULE := libRSCpuRef |
Duane Sand | e8e408a | 2014-05-13 16:46:02 -0700 | [diff] [blame] | 18 | LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64 |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 19 | |
| 20 | LOCAL_SRC_FILES:= \ |
Tim Murray | aff7445 | 2015-03-30 15:14:36 -0700 | [diff] [blame] | 21 | rsCpuCore.cpp \ |
| 22 | rsCpuExecutable.cpp \ |
| 23 | rsCpuScript.cpp \ |
| 24 | rsCpuRuntimeMath.cpp \ |
| 25 | rsCpuRuntimeMathFuncs.cpp \ |
Tim Murray | aff7445 | 2015-03-30 15:14:36 -0700 | [diff] [blame] | 26 | 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 Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 40 | |
Tim Murray | bee48d7 | 2014-06-13 12:44:47 -0700 | [diff] [blame] | 41 | LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON |
Ian Rogers | 3cdd1fb | 2014-03-19 15:41:32 -0700 | [diff] [blame] | 42 | |
Tim Murray | 358ffb8 | 2014-12-09 11:53:06 -0800 | [diff] [blame] | 43 | ifeq ($(RS_DISABLE_A53_WORKAROUND),true) |
| 44 | LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND |
| 45 | endif |
| 46 | |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 47 | LOCAL_SRC_FILES_arm64 += \ |
| 48 | rsCpuIntrinsics_advsimd_3DLUT.S \ |
| 49 | rsCpuIntrinsics_advsimd_Convolve.S \ |
| 50 | rsCpuIntrinsics_advsimd_Blur.S \ |
| 51 | rsCpuIntrinsics_advsimd_ColorMatrix.S \ |
Simon Hosie | 3a98366 | 2014-11-26 17:21:00 -0800 | [diff] [blame] | 52 | rsCpuIntrinsics_advsimd_Resize.S \ |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 53 | rsCpuIntrinsics_advsimd_YuvToRGB.S |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 54 | # rsCpuIntrinsics_advsimd_Blend.S \ |
Jason Sams | 06b0f7d | 2013-03-22 13:43:01 -0700 | [diff] [blame] | 55 | |
Chih-Hung Hsieh | 12f143e | 2014-10-03 09:33:11 -0700 | [diff] [blame] | 56 | # Clang does not compile rsCpuIntrinsics_advsimd_3DLUT.S. |
| 57 | LOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as |
| 58 | |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 59 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 60 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON |
| 61 | endif |
| 62 | |
| 63 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 64 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 65 | LOCAL_SRC_FILES_arm += \ |
Simon Hosie | 5dcaaa5 | 2014-03-15 21:23:51 -0700 | [diff] [blame] | 66 | rsCpuIntrinsics_neon_3DLUT.S \ |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 67 | rsCpuIntrinsics_neon_Blend.S \ |
| 68 | rsCpuIntrinsics_neon_Blur.S \ |
Simon Hosie | 4e5c414 | 2014-03-15 21:45:49 -0700 | [diff] [blame] | 69 | rsCpuIntrinsics_neon_Convolve.S \ |
Simon Hosie | 5dcaaa5 | 2014-03-15 21:23:51 -0700 | [diff] [blame] | 70 | rsCpuIntrinsics_neon_ColorMatrix.S \ |
Simon Hosie | 3a98366 | 2014-11-26 17:21:00 -0800 | [diff] [blame] | 71 | rsCpuIntrinsics_neon_Resize.S \ |
Jason Sams | 83f304c | 2014-03-05 16:38:24 -0800 | [diff] [blame] | 72 | rsCpuIntrinsics_neon_YuvToRGB.S \ |
Jason Sams | 79a9dac | 2014-09-30 11:06:16 -0700 | [diff] [blame] | 73 | |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 74 | LOCAL_ASFLAGS_arm := -mfpu=neon |
Chih-Hung Hsieh | 12f143e | 2014-10-03 09:33:11 -0700 | [diff] [blame] | 75 | # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S. |
| 76 | LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 77 | endif |
| 78 | |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 79 | ifeq ($(ARCH_X86_HAVE_SSSE3),true) |
| 80 | LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3 |
| 81 | LOCAL_SRC_FILES+= \ |
Stephen Hines | 7de1920 | 2014-08-19 22:05:26 -0700 | [diff] [blame] | 82 | rsCpuIntrinsics_x86.cpp |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 83 | endif |
| 84 | |
Pirama Arumuga Nainar | aa6757f | 2015-02-13 20:02:50 -0800 | [diff] [blame] | 85 | LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ libdl libz |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 86 | |
David Gross | b043df0 | 2015-05-29 11:38:15 -0700 | [diff] [blame] | 87 | LOCAL_SHARED_LIBRARIES += libbcinfo libblas |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 88 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 89 | |
| 90 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
| 91 | LOCAL_C_INCLUDES += frameworks/rs |
Tim Murray | 64c682b | 2015-01-09 12:08:43 -0800 | [diff] [blame] | 92 | LOCAL_C_INCLUDES += external/cblas/include |
Pirama Arumuga Nainar | aa6757f | 2015-02-13 20:02:50 -0800 | [diff] [blame] | 93 | LOCAL_C_INCLUDES += external/zlib |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 94 | |
Stephen Hines | 82e0a67 | 2014-05-05 15:40:56 -0700 | [diff] [blame] | 95 | include frameworks/compile/libbcc/libbcc-targets.mk |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 96 | |
Stephen Hines | 4b2bea3 | 2014-08-13 17:32:10 +0000 | [diff] [blame] | 97 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 98 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 99 | LOCAL_MODULE_TAGS := optional |
| 100 | |
| 101 | include $(BUILD_SHARED_LIBRARY) |