summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: cde939499d94556d70901c551cce4a789558dc62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# Flag build for parallelism; see https://savannah.gnu.org/patch/?6905
.AUTOPARALLEL:

lib_LTLIBRARIES = libmutter.la

SUBDIRS=compositor/plugins

EXTRA_DIST =
NULL =

AM_CPPFLAGS = \
	-DCLUTTER_ENABLE_COMPOSITOR_API					\
	-DCLUTTER_ENABLE_EXPERIMENTAL_API				\
	-DCOGL_ENABLE_EXPERIMENTAL_API					\
	-DCOGL_ENABLE_EXPERIMENTAL_2_0_API                              \
	-DCLUTTER_DISABLE_DEPRECATION_WARNINGS				\
	-DCOGL_DISABLE_DEPRECATION_WARNINGS				\
	$(MUTTER_CFLAGS)						\
	$(MUTTER_NATIVE_BACKEND_CFLAGS)					\
	-I$(builddir)							\
	-I$(srcdir)							\
	-I$(srcdir)/backends						\
	-I$(srcdir)/core						\
	-I$(srcdir)/ui							\
	-I$(srcdir)/compositor						\
	-DMUTTER_LIBEXECDIR=\"$(libexecdir)\"				\
	-DMUTTER_LOCALEDIR=\"$(localedir)\"				\
	-DMUTTER_PKGDATADIR=\"$(pkgdatadir)\"				\
	-DMUTTER_DATADIR=\"$(datadir)\"					\
	-DG_LOG_DOMAIN=\"mutter\"					\
	-DSN_API_NOT_YET_FROZEN=1					\
	-DMUTTER_PKGLIBDIR=\"$(pkglibdir)\"				\
	-DMUTTER_PLUGIN_DIR=\"$(MUTTER_PLUGIN_DIR)\"			\
	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"			\
	-DXWAYLAND_PATH=\"$(XWAYLAND_PATH)\"				\
	$(NULL)

mutter_built_sources = \
	$(dbus_idle_built_sources)		\
	$(dbus_display_config_built_sources)	\
	$(dbus_login1_built_sources)		\
	meta/meta-enum-types.h			\
	meta-enum-types.c			\
	$(NULL)

if HAVE_WAYLAND
mutter_built_sources += \
	pointer-gestures-protocol.c		\
	pointer-gestures-server-protocol.h	\
	gtk-shell-protocol.c			\
	gtk-shell-server-protocol.h		\
	xdg-shell-protocol.c			\
	xdg-shell-server-protocol.h		\
	$(NULL)
endif

wayland_protocols =				\
	wayland/protocol/pointer-gestures.xml	\
	wayland/protocol/gtk-shell.xml		\
	wayland/protocol/xdg-shell.xml		\
	$(NULL)

