Makefile.am 12.1 KB
Newer Older
1 2 3
# Flag build for parallelism; see https://savannah.gnu.org/patch/?6905
.AUTOPARALLEL:

4
lib_LTLIBRARIES = libmutter-wayland.la
rhp's avatar
...  
rhp committed
5

6
SUBDIRS=compositor/plugins
7

8
INCLUDES=								\
9
	-DCLUTTER_ENABLE_COMPOSITOR_API					\
10 11
	-DCLUTTER_ENABLE_EXPERIMENTAL_API				\
	-DCOGL_ENABLE_EXPERIMENTAL_API					\
12
	-DCOGL_ENABLE_EXPERIMENTAL_2_0_API                              \
13
	$(MUTTER_CFLAGS)						\
14
	-I$(top_builddir)						\
15 16 17
	-I$(srcdir)							\
	-I$(srcdir)/core						\
	-I$(srcdir)/ui							\
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
	-I$(srcdir)/compositor						\
	-DMUTTER_LIBEXECDIR=\"$(libexecdir)\"				\
	-DHOST_ALIAS=\"@HOST_ALIAS@\"					\
	-DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"		\
	-DMUTTER_PKGDATADIR=\"$(pkgdatadir)\"				\
	-DMUTTER_DATADIR=\"$(datadir)\"					\
	-DG_LOG_DOMAIN=\"mutter\"					\
	-DSN_API_NOT_YET_FROZEN=1					\
	-DMUTTER_MAJOR_VERSION=$(MUTTER_MAJOR_VERSION)			\
	-DMUTTER_MINOR_VERSION=$(MUTTER_MINOR_VERSION)			\
	-DMUTTER_MICRO_VERSION=$(MUTTER_MICRO_VERSION)			\
	-DMUTTER_PLUGIN_API_VERSION=$(MUTTER_PLUGIN_API_VERSION)	\
	-DMUTTER_PKGLIBDIR=\"$(pkglibdir)\"				\
	-DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\"			\
	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
rhp's avatar
...  
rhp committed
33

34 35
INCLUDES += \
	-I$(srcdir)/wayland						\
Colin Walters's avatar
Colin Walters committed
36
	-I$(builddir)/wayland						\
37 38
	-DXWAYLAND_PATH='"@XWAYLAND_PATH@"'

39
mutter_built_sources = \
40
	$(dbus_idle_built_sources)		\
41
	$(dbus_xrandr_built_sources)		\
42 43
	mutter-enum-types.h 			\
	mutter-enum-types.c			\
44 45
	wayland/gtk-shell-protocol.c		\
	wayland/gtk-shell-server-protocol.h	\
Jasper St. Pierre's avatar
Jasper St. Pierre committed
46 47
	wayland/xdg-shell-protocol.c		\
	wayland/xdg-shell-server-protocol.h	\
48
	wayland/xserver-protocol.c		\
49
	wayland/xserver-server-protocol.h
50

51
libmutter_wayland_la_SOURCES =			\
52 53
	core/async-getprop.c			\
	core/async-getprop.h			\
54 55
	core/barrier.c				\
	meta/barrier.h				\
56 57 58
	core/bell.c				\
	core/bell.h				\
	core/boxes.c				\
59
	core/boxes-private.h			\
60
	meta/boxes.h				\
61 62
	compositor/clutter-utils.c		\
	compositor/clutter-utils.h		\
63 64
	compositor/cogl-utils.c			\
	compositor/cogl-utils.h			\
65
	compositor/compositor.c			\
66
	compositor/compositor-private.h		\
67
	compositor/meta-background.c		\
68
	compositor/meta-background-actor.c	\
69
	compositor/meta-background-actor-private.h	\
70
	compositor/meta-background-group.c	\
71 72
	compositor/meta-cullable.c		\
	compositor/meta-cullable.h		\
