blob: 65999329e49da4a5916bd4ef854d475a73ddf2db [file] [log] [blame]
Jason Sams709a0972012-11-15 18:18:04 -08001
2LOCAL_PATH:=$(call my-dir)
3
Chris Wailesf3712132014-07-16 15:18:30 -07004rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable \
5 -fno-exceptions -std=c++11
Jason Sams709a0972012-11-15 18:18:04 -08006ifeq ($(TARGET_BUILD_PDK), true)
7 rs_base_CFLAGS += -D__RS_PDK__
8endif
9
10ifneq ($(OVERRIDE_RS_DRIVER),)
11 rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER)
12endif
13
14include $(CLEAR_VARS)
Logan Chien8d501742014-05-26 23:07:47 +080015ifneq ($(HOST_OS),windows)
Jason Sams709a0972012-11-15 18:18:04 -080016LOCAL_CLANG := true
Logan Chien8d501742014-05-26 23:07:47 +080017endif
Jason Sams709a0972012-11-15 18:18:04 -080018LOCAL_MODULE := libRSCpuRef
Duane Sande8e408a2014-05-13 16:46:02 -070019LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64
Jason Sams709a0972012-11-15 18:18:04 -080020
21LOCAL_SRC_FILES:= \
22 rsCpuCore.cpp \
23 rsCpuScript.cpp \
24 rsCpuRuntimeMath.cpp \
Pirama Arumuga Nainardc0d8f72014-12-02 15:23:38 -080025 rsCpuRuntimeMathFuncs.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080026 rsCpuRuntimeStubs.cpp \
27 rsCpuScriptGroup.cpp \
Yang Ni1ffd86b2015-01-07 09:16:40 -080028 rsCpuScriptGroup2.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080029 rsCpuIntrinsic.cpp \
Jason Sams7c4b8882013-01-04 10:50:05 -080030 rsCpuIntrinsic3DLUT.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080031 rsCpuIntrinsicBlend.cpp \
32 rsCpuIntrinsicBlur.cpp \
33 rsCpuIntrinsicColorMatrix.cpp \
34 rsCpuIntrinsicConvolve3x3.cpp \
35 rsCpuIntrinsicConvolve5x5.cpp \
Jason Sams2282e282013-06-17 16:52:01 -070036 rsCpuIntrinsicHistogram.cpp \
Jason Sams0d6043c2014-04-16 17:01:20 -070037 rsCpuIntrinsicResize.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080038 rsCpuIntrinsicLUT.cpp \
Jason Samsd56fa522014-04-23 23:15:43 -070039 rsCpuIntrinsicYuvToRGB.cpp
Jason Sams709a0972012-11-15 18:18:04 -080040
Tim Murraybee48d72014-06-13 12:44:47 -070041LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
Ian Rogers3cdd1fb2014-03-19 15:41:32 -070042
Tim Murray358ffb82014-12-09 11:53:06 -080043ifeq ($(RS_DISABLE_A53_WORKAROUND),true)
44LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND
45endif
46
Jason Sams074424a2014-05-22 13:30:03 -070047LOCAL_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 Murraye195a3f2014-03-13 15:04:58 -070053# rsCpuIntrinsics_advsimd_Blend.S \
Jason Sams06b0f7d2013-03-22 13:43:01 -070054
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070055# Clang does not compile rsCpuIntrinsics_advsimd_3DLUT.S.
56LOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
57
Ying Wang02170e62014-03-04 15:33:24 -080058ifeq ($(ARCH_ARM_HAVE_NEON),true)
59 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
60endif
61
62ifeq ($(ARCH_ARM_HAVE_VFP),true)
Jason Sams074424a2014-05-22 13:30:03 -070063 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
Ying Wang02170e62014-03-04 15:33:24 -080064 LOCAL_SRC_FILES_arm += \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070065 rsCpuIntrinsics_neon_3DLUT.S \
Ying Wang02170e62014-03-04 15:33:24 -080066 rsCpuIntrinsics_neon_Blend.S \
67 rsCpuIntrinsics_neon_Blur.S \
Simon Hosie4e5c4142014-03-15 21:45:49 -070068 rsCpuIntrinsics_neon_Convolve.S \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070069 rsCpuIntrinsics_neon_ColorMatrix.S \
Jason Sams83f304c2014-03-05 16:38:24 -080070 rsCpuIntrinsics_neon_YuvToRGB.S \
Jason Sams79a9dac2014-09-30 11:06:16 -070071
Ying Wang02170e62014-03-04 15:33:24 -080072 LOCAL_ASFLAGS_arm := -mfpu=neon
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070073 # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S.
74 LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
Jason Sams709a0972012-11-15 18:18:04 -080075endif
76
Rose, James7b7060c2014-04-22 12:08:06 +080077ifeq ($(ARCH_X86_HAVE_SSSE3),true)
78 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3
79 LOCAL_SRC_FILES+= \
Stephen Hines7de19202014-08-19 22:05:26 -070080 rsCpuIntrinsics_x86.cpp
Rose, James7b7060c2014-04-22 12:08:06 +080081endif
82
Pirama Arumuga Nainardc0d8f72014-12-02 15:23:38 -080083LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ libdl
Tim Murraye195a3f2014-03-13 15:04:58 -070084
85# these are not supported in 64-bit yet
Tim Murray8c24cd62014-04-10 18:04:39 -070086LOCAL_SHARED_LIBRARIES += libbcc libbcinfo
Tim Murraye195a3f2014-03-13 15:04:58 -070087
Jason Sams709a0972012-11-15 18:18:04 -080088
89LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
90LOCAL_C_INCLUDES += frameworks/rs
91
Logan Chien8d501742014-05-26 23:07:47 +080092ifneq ($(HOST_OS),windows)
Stephen Hines00511322014-01-31 11:20:23 -080093include external/libcxx/libcxx.mk
Logan Chien8d501742014-05-26 23:07:47 +080094endif
Stephen Hines82e0a672014-05-05 15:40:56 -070095include frameworks/compile/libbcc/libbcc-targets.mk
Stephen Hines00511322014-01-31 11:20:23 -080096
Stephen Hines4b2bea32014-08-13 17:32:10 +000097LOCAL_CFLAGS += $(rs_base_CFLAGS)
Jason Sams709a0972012-11-15 18:18:04 -080098
Jason Sams709a0972012-11-15 18:18:04 -080099LOCAL_MODULE_TAGS := optional
100
101include $(BUILD_SHARED_LIBRARY)