build: Move protocol/Makefile.am into toplevel Makefile.am
[platform/upstream/weston.git] / Makefile.am
1 bin_PROGRAMS =
2 moduledir = $(libdir)/weston
3 module_LTLIBRARIES =
4 BUILT_SOURCES =
5
6 SUBDIRS =                                       \
7         shared                                  \
8         src                                     \
9         clients                                 \
10         tests                                   \
11         man
12
13 DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
14
15 EXTRA_DIST = weston.ini.in wayland-scanner.mk
16
17 weston.ini : $(srcdir)/weston.ini.in
18         $(AM_V_GEN)$(SED) \
19                 -e 's|@bindir[@]|$(bindir)|g' \
20                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
21                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
22                 $< > $@
23
24 all-local : weston.ini validate-protocol-xml
25
26 CLEANFILES = weston.ini $(BUILT_SOURCES)
27
28
29 westondatadir = $(datadir)/weston
30 dist_westondata_DATA =                          \
31         data/wayland.svg                        \
32         data/wayland.png                        \
33         data/pattern.png                        \
34         data/terminal.png                       \
35         data/border.png                         \
36         data/icon_window.png                    \
37         data/sign_close.png                     \
38         data/sign_maximize.png                  \
39         data/sign_minimize.png
40
41
42 if BUILD_WCAP_TOOLS
43 bin_PROGRAMS += wcap-decode
44
45 wcap_decode_SOURCES =                           \
46         wcap/main.c                             \
47         wcap/wcap-decode.c                      \
48         wcap/wcap-decode.h
49
50 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
51 wcap_decode_LDADD = $(WCAP_LIBS)
52 endif
53
54
55 if ENABLE_DESKTOP_SHELL
56
57 module_LTLIBRARIES += desktop-shell.la
58
59 desktop_shell_la_CPPFLAGS =                     \
60         -I$(top_srcdir)/shared                  \
61         -I$(top_srcdir)/src                     \
62         -I$(top_builddir)/src                   \
63         -I$(top_builddir)/desktop-shell         \
64         -DDATADIR='"$(datadir)"'                \
65         -DMODULEDIR='"$(moduledir)"'            \
66         -DLIBEXECDIR='"$(libexecdir)"'          \
67         -DIN_WESTON
68
69 desktop_shell_la_LDFLAGS = -module -avoid-version
70 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)    \
71         shared/libshared.la
72 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
73 desktop_shell_la_SOURCES =                              \
74         desktop-shell/shell.h                           \
75         desktop-shell/shell.c                           \
76         desktop-shell/exposay.c                         \
77         desktop-shell/input-panel.c                     \
78         desktop-shell/desktop-shell-protocol.c          \
79         desktop-shell/desktop-shell-server-protocol.h   \
80         desktop-shell/xdg-shell-protocol.c              \
81         desktop-shell/xdg-shell-server-protocol.h
82
83 BUILT_SOURCES +=                                        \
84         desktop-shell/desktop-shell-protocol.c          \
85         desktop-shell/desktop-shell-server-protocol.h   \
86         desktop-shell/xdg-shell-protocol.c              \
87         desktop-shell/xdg-shell-server-protocol.h
88 endif
89
90
91 if ENABLE_XWAYLAND
92
93 module_LTLIBRARIES += xwayland.la
94
95 xwayland_la_CPPFLAGS =                          \
96         -I$(top_srcdir)/shared                  \
97         -I$(top_srcdir)/src                     \
98         -I$(top_builddir)/src                   \
99         -I$(top_builddir)/xwayland              \
100         -DDATADIR='"$(datadir)"'                \
101         -DMODULEDIR='"$(moduledir)"'            \
102         -DLIBEXECDIR='"$(libexecdir)"'          \
103         -DXSERVER_PATH='"@XSERVER_PATH@"'
104
105 xwayland_la_LDFLAGS = -module -avoid-version
106 xwayland_la_LIBADD =                    \
107         $(XWAYLAND_LIBS)                \
108         $(top_builddir)/shared/libshared-cairo.la
109 xwayland_la_CFLAGS =                            \
110         $(GCC_CFLAGS)                           \
111         $(COMPOSITOR_CFLAGS)                    \
112         $(PIXMAN_CFLAGS)                        \
113         $(CAIRO_CFLAGS)
114 xwayland_la_SOURCES =                           \
115         xwayland/xwayland.h                     \
116         xwayland/window-manager.c               \
117         xwayland/selection.c                    \
118         xwayland/dnd.c                          \
119         xwayland/launcher.c                     \
120         xwayland/xserver-protocol.c             \
121         xwayland/xserver-server-protocol.h      \
122         xwayland/hash.c                         \
123         xwayland/hash.h
124
125 BUILT_SOURCES +=                                \
126         xwayland/xserver-protocol.c             \
127         xwayland/xserver-server-protocol.h
128 endif
129
130
131 protocol_sources =                              \
132         protocol/desktop-shell.xml              \
133         protocol/screenshooter.xml              \
134         protocol/xserver.xml                    \
135         protocol/text.xml                       \
136         protocol/input-method.xml               \
137         protocol/workspaces.xml                 \
138         protocol/text-cursor-position.xml       \
139         protocol/wayland-test.xml               \
140         protocol/xdg-shell.xml                  \
141         protocol/scaler.xml
142
143 if HAVE_XMLLINT
144 .PHONY : validate-protocol-xml
145
146 .%.xml.valid : $(top_srcdir)/protocol/%.xml
147         $(AM_V_GEN)$(XMLLINT) --noout --dtdvalid $(dtddir)/wayland.dtd $^ > $@
148
149 validate-protocol-xml : $(protocol_sources:protocol/%.xml=.%.xml.valid)
150
151 CLEANFILES += $(protocol_sources:protocol/%.xml=.%.xml.valid)
152 EXTRA_DIST += $(protocol_sources)
153
154 endif
155
156
157 wayland_protocoldir = $(top_srcdir)/protocol
158 include $(top_srcdir)/wayland-scanner.mk