compositor: Consolidate output repaint logic
[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
9 weston_LDFLAGS = -export-dynamic
10 weston_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
11 weston_LDADD = $(COMPOSITOR_LIBS) $(DLOPEN_LIBS) -lm ../shared/libshared.la
12
13 weston_SOURCES =                                \
14         git-version.h                           \
15         log.c                                   \
16         log.h                                   \
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         workspaces-protocol.c                   \
32         workspaces-server-protocol.h            \
33         util.c                                  \
34         matrix.c                                \
35         matrix.h                                \
36         gles2-renderer.c                        \
37         weston-launch.h                         \
38         weston-egl-ext.h
39
40 git-version.h : .FORCE
41         $(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; \
42         cmp -s $@ $@-new || cp $@-new $@; \
43         rm $@-new)
44
45 .FORCE :
46
47 if ENABLE_XWAYLAND
48 SUBDIRS = xwayland
49 endif
50
51 DIST_SUBDIRS = xwayland
52
53
54 if BUILD_WESTON_LAUNCH
55 weston_launch = weston-launch
56 weston_launch_SOURCES = weston-launch.c weston-launch.h
57 weston_launch_CFLAGS= $(GCC_CFLAGS)
58 weston_launch_CPPFLAGS = $(WESTON_LAUNCH_CFLAGS) $(SYSTEMD_LOGIN_CFLAGS) \
59                  -DBINDIR='"$(bindir)"'
60 weston_launch_LDADD = $(WESTON_LAUNCH_LIBS) $(SYSTEMD_LOGIN_LIBS)
61
62 if ENABLE_SETUID_INSTALL
63 install-exec-hook:
64         chown root $(DESTDIR)$(bindir)/weston-launch
65         chmod u+s $(DESTDIR)$(bindir)/weston-launch
66 endif
67
68 endif # BUILD_WESTON_LAUNCH
69
70 moduledir = @libdir@/weston
71 module_LTLIBRARIES =                            \
72         $(desktop_shell)                        \
73         $(tablet_shell)                         \
74         $(x11_backend)                          \
75         $(drm_backend)                          \
76         $(wayland_backend)
77
78 # Do not install, since the binary produced via autotools is unusable.
79 # The real backend is built by the Android build system.
80 noinst_LTLIBRARIES = $(android_backend)
81
82 if ENABLE_X11_COMPOSITOR
83 x11_backend = x11-backend.la
84 x11_backend_la_LDFLAGS = -module -avoid-version
85 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
86         ../shared/libshared.la
87 x11_backend_la_CFLAGS =                         \
88         $(COMPOSITOR_CFLAGS)                    \
89         $(X11_COMPOSITOR_CFLAGS)                \
90         $(GCC_CFLAGS)
91 x11_backend_la_SOURCES = compositor-x11.c
92 endif
93
94 if ENABLE_DRM_COMPOSITOR
95 drm_backend = drm-backend.la
96 drm_backend_la_LDFLAGS = -module -avoid-version
97 drm_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(DRM_COMPOSITOR_LIBS) \
98         ../shared/libshared.la
99 drm_backend_la_CFLAGS =                         \
100         $(COMPOSITOR_CFLAGS)                    \
101         $(DRM_COMPOSITOR_CFLAGS)                \
102         $(GCC_CFLAGS)
103 drm_backend_la_SOURCES =                        \
104         compositor-drm.c                        \
105         tty.c                                   \
106         evdev.c                                 \
107         evdev.h                                 \
108         evdev-touchpad.c                        \
109         launcher-util.c                         \
110         launcher-util.h                         \
111         libbacklight.c                          \
112         libbacklight.h
113 endif
114
115 if ENABLE_WAYLAND_COMPOSITOR
116 wayland_backend = wayland-backend.la
117 wayland_backend_la_LDFLAGS = -module -avoid-version
118 wayland_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(WAYLAND_COMPOSITOR_LIBS) \
119         ../shared/libshared.la
120 wayland_backend_la_CFLAGS =                     \
121         $(COMPOSITOR_CFLAGS)                    \
122         $(WAYLAND_COMPOSITOR_CFLAGS)            \
123         $(GCC_CFLAGS)
124 wayland_backend_la_SOURCES = compositor-wayland.c
125 endif
126
127 if ENABLE_ANDROID_COMPOSITOR
128 android_backend = android-backend.la
129 android_backend_la_LDFLAGS = -module -avoid-version
130 android_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(ANDROID_COMPOSITOR_LIBS)
131 android_backend_la_CFLAGS =                     \
132         $(GCC_CFLAGS)                           \
133         $(COMPOSITOR_CFLAGS)                    \
134         $(ANDROID_COMPOSITOR_CFLAGS)
135 android_backend_la_CXXFLAGS = $(GCC_CXXFLAGS) $(COMPOSITOR_CFLAGS)
136 android_backend_la_SOURCES =                    \
137         compositor-android.c                    \
138         evdev.c                                 \
139         evdev.h                                 \
140         evdev-touchpad.c                        \
141         android-framebuffer.cpp                 \
142         android-framebuffer.h
143 endif
144
145 if ENABLE_DESKTOP_SHELL
146 desktop_shell = desktop-shell.la
147 desktop_shell_la_LDFLAGS = -module -avoid-version
148 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)    \
149         ../shared/libshared.la
150 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
151 desktop_shell_la_SOURCES =                      \
152         shell.c                                 \
153         desktop-shell-protocol.c                \
154         desktop-shell-server-protocol.h
155 endif
156
157 if ENABLE_TABLET_SHELL
158 tablet_shell = tablet-shell.la
159 tablet_shell_la_LDFLAGS = -module -avoid-version
160 tablet_shell_la_LIBADD = $(COMPOSITOR_LIBS)
161 tablet_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
162 tablet_shell_la_SOURCES =                       \
163         tablet-shell.c                          \
164         tablet-shell-protocol.c                 \
165         tablet-shell-server-protocol.h
166 endif
167
168 BUILT_SOURCES =                                 \
169         screenshooter-server-protocol.h         \
170         screenshooter-protocol.c                \
171         text-cursor-position-server-protocol.h  \
172         text-cursor-position-protocol.c         \
173         tablet-shell-protocol.c                 \
174         tablet-shell-server-protocol.h          \
175         desktop-shell-protocol.c                \
176         desktop-shell-server-protocol.h         \
177         text-protocol.c                         \
178         text-server-protocol.h                  \
179         workspaces-server-protocol.h            \
180         workspaces-protocol.c                   \
181         git-version.h
182
183 CLEANFILES = $(BUILT_SOURCES)
184
185 @wayland_scanner_rules@