autotools: Add an option to install demo clients
[profile/ivi/weston-ivi-shell.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 weston_simple_egl_clients_programs =            \
55         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 weston_screenshooter_LDADD = libtoytoolkit.la
114
115 weston_terminal_SOURCES = terminal.c
116 weston_terminal_LDADD = libtoytoolkit.la -lutil
117
118 weston_image_SOURCES = image.c
119 weston_image_LDADD = libtoytoolkit.la
120
121 weston_cliptest_SOURCES = cliptest.c
122 weston_cliptest_CPPFLAGS = $(AM_CPPFLAGS) $(PIXMAN_CFLAGS)
123 weston_cliptest_LDADD = libtoytoolkit.la $(PIXMAN_LIBS)
124
125 weston_dnd_SOURCES = dnd.c
126 weston_dnd_LDADD = libtoytoolkit.la
127
128 weston_smoke_SOURCES = smoke.c
129 weston_smoke_LDADD = libtoytoolkit.la
130
131 weston_resizor_SOURCES = resizor.c
132 weston_resizor_LDADD = libtoytoolkit.la
133
134 if HAVE_CAIRO_GLESV2
135 cairo_glesv2_programs = weston-nested weston-nested-client
136
137 weston_nested_SOURCES = nested.c
138 weston_nested_LDADD = libtoytoolkit.la $(SERVER_LIBS)
139
140 weston_nested_client_SOURCES = nested-client.c
141 weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
142 endif
143
144 weston_eventdemo_SOURCES = eventdemo.c
145 weston_eventdemo_LDADD = libtoytoolkit.la
146
147 weston_clickdot_SOURCES = clickdot.c
148 weston_clickdot_LDADD = libtoytoolkit.la
149
150 weston_transformed_SOURCES = transformed.c
151 weston_transformed_LDADD = libtoytoolkit.la
152
153 weston_fullscreen_SOURCES = fullscreen.c
154 weston_fullscreen_LDADD = libtoytoolkit.la
155
156 weston_calibrator_SOURCES = calibrator.c        \
157         ../shared/matrix.c                      \
158         ../shared/matrix.h
159 weston_calibrator_LDADD = libtoytoolkit.la
160
161 if BUILD_SUBSURFACES_CLIENT
162 subsurfaces = weston-subsurfaces
163 weston_subsurfaces_SOURCES = subsurfaces.c
164 weston_subsurfaces_CPPFLAGS = $(AM_CPPFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS)
165 weston_subsurfaces_LDADD = libtoytoolkit.la $(SIMPLE_EGL_CLIENT_LIBS) -lm
166 endif
167
168 if HAVE_PANGO
169 pango_programs = weston-editor
170 weston_editor_SOURCES =                         \
171         editor.c                                \
172         text-protocol.c                         \
173         text-client-protocol.h
174 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
175 weston_editor_CPPFLAGS = $(AM_CPPFLAGS) $(PANGO_CFLAGS)
176 endif
177
178 keyboard = weston-keyboard
179 weston_keyboard_SOURCES =                       \
180         keyboard.c                              \
181         desktop-shell-client-protocol.h         \
182         desktop-shell-protocol.c                \
183         input-method-protocol.c                 \
184         input-method-client-protocol.h
185 weston_keyboard_LDADD = libtoytoolkit.la
186
187 weston_simple_im_SOURCES =                      \
188         weston-simple-im.c                      \
189         input-method-protocol.c                 \
190         input-method-client-protocol.h
191 weston_simple_im_LDADD = $(CLIENT_LIBS)
192
193 weston_info_SOURCES =                           \
194         weston-info.c                           \
195         ../shared/os-compatibility.c            \
196         ../shared/os-compatibility.h
197 weston_info_LDADD = $(WESTON_INFO_LIBS)
198
199 weston_desktop_shell_SOURCES =                  \
200         desktop-shell.c                         \
201         desktop-shell-client-protocol.h         \
202         desktop-shell-protocol.c
203 weston_desktop_shell_LDADD = libtoytoolkit.la
204
205 weston_tablet_shell_SOURCES =                   \
206         tablet-shell.c                          \
207         tablet-shell-client-protocol.h          \
208         tablet-shell-protocol.c
209 weston_tablet_shell_LDADD = libtoytoolkit.la
210
211 BUILT_SOURCES =                                 \
212         screenshooter-client-protocol.h         \
213         screenshooter-protocol.c                \
214         text-cursor-position-client-protocol.h  \
215         text-cursor-position-protocol.c         \
216         text-protocol.c                         \
217         text-client-protocol.h                  \
218         input-method-protocol.c                 \
219         input-method-client-protocol.h          \
220         desktop-shell-client-protocol.h         \
221         desktop-shell-protocol.c                \
222         tablet-shell-client-protocol.h          \
223         tablet-shell-protocol.c                 \
224         subsurface-client-protocol.h            \
225         subsurface-protocol.c                   \
226         workspaces-client-protocol.h            \
227         workspaces-protocol.c
228
229 CLEANFILES = $(BUILT_SOURCES)
230 endif
231
232 if BUILD_FULL_GL_CLIENTS
233 full_gl_client_programs = weston-gears
234
235 weston_gears_SOURCES = gears.c
236 weston_gears_LDADD = libtoytoolkit.la
237
238 if HAVE_GLU
239 screensaver = weston-screensaver
240 weston_screensaver_SOURCES =                    \
241         wscreensaver.c                          \
242         wscreensaver.h                          \
243         desktop-shell-client-protocol.h         \
244         desktop-shell-protocol.c                \
245         wscreensaver-glue.c                     \
246         wscreensaver-glue.h                     \
247         glmatrix.c                              \
248         matrix3.xpm
249 weston_screensaver_LDADD = libtoytoolkit.la $(GLU_LIBS)
250 weston_screensaver_CFLAGS = $(GLU_CFLAGS)
251 endif
252
253 endif
254
255 @wayland_scanner_rules@
256
257 if HAVE_POPPLER
258 poppler_programs = weston-view
259 weston_view_SOURCES = view.c
260 weston_view_LDADD = libtoytoolkit.la $(POPPLER_LIBS)
261 weston_view_CPPFLAGS = $(AM_CPPFLAGS) $(POPPLER_CFLAGS)
262 endif