73 74 75 76 77
	compositor/meta-module.c		\
	compositor/meta-module.h		\
	compositor/meta-plugin.c		\
	compositor/meta-plugin-manager.c	\
	compositor/meta-plugin-manager.h	\
78
	compositor/meta-shadow-factory.c	\
Owen W. Taylor's avatar
Owen W. Taylor committed
79
	compositor/meta-shadow-factory-private.h	\
80
	compositor/meta-shaped-texture.c	\
81
	compositor/meta-shaped-texture-private.h 	\
82 83
	compositor/meta-surface-actor.c		\
	compositor/meta-surface-actor.h		\
84 85 86 87
	compositor/meta-surface-actor-x11.c	\
	compositor/meta-surface-actor-x11.h	\
	compositor/meta-surface-actor-wayland.c	\
	compositor/meta-surface-actor-wayland.h	\
88 89
	compositor/meta-texture-rectangle.c	\
	compositor/meta-texture-rectangle.h	\
90 91 92 93 94 95
	compositor/meta-texture-tower.c		\
	compositor/meta-texture-tower.h		\
	compositor/meta-window-actor.c		\
	compositor/meta-window-actor-private.h	\
	compositor/meta-window-group.c		\
	compositor/meta-window-group.h		\
96 97 98 99
	compositor/meta-window-shape.c		\
	compositor/meta-window-shape.h		\
	compositor/region-utils.c		\
	compositor/region-utils.h		\
100
	meta/compositor.h			\
101
	meta/meta-background.h			\
102
	meta/meta-background-actor.h		\
103
	meta/meta-background-group.h		\
104 105 106 107
	meta/meta-plugin.h			\
	meta/meta-shadow-factory.h		\
	meta/meta-window-actor.h		\
	meta/compositor-mutter.h 		\
108
	core/above-tab-keycode.c		\
109 110 111 112 113
	core/constraints.c			\
	core/constraints.h			\
	core/core.c				\
	core/delete.c				\
	core/display.c				\
114
	core/display-private.h			\
115
	meta/display.h				\
116 117
	core/edge-resistance.c			\
	core/edge-resistance.h			\
118 119
	core/edid-parse.c			\
	core/edid.h				\
120
	core/errors.c				\
121
	meta/errors.h				\
122
	core/frame.c				\
123
	core/frame.h				\
124
	ui/gradient.c				\
125
	meta/gradient.h				\
126 127 128 129
	core/group-private.h			\
	core/group-props.c			\
	core/group-props.h			\
	core/group.c				\
130
	meta/group.h				\
131 132 133
	core/iconcache.c			\
	core/iconcache.h			\
	core/keybindings.c			\
Tomas Frydrych's avatar
Tomas Frydrych committed
134
	core/keybindings-private.h		\
135
	core/main.c				\
136 137
	core/meta-cursor-tracker.c		\
	core/meta-cursor-tracker-private.h	\
138 139
	core/meta-idle-monitor.c		\
	core/meta-idle-monitor-private.h	\
140
	core/meta-xrandr-shared.h		\
141
	core/monitor.c				\
142
	core/monitor-config.c			\
143
	core/monitor-kms.c			\
144
	core/monitor-private.h			\
145
	core/monitor-xrandr.c			\
146
	core/mutter-Xatomtype.h			\
147 148 149
	core/place.c				\
	core/place.h				\
	core/prefs.c				\
150
	meta/prefs.h				\
151
	core/screen.c				\
152
	core/screen-private.h			\
153 154
	meta/screen.h				\
	meta/types.h				\
155 156 157 158
	core/session.c				\
	core/session.h				\
	core/stack.c				\
	core/stack.h				\
159 160
	core/stack-tracker.c			\
	core/stack-tracker.h			\
161
	core/util.c				\
162
	meta/util.h				\
163
	core/util-private.h			\
164 165
	core/window-props.c			\
	core/window-props.h			\
166 167
	core/window-x11.c			\
	core/window-x11.h			\
168
	core/window-x11-private.h		\
169
	core/window.c				\
