95bb97e7faea646e97415818df11be869ac9cd44
[platform/upstream/gstreamer.git] / ext / wayland / Makefile.am
1 plugin_LTLIBRARIES = libgstwaylandsink.la
2
3 BUILT_SOURCES = \
4         viewporter-protocol.c \
5         viewporter-client-protocol.h \
6         linux-dmabuf-unstable-v1-protocol.c \
7         linux-dmabuf-unstable-v1-client-protocol.h \
8         fullscreen-shell-unstable-v1-protocol.c \
9         fullscreen-shell-unstable-v1-client-protocol.h \
10         xdg-shell-protocol.c \
11         xdg-shell-client-protocol.h
12
13 libgstwaylandsink_la_SOURCES =  \
14         gstwaylandsink.c \
15         wlshmallocator.c \
16         wlbuffer.c \
17         wldisplay.c \
18         wlwindow.c \
19         wlvideoformat.c \
20         wllinuxdmabuf.c
21
22 nodist_libgstwaylandsink_la_SOURCES = \
23         viewporter-protocol.c \
24         linux-dmabuf-unstable-v1-protocol.c \
25         fullscreen-shell-unstable-v1-protocol.c \
26         xdg-shell-protocol.c
27
28 libgstwaylandsink_la_CFLAGS = \
29         $(GST_PLUGINS_BAD_CFLAGS) \
30         $(GST_PLUGINS_BASE_CFLAGS) \
31         $(GST_CFLAGS) \
32         $(WAYLAND_CFLAGS)
33 libgstwaylandsink_la_LIBADD = \
34         $(top_builddir)/gst-libs/gst/wayland/libgstwayland-$(GST_API_VERSION).la \
35         $(GST_PLUGINS_BASE_LIBS) \
36         -lgstvideo-$(GST_API_VERSION) \
37         -lgstallocators-$(GST_API_VERSION) \
38         $(WAYLAND_LIBS)
39 libgstwaylandsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
40
41 noinst_HEADERS = \
42         gstwaylandsink.h \
43         wlshmallocator.h \
44         wlbuffer.h \
45         wldisplay.h \
46         wlwindow.h \
47         wlvideoformat.h \
48         wllinuxdmabuf.h
49
50 CLEANFILES = $(BUILT_SOURCES)
51
52 .SECONDEXPANSION:
53
54 define protostability
55 $(if $(findstring unstable,$1),unstable,stable)
56 endef
57
58 define protoname
59 $(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/')
60 endef
61
62 %-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
63         $(AM_V_GEN)$(wayland_scanner) code < $< > $@
64
65 %-client-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml
66         $(AM_V_GEN)$(wayland_scanner) client-header < $< > $@