blob: 5de964fc8608c4d67efa8d2635d091a49b8aabc0 [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 \
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
Tim Murray358ffb82014-12-09 11:53:06 -080046ifeq ($(RS_DISABLE_A53_WORKAROUND),true)
47LOCAL_CFLAGS_arm64 += -DDISABLE_A53_WORKAROUND
48endif
49
Jason Sams074424a2014-05-22 13:30:03 -070050LOCAL_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 Murraye195a3f2014-03-13 15:04:58 -070056# rsCpuIntrinsics_advsimd_Blend.S \
Jason Sams06b0f7d2013-03-22 13:43:01 -070057
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070058# Clang does not compile rsCpuIntrinsics_advsimd_3DLUT.S.
59LOCAL_CLANG_ASFLAGS_arm64 += -no-integrated-as
60
Ying Wang02170e62014-03-04 15:33:24 -080061ifeq ($(ARCH_ARM_HAVE_NEON),true)
62 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
63endif
64
65ifeq ($(ARCH_ARM_HAVE_VFP),true)
Jason Sams074424a2014-05-22 13:30:03 -070066 LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS
Ying Wang02170e62014-03-04 15:33:24 -080067 LOCAL_SRC_FILES_arm += \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070068 rsCpuIntrinsics_neon_3DLUT.S \
Ying Wang02170e62014-03-04 15:33:24 -080069 rsCpuIntrinsics_neon_Blend.S \
70 rsCpuIntrinsics_neon_Blur.S \
Simon Hosie4e5c4142014-03-15 21:45:49 -070071 rsCpuIntrinsics_neon_Convolve.S \
Simon Hosie5dcaaa52014-03-15 21:23:51 -070072 rsCpuIntrinsics_neon_ColorMatrix.S \
Jason Sams83f304c2014-03-05 16:38:24 -080073 rsCpuIntrinsics_neon_YuvToRGB.S \
Jason Sams79a9dac2014-09-30 11:06:16 -070074
Ying Wang02170e62014-03-04 15:33:24 -080075 LOCAL_ASFLAGS_arm := -mfpu=neon
Chih-Hung Hsieh12f143e2014-10-03 09:33:11 -070076 # Clang does not compile rsCpuIntrinsics_neon_3DLUT.S.
77 LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
Jason Sams709a0972012-11-15 18:18:04 -080078endif
79
Rose, James7b7060c2014-04-22 12:08:06 +080080ifeq ($(ARCH_X86_HAVE_SSSE3),true)
81 LOCAL_CFLAGS += -DARCH_X86_HAVE_SSSE3
82 LOCAL_SRC_FILES+= \
Stephen Hines7de19202014-08-19 22:05:26 -070083 rsCpuIntrinsics_x86.cpp
Rose, James7b7060c2014-04-22 12:08:06 +080084endif
85
Tim Murray8c24cd62014-04-10 18:04:39 -070086LOCAL_SHARED_LIBRARIES += libRS libcutils libutils liblog libsync libc++
Tim Murraye195a3f2014-03-13 15:04:58 -070087
88# these are not supported in 64-bit yet
Tim Murray8c24cd62014-04-10 18:04:39 -070089LOCAL_SHARED_LIBRARIES += libbcc libbcinfo
Tim Murraye195a3f2014-03-13 15:04:58 -070090
Jason Sams709a0972012-11-15 18:18:04 -080091
92LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
93LOCAL_C_INCLUDES += frameworks/rs
94
Logan Chien8d501742014-05-26 23:07:47 +080095ifneq ($(HOST_OS),windows)
Stephen Hines00511322014-01-31 11:20:23 -080096include external/libcxx/libcxx.mk
Logan Chien8d501742014-05-26 23:07:47 +080097endif
Stephen Hines82e0a672014-05-05 15:40:56 -070098include frameworks/compile/libbcc/libbcc-targets.mk
Stephen Hines00511322014-01-31 11:20:23 -080099
Stephen Hines4b2bea32014-08-13 17:32:10 +0000100LOCAL_CFLAGS += $(rs_base_CFLAGS)
Jason Sams709a0972012-11-15 18:18:04 -0800101
Jason Sams709a0972012-11-15 18:18:04 -0800102LOCAL_MODULE_TAGS := optional
103
104include $(BUILD_SHARED_LIBRARY)