blob: ad7cef73a6f44a32e87cddd6733a54e869e758ec [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
Tim Murray8c24cd62014-04-10 18:04:39 -070021ifeq ($(HOST_OS), darwin)
22LOCAL_CFLAGS += -no-integrated-as
23LOCAL_ASFLAGS += -no-integrated-as
24endif
25
Jason Sams709a0972012-11-15 18:18:04 -080026LOCAL_SRC_FILES:= \
27 rsCpuCore.cpp \
28 rsCpuScript.cpp \
29 rsCpuRuntimeMath.cpp \
30 rsCpuRuntimeStubs.cpp \
31 rsCpuScriptGroup.cpp \
32 rsCpuIntrinsic.cpp \
Jason Sams7c4b8882013-01-04 10:50:05 -080033 rsCpuIntrinsic3DLUT.cpp \
Jason Sams709a0972012-11-15 18:18:04 -080034 rsCpuIntrinsicBlend.cpp \
35 rsCpuIntrinsicBlur.cpp \
36 rsCpuIntrinsicColorMatrix.cpp \
37 rsCpuIntrinsicConvolve3x3.cpp \
38 rsCpuIntrinsicConvolve5x5.cpp \
Jason Sams2282e282013-06-17 16:52:01 -070039 rsCpuIntrinsicHistogram.cpp \
Matthieu Delahaye6fc3e122014-03-04 11:05:49 -060040 rsCpuIntrinsicLoopFilter.cpp \
Matthieu Delahaye60498fe2014-02-18 13:21:06 -060041 rsCpuIntrinsicYuvToRGB.cpp \
Jason Sams39ab94a2014-04-16 17:14:05 -070042 rsCpuIntrinsicResize.cpp \
Jason Samsee0f4832014-04-23 15:21:34 -070043 rsCpuIntrinsicLUT.cpp
Jason Sams709a0972012-11-15 18:18:04 -080044
Tim Murraybee48d72014-06-13 12:44:47 -070045LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
Ian Rogers3cdd1fb2014-03-19 15:41:32 -070046
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
Ying Wang02170e62014-03-04 15:33:24 -080055ifeq ($(ARCH_ARM_HAVE_NEON),true)
56 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
57endif
58
59ifeq ($(ARCH_ARM_HAVE_VFP),true)
Jason Sams074424a2014-05-22 13:30:03 -070060 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
Ying Wang02170e62014-03-04 15:33:24 -080061 LOCAL_SRC_FILES_arm += \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070062 rsCpuIntrinsics_neon_3DLUT.S \
Ying Wang02170e62014-03-04 15:33:24 -080063 rsCpuIntrinsics_neon_Blend.S \
64 rsCpuIntrinsics_neon_Blur.S \
Simon Hosie4e5c4142014-03-15 21:45:49 -070065 rsCpuIntrinsics_neon_Convolve.S \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070066 rsCpuIntrinsics_neon_ColorMatrix.S \
Jason Sams83f304c2014-03-05 16:38:24 -080067 rsCpuIntrinsics_neon_YuvToRGB.S \
Matthieu Delahaye6fc3e122014-03-04 11:05:49 -060068 vp9_loopfilter_16_neon.S \
69 vp9_loopfilter_neon.S \
70 vp9_mb_lpf_neon.S
Ying Wang02170e62014-03-04 15:33:24 -080071 LOCAL_ASFLAGS_arm := -mfpu=neon
Jason Sams709a0972012-11-15 18:18:04 -080072endif
73
Rose, James7b7060c2014-04-22 12:08:06 +080074ifeq ($(ARCH_X86_HAVE_SSSE3),true)
75 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3
76 LOCAL_SRC_FILES+= \
77 rsCpuIntrinsics_x86.c
78endif
79
Tim Murray8c24cd62014-04-10 18:04:39 -070080LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++
Tim Murraye195a3f2014-03-13 15:04:58 -070081
82# these are not supported in 64-bit yet
Tim Murray8c24cd62014-04-10 18:04:39 -070083LOCAL_SHARED_LIBRARIES += libbcc libbcinfo
Tim Murraye195a3f2014-03-13 15:04:58 -070084
Jason Sams709a0972012-11-15 18:18:04 -080085
86LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
87LOCAL_C_INCLUDES += frameworks/rs
Matthieu Delahaye6fc3e122014-03-04 11:05:49 -060088LOCAL_C_INCLUDES += system/core/include
Jason Sams709a0972012-11-15 18:18:04 -080089
Logan Chien8d501742014-05-26 23:07:47 +080090ifneq ($(HOST_OS),windows)
Stephen Hines00511322014-01-31 11:20:23 -080091include external/libcxx/libcxx.mk
Logan Chien8d501742014-05-26 23:07:47 +080092endif
Stephen Hines82e0a672014-05-05 15:40:56 -070093include frameworks/compile/libbcc/libbcc-targets.mk
Stephen Hines00511322014-01-31 11:20:23 -080094
Stephen Hines4b2bea32014-08-13 17:32:10 +000095LOCAL_CFLAGS += $(rs_base_CFLAGS)
Jason Sams709a0972012-11-15 18:18:04 -080096
Jason Sams709a0972012-11-15 18:18:04 -080097LOCAL_MODULE_TAGS := optional
98
99include $(BUILD_SHARED_LIBRARY)