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