build: Move xwayland/Makefile.am into toplevel Makefile.am
[platform/upstream/weston.git] / Makefile.am
1 bin_PROGRAMS =
2 moduledir = $(libdir)/weston
3 module_LTLIBRARIES =
4 BUILT_SOURCES =
5
6 SUBDIRS =                                       \
7         shared                                  \
8         src                                     \
9         clients                                 \
10         protocol                                \
11         tests                                   \
12         man
13
14 DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
15
16 EXTRA_DIST = weston.ini.in wayland-scanner.mk
17
18 weston.ini : $(srcdir)/weston.ini.in
19         $(AM_V_GEN)$(SED) \
20                 -e 's|@bindir[@]|$(bindir)|g' \
21                 -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
22                 -e 's|@libexecdir[@]|$(libexecdir)|g' \
23                 $< > $@
24
25 all-local : weston.ini
26
27 CLEANFILES = weston.ini $(BUILT_SOURCES)
28
29
30 westondatadir = $(datadir)/weston
31 dist_westondata_DATA =                          \
32         data/wayland.svg                        \
33         data/wayland.png                        \
34         data/pattern.png                        \
35         data/terminal.png                       \
36         data/border.png                         \
37         data/icon_window.png                    \
38         data/sign_close.png                     \
39         data/sign_maximize.png                  \
40         data/sign_minimize.png
41
42
43 if BUILD_WCAP_TOOLS
44 bin_PROGRAMS += wcap-decode
45
46 wcap_decode_SOURCES =                           \
47         wcap/main.c                             \
48         wcap/wcap-decode.c                      \
49         wcap/wcap-decode.h
50
51 wcap_decode_CFLAGS = $(GCC_CFLAGS) $(WCAP_CFLAGS)
52 wcap_decode_LDADD = $(WCAP_LIBS)
53 endif
54
55
56 if ENABLE_DESKTOP_SHELL
57
58 module_LTLIBRARIES += desktop-shell.la
59
60 desktop_shell_la_CPPFLAGS =                     \
61         -I$(top_srcdir)/shared                  \
62         -I$(top_srcdir)/src                     \
63         -I$(top_builddir)/src                   \
64         -I$(top_builddir)/desktop-shell         \
65         -DDATADIR='"$(datadir)"'                \
66         -DMODULEDIR='"$(moduledir)"'            \
67         -DLIBEXECDIR='"$(libexecdir)"'          \
68         -DIN_WESTON
69
70 desktop_shell_la_LDFLAGS = -module -avoid-version
71 desktop_shell_la_LIBADD = $(COMPOSITOR_LIBS)    \
72         shared/libshared.la
73 desktop_shell_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
74 desktop_shell_la_SOURCES =                              \
75         desktop-shell/shell.h                           \
76         desktop-shell/shell.c                           \
77         desktop-shell/exposay.c                         \
78         desktop-shell/input-panel.c                     \
79         desktop-shell/desktop-shell-protocol.c          \
80         desktop-shell/desktop-shell-server-protocol.h   \
81         desktop-shell/xdg-shell-protocol.c              \
82         desktop-shell/xdg-shell-server-protocol.h
83
84 BUILT_SOURCES +=                                        \
85         desktop-shell/desktop-shell-protocol.c          \
86         desktop-shell/desktop-shell-server-protocol.h   \
87         desktop-shell/xdg-shell-protocol.c              \
88         desktop-shell/xdg-shell-server-protocol.h
89 endif
90
91
92 if ENABLE_XWAYLAND
93
94 module_LTLIBRARIES += xwayland.la
95
96 xwayland_la_CPPFLAGS =                          \
97         -I$(top_srcdir)/shared                  \
98         -I$(top_srcdir)/src                     \
99         -I$(top_builddir)/src                   \
100         -I$(top_builddir)/xwayland              \
101         -DDATADIR='"$(datadir)"'                \
102         -DMODULEDIR='"$(moduledir)"'            \
103         -DLIBEXECDIR='"$(libexecdir)"'          \
104         -DXSERVER_PATH='"@XSERVER_PATH@"'
105
106 xwayland_la_LDFLAGS = -module -avoid-version
107 xwayland_la_LIBADD =                    \
108         $(XWAYLAND_LIBS)                \
109         $(top_builddir)/shared/libshared-cairo.la
110 xwayland_la_CFLAGS =                            \
111         $(GCC_CFLAGS)                           \
112         $(COMPOSITOR_CFLAGS)                    \
113         $(PIXMAN_CFLAGS)                        \
114         $(CAIRO_CFLAGS)
115 xwayland_la_SOURCES =                           \
116         xwayland/xwayland.h                     \
117         xwayland/window-manager.c               \
118         xwayland/selection.c                    \
119         xwayland/dnd.c                          \
120         xwayland/launcher.c                     \
121         xwayland/xserver-protocol.c             \
122         xwayland/xserver-server-protocol.h      \
123         xwayland/hash.c                         \
124         xwayland/hash.h
125
126 BUILT_SOURCES +=                                \
127         xwayland/xserver-protocol.c             \
128         xwayland/xserver-server-protocol.h
129 endif
130
131 wayland_protocoldir = $(top_srcdir)/protocol
132 include $(top_srcdir)/wayland-scanner.mk