libmutter_la_SOURCES =				\
	backends/meta-backend.c			\
	meta/meta-backend.h			\
	backends/meta-backend-private.h		\
	backends/meta-barrier.c			\
	backends/meta-barrier-private.h		\
	backends/meta-cursor.c			\
	backends/meta-cursor.h			\
	backends/meta-cursor-private.h		\
	backends/meta-cursor-tracker.c		\
	backends/meta-cursor-tracker-private.h	\
	backends/meta-cursor-renderer.c		\
	backends/meta-cursor-renderer.h		\
	backends/meta-display-config-shared.h	\
	backends/meta-idle-monitor.c		\
	backends/meta-idle-monitor-private.h	\
	backends/meta-idle-monitor-dbus.c	\
	backends/meta-idle-monitor-dbus.h	\
	backends/meta-input-settings.c		\
	backends/meta-input-settings-private.h	\
	backends/meta-monitor-config.c		\
	backends/meta-monitor-config.h		\
	backends/meta-monitor-manager.c		\
	meta/meta-monitor-manager.h		\
	backends/meta-monitor-manager-private.h	\
	backends/meta-monitor-manager-dummy.c	\
	backends/meta-monitor-manager-dummy.h	\
	backends/meta-stage.h			\
	backends/meta-stage.c			\
	backends/edid-parse.c			\
	backends/edid.h				\
	backends/x11/meta-backend-x11.c			\
	backends/x11/meta-backend-x11.h			\
	backends/x11/meta-barrier-x11.c			\
	backends/x11/meta-barrier-x11.h			\
	backends/x11/meta-cursor-renderer-x11.c		\
	backends/x11/meta-cursor-renderer-x11.h		\
	backends/x11/meta-idle-monitor-xsync.c		\
	backends/x11/meta-idle-monitor-xsync.h		\
	backends/x11/meta-input-settings-x11.c		\
	backends/x11/meta-input-settings-x11.h		\
	backends/x11/meta-monitor-manager-xrandr.c	\
	backends/x11/meta-monitor-manager-xrandr.h	\
	core/meta-accel-parse.c			\
	core/meta-accel-parse.h			\
	meta/barrier.h				\
	core/bell.c				\
	core/bell.h				\
	core/boxes.c				\
	core/boxes-private.h			\
	meta/boxes.h				\
	compositor/clutter-utils.c		\
	compositor/clutter-utils.h		\
	compositor/cogl-utils.c			\
	compositor/cogl-utils.h			\
	compositor/compositor.c			\
	compositor/compositor-private.h		\
	compositor/meta-background.c		\
	compositor/meta-background-private.h	\
	compositor/meta-background-actor.c	\
	compositor/meta-background-actor-private.h	\
	compositor/meta-background-image.c	\
	compositor/meta-background-group.c	\
	compositor/meta-cullable.c		\
	compositor/meta-cullable.h		\
	compositor/meta-dnd-actor.c		\
	compositor/meta-dnd-actor-private.h	\
	compositor/meta-feedback-actor.c	\
	compositor/meta-feedback-actor-private.h	\
	compositor/meta-module.c		\
	compositor/meta-module.h		\
	compositor/meta-plugin.c		\
	compositor/meta-plugin-manager.c	\
	compositor/meta-plugin-manager.h	\
	compositor/meta-shadow-factory.c	\
	compositor/meta-shaped-texture.c	\
	compositor/meta-shaped-texture-private.h 	\
	compositor/meta-surface-actor.c		\
	compositor/meta-surface-actor.h		\
	compositor/meta-surface-actor-x11.c	\
	compositor/meta-surface-actor-x11.h	\
	compositor/meta-sync-ring.c		\
	compositor/meta-sync-ring.h		\
	compositor/meta-texture-rectangle.c	\
	compositor/meta-texture-rectangle.h	\
	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		\
	compositor/meta-window-shape.c		\
	compositor/region-utils.c		\
	compositor/region-utils.h		\
	meta/compositor.h			\
	meta/meta-background.h			\
	meta/meta-background-actor.h		\
	meta/meta-background-image.h		\
	meta/meta-background-group.h		\
	meta/meta-plugin.h			\
	meta/meta-shadow-factory.h		\
	meta/meta-window-actor.h		\
	meta/meta-window-shape.h		\
	meta/compositor-mutter.h 		\
	core/constraints.c			\
	core/constraints.h			\
	core/core.c				\
	core/delete.c				\
	core/display.c				\
	core/display-private.h			\
	meta/display.h				\
	core/edge-resistance.c			\
	core/edge-resistance.h			\
	core/events.c				\
	core/events.h				\
	core/errors.c				\
	meta/errors.h				\
	core/frame.c				\
	core/frame.h				\
	core/meta-gesture-tracker.c		\
	core/meta-gesture-tracker-private.h	\
	core/keybindings.c			\
	core/keybindings-private.h		\
	core/main.c				\
	core/place.c				\
	core/place.h				\
	core/prefs.c				\
	meta/prefs.h				\
	core/screen.c				\
	core/screen-private.h			\
	meta/screen.h				\
	meta/types.h				\
	core/restart.c				\
	core/stack.c				\
	core/stack.h				\
	core/stack-tracker.c			\
	core/stack-tracker.h			\
	core/util.c				\
	meta/util.h				\
	core/util-private.h			\
	core/window.c				\
	core/window-private.h			\
	meta/window.h				\
	core/workspace.c			\
	core/workspace-private.h		\
	meta/common.h				\
	core/core.h				\
	ui/ui.h					\
	ui/frames.c				\
	ui/frames.h				\
	ui/theme.c				\
	meta/theme.h				\
	ui/theme-private.h			\
	ui/ui.c					\
	x11/atomnames.h				\
	x11/events.c				\
	x11/events.h				\
	x11/group-private.h			\
	x11/group-props.c			\
	x11/group-props.h			\
	x11/group.c				\
	meta/group.h				\
	x11/iconcache.c				\
	x11/iconcache.h				\
	x11/session.c				\
	x11/session.h				\
	x11/window-props.c			\
	x11/window-props.h			\
	x11/window-x11.c			\
	x11/window-x11.h			\
	x11/window-x11-private.h		\
	x11/xprops.c				\
	x11/xprops.h				\
	x11/mutter-Xatomtype.h			\
	$(NULL)

