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