autotools: Don't use wayland-scanner.m4
[platform/upstream/weston.git] / clients / Makefile.am
1 bin_PROGRAMS =                                  \
2         weston-info                             \
3         $(terminal)
4
5 if ENABLE_DEMO_CLIENTS
6 bin_PROGRAMS +=                                 \
7         $(clients_programs)                     \
8         $(pango_programs)                       \
9         $(poppler_programs)                     \
10         $(simple_clients_programs)              \
11         $(simple_egl_clients_programs)
12 else
13 noinst_PROGRAMS =                               \
14         $(clients_programs)                     \
15         $(pango_programs)                       \
16         $(poppler_programs)                     \
17         $(simple_clients_programs)              \
18         $(simple_egl_clients_programs)
19 endif
20
21 libexec_PROGRAMS =                              \
22         $(desktop_shell)                        \
23         $(tablet_shell)                         \
24         $(screenshooter)                        \
25         $(screensaver)                          \
26         $(keyboard)                             \
27         weston-simple-im
28
29 AM_CFLAGS = $(GCC_CFLAGS)
30 AM_CPPFLAGS =                                   \
31         -DDATADIR='"$(datadir)"'                \
32         -DBINDIR='"$(bindir)"'                  \
33         $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
34
35 if BUILD_SIMPLE_CLIENTS
36 simple_clients_programs =                       \
37         weston-simple-shm                       \
38         weston-simple-touch
39
40 weston_simple_shm_SOURCES = simple-shm.c        \
41         ../shared/os-compatibility.c            \
42         ../shared/os-compatibility.h
43 weston_simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
44 weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
45
46 weston_simple_touch_SOURCES = simple-touch.c    \
47         ../shared/os-compatibility.c            \
48         ../shared/os-compatibility.h
49 weston_simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
50 weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
51 endif
52
53 if BUILD_SIMPLE_EGL_CLIENTS
54 simple_egl_clients_programs =                   \
55         weston-simple-egl
56
57 weston_simple_egl_SOURCES = simple-egl.c
58 weston_simple_egl_CPPFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS)
59 weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
60 endif
61
62 if BUILD_CLIENTS
63 terminal = weston-terminal
64
65 clients_programs =                              \
66         weston-flower                           \
67         weston-image                            \
68         weston-cliptest                         \
69         weston-dnd                              \
70         weston-smoke                            \
71         weston-resizor                          \
72         weston-eventdemo                        \
73         weston-clickdot                         \
74         weston-transformed                      \
75         weston-fullscreen                       \
76         weston-calibrator                       \
77         $(subsurfaces)                          \
78         $(full_gl_client_programs)              \
79         $(cairo_glesv2_programs)
80
81 desktop_shell = weston-desktop-shell
82
83 if ENABLE_TABLET_SHELL
84 tablet_shell = weston-tablet-shell
85 endif
86
87 screenshooter = weston-screenshooter
88
89 noinst_LTLIBRARIES = libtoytoolkit.la
90
91 libtoytoolkit_la_SOURCES =                      \
92         window.c                                \
93         window.h                                \
94         text-cursor-position-protocol.c         \
95         text-cursor-position-client-protocol.h  \
96         subsurface-protocol.c                   \
97         subsurface-client-protocol.h            \
98         workspaces-protocol.c                   \
99         workspaces-client-protocol.h
100
101 libtoytoolkit_la_LIBADD =                       \
102         $(CLIENT_LIBS)                          \
103         $(CAIRO_EGL_LIBS)                       \
104         ../shared/libshared-cairo.la -lrt -lm
105
106 weston_flower_SOURCES = flower.c
107 weston_flower_LDADD = libtoytoolkit.la
108
109 weston_screenshooter_SOURCES =                  \
110         screenshot.c                            \
111         screenshooter-protocol.c                \
112         screenshooter-client-protocol.h         \
113         ../shared/os-compatibility.c            \
114         ../shared/os-compatibility.h
115 weston_screenshooter_LDADD = $(CLIENT_LIBS)
116
117 weston_terminal_SOURCES = terminal.c
118 weston_terminal_LDADD = libtoytoolkit.la -lutil
119
120 weston_image_SOURCES = image.c
121 weston_image_LDADD = libtoytoolkit.la
122
123 weston_cliptest_SOURCES = cliptest.c
124 weston_cliptest_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAN_CFLAGS)
125 weston_cliptest_LDADD = libtoytoolkit.la $(PIXMAN_LIBS)
126
127 weston_dnd_SOURCES = dnd.c
128 weston_dnd_LDADD = libtoytoolkit.la
129
130 weston_smoke_SOURCES = smoke.c
131 weston_smoke_LDADD = libtoytoolkit.la
132
133 weston_resizor_SOURCES = resizor.c
134 weston_resizor_LDADD = libtoytoolkit.la
135
136 if HAVE_CAIRO_GLESV2
137 cairo_glesv2_programs = weston-nested weston-nested-client
138
139 weston_nested_SOURCES = nested.c
140 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
141
142 weston_nested_client_SOURCES = nested-client.c
143 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
144 endif
145
146 weston_eventdemo_SOURCES = eventdemo.c
147 weston_eventdemo_LDADD = libtoytoolkit.la
148
149 weston_clickdot_SOURCES = clickdot.c
150 weston_clickdot_LDADD = libtoytoolkit.la
151
152 weston_transformed_SOURCES = transformed.c
153 weston_transformed_LDADD = libtoytoolkit.la
154
155 weston_fullscreen_SOURCES = fullscreen.c
156 weston_fullscreen_LDADD = libtoytoolkit.la
157
158 weston_calibrator_SOURCES = calibrator.c        \
159         ../shared/matrix.c                      \
160         ../shared/matrix.h
161 weston_calibrator_LDADD = libtoytoolkit.la
162
163 if BUILD_SUBSURFACES_CLIENT
164 subsurfaces = weston-subsurfaces
165 weston_subsurfaces_SOURCES = subsurfaces.c
166 weston_subsurfaces_CPPFLAGS = $(AM_CPPFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
167 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
168 endif
169
170 if HAVE_PANGO
171 pango_programs = weston-editor
172 weston_editor_SOURCES =                         \
173         editor.c                                \
174         text-protocol.c                         \
175         text-client-protocol.h
176 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
177 weston_editor_CPPFLAGS = $(AM_CPPFLAGS) $(PANGO_CFLAGS)
178 endif
179
180 keyboard = weston-keyboard
181 weston_keyboard_SOURCES =                       \
182         keyboard.c                              \
183         desktop-shell-client-protocol.h         \
184         desktop-shell-protocol.c                \
185         input-method-protocol.c                 \
186         input-method-client-protocol.h
187 weston_keyboard_LDADD = libtoytoolkit.la
188
189 weston_simple_im_SOURCES =                      \
190         weston-simple-im.c                      \
191         input-method-protocol.c                 \
192         input-method-client-protocol.h
193 weston_simple_im_LDADD = $(CLIENT_LIBS)
194
195 weston_info_SOURCES =                           \
196         weston-info.c                           \
197         ../shared/os-compatibility.c            \
198         ../shared/os-compatibility.h
199 weston_info_LDADD = $(WESTON_INFO_LIBS)
200
201 weston_desktop_shell_SOURCES =                  \
202         desktop-shell.c                         \
203         desktop-shell-client-protocol.h         \
204         desktop-shell-protocol.c
205 weston_desktop_shell_LDADD = libtoytoolkit.la
206
207 weston_tablet_shell_SOURCES =                   \
208         tablet-shell.c                          \
209         tablet-shell-client-protocol.h          \
210         tablet-shell-protocol.c
211 weston_tablet_shell_LDADD = libtoytoolkit.la
212
213 BUILT_SOURCES =                                 \
214         screenshooter-client-protocol.h         \
215         screenshooter-protocol.c                \
216         text-cursor-position-client-protocol.h  \
217         text-cursor-position-protocol.c         \
218         text-protocol.c                         \
219         text-client-protocol.h                  \
220         input-method-protocol.c                 \
221         input-method-client-protocol.h          \
222         desktop-shell-client-protocol.h         \
223         desktop-shell-protocol.c                \
224         tablet-shell-client-protocol.h          \
225         tablet-shell-protocol.c                 \
226         subsurface-client-protocol.h            \
227         subsurface-protocol.c                   \
228         workspaces-client-protocol.h            \
229         workspaces-protocol.c
230
231 CLEANFILES = $(BUILT_SOURCES)
232 endif
233
234 if BUILD_FULL_GL_CLIENTS
235 full_gl_client_programs = weston-gears
236
237 weston_gears_SOURCES = gears.c
238 weston_gears_LDADD = libtoytoolkit.la
239
240 if HAVE_GLU
241 screensaver = weston-screensaver
242 weston_screensaver_SOURCES =                    \
243         wscreensaver.c                          \
244         wscreensaver.h                          \
245         desktop-shell-client-protocol.h         \
246         desktop-shell-protocol.c                \
247         wscreensaver-glue.c                     \
248         wscreensaver-glue.h                     \
249         glmatrix.c                              \
250         matrix3.xpm
251 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
252 weston_screensaver_CFLAGS = $(GLU_CFLAGS)
253 endif
254
255 endif
256
257 wayland_protocoldir = $(top_srcdir)/protocol
258 include $(top_srcdir)/wayland-scanner.mk
259
260 if HAVE_POPPLER
261 poppler_programs = weston-view
262 weston_view_SOURCES = view.c
263 weston_view_LDADD = libtoytoolkit.la $(POPPLER_LIBS)
264 weston_view_CPPFLAGS = $(AM_CPPFLAGS) $(POPPLER_CFLAGS)
265 endif