170
	core/window-private.h			\
171
	meta/window.h				\
172
	core/workspace.c			\
Tomas Frydrych's avatar
Tomas Frydrych committed
173
	core/workspace-private.h		\
174
	core/xprops.c				\
175 176 177 178
	core/xprops.h				\
	meta/common.h				\
	core/core.h				\
	ui/ui.h					\
179 180 181 182 183 184 185
	ui/frames.c				\
	ui/frames.h				\
	ui/menu.c				\
	ui/menu.h				\
	ui/metaaccellabel.c			\
	ui/metaaccellabel.h			\
	ui/resizepopup.c			\
186
	ui/resizepopup.h			\
187 188
	ui/theme-parser.c			\
	ui/theme.c				\
189
	meta/theme.h				\
190
	ui/theme-private.h			\
Jasper St. Pierre's avatar
Jasper St. Pierre committed
191
	ui/ui.c					\
192
	wayland/meta-wayland.c			\
193
	wayland/meta-wayland.h			\
194 195
	wayland/meta-wayland-private.h		\
	wayland/meta-xwayland-private.h		\
196 197 198 199 200 201 202 203
	wayland/meta-xwayland.c			\
	wayland/meta-wayland-data-device.c      \
	wayland/meta-wayland-data-device.h      \
	wayland/meta-wayland-keyboard.c		\
	wayland/meta-wayland-keyboard.h		\
	wayland/meta-wayland-pointer.c		\
	wayland/meta-wayland-pointer.h		\
	wayland/meta-wayland-seat.c		\
204 205
	wayland/meta-wayland-seat.h		\
	wayland/meta-wayland-stage.h		\
206
	wayland/meta-wayland-stage.c		\
207
	wayland/meta-wayland-surface.c		\
208 209
	wayland/meta-wayland-surface.h		\
	wayland/meta-wayland-types.h		\
210
	wayland/meta-wayland-versions.h		\
211 212
	wayland/meta-weston-launch.c		\
	wayland/meta-weston-launch.h
213

Jasper St. Pierre's avatar
Jasper St. Pierre committed
214 215 216
nodist_libmutter_wayland_la_SOURCES =		\
	$(mutter_built_sources)

217 218
libmutter_wayland_la_LDFLAGS = -no-undefined
libmutter_wayland_la_LIBADD  = $(MUTTER_LIBS)
Masahiro Sakai's avatar
Masahiro Sakai committed
219

220 221
# Headers installed for plugins; introspected information will
# be extracted into Mutter-<version>.gir
222
libmutterinclude_base_headers =		\
223
	meta/barrier.h				\
224 225 226 227 228 229 230 231 232 233
	meta/boxes.h				\
	meta/common.h				\
	meta/compositor-mutter.h		\
	meta/compositor.h			\
	meta/display.h				\
	meta/errors.h				\
	meta/gradient.h				\
	meta/group.h				\
	meta/keybindings.h			\
	meta/main.h				\
234
	meta/meta-background-actor.h		\
235 236
	meta/meta-background-group.h		\
	meta/meta-background.h			\
237
	meta/meta-cursor-tracker.h		\
238
	meta/meta-idle-monitor.h		\
239
	meta/meta-plugin.h			\
240
	meta/meta-shaped-texture.h		\
241 242 243 244 245 246 247 248 249
	meta/meta-shadow-factory.h		\
	meta/meta-window-actor.h		\
	meta/prefs.h				\
	meta/screen.h				\
	meta/theme.h				\
	meta/types.h				\
	meta/util.h				\
	meta/window.h				\
	meta/workspace.h
250

251
# Excluded from scanning for introspection but installed
252
# atomnames.h: macros cause problems for scanning process
253
libmutterinclude_extra_headers =		\
254
	meta/atomnames.h
255

256
libmutterincludedir = $(includedir)/mutter-wayland/meta
257

