blob: 7c63c95a47a965fc4fff3e5dd98a795cf700fcaa [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 \
Tim Murray64c682b2015-01-09 12:08:43 -080031 rsCpuIntrinsicBLAS.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080032 rsCpuIntrinsicBlend.cpp \
33 rsCpuIntrinsicBlur.cpp \
34 rsCpuIntrinsicColorMatrix.cpp \
35 rsCpuIntrinsicConvolve3x3.cpp \
36 rsCpuIntrinsicConvolve5x5.cpp \
Jason Sams2282e282013-06-17 16:52:01 -070037 rsCpuIntrinsicHistogram.cpp \
Jason Sams0d6043c2014-04-16 17:01:20 -070038 rsCpuIntrinsicResize.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080039 rsCpuIntrinsicLUT.cpp \
Jason Samsd56fa522014-04-23 23:15:43 -070040 rsCpuIntrinsicYuvToRGB.cpp
Jason Sams709a0972012-11-15 18:18:04 -080041
Tim Murraybee48d72014-06-13 12:44:47 -070042LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
Ian Rogers3cdd1fb2014-03-19 15:41:32 -070043
Tim Murray358ffb82014-12-09 11:53:06 -080044ifeq ($(RS_DISABLE_A53_WORKAROUND),true)
45LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND
46endif
47
Jason Sams074424a2014-05-22 13:30:03 -070048LOCAL_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 Murraye195a3f2014-03-13 15:04:58 -070054# rsCpuIntrinsics_advsimd_Blend.S \
Jason Sams06b0f7d2013-03-22 13:43:01 -070055
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070056# Clang does not compile rsCpuIntrinsics_advsimd_3DLUT.S.
57LOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
58
Ying Wang02170e62014-03-04 15:33:24 -080059ifeq ($(ARCH_ARM_HAVE_NEON),true)
60 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
61endif
62
63ifeq ($(ARCH_ARM_HAVE_VFP),true)
Jason Sams074424a2014-05-22 13:30:03 -070064 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
Ying Wang02170e62014-03-04 15:33:24 -080065 LOCAL_SRC_FILES_arm += \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070066 rsCpuIntrinsics_neon_3DLUT.S \
Ying Wang02170e62014-03-04 15:33:24 -080067 rsCpuIntrinsics_neon_Blend.S \
68 rsCpuIntrinsics_neon_Blur.S \
Simon Hosie4e5c4142014-03-15 21:45:49 -070069 rsCpuIntrinsics_neon_Convolve.S \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070070 rsCpuIntrinsics_neon_ColorMatrix.S \
Jason Sams83f304c2014-03-05 16:38:24 -080071 rsCpuIntrinsics_neon_YuvToRGB.S \
Jason Sams79a9dac2014-09-30 11:06:16 -070072
Ying Wang02170e62014-03-04 15:33:24 -080073 LOCAL_ASFLAGS_arm := -mfpu=neon
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070074 # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S.
75 LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
Jason Sams709a0972012-11-15 18:18:04 -080076endif
77
Rose, James7b7060c2014-04-22 12:08:06 +080078ifeq ($(ARCH_X86_HAVE_SSSE3),true)
79 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3
80 LOCAL_SRC_FILES+= \
Stephen Hines7de19202014-08-19 22:05:26 -070081 rsCpuIntrinsics_x86.cpp
Rose, James7b7060c2014-04-22 12:08:06 +080082endif
83
Pirama Arumuga Nainardc0d8f72014-12-02 15:23:38 -080084LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++ libdl
Tim Murraye195a3f2014-03-13 15:04:58 -070085
Tim Murray64c682b2015-01-09 12:08:43 -080086LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libblas
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
Tim Murray64c682b2015-01-09 12:08:43 -080091LOCAL_C_INCLUDES += external/cblas/include
Jason Sams709a0972012-11-15 18:18:04 -080092
Logan Chien8d501742014-05-26 23:07:47 +080093ifneq ($(HOST_OS),windows)
Stephen Hines00511322014-01-31 11:20:23 -080094include external/libcxx/libcxx.mk
Logan Chien8d501742014-05-26 23:07:47 +080095endif
Stephen Hines82e0a672014-05-05 15:40:56 -070096include frameworks/compile/libbcc/libbcc-targets.mk
Stephen Hines00511322014-01-31 11:20:23 -080097
Stephen Hines4b2bea32014-08-13 17:32:10 +000098LOCAL_CFLAGS += $(rs_base_CFLAGS)
Jason Sams709a0972012-11-15 18:18:04 -080099
Jason Sams709a0972012-11-15 18:18:04 -0800100LOCAL_MODULE_TAGS := optional
101
102include $(BUILD_SHARED_LIBRARY)