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