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