1# Copyright (c) 2007 Intel Corporation. All Rights Reserved. 2# 3# Permission is hereby granted, free of charge, to any person obtaining a 4# copy of this software and associated documentation files (the 5# "Software"), to deal in the Software without restriction, including 6# without limitation the rights to use, copy, modify, merge, publish, 7# distribute, sub license, and/or sell copies of the Software, and to 8# permit persons to whom the Software is furnished to do so, subject to 9# the following conditions: 10# 11# The above copyright notice and this permission notice (including the 12# next paragraph) shall be included in all copies or substantial portions 13# of the Software. 14# 15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 18# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 19# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 23# For libva 24# ===================================================== 25 26LOCAL_PATH:= $(call my-dir) 27 28ifeq ($(ENABLE_IMG_GRAPHICS),true) 29 30LIBVA_DRIVERS_PATH = /system/lib 31 32# Clang does not like partially initialized structures 33# in va_fool.c, va.c and va_drm_utils.c. 34 35include $(CLEAR_VARS) 36 37LOCAL_MODULE := libva 38LOCAL_MODULE_CLASS := SHARED_LIBRARIES 39 40generated_sources_dir := $(call local-generated-sources-dir) 41 42LOCAL_SRC_FILES := \ 43 va.c \ 44 va_trace.c \ 45 va_fool.c 46 47LOCAL_CLANG_CFLAGS += -Wno-missing-field-initializers 48 49LOCAL_CFLAGS := \ 50 -DANDROID \ 51 -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" \ 52 -DLOG_TAG=\"libva\" \ 53 -DANDROID_ALOG 54 55LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/.. $(generated_sources_dir) 56 57LOCAL_C_INCLUDES := \ 58 $(TARGET_OUT_HEADERS)/libva \ 59 $(LOCAL_PATH)/x11 \ 60 $(LOCAL_PATH)/.. 61 62LOCAL_COPY_HEADERS := \ 63 va.h \ 64 va_dec_hevc.h \ 65 va_dec_jpeg.h \ 66 va_dec_vp8.h \ 67 va_dec_vp9.h \ 68 va_enc.h \ 69 va_enc_h264.h \ 70 va_enc_jpeg.h \ 71 va_enc_vp8.h \ 72 va_backend.h \ 73 va_drmcommon.h \ 74 va_vpp.h \ 75 va_backend_vpp.h \ 76 va_enc_mpeg2.h \ 77 78LOCAL_COPY_HEADERS_TO := libva/va 79LOCAL_CFLAGS += -Werror 80 81LOCAL_SHARED_LIBRARIES := libdl libdrm libcutils liblog 82 83GEN := $(generated_sources_dir)/va/va_version.h 84$(GEN): SCRIPT := $(LOCAL_PATH)/../build/gen_version.sh 85$(GEN): PRIVATE_PATH := $(LOCAL_PATH) 86$(GEN): PRIVATE_CUSTOM_TOOL = /bin/bash $(SCRIPT) $(PRIVATE_PATH)/.. $(PRIVATE_PATH)/va_version.h.in > $@ 87$(GEN): $(LOCAL_PATH)/va_version.h.in $(LOCAL_PATH)/../build/gen_version.sh $(LOCAL_PATH)/../configure.ac 88 $(transform-generated-source) 89LOCAL_GENERATED_SOURCES := $(GEN) 90 91include $(BUILD_SHARED_LIBRARY) 92 93my_header := $(TARGET_OUT_HEADERS)/libva/va/va_version.h 94ALL_COPIED_HEADERS.$(my_header).MAKEFILE := $(ALL_COPIED_HEADERS.$(my_header).MAKEFILE) $(my_header) 95ALL_COPIED_HEADERS.$(my_header).SRC := $(ALL_COPIED_HEADERS.$(my_header).SRC) $(GEN) 96ALL_COPIED_HEADERS += $(my_header) 97 98# For libva-android 99# ===================================================== 100 101include $(CLEAR_VARS) 102 103LOCAL_SRC_FILES := \ 104 android/va_android.cpp \ 105 drm/va_drm_utils.c 106 107LOCAL_CFLAGS := \ 108 -DANDROID -DLOG_TAG=\"libva-android\" 109 110LOCAL_CLANG_CFLAGS += -Wno-missing-field-initializers 111 112LOCAL_C_INCLUDES := \ 113 $(TARGET_OUT_HEADERS)/libva \ 114 $(TARGET_OUT_HEADERS)/libdrm \ 115 $(LOCAL_PATH)/drm 116 117LOCAL_COPY_HEADERS_TO := libva/va 118 119LOCAL_COPY_HEADERS := va_android.h 120LOCAL_CFLAGS += -Werror 121LOCAL_MODULE_TAGS := optional 122LOCAL_MODULE := libva-android 123 124LOCAL_SHARED_LIBRARIES := libva libdrm 125 126include $(BUILD_SHARED_LIBRARY) 127 128 129# For libva-egl 130# ===================================================== 131 132include $(CLEAR_VARS) 133 134LOCAL_SRC_FILES := \ 135 egl/va_egl.c 136 137LOCAL_CFLAGS := \ 138 -DANDROID -DLOG_TAG=\"libva-egl\" 139 140LOCAL_C_INCLUDES := \ 141 $(TARGET_OUT_HEADERS)/libva \ 142 $(LOCAL_PATH)/x11 143 144LOCAL_COPY_HEADERS_TO := libva/va 145 146LOCAL_COPY_HEADERS := egl/va_egl.h egl/va_backend_egl.h 147LOCAL_CFLAGS += -Werror 148LOCAL_MODULE_TAGS := optional 149LOCAL_MODULE := libva-egl 150 151LOCAL_SHARED_LIBRARIES := libva 152 153include $(BUILD_SHARED_LIBRARY) 154 155 156# For libva-tpi 157# ===================================================== 158 159include $(CLEAR_VARS) 160 161LOCAL_CLANG_CFLAGS += -Wno-missing-field-initializers 162 163LOCAL_SRC_FILES := va_tpi.c 164 165LOCAL_CFLAGS := -DANDROID -DLOG_TAG=\"libva-tpi\" 166 167LOCAL_C_INCLUDES := \ 168 $(TARGET_OUT_HEADERS)/libva \ 169 $(LOCAL_PATH)/.. 170 171LOCAL_COPY_HEADERS_TO := libva/va 172 173LOCAL_COPY_HEADERS := \ 174 va_tpi.h \ 175 va_backend_tpi.h 176 177LOCAL_SHARED_LIBRARIES := libva 178LOCAL_CFLAGS += -Werror 179LOCAL_MODULE_TAGS := optional 180LOCAL_MODULE := libva-tpi 181 182include $(BUILD_SHARED_LIBRARY) 183 184endif # $(ENABLE_IMG_GRAPHICS),true) 185