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