1 2LOCAL_PATH:=frameworks/rs 3rs_base_CFLAGS := -Werror -Wall -Wno-unused-parameter -Wno-unused-variable \ 4 -Wno-overloaded-virtual -DRS_COMPATIBILITY_LIB 5 6ifeq ($(ARCH_ARM_HAVE_NEON),true) 7rs_base_CFLAGS += -DARCH_ARM_HAVE_NEON 8endif 9 10ifeq ($(TARGET_BUILD_PDK), true) 11 rs_base_CFLAGS += -D__RS_PDK__ 12endif 13 14# Build rsg-generator ==================== 15include $(CLEAR_VARS) 16 17LOCAL_MODULE := rsg-generator_support 18 19# These symbols are normally defined by BUILD_XXX, but we need to define them 20# here so that local-intermediates-dir works. 21 22LOCAL_IS_HOST_MODULE := true 23LOCAL_MODULE_CLASS := EXECUTABLES 24intermediates := $(local-intermediates-dir) 25LOCAL_MODULE_TAGS := optional 26 27LOCAL_SRC_FILES:= \ 28 spec.l \ 29 rsg_generator.c 30 31include $(BUILD_HOST_EXECUTABLE) 32 33# TODO: This should go into build/core/config.mk 34RSG_GENERATOR_SUPPORT:=$(LOCAL_BUILT_MODULE) 35 36include $(CLEAR_VARS) 37LOCAL_CLANG := true 38LOCAL_MODULE := libRSSupport 39LOCAL_SDK_VERSION := 8 40 41# TODO: remove this once we have 64-bit NDK libraries. 42LOCAL_32_BIT_ONLY := true 43 44LOCAL_MODULE_CLASS := SHARED_LIBRARIES 45generated_sources_dir := $(call local-generated-sources-dir) 46 47# Generate custom headers 48 49GEN := $(addprefix $(generated_sources_dir)/, \ 50 rsgApiStructs.h \ 51 rsgApiFuncDecl.h \ 52 ) 53 54$(GEN) : PRIVATE_PATH := $(LOCAL_PATH) 55$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR_SUPPORT) $< $@ <$(PRIVATE_PATH)/rs.spec 56$(GEN) : $(RSG_GENERATOR_SUPPORT) $(LOCAL_PATH)/rs.spec 57$(GEN): $(generated_sources_dir)/%.h : $(LOCAL_PATH)/%.h.rsg 58 $(transform-generated-source) 59 60# used in jni/Android.mk 61rs_generated_source += $(GEN) 62LOCAL_GENERATED_SOURCES += $(GEN) 63 64# Generate custom source files 65 66GEN := $(addprefix $(generated_sources_dir)/, \ 67 rsgApi.cpp \ 68 rsgApiReplay.cpp \ 69 ) 70 71$(GEN) : PRIVATE_PATH := $(LOCAL_PATH) 72$(GEN) : PRIVATE_CUSTOM_TOOL = $(RSG_GENERATOR_SUPPORT) $< $@ <$(PRIVATE_PATH)/rs.spec 73$(GEN) : $(RSG_GENERATOR_SUPPORT) $(LOCAL_PATH)/rs.spec 74$(GEN): $(generated_sources_dir)/%.cpp : $(LOCAL_PATH)/%.cpp.rsg 75 $(transform-generated-source) 76 77# used in jni/Android.mk 78rs_generated_source += $(GEN) 79 80LOCAL_GENERATED_SOURCES += $(GEN) 81 82LOCAL_SRC_FILES:= \ 83 rsAdapter.cpp \ 84 rsAllocation.cpp \ 85 rsCompatibilityLib.cpp \ 86 rsComponent.cpp \ 87 rsContext.cpp \ 88 rsCppUtils.cpp \ 89 rsDevice.cpp \ 90 rsElement.cpp \ 91 rsFifoSocket.cpp \ 92 rsObjectBase.cpp \ 93 rsMatrix2x2.cpp \ 94 rsMatrix3x3.cpp \ 95 rsMatrix4x4.cpp \ 96 rsMutex.cpp \ 97 rsSampler.cpp \ 98 rsScript.cpp \ 99 rsScriptC.cpp \ 100 rsScriptC_Lib.cpp \ 101 rsScriptGroup.cpp \ 102 rsScriptIntrinsic.cpp \ 103 rsSignal.cpp \ 104 rsStream.cpp \ 105 rsThreadIO.cpp \ 106 rsType.cpp \ 107 driver/rsdAllocation.cpp \ 108 driver/rsdBcc.cpp \ 109 driver/rsdCore.cpp \ 110 driver/rsdElement.cpp \ 111 driver/rsdRuntimeStubs.cpp \ 112 driver/rsdSampler.cpp \ 113 driver/rsdScriptGroup.cpp \ 114 driver/rsdType.cpp \ 115 cpu_ref/rsCpuCore.cpp \ 116 cpu_ref/rsCpuScript.cpp \ 117 cpu_ref/rsCpuRuntimeMath.cpp \ 118 cpu_ref/rsCpuRuntimeStubs.cpp \ 119 cpu_ref/rsCpuScriptGroup.cpp \ 120 cpu_ref/rsCpuIntrinsic.cpp \ 121 cpu_ref/rsCpuIntrinsic3DLUT.cpp \ 122 cpu_ref/rsCpuIntrinsicBlend.cpp \ 123 cpu_ref/rsCpuIntrinsicBlur.cpp \ 124 cpu_ref/rsCpuIntrinsicColorMatrix.cpp \ 125 cpu_ref/rsCpuIntrinsicConvolve3x3.cpp \ 126 cpu_ref/rsCpuIntrinsicConvolve5x5.cpp \ 127 cpu_ref/rsCpuIntrinsicHistogram.cpp \ 128 cpu_ref/rsCpuIntrinsicLUT.cpp \ 129 cpu_ref/rsCpuIntrinsicResize.cpp \ 130 cpu_ref/rsCpuIntrinsicYuvToRGB.cpp \ 131 cpu_ref/rsCpuRuntimeMathFuncs.cpp 132 133ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) 134LOCAL_CFLAGS_arm := -DARCH_ARM_HAVE_VFP -DARCH_ARM_USE_INTRINSICS 135LOCAL_ASFLAGS_arm := -mfpu=neon 136LOCAL_SRC_FILES_arm := \ 137 cpu_ref/rsCpuIntrinsics_neon_3DLUT.S \ 138 cpu_ref/rsCpuIntrinsics_neon_ColorMatrix.S \ 139 cpu_ref/rsCpuIntrinsics_neon_Blend.S \ 140 cpu_ref/rsCpuIntrinsics_neon_Blur.S \ 141 cpu_ref/rsCpuIntrinsics_neon_Convolve.S \ 142 cpu_ref/rsCpuIntrinsics_neon_YuvToRGB.S 143endif 144 145LOCAL_LDFLAGS += -llog -ldl 146LOCAL_NDK_STL_VARIANT := stlport_static 147 148LOCAL_C_INCLUDES += frameworks/compile/libbcc/include 149 150 151LOCAL_CFLAGS += $(rs_base_CFLAGS) 152 153LOCAL_MODULE:= libRSSupport 154LOCAL_MODULE_TAGS := optional 155 156# TODO: why isn't this picked up from the host GLOBAL_CFLAGS? 157LOCAL_CFLAGS += -D__STDC_FORMAT_MACROS 158 159include $(BUILD_SHARED_LIBRARY) 160