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 \ |
Jason Sams | 0d6043c | 2014-04-16 17:01:20 -0700 | [diff] [blame] | 40 | rsCpuIntrinsicResize.cpp \ |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 41 | rsCpuIntrinsicLUT.cpp \ |
Jason Sams | d56fa52 | 2014-04-23 23:15:43 -0700 | [diff] [blame] | 42 | rsCpuIntrinsicYuvToRGB.cpp |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 43 | |
Tim Murray | bee48d7 | 2014-06-13 12:44:47 -0700 | [diff] [blame] | 44 | 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] | 45 | |
Tim Murray | 358ffb8 | 2014-12-09 11:53:06 -0800 | [diff] [blame] | 46 | ifeq ($(RS_DISABLE_A53_WORKAROUND),true) |
| 47 | LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND |
| 48 | endif |
| 49 | |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 50 | LOCAL_SRC_FILES_arm64 += \ |
| 51 | rsCpuIntrinsics_advsimd_3DLUT.S \ |
| 52 | rsCpuIntrinsics_advsimd_Convolve.S \ |
| 53 | rsCpuIntrinsics_advsimd_Blur.S \ |
| 54 | rsCpuIntrinsics_advsimd_ColorMatrix.S \ |
| 55 | rsCpuIntrinsics_advsimd_YuvToRGB.S |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 56 | # rsCpuIntrinsics_advsimd_Blend.S \ |
Jason Sams | 06b0f7d | 2013-03-22 13:43:01 -0700 | [diff] [blame] | 57 | |
Chih-Hung Hsieh | 12f143e | 2014-10-03 09:33:11 -0700 | [diff] [blame] | 58 | # Clang does not compile rsCpuIntrinsics_advsimd_3DLUT.S. |
| 59 | LOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as |
| 60 | |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 61 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 62 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON |
| 63 | endif |
| 64 | |
| 65 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
Jason Sams | 074424a | 2014-05-22 13:30:03 -0700 | [diff] [blame] | 66 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 67 | LOCAL_SRC_FILES_arm += \ |
Simon Hosie | 5dcaaa5 | 2014-03-15 21:23:51 -0700 | [diff] [blame] | 68 | rsCpuIntrinsics_neon_3DLUT.S \ |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 69 | rsCpuIntrinsics_neon_Blend.S \ |
| 70 | rsCpuIntrinsics_neon_Blur.S \ |
Simon Hosie | 4e5c414 | 2014-03-15 21:45:49 -0700 | [diff] [blame] | 71 | rsCpuIntrinsics_neon_Convolve.S \ |
Simon Hosie | 5dcaaa5 | 2014-03-15 21:23:51 -0700 | [diff] [blame] | 72 | rsCpuIntrinsics_neon_ColorMatrix.S \ |
Jason Sams | 83f304c | 2014-03-05 16:38:24 -0800 | [diff] [blame] | 73 | rsCpuIntrinsics_neon_YuvToRGB.S \ |
Jason Sams | 79a9dac | 2014-09-30 11:06:16 -0700 | [diff] [blame] | 74 | |
Ying Wang | 02170e6 | 2014-03-04 15:33:24 -0800 | [diff] [blame] | 75 | LOCAL_ASFLAGS_arm := -mfpu=neon |
Chih-Hung Hsieh | 12f143e | 2014-10-03 09:33:11 -0700 | [diff] [blame] | 76 | # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S. |
| 77 | LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 78 | endif |
| 79 | |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 80 | ifeq ($(ARCH_X86_HAVE_SSSE3),true) |
| 81 | LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3 |
| 82 | LOCAL_SRC_FILES+= \ |
Stephen Hines | 7de1920 | 2014-08-19 22:05:26 -0700 | [diff] [blame] | 83 | rsCpuIntrinsics_x86.cpp |
Rose, James | 7b7060c | 2014-04-22 12:08:06 +0800 | [diff] [blame] | 84 | endif |
| 85 | |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 86 | LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 87 | |
| 88 | # these are not supported in 64-bit yet |
Tim Murray | 8c24cd6 | 2014-04-10 18:04:39 -0700 | [diff] [blame] | 89 | LOCAL_SHARED_LIBRARIES += libbcc libbcinfo |
Tim Murray | e195a3f | 2014-03-13 15:04:58 -0700 | [diff] [blame] | 90 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 91 | |
| 92 | LOCAL_C_INCLUDES += frameworks/compile/libbcc/include |
| 93 | LOCAL_C_INCLUDES += frameworks/rs |
| 94 | |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 95 | ifneq ($(HOST_OS),windows) |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 96 | include external/libcxx/libcxx.mk |
Logan Chien | 8d50174 | 2014-05-26 23:07:47 +0800 | [diff] [blame] | 97 | endif |
Stephen Hines | 82e0a67 | 2014-05-05 15:40:56 -0700 | [diff] [blame] | 98 | include frameworks/compile/libbcc/libbcc-targets.mk |
Stephen Hines | 0051132 | 2014-01-31 11:20:23 -0800 | [diff] [blame] | 99 | |
Stephen Hines | 4b2bea3 | 2014-08-13 17:32:10 +0000 | [diff] [blame] | 100 | LOCAL_CFLAGS += $(rs_base_CFLAGS) |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 101 | |
Jason Sams | 709a097 | 2012-11-15 18:18:04 -0800 | [diff] [blame] | 102 | LOCAL_MODULE_TAGS := optional |
| 103 | |
| 104 | include $(BUILD_SHARED_LIBRARY) |