OSDN Git Service

android: ignore unimportant compile warnnings
[android-x86/hardware-intel-common-vaapi.git] / src / Android.mk
1 # Copyright (c) 2012 Intel Corporation. All Rights Reserved.
2 #
3 #
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the
6 # "Software"), to deal in the Software without restriction, including
7 # without limitation the rights to use, copy, modify, merge, publish,
8 # distribute, sub license, and/or sell copies of the Software, and to
9 # permit persons to whom the Software is furnished to do so, subject to
10 # the following conditions:
11 #
12 # The above copyright notice and this permission notice (including the
13 # next paragraph) shall be included in all copies or substantial portions
14 # of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 # IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 #
24
25 LOCAL_PATH:= $(call my-dir)
26
27 include $(LOCAL_PATH)/Makefile.sources
28
29 include $(CLEAR_VARS)
30
31 LOCAL_SRC_FILES := $(source_c)
32
33 LOCAL_MODULE := i965_drv_video
34 LOCAL_MODULE_TAGS := optional
35 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
36 LOCAL_MODULE_RELATIVE_PATH := dri
37 LOCAL_PROPRIETARY_MODULE := true
38
39 intermediates := $(call local-generated-sources-dir)
40
41 LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
42
43 GEN := $(intermediates)/config_android.h
44 $(GEN): SCRIPT := $(LOCAL_PATH)/../build/gen_version.sh
45 $(GEN): PRIVATE_CUSTOM_TOOL = \
46         eval $$(sed -n "/^m4_define.*\(intel_vaapi_driver_.*_version\).*\[\([0-9]*\)\].*/s//\1=\2;/p" $(word 2,$^)); \
47         sed -e "s/\(define INTEL_DRIVER_MAJOR_VERSION\)\(.*\)/\1 $$intel_vaapi_driver_major_version/; \
48                 s/\(define INTEL_DRIVER_MINOR_VERSION\)\(.*\)/\1 $$intel_vaapi_driver_minor_version/; \
49                 s/\(define INTEL_DRIVER_MICRO_VERSION\)\(.*\)/\1 $$intel_vaapi_driver_micro_version/; \
50                 s/\(define INTEL_DRIVER_PRE_VERSION\)\(.*\)/\1 $$intel_vaapi_driver_pre_version/" \
51                 $< > $@
52 $(GEN): $(intermediates)/%.h : $(LOCAL_PATH)/%.h.in $(LOCAL_PATH)/../configure.ac
53         $(transform-generated-source)
54 LOCAL_GENERATED_SOURCES := $(GEN)
55
56 GEN := $(intermediates)/intel_version.h
57 $(GEN): $(LOCAL_PATH)/intel_version.h.in $(wildcard $(LOCAL_PATH)/../.git/logs/HEAD)
58         @echo "Generating: $@ <= git"; mkdir -p $(@D)
59         $(hide) VER=`cd $(<D)/.. && git describe --tags --always --dirty || echo unknown`; \
60         sed -e "s|\@INTEL_DRIVER_GIT_VERSION\@|$$VER|" $< > $@
61 LOCAL_GENERATED_SOURCES += $(GEN)
62
63 LOCAL_CFLAGS := -DLINUX -g -Wall -Wno-unused -fvisibility=hidden \
64         -Wno-missing-field-initializers \
65         -Wno-unused-parameter \
66         -Wno-pointer-arith \
67         -Wno-sign-compare \
68
69 LOCAL_SHARED_LIBRARIES := libdl libdrm libdrm_intel libcutils \
70                libva libva-android libstdc++
71
72 ifeq ($(strip $(DRIVER_LOG_ENABLE)),true)
73 LOCAL_CFLAGS += -DDRIVER_LOG_ENABLE
74 LOCAL_SHARED_LIBRARIES += liblog
75 endif
76
77 include $(BUILD_SHARED_LIBRARY)