if HAVE_WAYLAND
libmutter_la_SOURCES +=				\
	compositor/meta-surface-actor-wayland.c	\
	compositor/meta-surface-actor-wayland.h	\
	wayland/meta-wayland.c			\
	wayland/meta-wayland.h			\
	wayland/meta-wayland-private.h		\
	wayland/meta-xwayland.c			\
	wayland/meta-xwayland.h			\
	wayland/meta-xwayland-selection.c	\
	wayland/meta-xwayland-selection-private.h	\
	wayland/meta-xwayland-private.h		\
	wayland/meta-wayland-buffer.c      	\
	wayland/meta-wayland-buffer.h      	\
	wayland/meta-wayland-region.c      	\
	wayland/meta-wayland-region.h      	\
	wayland/meta-wayland-data-device.c      \
	wayland/meta-wayland-data-device.h      \
	wayland/meta-wayland-data-device-private.h	\
	wayland/meta-wayland-pointer-gesture-swipe.c	\
	wayland/meta-wayland-pointer-gesture-swipe.h	\
	wayland/meta-wayland-keyboard.c		\
	wayland/meta-wayland-keyboard.h		\
	wayland/meta-wayland-pointer.c		\
	wayland/meta-wayland-pointer.h		\
	wayland/meta-wayland-popup.c		\
	wayland/meta-wayland-popup.h		\
	wayland/meta-wayland-seat.c		\
	wayland/meta-wayland-seat.h		\
	wayland/meta-wayland-touch.c		\
	wayland/meta-wayland-touch.h		\
	wayland/meta-wayland-surface.c		\
	wayland/meta-wayland-surface.h		\
	wayland/meta-wayland-types.h		\
	wayland/meta-wayland-versions.h		\
	wayland/meta-wayland-outputs.c		\
	wayland/meta-wayland-outputs.h		\
	wayland/meta-window-wayland.c		\
	wayland/meta-window-wayland.h		\
	$(NULL)
endif

if HAVE_NATIVE_BACKEND
libmutter_la_SOURCES +=					\
	backends/native/meta-backend-native.c		\
	backends/native/meta-backend-native.h		\
	backends/native/meta-backend-native-private.h	\
	backends/native/meta-barrier-native.c		\
	backends/native/meta-barrier-native.h		\
	backends/native/meta-cursor-renderer-native.c	\
	backends/native/meta-cursor-renderer-native.h	\
	backends/native/meta-idle-monitor-native.c	\
	backends/native/meta-idle-monitor-native.h	\
	backends/native/meta-input-settings-native.c	\
	backends/native/meta-input-settings-native.h	\
	backends/native/meta-monitor-manager-kms.c	\
	backends/native/meta-monitor-manager-kms.h	\
	backends/native/meta-launcher.c			\
	backends/native/meta-launcher.h			\
	backends/native/dbus-utils.c			\
	backends/native/dbus-utils.h			\
	$(NULL)
endif

nodist_libmutter_la_SOURCES = $(mutter_built_sources)

libmutter_la_LDFLAGS = -no-undefined -export-symbols-regex "^(meta|ag)_.*"
libmutter_la_LIBADD  = $(MUTTER_LIBS) $(MUTTER_NATIVE_BACKEND_LIBS)

# Headers installed for plugins; introspected information will
# be extracted into Mutter-<version>.gir
libmutterinclude_headers =			\
	meta/barrier.h				\
	meta/boxes.h				\
	meta/common.h				\
	meta/compositor-mutter.h		\
	meta/compositor.h			\
	meta/display.h				\
	meta/errors.h				\
	meta/group.h				\
	meta/keybindings.h			\
	meta/main.h				\
	meta/meta-backend.h			\
	meta/meta-background.h			\
	meta/meta-background-actor.h		\
	meta/meta-background-image.h		\
	meta/meta-background-group.h		\
	meta/meta-cursor-tracker.h		\
	meta/meta-idle-monitor.h		\
	meta/meta-plugin.h			\
	meta/meta-monitor-manager.h		\
	meta/meta-shaped-texture.h		\
	meta/meta-shadow-factory.h		\
	meta/meta-window-actor.h		\
	meta/meta-window-shape.h		\
	meta/prefs.h				\
	meta/screen.h				\
	meta/theme.h				\
	meta/types.h				\
	meta/util.h				\
	meta/window.h				\
	meta/workspace.h			\
	$(NULL)

