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 | |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 21 | ifeq ($(HOST_OS), darwin) |
| 22 | LOCAL_CFLAGS += -no-integrated-as |
| 23 | LOCAL_ASFLAGS += -no-integrated-as |
| 24 | endif |
| 25 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 26 | LOCAL_SRC_FILES:= \ |
| 27 | rsCpuCore.cpp \ |
| 28 | rsCpuScript.cpp \ |
| 29 | rsCpuRuntimeMath.cpp \ |
| 30 | rsCpuRuntimeStubs.cpp \ |
| 31 | rsCpuScriptGroup.cpp \ |
| 32 | rsCpuIntrinsic.cpp \ |
Jason Sams | 7c4b888 | 2013-01-04 10:50:05 -0800 | [diff] [blame] | 33 | rsCpuIntrinsic3DLUT.cpp \ |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 34 | rsCpuIntrinsicBlend.cpp \ |
| 35 | rsCpuIntrinsicBlur.cpp \ |
| 36 | rsCpuIntrinsicColorMatrix.cpp \ |
| 37 | rsCpuIntrinsicConvolve3x3.cpp \ |
| 38 | rsCpuIntrinsicConvolve5x5.cpp \ |
Jason Sams | 2282e28 | 2013-06-17 16:52:01 -0700 | [diff] [blame] | 39 | rsCpuIntrinsicHistogram.cpp \ |
Matthieu Delahaye | 6fc3e12 | 2014-03-04 11:05:49 -0600 | [diff] [blame] | 40 | rsCpuIntrinsicLoopFilter.cpp \ |
Matthieu Delahaye | 60498fe | 2014-02-18 13:21:06 -0600 | [diff] [blame] | 41 | rsCpuIntrinsicYuvToRGB.cpp \ |
Jason Sams | 39ab94a | 2014-04-16 17:14:05 -0700 | [diff] [blame] | 42 | rsCpuIntrinsicResize.cpp \ |
Jason Sams | ee0f483 | 2014-04-23 15:21:34 -0700 | [diff] [blame] | 43 | rsCpuIntrinsicLUT.cpp |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 44 | |
Tim Murray | bee48d7 | 2014-06-13 12:44:47 -0700 | [diff] [blame] | 45 | 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] | 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 \ |
| 52 | rsCpuIntrinsics_advsimd_YuvToRGB.S |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 53 | # rsCpuIntrinsics_advsimd_Blend.S \ |
Jason Sams | 06b0f7d | 2013-03-22 13:43:01 -0700 | [diff] [blame] | 54 | |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 55 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 56 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON |
| 57 | endif |
| 58 | |
| 59 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 60 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 61 | LOCAL_SRC_FILES_arm += \ |
Simon Hosie | 5dcaaa5 | 2014-03-15 21:23:51 -0700 | [diff] [blame] | 62 | rsCpuIntrinsics_neon_3DLUT.S \ |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 63 | rsCpuIntrinsics_neon_Blend.S \ |
| 64 | rsCpuIntrinsics_neon_Blur.S \ |
Simon Hosie | 4e5c414 | 2014-03-15 21:45:49 -0700 | [diff] [blame] | 65 | rsCpuIntrinsics_neon_Convolve.S \ |
Simon Hosie | 5dcaaa5 | 2014-03-15 21:23:51 -0700 | [diff] [blame] | 66 | rsCpuIntrinsics_neon_ColorMatrix.S \ |
Jason Sams | 83f304c | 2014-03-05 16:38:24 -0800 | [diff] [blame] | 67 | rsCpuIntrinsics_neon_YuvToRGB.S \ |
Matthieu Delahaye | 6fc3e12 | 2014-03-04 11:05:49 -0600 | [diff] [blame] | 68 | vp9_loopfilter_16_neon.S \ |
| 69 | vp9_loopfilter_neon.S \ |
| 70 | vp9_mb_lpf_neon.S |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 71 | LOCAL_ASFLAGS_arm := -mfpu=neon |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 72 | endif |
| 73 | |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 74 | ifeq ($(ARCH_X86_HAVE_SSSE3),true) |
| 75 | LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3 |
| 76 | LOCAL_SRC_FILES+= \ |
| 77 | rsCpuIntrinsics_x86.c |
| 78 | endif |
| 79 | |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 80 | LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 81 | |
| 82 | # these are not supported in 64-bit yet |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 83 | LOCAL_SHARED_LIBRARIES += libbcc libbcinfo |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 84 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 85 | |
| 86 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
| 87 | LOCAL_C_INCLUDES += frameworks/rs |
Matthieu Delahaye | 6fc3e12 | 2014-03-04 11:05:49 -0600 | [diff] [blame] | 88 | LOCAL_C_INCLUDES += system/core/include |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 89 | |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 90 | ifneq ($(HOST_OS),windows) |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 91 | include external/libcxx/libcxx.mk |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 92 | endif |
Stephen Hines | 82e0a67 | 2014-05-05 15:40:56 -0700 | [diff] [blame] | 93 | include frameworks/compile/libbcc/libbcc-targets.mk |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 94 | |
Stephen Hines | 4b2bea3 | 2014-08-13 17:32:10 +0000 | [diff] [blame] | 95 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 96 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 97 | LOCAL_MODULE_TAGS := optional |
| 98 | |
| 99 | include $(BUILD_SHARED_LIBRARY) |