1# Copyright (c) 2011 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
25LOCAL_PATH:= $(call my-dir)
26
27include $(CLEAR_VARS)
28
29LOCAL_CFLAGS := \
30    -DLINUX -DANDROID -g -Wall -Wno-unused \
31    -DPSBVIDEO_LOG_ENABLE -DPSBVIDEO_VXD392 \
32    -DPSBVIDEO_MSVDX_DEC_TILING -DPSBVIDEO_MSVDX_EC
33
34LOCAL_C_INCLUDES := \
35    $(call include-path-for, libhardware)/hardware \
36    $(call include-path-for, frameworks-base) \
37    $(TARGET_OUT_HEADERS)/libva \
38    $(TARGET_OUT_HEADERS)/libttm \
39    $(TARGET_OUT_HEADERS)/libwsbm \
40    $(TARGET_OUT_HEADERS)/libdrm \
41    $(TARGET_OUT_HEADERS)/opengles \
42    $(TARGET_OUT_HEADERS)/pvr \
43    $(LOCAL_PATH)/hwdefs
44
45LOCAL_SHARED_LIBRARIES += libdl libdrm libwsbm libcutils \
46                libui libutils libbinder libhardware liblog
47
48LOCAL_SRC_FILES := \
49    object_heap.c \
50    psb_buffer.c \
51    psb_buffer_dm.c \
52    psb_cmdbuf.c \
53    psb_drv_video.c \
54    psb_drv_debug.c \
55    psb_surface_attrib.c \
56    psb_output.c \
57    android/psb_output_android.c \
58    android/psb_android_glue.cpp \
59    android/psb_surface_gralloc.c \
60    android/psb_gralloc.cpp \
61    psb_surface.c \
62    psb_overlay.c \
63    vc1_idx.c \
64    vc1_vlc.c \
65    pnw_H264.c \
66    pnw_MPEG4.c \
67    pnw_MPEG2.c \
68    pnw_VC1.c \
69    pnw_rotate.c \
70    tng_vld_dec.c \
71    tng_yuv_processor.c \
72    tng_VP8.c \
73    tng_jpegdec.c
74
75ifneq ($(filter $(TARGET_BOARD_PLATFORM),merrifield moorefield morganfield),)
76LOCAL_SRC_FILES += \
77    pnw_H263ES.c \
78    pnw_H264ES.c \
79    pnw_MPEG4ES.c \
80    pnw_cmdbuf.c \
81    pnw_hostcode.c \
82    pnw_hostheader.c \
83    pnw_hostjpeg.c \
84    pnw_jpeg.c \
85    tng_ved_scaling.c \
86    tng_cmdbuf.c \
87    tng_hostheader.c \
88    tng_hostcode.c \
89    tng_picmgmt.c \
90    tng_hostbias.c \
91    tng_H264ES.c \
92    tng_H263ES.c \
93    tng_MPEG4ES.c \
94    tng_jpegES.c \
95    tng_slotorder.c \
96    tng_hostair.c \
97    tng_trace.c \
98    vsp_VPP.c \
99    vsp_vp8.c \
100    vsp_cmdbuf.c \
101    vsp_compose.c \
102
103
104ifeq ($(TARGET_HAS_VPP),true)
105LOCAL_C_INCLUDES += \
106    $(TARGET_OUT_HEADERS)/libmedia_utils_vpp
107endif
108
109
110ifeq ($(TARGET_HAS_VPP),true)
111LOCAL_SHARED_LIBRARIES += libvpp_setting
112LOCAL_CFLAGS += DPSBVIDEO_MRFL_VPP_SETTING
113endif
114
115
116ifeq ($(TARGET_HAS_VPP),true)
117LOCAL_CFLAGS += \
118    -DPSBVIDEO_MRFL_VPP -DPSBVIDEO_MRFL \
119    -DPSBVIDEO_VPP_TILING -DSLICE_HEADER_PARSING
120else
121LOCAL_CFLAGS += \
122    -DPSBVIDEO_MRFL_VPP \
123    -DPSBVIDEO_MRFL \
124    -DSLICE_HEADER_PARSING
125endif
126
127ifeq ($(TARGET_BOARD_PLATFORM),merrifield)
128ifeq ($(TARGET_HAS_VPP),true)
129LOCAL_CFLAGS += -DPSBVIDEO_MRFL_VPP_ROTATE
130endif
131endif
132
133else
134LOCAL_CFLAGS += \
135    -DPSBVIDEO_VXD392 -DBAYTRAIL \
136    -DPSBVIDEO_MSVDX_DEC_TILING -DPSBVIDEO_MSVDX_EC
137endif
138
139ifeq ($(TARGET_HAS_MULTIPLE_DISPLAY),true)
140LOCAL_SRC_FILES += android/psb_mds.cpp
141LOCAL_CFLAGS += -DTARGET_HAS_MULTIPLE_DISPLAY
142LOCAL_SHARED_LIBRARIES += libmultidisplay
143endif
144LOCAL_CFLAGS += -Werror
145LOCAL_MODULE_TAGS := optional
146LOCAL_MODULE := pvr_drv_video
147
148include $(BUILD_SHARED_LIBRARY)
149