xwayland: change library name
[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         compositor.c                            \
15         compositor.h                            \
16         filter.c                                \
17         filter.h                                \
18         screenshooter.c                         \
19         screenshooter-protocol.c                \
20         screenshooter-server-protocol.h         \
21         util.c                                  \
22         matrix.c                                \
23         matrix.h                                \
24         weston-launch.h                         \
25         weston-egl-ext.h
26
27 if ENABLE_XWAYLAND
28 SUBDIRS = xwayland
29 endif
30
31 DIST_SUBDIRS = xwayland
32
33
34 if BUILD_WESTON_LAUNCH
35 weston_launch = weston-launch
36 weston_launch_SOURCES = weston-launch.c weston-launch.h
37 weston_launch_CFLAGS= $(GCC_CFLAGS)
38 weston_launch_CPPFLAGS = $(WESTON_LAUNCH_CFLAGS) $(SYSTEMD_LOGIN_CFLAGS) \
39                  -DBINDIR='"$(bindir)"'
40 weston_launch_LDADD = $(WESTON_LAUNCH_LIBS) $(SYSTEMD_LOGIN_LIBS)
41
42 if ENABLE_SETUID_INSTALL
43 install-exec-hook:
44         chown root $(DESTDIR)$(bindir)/weston-launch
45         chmod u+s $(DESTDIR)$(bindir)/weston-launch
46 endif
47
48 else # BUILD_WESTON_LAUNCH
49
50 if ENABLE_SETUID_INSTALL
51 install-exec-hook:
52         chown root $(DESTDIR)$(bindir)/weston
53         chmod u+s $(DESTDIR)$(bindir)/weston
54 endif
55
56 endif # BUILD_WESTON_LAUNCH
57
58 moduledir = @libdir@/weston
59 module_LTLIBRARIES =                            \
60         $(desktop_shell)                        \
61         $(tablet_shell)                         \
62         $(x11_backend)                          \
63         $(drm_backend)                          \
64         $(wayland_backend)                      \
65         $(openwfd_backend)
66
67 if ENABLE_X11_COMPOSITOR
68 x11_backend = x11-backend.la
69 x11_backend_la_LDFLAGS = -module -avoid-version
70 x11_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(X11_COMPOSITOR_LIBS) \
71         ../shared/libshared.la
72 x11_backend_la_CFLAGS =                         \
73         $(COMPOSITOR_CFLAGS)                    \
74         $(X11_COMPOSITOR_CFLAGS)                \
75         $(GCC_CFLAGS)
76 x11_backend_la_SOURCES = compositor-x11.c
77 endif
78
79 if ENABLE_DRM_COMPOSITOR
80 drm_backend = drm-backend.la
81 drm_backend_la_LDFLAGS = -module -avoid-version
82 drm_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(DRM_COMPOSITOR_LIBS) \
83         ../shared/libshared.la
84 drm_backend_la_CFLAGS =                         \
85         $(COMPOSITOR_CFLAGS)                    \
86         $(DRM_COMPOSITOR_CFLAGS)                \
87         $(GCC_CFLAGS)
88 drm_backend_la_SOURCES =                        \
89         compositor-drm.c                        \
90         tty.c                                   \
91         evdev.c                                 \
92         evdev.h                                 \
93         evdev-private.h                         \
94         evdev-touchpad.c                        \
95         launcher-util.c                         \
96         launcher-util.h                         \
97         libbacklight.c                          \
98         libbacklight.h
99 endif
100
101 if ENABLE_WAYLAND_COMPOSITOR
102 wayland_backend = wayland-backend.la
103 wayland_backend_la_LDFLAGS = -module -avoid-version
104 wayland_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(WAYLAND_COMPOSITOR_LIBS) \
105         ../shared/libshared.la
106 wayland_backend_la_CFLAGS =                     \
107         $(COMPOSITOR_CFLAGS)                    \
108         $(WAYLAND_COMPOSITOR_CFLAGS)            \
109         $(GCC_CFLAGS)
110 wayland_backend_la_SOURCES = compositor-wayland.c
111 endif
112
113 if ENABLE_OPENWFD_COMPOSITOR
114 openwfd_backend = openwfd-backend.la
115 openwfd_backend_la_LDFLAGS = -module -avoid-version
116 openwfd_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(OPENWFD_COMPOSITOR_LIBS)
117 openwfd_backend_la_CFLAGS = $(OPENWFD_COMPOSITOR_CFLAGS) $(GCC_CFLAGS)
118 openwfd_backend_la_SOURCES = compositor-openwfd.c tty.c evdev.c evdev.h
119 endif
120
121 if ENABLE_DESKTOP_SHELL
122 desktop_shell = desktop-shell.la
123 desktop_shell_la_LDFLAGS = -module -avoid-version
124 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)    \
125         ../shared/libshared.la
126 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
127 desktop_shell_la_SOURCES =                      \
128         shell.c                                 \
129         desktop-shell-protocol.c                \
130         desktop-shell-server-protocol.h
131 endif
132
133 if ENABLE_TABLET_SHELL
134 tablet_shell = tablet-shell.la
135 tablet_shell_la_LDFLAGS = -module -avoid-version
136 tablet_shell_la_LIBADD = $(COMPOSITOR_LIBS)
137 tablet_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
138 tablet_shell_la_SOURCES =                       \
139         tablet-shell.c                          \
140         tablet-shell-protocol.c                 \
141         tablet-shell-server-protocol.h
142 endif
143
144 BUILT_SOURCES =                                 \
145         screenshooter-server-protocol.h         \
146         screenshooter-protocol.c                \
147         tablet-shell-protocol.c                 \
148         tablet-shell-server-protocol.h          \
149         desktop-shell-protocol.c                \
150         desktop-shell-server-protocol.h
151
152 CLEANFILES = $(BUILT_SOURCES)
153
154 @wayland_scanner_rules@