libmutterinclude_built_headers =		\
	meta/meta-version.h			\
	meta/meta-enum-types.h			\
	$(NULL)

libmutterinclude_base_headers =			\
	$(libmutterinclude_headers)		\
	$(libmutterinclude_built_headers)

libmutterincludedir = $(includedir)/mutter/meta

libmutterinclude_HEADERS =			\
	$(libmutterinclude_headers)

nodist_libmutterinclude_HEADERS =		\
	$(libmutterinclude_built_headers)

bin_PROGRAMS=mutter
noinst_PROGRAMS=

mutter_SOURCES = core/mutter.c
mutter_LDADD = $(MUTTER_LIBS) libmutter.la

libexec_PROGRAMS = mutter-restart-helper
mutter_restart_helper_SOURCES = core/restart-helper.c
mutter_restart_helper_LDADD = $(MUTTER_LIBS)

include Makefile-tests.am

if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)

# 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

# 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

INTROSPECTION_GIRS = Meta-$(api_version).gir

Meta-$(api_version).gir: libmutter.la
@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
@META_GIR@_EXPORT_PACKAGES = libmutter
@META_GIR@_CFLAGS = $(AM_CPPFLAGS)
@META_GIR@_LIBS = libmutter.la
@META_GIR@_FILES =				\
	$(libmutterinclude_base_headers)	\
	$(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES))
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error

endif

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

CLEANFILES =					\
	$(mutter_built_sources)			\
	$(typelib_DATA)				\
	$(gir_DATA)

DISTCLEANFILES = 				\
	$(libmutterinclude_built_headers)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmutter.pc

EXTRA_DIST +=					\
	$(wayland_protocols)			\
	libmutter.pc.in				\
	meta-enum-types.h.in			\
	meta-enum-types.c.in			\
	org.freedesktop.login1.xml		\
	org.gnome.Mutter.DisplayConfig.xml	\
	org.gnome.Mutter.IdleMonitor.xml	\
	$(NULL)

BUILT_SOURCES =					\
	$(mutter_built_sources)			\
	$(libmutterinclude_built_headers)

MUTTER_STAMP_FILES = stamp-meta-enum-types.h
CLEANFILES += $(MUTTER_STAMP_FILES)

meta/meta-enum-types.h: stamp-meta-enum-types.h Makefile
	@true
stamp-meta-enum-types.h: $(libmutterinclude_headers) meta-enum-types.h.in
	$(AM_V_GEN) ( cd $(srcdir) && \
	  $(GLIB_MKENUMS) \
	    --template meta-enum-types.h.in \
	  $(libmutterinclude_base_headers) ) >> xgen-teth && \
	(cmp -s xgen-teth meta/meta-enum-types.h || cp xgen-teth meta/meta-enum-types.h) && \
	rm -f xgen-teth && \
	echo timestamp > $(@F)

meta-enum-types.c: stamp-meta-enum-types.h meta-enum-types.c.in
	  $(AM_V_GEN) ( cd $(srcdir) && \
	  $(GLIB_MKENUMS) \
	    --template meta-enum-types.c.in \
	  $(libmutterinclude_base_headers) ) >> xgen-tetc && \
	cp xgen-tetc meta-enum-types.c && \
	rm -f xgen-tetc

dbus_display_config_built_sources = meta-dbus-display-config.c meta-dbus-display-config.h

$(dbus_display_config_built_sources) : Makefile.am org.gnome.Mutter.DisplayConfig.xml
	$(AM_V_GEN)gdbus-codegen							\
		--interface-prefix org.gnome.Mutter					\
		--c-namespace MetaDBus							\
		--generate-c-code meta-dbus-display-config				\
		$(srcdir)/org.gnome.Mutter.DisplayConfig.xml

$(dbus_idle_built_sources) : Makefile.am org.gnome.Mutter.IdleMonitor.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)/org.gnome.Mutter.IdleMonitor.xml

dbus_login1_built_sources = meta-dbus-login1.c meta-dbus-login1.h

$(dbus_login1_built_sources) : Makefile.am org.freedesktop.login1.xml
	$(AM_V_GEN)gdbus-codegen							\
		--interface-prefix org.freedesktop.login1				\
		--c-namespace Login1							\
		--generate-c-code meta-dbus-login1					\
		$(srcdir)/org.freedesktop.login1.xml

%-protocol.c : $(srcdir)/wayland/protocol/%.xml
	$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
%-server-protocol.h : $(srcdir)/wayland/protocol/%.xml
	$(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@