input: Rename weston_device_repick() to weston_seat_repick()
[platform/upstream/weston.git] / src / Makefile.am
1 bin_PROGRAMS = weston                           \
2         $(weston_launch)
3
4 AM_CPPFLAGS =                                   \
5         -I$(top_srcdir)/shared                  \
6         -DDATADIR='"$(datadir)"'                \
7         -DMODULEDIR='"$(moduledir)"'            \
8         -DLIBEXECDIR='"$(libexecdir)"'          \
9         -DIN_WESTON
10
11 weston_LDFLAGS = -export-dynamic
12 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
13 weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
14         $(DLOPEN_LIBS) -lm ../shared/libshared.la
15
16 weston_SOURCES =                                \
17         git-version.h                           \
18         log.c                                   \
19         compositor.c                            \
20         compositor.h                            \
21         input.c                                 \
22         data-device.c                           \
23         filter.c                                \
24         filter.h                                \
25         screenshooter.c                         \
26         screenshooter-protocol.c                \
27         screenshooter-server-protocol.h         \
28         clipboard.c                             \
29         text-cursor-position-protocol.c         \
30         text-cursor-position-server-protocol.h  \
31         zoom.c                                  \
32         text-backend.c                          \
33         text-protocol.c                         \
34         text-server-protocol.h                  \
35         input-method-protocol.c                 \
36         input-method-server-protocol.h          \
37         workspaces-protocol.c                   \
38         workspaces-server-protocol.h            \
39         bindings.c                              \
40         animation.c                             \
41         gl-renderer.h                           \
42         noop-renderer.c                         \
43         pixman-renderer.c                       \
44         pixman-renderer.h                       \
45         ../shared/matrix.c                      \
46         ../shared/matrix.h                      \
47         weston-launch.h                         \
48         weston-egl-ext.h
49
50 if ENABLE_EGL
51 weston_SOURCES +=                               \
52         gl-renderer.c
53 endif
54
55 git-version.h : .FORCE
56         $(AM_V_GEN)(echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@-new; \
57         cmp -s $@ $@-new || cp $@-new $@; \
58         rm $@-new)
59
60 .FORCE :
61
62 if ENABLE_XWAYLAND
63 SUBDIRS = xwayland
64 endif
65
66 DIST_SUBDIRS = xwayland
67
68
69 if BUILD_WESTON_LAUNCH
70 weston_launch = weston-launch
71 weston_launch_SOURCES = weston-launch.c weston-launch.h
72 weston_launch_CFLAGS= $(GCC_CFLAGS)
73 weston_launch_CPPFLAGS = $(WESTON_LAUNCH_CFLAGS) $(SYSTEMD_LOGIN_CFLAGS) \
74                  -DBINDIR='"$(bindir)"'
75 weston_launch_LDADD = $(WESTON_LAUNCH_LIBS) $(SYSTEMD_LOGIN_LIBS)
76
77 if ENABLE_SETUID_INSTALL
78 install-exec-hook:
79         chown root $(DESTDIR)$(bindir)/weston-launch
80         chmod u+s $(DESTDIR)$(bindir)/weston-launch
81 endif
82
83 endif # BUILD_WESTON_LAUNCH
84
85 pkgconfigdir = $(libdir)/pkgconfig
86 pkgconfig_DATA = weston.pc
87
88 westonincludedir = $(includedir)/weston
89 westoninclude_HEADERS =                         \
90         version.h                               \
91         compositor.h                            \
92         ../shared/matrix.h                      \
93         ../shared/config-parser.h
94
95 moduledir = $(libdir)/weston
96 module_LTLIBRARIES =                            \
97         $(desktop_shell)                        \
98         $(tablet_shell)                         \
99         $(x11_backend)                          \
100         $(drm_backend)                          \
101         $(wayland_backend)                      \
102         $(headless_backend)                     \
103         $(fbdev_backend)                        \
104         $(rdp_backend)
105
106 noinst_LTLIBRARIES =
107
108 if INSTALL_RPI_COMPOSITOR
109 module_LTLIBRARIES += $(rpi_backend)
110 else
111 noinst_LTLIBRARIES += $(rpi_backend)
112 endif
113
114 if ENABLE_X11_COMPOSITOR
115 x11_backend = x11-backend.la
116 x11_backend_la_LDFLAGS = -module -avoid-version
117 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
118         ../shared/libshared-cairo.la
119 x11_backend_la_CFLAGS =                         \
120         $(COMPOSITOR_CFLAGS)                    \
121         $(PIXMAN_CFLAGS)                        \
122         $(CAIRO_CFLAGS)                         \
123         $(X11_COMPOSITOR_CFLAGS)                \
124         $(GCC_CFLAGS)
125 x11_backend_la_SOURCES = compositor-x11.c
126 endif
127
128 if ENABLE_DRM_COMPOSITOR
129 drm_backend = drm-backend.la
130 drm_backend_la_LDFLAGS = -module -avoid-version
131 drm_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(DRM_COMPOSITOR_LIBS) \
132         ../shared/libshared.la
133 drm_backend_la_CFLAGS =                         \
134         $(COMPOSITOR_CFLAGS)                    \
135         $(DRM_COMPOSITOR_CFLAGS)                \
136         $(GCC_CFLAGS)
137 drm_backend_la_SOURCES =                        \
138         compositor-drm.c                        \
139         tty.c                                   \
140         udev-seat.c                             \
141         udev-seat.h                             \
142         evdev.c                                 \
143         evdev.h                                 \
144         evdev-touchpad.c                        \
145         launcher-util.c                         \
146         launcher-util.h                         \
147         libbacklight.c                          \
148         libbacklight.h
149 endif
150
151 if ENABLE_WAYLAND_COMPOSITOR
152 wayland_backend = wayland-backend.la
153 wayland_backend_la_LDFLAGS = -module -avoid-version
154 wayland_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(WAYLAND_COMPOSITOR_LIBS) \
155         ../shared/libshared-cairo.la
156 wayland_backend_la_CFLAGS =                     \
157         $(COMPOSITOR_CFLAGS)                    \
158         $(PIXMAN_CFLAGS)                        \
159         $(CAIRO_CFLAGS)                         \
160         $(WAYLAND_COMPOSITOR_CFLAGS)            \
161         $(GCC_CFLAGS)
162 wayland_backend_la_SOURCES = compositor-wayland.c
163 endif
164
165 if ENABLE_RPI_COMPOSITOR
166 rpi_backend = rpi-backend.la
167 rpi_backend_la_LDFLAGS = -module -avoid-version
168 rpi_backend_la_LIBADD = $(COMPOSITOR_LIBS)      \
169         $(RPI_COMPOSITOR_LIBS)                  \
170         $(RPI_BCM_HOST_LIBS)                    \
171         ../shared/libshared.la
172 rpi_backend_la_CFLAGS =                         \
173         $(GCC_CFLAGS)                           \
174         $(COMPOSITOR_CFLAGS)                    \
175         $(RPI_COMPOSITOR_CFLAGS)                \
176         $(RPI_BCM_HOST_CFLAGS)
177 rpi_backend_la_SOURCES =                        \
178         compositor-rpi.c                        \
179         rpi-bcm-stubs.h                         \
180         tty.c                                   \
181         evdev.c                                 \
182         evdev.h                                 \
183         evdev-touchpad.c
184 endif
185
186 if ENABLE_HEADLESS_COMPOSITOR
187 headless_backend = headless-backend.la
188 headless_backend_la_LDFLAGS = -module -avoid-version
189 headless_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
190         ../shared/libshared.la
191 headless_backend_la_CFLAGS =                    \
192         $(COMPOSITOR_CFLAGS)                    \
193         $(GCC_CFLAGS)
194 headless_backend_la_SOURCES = compositor-headless.c
195 endif
196
197 if ENABLE_FBDEV_COMPOSITOR
198 fbdev_backend = fbdev-backend.la
199 fbdev_backend_la_LDFLAGS = -module -avoid-version
200 fbdev_backend_la_LIBADD = \
201         $(COMPOSITOR_LIBS) \
202         $(FBDEV_COMPOSITOR_LIBS) \
203         ../shared/libshared.la
204 fbdev_backend_la_CFLAGS = \
205         $(COMPOSITOR_CFLAGS) \
206         $(FBDEV_COMPOSITOR_CFLAGS) \
207         $(PIXMAN_CFLAGS) \
208         $(GCC_CFLAGS)
209 fbdev_backend_la_SOURCES = \
210         compositor-fbdev.c \
211         tty.c \
212         udev-seat.c \
213         udev-seat.h \
214         evdev.c \
215         evdev.h \
216         evdev-touchpad.c \
217         launcher-util.c
218 endif
219
220 if ENABLE_RDP_COMPOSITOR
221 rdp_backend = rdp-backend.la
222 rdp_backend_la_LDFLAGS = -module -avoid-version
223 rdp_backend_la_LIBADD = $(COMPOSITOR_LIBS) \
224         $(RDP_COMPOSITOR_LIBS) \
225         ../shared/libshared.la
226 rdp_backend_la_CFLAGS =                 \
227         $(COMPOSITOR_CFLAGS)                    \
228         $(RDP_COMPOSITOR_CFLAGS) \
229         $(GCC_CFLAGS)
230 rdp_backend_la_SOURCES = compositor-rdp.c
231 endif
232
233 if ENABLE_DESKTOP_SHELL
234 desktop_shell = desktop-shell.la
235 desktop_shell_la_LDFLAGS = -module -avoid-version
236 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)    \
237         ../shared/libshared.la
238 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
239 desktop_shell_la_SOURCES =                      \
240         shell.c                                 \
241         desktop-shell-protocol.c                \
242         desktop-shell-server-protocol.h
243 endif
244
245 if ENABLE_TABLET_SHELL
246 tablet_shell = tablet-shell.la
247 tablet_shell_la_LDFLAGS = -module -avoid-version
248 tablet_shell_la_LIBADD = $(COMPOSITOR_LIBS)
249 tablet_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
250 tablet_shell_la_SOURCES =                       \
251         tablet-shell.c                          \
252         tablet-shell-protocol.c                 \
253         tablet-shell-server-protocol.h
254 endif
255
256 BUILT_SOURCES =                                 \
257         screenshooter-server-protocol.h         \
258         screenshooter-protocol.c                \
259         text-cursor-position-server-protocol.h  \
260         text-cursor-position-protocol.c         \
261         tablet-shell-protocol.c                 \
262         tablet-shell-server-protocol.h          \
263         desktop-shell-protocol.c                \
264         desktop-shell-server-protocol.h         \
265         text-protocol.c                         \
266         text-server-protocol.h                  \
267         input-method-protocol.c                 \
268         input-method-server-protocol.h          \
269         workspaces-server-protocol.h            \
270         workspaces-protocol.c                   \
271         git-version.h
272
273 CLEANFILES = $(BUILT_SOURCES)
274
275 @wayland_scanner_rules@