OSDN Git Service

ENC: add AVC kernel binary on SKL
[android-x86/hardware-intel-common-vaapi.git] / src / Makefile.am
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 SUBDIRS         = shaders
24 DIST_SUBDIRS    = $(SUBDIRS)
25 EXTRA_DIST      =
26 BUILT_SOURCES   =
27
28 AM_CPPFLAGS = \
29         -DPTHREADS              \
30         $(DRM_CFLAGS)           \
31         $(LIBVA_DEPS_CFLAGS)    \
32         -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" \
33         $(NULL)
34
35 driver_cflags = \
36         -Wall                   \
37         -fvisibility=hidden     \
38         $(NULL)
39
40 driver_ldflags = \
41         -avoid-version          \
42         -no-undefined           \
43         -Wl,--no-undefined      \
44         $(NULL)
45
46 driver_libs = \
47         -lpthread -lm -ldl      \
48         $(DRM_LIBS) -ldrm_intel \
49         $(NULL)
50
51 source_c = \
52         dso_utils.c             \
53         gen6_mfc.c              \
54         gen6_mfc_common.c       \
55         gen6_mfd.c              \
56         gen6_vme.c              \
57         gen7_vme.c              \
58         gen7_mfc.c              \
59         gen7_mfd.c              \
60         gen75_mfd.c             \
61         gen75_mfc.c             \
62         gen8_encoder_vp8.c      \
63         gen8_mfc.c              \
64         gen8_mfd.c              \
65         gen8_vme.c              \
66         gen9_encoder_vp8.c      \
67         gen9_vme.c              \
68         gen9_mfc.c              \
69         gen9_mfc_hevc.c         \
70         gen9_mfd.c              \
71         gen9_vdenc.c            \
72         gen75_picture_process.c \
73         gen75_vme.c             \
74         gen75_vpp_gpe.c         \
75         gen75_vpp_vebox.c       \
76         gen9_post_processing.c  \
77         i965_avc_bsd.c          \
78         i965_avc_hw_scoreboard.c\
79         i965_avc_ildb.c         \
80         i965_decoder_utils.c    \
81         i965_device_info.c      \
82         i965_drv_video.c        \
83         i965_encoder.c          \
84         i965_encoder_utils.c    \
85         i965_encoder_vp8.c      \
86         i965_media.c            \
87         i965_media_h264.c       \
88         i965_media_mpeg2.c      \
89         i965_gpe_utils.c        \
90         i965_post_processing.c  \
91         i965_yuv_coefs.c        \
92         gen8_post_processing.c  \
93         i965_render.c           \
94         i965_vpp_avs.c          \
95         gen8_render.c           \
96         gen9_render.c           \
97         intel_batchbuffer.c     \
98         intel_batchbuffer_dump.c\
99         intel_driver.c          \
100         intel_memman.c          \
101         object_heap.c           \
102         intel_media_common.c            \
103         vp8_probs.c             \
104         vp9_probs.c             \
105         vpx_quant.c             \
106         gen9_vp9_encoder_kernels.c      \
107         gen9_vp9_const_def.c      \
108         gen9_vp9_encoder.c      \
109         intel_common_vpp_internal.c           \
110         i965_encoder_const_def.c    \
111         gen9_avc_const_def.c    \
112         gen9_avc_encoder_kernels.c     \
113         $(NULL)
114
115 source_h = \
116         dso_utils.h             \
117         gen6_mfc.h              \
118         gen6_mfd.h              \
119         gen6_vme.h              \
120         gen7_mfd.h              \
121         gen75_picture_process.h \
122         gen75_vpp_gpe.h         \
123         gen75_vpp_vebox.h       \
124         gen8_post_processing.h  \
125         gen9_mfd.h              \
126         gen9_mfc.h              \
127         gen9_vdenc.h            \
128         i965_avc_bsd.h          \
129         i965_avc_hw_scoreboard.h\
130         i965_avc_ildb.h         \
131         i965_decoder.h          \
132         i965_decoder_utils.h    \
133         i965_defines.h          \
134         i965_drv_video.h        \
135         i965_encoder.h          \
136         i965_encoder_utils.h    \
137         i965_encoder_vp8.h      \
138         i965_media.h            \
139         i965_media_h264.h       \
140         i965_media_mpeg2.h      \
141         i965_mutext.h           \
142         i965_gpe_utils.h        \
143         i965_pciids.h           \
144         i965_post_processing.h  \
145         i965_render.h           \
146         i965_structs.h          \
147         i965_vpp_avs.h          \
148         i965_yuv_coefs.h        \
149         intel_batchbuffer.h     \
150         intel_batchbuffer_dump.h\
151         intel_compiler.h        \
152         intel_driver.h          \
153         intel_media.h           \
154         intel_memman.h          \
155         intel_version.h         \
156         object_heap.h           \
157         vp8_probs.h             \
158         vp9_probs.h             \
159         vpx_quant.h             \
160         sysdeps.h               \
161         va_backend_compat.h     \
162         i965_fourcc.h           \
163         gen9_vp9_encoder.h           \
164         gen9_vp9_encapi.h           \
165         gen9_vp9_const_def.h      \
166         gen9_vp9_encoder_kernels.h           \
167         intel_gen_vppapi.h           \
168         intel_common_vpp_internal.h           \
169         i965_encoder_common.h        \
170         i965_encoder_api.h        \
171         gen9_avc_const_def.h      \
172         gen9_avc_encoder_kernels.h      \
173         $(NULL)
174
175 # convenience library that can be linked by driver and tests
176 noinst_LTLIBRARIES              = libi965_drv_video.la
177 libi965_drv_video_la_CFLAGS     = $(driver_cflags)
178 libi965_drv_video_la_LDFLAGS    = $(driver_ldflags)
179 libi965_drv_video_la_LIBADD     = $(driver_libs)
180 libi965_drv_video_la_SOURCES    = $(source_c)
181
182 # driver module
183 i965_drv_video_la_LTLIBRARIES   = i965_drv_video.la
184 i965_drv_video_ladir            = $(LIBVA_DRIVERS_PATH)
185 i965_drv_video_la_CFLAGS        = $(driver_cflags)
186 i965_drv_video_la_LDFLAGS       = -module $(driver_ldflags)
187 i965_drv_video_la_LIBADD        = libi965_drv_video.la $(driver_libs)
188 i965_drv_video_la_SOURCES       =
189
190 noinst_HEADERS                  = $(source_h)
191
192 if USE_X11
193 source_c                        += i965_output_dri.c
194 source_h                        += i965_output_dri.h
195 endif
196
197 if USE_WAYLAND
198 source_c                        += i965_output_wayland.c
199 source_h                        += i965_output_wayland.h
200 source_h                        += $(protocol_source_h)
201 driver_cflags                   += $(WAYLAND_CFLAGS) $(WAYLAND_CLIENT_CFLAGS)
202 endif
203
204 # git version
205 VERSION_FILE                    = .VERSION
206 OLD_VERSION_FILE                = $(VERSION_FILE).old
207 NEW_VERSION_FILE                = $(VERSION_FILE).new
208 PKG_VERSION_FILE                = $(VERSION_FILE).pkg
209
210 intel_version.h: gen-version
211         $(AM_V_GEN)                                                      \
212         OV=`[ -f $(OLD_VERSION_FILE) ] && cat $(OLD_VERSION_FILE) || :`; \
213         NV=`cat $(NEW_VERSION_FILE)`;                                    \
214         if [ "$$OV" != "$$NV" -o ! -f intel_version.h ]; then            \
215                 cp -f $(NEW_VERSION_FILE) $(OLD_VERSION_FILE);           \
216                 $(SED) -e "s|\@INTEL_DRIVER_GIT_VERSION\@|$${NV}|"       \
217                         $(srcdir)/intel_version.h.in > intel_version.h;  \
218         fi
219
220 gen-version:
221         @echo $(VERSION) > $(NEW_VERSION_FILE)
222 if HAVE_GIT
223         @[ -d $(top_srcdir)/.git ] && \
224         (cd $(top_srcdir) && $(GIT) describe --tags) > $(NEW_VERSION_FILE) || :
225 endif
226         @[ -f $(srcdir)/$(PKG_VERSION_FILE) ] && \
227         cp -f $(srcdir)/$(PKG_VERSION_FILE) $(NEW_VERSION_FILE) || :
228
229 $(PKG_VERSION_FILE): $(NEW_VERSION_FILE)
230         @cp -f $< $@
231
232 BUILT_SOURCES   += intel_version.h
233 EXTRA_DIST      += Android.mk intel_version.h.in $(PKG_VERSION_FILE)
234
235 # Wayland protocol
236 protocol_source_h = wayland-drm-client-protocol.h
237 i965_output_wayland.c: $(protocol_source_h)
238 %-client-protocol.h : %.xml
239         $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
240
241 EXTRA_DIST += \
242         wayland-drm.xml         \
243         $(NULL)
244
245 # Extra clean files so that maintainer-clean removes *everything*
246 MAINTAINERCLEANFILES = Makefile.in config.h.in