OSDN Git Service

Don't check WAYLAND_SCANNER if wayland isn't used or found
[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         -module -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_mfc.c              \
63         gen8_mfd.c              \
64         gen8_vme.c              \
65         gen9_vme.c              \
66         gen9_mfc.c              \
67         gen9_mfc_hevc.c         \
68         gen9_mfd.c              \
69         gen9_vdenc.c            \
70         gen75_picture_process.c \
71         gen75_vme.c             \
72         gen75_vpp_gpe.c         \
73         gen75_vpp_vebox.c       \
74         gen9_post_processing.c  \
75         i965_avc_bsd.c          \
76         i965_avc_hw_scoreboard.c\
77         i965_avc_ildb.c         \
78         i965_decoder_utils.c    \
79         i965_device_info.c      \
80         i965_drv_video.c        \
81         i965_encoder.c          \
82         i965_encoder_utils.c    \
83         i965_media.c            \
84         i965_media_h264.c       \
85         i965_media_mpeg2.c      \
86         i965_gpe_utils.c        \
87         i965_post_processing.c  \
88         i965_yuv_coefs.c        \
89         gen8_post_processing.c  \
90         i965_render.c           \
91         i965_vpp_avs.c          \
92         gen8_render.c           \
93         gen9_render.c           \
94         intel_batchbuffer.c     \
95         intel_batchbuffer_dump.c\
96         intel_driver.c          \
97         intel_memman.c          \
98         object_heap.c           \
99         intel_media_common.c            \
100         vp9_probs.c             \
101         gen9_vp9_encoder_kernels.c      \
102         gen9_vp9_const_def.c      \
103         gen9_vp9_encoder.c      \
104         $(NULL)
105
106 source_h = \
107         dso_utils.h             \
108         gen6_mfc.h              \
109         gen6_mfd.h              \
110         gen6_vme.h              \
111         gen7_mfd.h              \
112         gen75_picture_process.h \
113         gen75_vpp_gpe.h         \
114         gen75_vpp_vebox.h       \
115         gen8_post_processing.h  \
116         gen9_mfd.h              \
117         gen9_mfc.h              \
118         gen9_vdenc.h            \
119         i965_avc_bsd.h          \
120         i965_avc_hw_scoreboard.h\
121         i965_avc_ildb.h         \
122         i965_decoder.h          \
123         i965_decoder_utils.h    \
124         i965_defines.h          \
125         i965_drv_video.h        \
126         i965_encoder.h          \
127         i965_encoder_utils.h    \
128         i965_media.h            \
129         i965_media_h264.h       \
130         i965_media_mpeg2.h      \
131         i965_mutext.h           \
132         i965_gpe_utils.h        \
133         i965_pciids.h           \
134         i965_post_processing.h  \
135         i965_render.h           \
136         i965_structs.h          \
137         i965_vpp_avs.h          \
138         i965_yuv_coefs.h        \
139         intel_batchbuffer.h     \
140         intel_batchbuffer_dump.h\
141         intel_compiler.h        \
142         intel_driver.h          \
143         intel_media.h           \
144         intel_memman.h          \
145         intel_version.h         \
146         object_heap.h           \
147         vp8_probs.h             \
148         vp9_probs.h             \
149         sysdeps.h               \
150         va_backend_compat.h     \
151         i965_fourcc.h           \
152         gen9_vp9_encoder.h           \
153         gen9_vp9_encapi.h           \
154         gen9_vp9_const_def.h      \
155         gen9_vp9_encoder_kernels.h           \
156         $(NULL)
157
158 i965_drv_video_la_LTLIBRARIES   = i965_drv_video.la
159 i965_drv_video_ladir            = $(LIBVA_DRIVERS_PATH)
160 i965_drv_video_la_CFLAGS        = $(driver_cflags)
161 i965_drv_video_la_LDFLAGS       = $(driver_ldflags)
162 i965_drv_video_la_LIBADD        = $(driver_libs)
163 i965_drv_video_la_SOURCES       = $(source_c)
164 noinst_HEADERS                  = $(source_h)
165
166 if USE_X11
167 source_c                        += i965_output_dri.c
168 source_h                        += i965_output_dri.h
169 endif
170
171 if USE_WAYLAND
172 source_c                        += i965_output_wayland.c
173 source_h                        += i965_output_wayland.h
174 source_h                        += $(protocol_source_h)
175 driver_cflags                   += $(WAYLAND_CFLAGS)
176 endif
177
178 # git version
179 VERSION_FILE                    = .VERSION
180 OLD_VERSION_FILE                = $(VERSION_FILE).old
181 NEW_VERSION_FILE                = $(VERSION_FILE).new
182 PKG_VERSION_FILE                = $(VERSION_FILE).pkg
183
184 intel_version.h: gen-version
185         $(AM_V_GEN)                                                      \
186         OV=`[ -f $(OLD_VERSION_FILE) ] && cat $(OLD_VERSION_FILE) || :`; \
187         NV=`cat $(NEW_VERSION_FILE)`;                                    \
188         if [ "$$OV" != "$$NV" -o ! -f intel_version.h ]; then            \
189                 cp -f $(NEW_VERSION_FILE) $(OLD_VERSION_FILE);           \
190                 $(SED) -e "s|\@INTEL_DRIVER_GIT_VERSION\@|$${NV}|"       \
191                         $(srcdir)/intel_version.h.in > intel_version.h;  \
192         fi
193
194 gen-version:
195         @echo $(VERSION) > $(NEW_VERSION_FILE)
196 if HAVE_GIT
197         @[ -d $(top_srcdir)/.git ] && \
198         (cd $(top_srcdir) && $(GIT) describe --tags) > $(NEW_VERSION_FILE) || :
199 endif
200         @[ -f $(srcdir)/$(PKG_VERSION_FILE) ] && \
201         cp -f $(srcdir)/$(PKG_VERSION_FILE) $(NEW_VERSION_FILE) || :
202
203 $(PKG_VERSION_FILE): $(NEW_VERSION_FILE)
204         @cp -f $< $@
205
206 BUILT_SOURCES   += intel_version.h
207 EXTRA_DIST      += Android.mk intel_version.h.in $(PKG_VERSION_FILE)
208
209 # Wayland protocol
210 protocol_source_h = wayland-drm-client-protocol.h
211 i965_output_wayland.c: $(protocol_source_h)
212 %-client-protocol.h : %.xml
213         $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
214
215 EXTRA_DIST += \
216         wayland-drm.xml         \
217         $(NULL)
218
219 # Extra clean files so that maintainer-clean removes *everything*
220 MAINTAINERCLEANFILES = Makefile.in config.h.in