258 259 260
libmutterinclude_HEADERS =			\
	$(libmutterinclude_base_headers)	\
	$(libmutterinclude_extra_headers)
261

262
bin_PROGRAMS=mutter-wayland
263

264 265
mutter_wayland_SOURCES = core/mutter.c
mutter_wayland_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
266

267 268 269 270
bin_PROGRAMS+=mutter-launch

mutter_launch_SOURCES = wayland/weston-launch.c wayland/weston-launch.h

271
mutter_launch_CFLAGS = $(MUTTER_LAUNCH_CFLAGS) -DLIBDIR=\"$(libdir)\"
272 273 274 275 276 277
mutter_launch_LDFLAGS = $(MUTTER_LAUNCH_LIBS) -lpam

install-exec-hook:
	-chown root $(DESTDIR)$(bindir)/mutter-launch
	-chmod u+s $(DESTDIR)$(bindir)/mutter-launch

278 279 280
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)

Owen W. Taylor's avatar
Owen W. Taylor committed
281 282 283 284 285
# Since we don't make any guarantees about stability and we don't support
# parallel install, there's no real reason to change directories, filenames,
# etc. as we change the Mutter tarball version.
#api_version = $(MUTTER_MAJOR_VERSION).$(MUTTER_MINOR_VERSION)
api_version = 3.0
286 287 288 289 290 291 292 293 294 295

# These files are in package-private directories, even though they may be used
# by plugins.  If you're writing a plugin, use g-ir-compiler --add-include-path
# and g-ir-compiler --includedir.
girdir = $(pkglibdir)
gir_DATA = Meta-$(api_version).gir

typelibdir = $(pkglibdir)
typelib_DATA = Meta-$(api_version).typelib

296 297
INTROSPECTION_GIRS = Meta-$(api_version).gir

298
Meta-$(api_version).gir: libmutter-wayland.la
299
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0
300
@META_GIR@_EXPORT_PACKAGES = libmutter-wayland
301
@META_GIR@_CFLAGS = $(INCLUDES)
302
@META_GIR@_LIBS = libmutter-wayland.la
303 304 305
@META_GIR@_FILES =				\
	mutter-enum-types.h			\
	$(libmutterinclude_base_headers)	\
306
	$(filter %.c,$(libmutter_wayland_la_SOURCES) $(nodist_libmutter_wayland_la_SOURCES))
307
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error
308 309 310

endif

311 312 313
testboxes_SOURCES = core/testboxes.c
testgradient_SOURCES = ui/testgradient.c
testasyncgetprop_SOURCES = core/testasyncgetprop.c
314

315
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
316

317 318 319
testboxes_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
testgradient_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
testasyncgetprop_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
320

321 322
@INTLTOOL_DESKTOP_RULE@

323
desktopfilesdir=$(datadir)/applications
324
desktopfiles_in_files=mutter-wayland.desktop.in
325 326
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
desktopfiles_DATA = $(desktopfiles_files)
327

328 329
xmldir       = @GNOME_KEYBINDINGS_KEYSDIR@
xml_in_files = \
330 331
        50-mutter-navigation.xml.in	\
        50-mutter-system.xml.in		\
332 333 334
        50-mutter-windows.xml.in
xml_DATA     = $(xml_in_files:.xml.in=.xml)

335 336
dbus_idle_built_sources = meta-dbus-idle-monitor.c meta-dbus-idle-monitor.h

337
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml org.gnome.mutter.wayland.gschema.xml
338
@INTLTOOL_XML_NOMERGE_RULE@
339
@GSETTINGS_RULES@
340

341
convertdir = $(datadir)/GConf/gsettings
342
convert_DATA = mutter-schemas.convert
343

Owen W. Taylor's avatar
Owen W. Taylor committed
344
CLEANFILES =					\
345
	mutter-wayland.desktop			\
Owen W. Taylor's avatar
Owen W. Taylor committed
346
	mutter-wm.desktop			\
347
	org.gnome.mutter.gschema.xml		\
