Fix distcheck
[profile/ivi/weston-ivi-shell.git] / src / Makefile.am
1 bin_PROGRAMS = weston
2
3 AM_CPPFLAGS =                                   \
4         -DDATADIR='"$(datadir)"'                \
5         -DMODULEDIR='"$(moduledir)"'            \
6         -DLIBEXECDIR='"$(libexecdir)"'          \
7         -DXSERVER_PATH='"@XSERVER_PATH@"'       \
8         $(COMPOSITOR_CFLAGS)
9
10 weston_LDFLAGS = -export-dynamic
11 weston_CFLAGS = $(GCC_CFLAGS)
12 weston_LDADD = \
13         $(COMPOSITOR_LIBS) $(DLOPEN_LIBS) $(XSERVER_LAUNCHER_LIBS)
14
15 weston_SOURCES =                        \
16         compositor.c                            \
17         compositor.h                            \
18         image-loader.c                          \
19         data-device.c                           \
20         screenshooter.c                         \
21         screenshooter-protocol.c                \
22         screenshooter-server-protocol.h         \
23         util.c                                  \
24         $(xserver_launcher_sources)
25
26 if ENABLE_XSERVER_LAUNCHER
27 xserver_launcher_sources =                      \
28         xserver-launcher.c                      \
29         xserver-protocol.c                      \
30         xserver-server-protocol.h               \
31         hash.c                                  \
32         hash.h
33 endif
34
35 moduledir = @libdir@/weston
36 module_LTLIBRARIES =                            \
37         $(desktop_shell)                        \
38         $(tablet_shell)                 \
39         $(x11_backend)                          \
40         $(drm_backend)                          \
41         $(wayland_backend)                      \
42         $(openwfd_backend)
43
44 if ENABLE_X11_COMPOSITOR
45 x11_backend = x11-backend.la
46 x11_backend_la_LDFLAGS = -module -avoid-version
47 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS)
48 x11_backend_la_CFLAGS = $(X11_COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
49 x11_backend_la_SOURCES = compositor-x11.c
50 endif
51
52 if ENABLE_DRM_COMPOSITOR
53 drm_backend = drm-backend.la
54 drm_backend_la_LDFLAGS = -module -avoid-version
55 drm_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(DRM_COMPOSITOR_LIBS)
56 drm_backend_la_CFLAGS = $(DRM_COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
57 drm_backend_la_SOURCES = compositor-drm.c tty.c evdev.c evdev.h
58 endif
59
60 if ENABLE_WAYLAND_COMPOSITOR
61 wayland_backend = wayland-backend.la
62 wayland_backend_la_LDFLAGS = -module -avoid-version
63 wayland_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(WAYLAND_COMPOSITOR_LIBS)
64 wayland_backend_la_CFLAGS = $(WAYLAND_COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
65 wayland_backend_la_SOURCES = compositor-wayland.c
66 endif
67
68 if ENABLE_OPENWFD_COMPOSITOR
69 openwfd_backend = openwfd-backend.la
70 openwfd_backend_la_LDFLAGS = -module -avoid-version
71 openwfd_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(OPENWFD_COMPOSITOR_LIBS)
72 openwfd_backend_la_CFLAGS = $(OPENWFD_COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
73 openwfd_backend_la_SOURCES = compositor-openwfd.c tty.c evdev.c evdev.h
74 endif
75
76 if ENABLE_DESKTOP_SHELL
77 desktop_shell = desktop-shell.la
78 desktop_shell_la_LDFLAGS = -module -avoid-version
79 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)    \
80         ../shared/libconfig-parser.la
81 desktop_shell_la_CFLAGS = $(GCC_CFLAGS)
82 desktop_shell_la_SOURCES =                      \
83         shell.c                                 \
84         switcher.c                              \
85         desktop-shell-protocol.c                \
86         desktop-shell-server-protocol.h
87 endif
88
89 if ENABLE_TABLET_SHELL
90 tablet_shell = tablet-shell.la
91 tablet_shell_la_LDFLAGS = -module -avoid-version
92 tablet_shell_la_LIBADD = $(COMPOSITOR_LIBS)
93 tablet_shell_la_CFLAGS = $(GCC_CFLAGS)
94 tablet_shell_la_SOURCES =                       \
95         tablet-shell.c                          \
96         tablet-shell-protocol.c                 \
97         tablet-shell-server-protocol.h
98 endif
99
100 BUILT_SOURCES =                                 \
101         screenshooter-server-protocol.h         \
102         screenshooter-protocol.c                \
103         tablet-shell-protocol.c                 \
104         tablet-shell-server-protocol.h          \
105         xserver-protocol.c                      \
106         xserver-server-protocol.h               \
107         desktop-shell-protocol.c                \
108         desktop-shell-server-protocol.h
109
110 CLEANFILES = $(BUILT_SOURCES)
111
112 @wayland_scanner_rules@