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