Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 1 | |
| 2 | LOCAL_PATH:=$(call my-dir) |
| 3 | |
Chris Wailes | f371213 | 2014-07-16 15:18:30 -0700 | [diff] [blame] | 4 | rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable \ |
| 5 | -fno-exceptions -std=c++11 |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 6 | ifeq ($(TARGET_BUILD_PDK), true) |
| 7 | rs_base_CFLAGS += -D__RS_PDK__ |
| 8 | endif |
| 9 | |
| 10 | ifneq ($(OVERRIDE_RS_DRIVER),) |
| 11 | rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER) |
| 12 | endif |
| 13 | |
| 14 | include $(CLEAR_VARS) |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 15 | ifneq ($(HOST_OS),windows) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 16 | LOCAL_CLANG := true |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 17 | endif |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 18 | LOCAL_MODULE := libRSCpuRef |
Duane Sand | e8e408a | 2014-05-13 16:46:02 -0700 | [diff] [blame] | 19 | LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64 |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 20 | |
| 21 | LOCAL_SRC_FILES:= \ |
| 22 | rsCpuCore.cpp \ |
| 23 | rsCpuScript.cpp \ |
| 24 | rsCpuRuntimeMath.cpp \ |
Pirama Arumuga Nainar | dc0d8f7 | 2014-12-02 15:23:38 -0800 | [diff] [blame] | 25 | rsCpuRuntimeMathFuncs.cpp \ |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 26 | rsCpuRuntimeStubs.cpp \ |
| 27 | rsCpuScriptGroup.cpp \ |
Yang Ni | 1ffd86b | 2015-01-07 09:16:40 -0800 | [diff] [blame] | 28 | rsCpuScriptGroup2.cpp \ |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 29 | rsCpuIntrinsic.cpp \ |
Jason Sams | 7c4b888 | 2013-01-04 10:50:05 -0800 | [diff] [blame] | 30 | rsCpuIntrinsic3DLUT.cpp \ |
Tim Murray | 64c682b | 2015-01-09 12:08:43 -0800 | [diff] [blame^] | 31 | rsCpuIntrinsicBLAS.cpp \ |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 32 | rsCpuIntrinsicBlend.cpp \ |
| 33 | rsCpuIntrinsicBlur.cpp \ |
| 34 | rsCpuIntrinsicColorMatrix.cpp \ |
| 35 | rsCpuIntrinsicConvolve3x3.cpp \ |
| 36 | rsCpuIntrinsicConvolve5x5.cpp \ |
Jason Sams | 2282e28 | 2013-06-17 16:52:01 -0700 | [diff] [blame] | 37 | rsCpuIntrinsicHistogram.cpp \ |
Jason Sams | 0d6043c | 2014-04-16 17:01:20 -0700 | [diff] [blame] | 38 | rsCpuIntrinsicResize.cpp \ |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 39 | rsCpuIntrinsicLUT.cpp \ |
Jason Sams | d56fa52 | 2014-04-23 23:15:43 -0700 | [diff] [blame] | 40 | rsCpuIntrinsicYuvToRGB.cpp |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 41 | |
Tim Murray | bee48d7 | 2014-06-13 12:44:47 -0700 | [diff] [blame] | 42 | 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] | 43 | |
Tim Murray | 358ffb8 | 2014-12-09 11:53:06 -0800 | [diff] [blame] | 44 | ifeq ($(RS_DISABLE_A53_WORKAROUND),true) |
| 45 | LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND |
| 46 | endif |
| 47 | |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 48 | LOCAL_SRC_FILES_arm64 += \ |
| 49 | rsCpuIntrinsics_advsimd_3DLUT.S \ |
| 50 | rsCpuIntrinsics_advsimd_Convolve.S \ |
| 51 | rsCpuIntrinsics_advsimd_Blur.S \ |
| 52 | rsCpuIntrinsics_advsimd_ColorMatrix.S \ |
| 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 \ |
Jason Sams | 83f304c | 2014-03-05 16:38:24 -0800 | [diff] [blame] | 71 | rsCpuIntrinsics_neon_YuvToRGB.S \ |
Jason Sams | 79a9dac | 2014-09-30 11:06:16 -0700 | [diff] [blame] | 72 | |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 73 | LOCAL_ASFLAGS_arm := -mfpu=neon |
Chih-Hung Hsieh | 12f143e | 2014-10-03 09:33:11 -0700 | [diff] [blame] | 74 | # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S. |
| 75 | LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 76 | endif |
| 77 | |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 78 | ifeq ($(ARCH_X86_HAVE_SSSE3),true) |
| 79 | LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3 |
| 80 | LOCAL_SRC_FILES+= \ |
Stephen Hines | 7de1920 | 2014-08-19 22:05:26 -0700 | [diff] [blame] | 81 | rsCpuIntrinsics_x86.cpp |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 82 | endif |
| 83 | |
Pirama Arumuga Nainar | dc0d8f7 | 2014-12-02 15:23:38 -0800 | [diff] [blame] | 84 | LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ libdl |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 85 | |
Tim Murray | 64c682b | 2015-01-09 12:08:43 -0800 | [diff] [blame^] | 86 | LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libblas |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 87 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 88 | |
| 89 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
| 90 | LOCAL_C_INCLUDES += frameworks/rs |
Tim Murray | 64c682b | 2015-01-09 12:08:43 -0800 | [diff] [blame^] | 91 | LOCAL_C_INCLUDES += external/cblas/include |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 92 | |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 93 | ifneq ($(HOST_OS),windows) |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 94 | include external/libcxx/libcxx.mk |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 95 | endif |
Stephen Hines | 82e0a67 | 2014-05-05 15:40:56 -0700 | [diff] [blame] | 96 | include frameworks/compile/libbcc/libbcc-targets.mk |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 97 | |
Stephen Hines | 4b2bea3 | 2014-08-13 17:32:10 +0000 | [diff] [blame] | 98 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 99 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 100 | LOCAL_MODULE_TAGS := optional |
| 101 | |
| 102 | include $(BUILD_SHARED_LIBRARY) |