blob: aa26c6a7181f64603e886ff52d8e3fd6616a3fc3 [file] [log] [blame]
Jason Sams709a0972012-11-15 18:18:04 -08001
2LOCAL_PATH:=$(call my-dir)
3
Tim Murray8c24cd62014-04-10 18:04:39 -07004rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -fno-exceptions
Jason Sams709a0972012-11-15 18:18:04 -08005ifeq ($(TARGET_BUILD_PDK), true)
6 rs_base_CFLAGS += -D__RS_PDK__
7endif
8
9ifneq ($(OVERRIDE_RS_DRIVER),)
10 rs_base_CFLAGS += -DOVERRIDE_RS_DRIVER=$(OVERRIDE_RS_DRIVER)
11endif
12
13include $(CLEAR_VARS)
Logan Chien8d501742014-05-26 23:07:47 +080014ifneq ($(HOST_OS),windows)
Jason Sams709a0972012-11-15 18:18:04 -080015LOCAL_CLANG := true
Logan Chien8d501742014-05-26 23:07:47 +080016endif
Jason Sams709a0972012-11-15 18:18:04 -080017LOCAL_MODULE := libRSCpuRef
Duane Sande8e408a2014-05-13 16:46:02 -070018LOCAL_MODULE_TARGET_ARCH := arm mips mips64 x86 x86_64 arm64
Jason Sams709a0972012-11-15 18:18:04 -080019
Tim Murray8c24cd62014-04-10 18:04:39 -070020ifeq ($(HOST_OS), darwin)
21LOCAL_CFLAGS += -no-integrated-as
22LOCAL_ASFLAGS += -no-integrated-as
23endif
24
Jason Sams709a0972012-11-15 18:18:04 -080025LOCAL_SRC_FILES:= \
26 rsCpuCore.cpp \
27 rsCpuScript.cpp \
28 rsCpuRuntimeMath.cpp \
29 rsCpuRuntimeStubs.cpp \
30 rsCpuScriptGroup.cpp \
31 rsCpuIntrinsic.cpp \
Jason Sams7c4b8882013-01-04 10:50:05 -080032 rsCpuIntrinsic3DLUT.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080033 rsCpuIntrinsicBlend.cpp \
34 rsCpuIntrinsicBlur.cpp \
35 rsCpuIntrinsicColorMatrix.cpp \
36 rsCpuIntrinsicConvolve3x3.cpp \
37 rsCpuIntrinsicConvolve5x5.cpp \
Jason Sams2282e282013-06-17 16:52:01 -070038 rsCpuIntrinsicHistogram.cpp \
Matthieu Delahaye6fc3e122014-03-04 11:05:49 -060039 rsCpuIntrinsicLoopFilter.cpp \
Jason Sams0d6043c2014-04-16 17:01:20 -070040 rsCpuIntrinsicResize.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080041 rsCpuIntrinsicLUT.cpp \
Jason Samsd56fa522014-04-23 23:15:43 -070042 rsCpuIntrinsicYuvToRGB.cpp
Jason Sams709a0972012-11-15 18:18:04 -080043
Tim Murraybee48d72014-06-13 12:44:47 -070044LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
Ian Rogers3cdd1fb2014-03-19 15:41:32 -070045
Jason Sams074424a2014-05-22 13:30:03 -070046LOCAL_SRC_FILES_arm64 += \
47 rsCpuIntrinsics_advsimd_3DLUT.S \
48 rsCpuIntrinsics_advsimd_Convolve.S \
49 rsCpuIntrinsics_advsimd_Blur.S \
50 rsCpuIntrinsics_advsimd_ColorMatrix.S \
51 rsCpuIntrinsics_advsimd_YuvToRGB.S
Tim Murraye195a3f2014-03-13 15:04:58 -070052# rsCpuIntrinsics_advsimd_Blend.S \
Jason Sams06b0f7d2013-03-22 13:43:01 -070053
Ying Wang02170e62014-03-04 15:33:24 -080054ifeq ($(ARCH_ARM_HAVE_NEON),true)
55 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
56endif
57
58ifeq ($(ARCH_ARM_HAVE_VFP),true)
Jason Sams074424a2014-05-22 13:30:03 -070059 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
Ying Wang02170e62014-03-04 15:33:24 -080060 LOCAL_SRC_FILES_arm += \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070061 rsCpuIntrinsics_neon_3DLUT.S \
Ying Wang02170e62014-03-04 15:33:24 -080062 rsCpuIntrinsics_neon_Blend.S \
63 rsCpuIntrinsics_neon_Blur.S \
Simon Hosie4e5c4142014-03-15 21:45:49 -070064 rsCpuIntrinsics_neon_Convolve.S \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070065 rsCpuIntrinsics_neon_ColorMatrix.S \
Jason Sams83f304c2014-03-05 16:38:24 -080066 rsCpuIntrinsics_neon_YuvToRGB.S \
Matthieu Delahaye6fc3e122014-03-04 11:05:49 -060067 vp9_loopfilter_16_neon.S \
68 vp9_loopfilter_neon.S \
69 vp9_mb_lpf_neon.S
Ying Wang02170e62014-03-04 15:33:24 -080070 LOCAL_ASFLAGS_arm := -mfpu=neon
Jason Sams709a0972012-11-15 18:18:04 -080071endif
72
Rose, James7b7060c2014-04-22 12:08:06 +080073ifeq ($(ARCH_X86_HAVE_SSSE3),true)
74 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3
75 LOCAL_SRC_FILES+= \
76 rsCpuIntrinsics_x86.c
77endif
78
Tim Murray8c24cd62014-04-10 18:04:39 -070079LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++
Tim Murraye195a3f2014-03-13 15:04:58 -070080
81# these are not supported in 64-bit yet
Tim Murray8c24cd62014-04-10 18:04:39 -070082LOCAL_SHARED_LIBRARIES += libbcc libbcinfo
Tim Murraye195a3f2014-03-13 15:04:58 -070083
Jason Sams709a0972012-11-15 18:18:04 -080084
85LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
86LOCAL_C_INCLUDES += frameworks/rs
Matthieu Delahaye6fc3e122014-03-04 11:05:49 -060087LOCAL_C_INCLUDES += system/core/include
Jason Sams709a0972012-11-15 18:18:04 -080088
Logan Chien8d501742014-05-26 23:07:47 +080089ifneq ($(HOST_OS),windows)
Stephen Hines00511322014-01-31 11:20:23 -080090include external/libcxx/libcxx.mk
Logan Chien8d501742014-05-26 23:07:47 +080091endif
Stephen Hines82e0a672014-05-05 15:40:56 -070092include frameworks/compile/libbcc/libbcc-targets.mk
Stephen Hines00511322014-01-31 11:20:23 -080093
Jason Sams709a0972012-11-15 18:18:04 -080094LOCAL_CFLAGS += $(rs_base_CFLAGS)
95
Jason Sams709a0972012-11-15 18:18:04 -080096LOCAL_MODULE_TAGS := optional
97
98include $(BUILD_SHARED_LIBRARY)