Giovanni Campagna's avatar
Giovanni Campagna committed
348
	org.gnome.mutter.wayland.gschema.xml	\
349
	$(xml_DATA)				\
Owen W. Taylor's avatar
Owen W. Taylor committed
350 351 352
	$(mutter_built_sources)			\
	$(typelib_DATA)				\
	$(gir_DATA)
353

354 355
pkgconfigdir = $(libdir)/pkgconfig

356
pkgconfig_DATA = libmutter-wayland.pc
357

358
EXTRA_DIST=$(desktopfiles_files) 	\
359
	$(wmproperties_files)		\
Owen W. Taylor's avatar
Owen W. Taylor committed
360
	$(IMAGES) 			\
361
	$(desktopfiles_in_files)	\
362
	$(wmproperties_in_files)	\
363
	$(xml_in_files)			\
364
	org.gnome.mutter.gschema.xml.in \
Giovanni Campagna's avatar
Giovanni Campagna committed
365
	org.gnome.mutter.wayland.gschema.xml.in \
366
	mutter-schemas.convert \
367
	libmutter-wayland.pc.in \
368
	mutter-enum-types.h.in \
Giovanni Campagna's avatar
Giovanni Campagna committed
369 370
	mutter-enum-types.c.in \
	xrandr.xml idle-monitor.xml
371

372
BUILT_SOURCES = $(mutter_built_sources)
Jasper St. Pierre's avatar
Jasper St. Pierre committed
373
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
374 375 376 377
CLEANFILES += $(MUTTER_STAMP_FILES)

mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
	@true
378
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in
379
	$(AM_V_GEN) ( cd $(srcdir) && \
380
	  $(GLIB_MKENUMS) \
Thierry Reding's avatar
Thierry Reding committed
381
	    --template mutter-enum-types.h.in \
382
	  $(libmutterinclude_base_headers) ) >> xgen-teth && \
383
	(cmp -s xgen-teth mutter-enum-types.h || cp xgen-teth mutter-enum-types.h) && \
384 385 386 387
	rm -f xgen-teth && \
	echo timestamp > $(@F)

mutter-enum-types.c: stamp-mutter-enum-types.h mutter-enum-types.c.in
388
	  $(AM_V_GEN) ( cd $(srcdir) && \
389
	  $(GLIB_MKENUMS) \
Thierry Reding's avatar
Thierry Reding committed
390
	    --template mutter-enum-types.c.in \
391 392 393
	  $(libmutterinclude_base_headers) ) >> xgen-tetc && \
	cp xgen-tetc mutter-enum-types.c && \
	rm -f xgen-tetc
394

395 396 397
dbus_xrandr_built_sources = meta-dbus-xrandr.c meta-dbus-xrandr.h

$(dbus_xrandr_built_sources) : Makefile.am xrandr.xml
398
	$(AM_V_GEN)gdbus-codegen							\
399 400 401
		--interface-prefix org.gnome.Mutter					\
		--c-namespace MetaDBus							\
		--generate-c-code meta-dbus-xrandr					\
Colin Walters's avatar
Colin Walters committed
402
		$(srcdir)/xrandr.xml
403

404 405 406 407 408 409 410 411 412

$(dbus_idle_built_sources) : Makefile.am idle-monitor.xml
	$(AM_V_GEN)gdbus-codegen							\
		--interface-prefix org.gnome.Mutter					\
		--c-namespace MetaDBus							\
		--generate-c-code meta-dbus-idle-monitor				\
		--c-generate-object-manager						\
		$(srcdir)/idle-monitor.xml

413
wayland/%-protocol.c : $(top_builddir)/protocol/%.xml
Colin Walters's avatar
Colin Walters committed
414
	mkdir -p wayland
415 416
	$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
wayland/%-server-protocol.h : $(top_builddir)/protocol/%.xml
Colin Walters's avatar
Colin Walters committed
417
	mkdir -p wayland
418
	$(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@