Makefile.am 8.71 KB
Newer Older
Perberos's avatar
Perberos committed
1 2 3 4 5
## We require new-style dependency handling.
AUTOMAKE_OPTIONS = 1.7

NULL =

6
saverdir = $(libexecdir)/xfce4-screensaver
Perberos's avatar
Perberos committed
7 8
themesdir = $(pkgdatadir)/themes

9
AM_CPPFLAGS =							\
Perberos's avatar
Perberos committed
10 11
	-I.							\
	-I$(srcdir)						\
12
	-DMATEMENU_I_KNOW_THIS_IS_UNSTABLE			\
Perberos's avatar
Perberos committed
13 14 15 16
	$(MATE_SCREENSAVER_CFLAGS)				\
	$(MATE_SCREENSAVER_DIALOG_CFLAGS)			\
	$(MATE_SCREENSAVER_CAPPLET_CFLAGS)			\
	$(DISABLE_DEPRECATED_CFLAGS)				\
17
	-DPREFIX=\""$(prefix)"\"				\
Perberos's avatar
Perberos committed
18
	-DBINDIR=\""$(bindir)"\"				\
19
	-DLIBDIR=\""$(libdir)"\"				\
Perberos's avatar
Perberos committed
20 21
	-DLIBEXECDIR=\""$(libexecdir)"\"			\
	-DDATADIR=\""$(datadir)"\"				\
22 23
	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
	-DMATELOCALEDIR=\""$(datadir)/locale"\"			\
Perberos's avatar
Perberos committed
24 25
	-DSAVERDIR=\""$(saverdir)"\"				\
	-DTHEMESDIR=\""$(themesdir)"\"				\
26
	-DGTKBUILDERDIR=\"$(pkgdatadir)\"			\
27
	-DPAM_SERVICE_NAME=\""xfce4-screensaver"\"		\
Perberos's avatar
Perberos committed
28 29 30 31 32
	$(WARN_CFLAGS)						\
	$(AUTH_CFLAGS)						\
	$(DEBUG_CFLAGS)						\
	$(DBUS_CFLAGS)						\
	$(LIBMATEKBDUI_CFLAGS)					\
33
	$(LIBNOTIFY_CFLAGS)					\
34
	$(LIBXKLAVIER_CFLAGS)				\
35
	$(SYSTEMD_CFLAGS)					\
Perberos's avatar
Perberos committed
36 37 38
	$(NULL)

bin_PROGRAMS = \
39 40 41
	xfce4-screensaver		\
	xfce4-screensaver-command	\
	xfce4-screensaver-preferences	\
Perberos's avatar
Perberos committed
42 43 44
	$(NULL)

libexec_PROGRAMS = \
45 46
	xfce4-screensaver-dialog	\
	xfce4-screensaver-gl-helper	\
Perberos's avatar
Perberos committed
47 48 49 50 51 52 53 54 55 56
	$(NULL)

noinst_PROGRAMS = 	\
	test-fade	\
	test-passwd	\
	test-watcher	\
	test-window	\
	$(NULL)

desktopdir = $(sysconfdir)/xdg/autostart
57
desktop_in_files = xfce4-screensaver.desktop.in
Perberos's avatar
Perberos committed
58 59 60
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

61 62
xfce4_screensaver_command_SOURCES = 	\
	xfce4-screensaver-command.c	\
Perberos's avatar
Perberos committed
63 64
	$(NULL)

65
xfce4_screensaver_command_LDADD =	\
Perberos's avatar
Perberos committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79
	$(MATE_SCREENSAVER_COMMAND_LIBS)	\
	$(NULL)

AUTH_SOURCES = 			\
	gs-auth.h		\
	gs-auth-@AUTH_SCHEME@.c	\
	$(NULL)

test_fade_SOURCES = 			\
	test-fade.c 			\
	gs-fade.c	 		\
	gs-fade.h	 		\
	gs-debug.c			\
	gs-debug.h			\
80 81
	xfce-rr.c			\
	xfce-rr.h			\
Perberos's avatar
Perberos committed
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
	$(NULL)

test_fade_LDADD =			\
	$(MATE_SCREENSAVER_LIBS)	\
	$(SAVER_LIBS)			\
	$(NULL)

test_passwd_SOURCES = 			\
	test-passwd.c 			\
	$(AUTH_SOURCES)			\
	setuid.c			\
	setuid.h			\
	subprocs.c			\
	subprocs.h			\
	$(NULL)

test_passwd_LDADD =			\
	$(MATE_SCREENSAVER_DIALOG_LIBS)\
	$(AUTH_LIBS)			\
	$(NULL)

test_watcher_SOURCES =			\
	test-watcher.c			\
	gs-watcher.h			\
	gs-watcher-x11.c		\
	gs-marshal.c 			\
	gs-marshal.h			\
	gs-debug.c			\
	gs-debug.h			\
	$(NULL)

test_watcher_LDADD =			\
	$(MATE_SCREENSAVER_LIBS)	\
	$(SAVER_LIBS)			\
	$(NULL)

test_window_SOURCES =			\
	test-window.c			\
	gs-window.h			\
	gs-window-x11.c			\
	gs-grab-x11.c			\
	gs-grab.h			\
	gs-marshal.c 			\
	gs-marshal.h			\
	gs-debug.c			\
	gs-debug.h			\
	subprocs.c			\
	subprocs.h			\
	$(NULL)

test_window_LDADD =			\
	$(MATE_SCREENSAVER_LIBS)	\
	$(SAVER_LIBS)			\
	$(NULL)

137 138
xfce4_screensaver_dialog_SOURCES = 	\
	xfce4-screensaver-dialog.c	\
Perberos's avatar
Perberos committed
139 140 141 142 143 144 145 146
	gs-lock-plug.c			\
	gs-lock-plug.h			\
	gs-debug.c			\
	gs-debug.h			\
	setuid.c			\
	setuid.h			\
	subprocs.c			\
	subprocs.h			\
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
	xfce-desktop-utils.c		\
	xfce-desktop-utils.h		\
	xfcekbd-indicator.c		\
	xfcekbd-indicator.h		\
	xfcekbd-indicator-config.c		\
	xfcekbd-indicator-config.h		\
	xfcekbd-config-private.h		\
	xfcekbd-desktop-config.c \
	xfcekbd-desktop-config.h \
	xfcekbd-keyboard-config.c \
	xfcekbd-keyboard-config.h \
	xfcekbd-util.c \
	xfcekbd-util.h \
	desktop-entries.c \
	desktop-entries.h \
	menu-layout.c \
	menu-layout.h \
	menu-util.c \
	menu-util.h \
	menu-monitor.c \
	menu-monitor.h \
	canonicalize.c \
	canonicalize.h \
	entry-directories.c \
	entry-directories.h \
Perberos's avatar
Perberos committed
172 173 174
	$(AUTH_SOURCES)			\
	$(NULL)

175
EXTRA_xfce4_screensaver_dialog_SOURCES = \
Perberos's avatar
Perberos committed
176 177 178
	gs-auth-pam.c		\
	gs-auth-helper.c	\
	gs-auth-pwent.c		\
179
	gs-auth-bsdauth.c	\
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
	xfce-desktop-utils.c		\
	xfce-desktop-utils.h		\
	xfcekbd-indicator.c		\
	xfcekbd-indicator.h		\
	xfcekbd-indicator-config.c		\
	xfcekbd-indicator-config.h		\
	xfcekbd-config-private.h		\
	xfcekbd-desktop-config.c \
	xfcekbd-desktop-config.h \
	xfcekbd-keyboard-config.c \
	xfcekbd-keyboard-config.h \
	xfcekbd-util.c \
	xfcekbd-util.h \
	desktop-entries.c \
	desktop-entries.h \
	menu-layout.c \
	menu-layout.h \
	menu-util.c \
	menu-util.h \
	menu-monitor.c \
	menu-monitor.h \
	canonicalize.c \
	canonicalize.h \
	entry-directories.c \
	entry-directories.h \
Perberos's avatar
Perberos committed
205 206
	$(NULL)

207
xfce4_screensaver_dialog_LDADD =	\
Perberos's avatar
Perberos committed
208
	$(MATE_SCREENSAVER_DIALOG_LIBS)\
209
	$(MATE_SCREENSAVER_LIBS)\
Perberos's avatar
Perberos committed
210 211 212
	$(SAVER_LIBS)			\
	$(AUTH_LIBS)			\
	$(LIBMATEKBDUI_LIBS)		\
213
	$(LIBNOTIFY_LIBS)		\
Perberos's avatar
Perberos committed
214 215 216 217 218
	$(NULL)

BUILT_SOURCES = 		\
	gs-marshal.c 		\
	gs-marshal.h		\
219
	xfcekbd-indicator-marshal.h \
Perberos's avatar
Perberos committed
220 221 222 223 224 225 226 227 228
	$(NULL)

gs-marshal.c: gs-marshal.list
	echo "#include \"gs-marshal.h\"" > $@ && \
	@GLIB_GENMARSHAL@ $< --prefix=gs_marshal --body >> $@

gs-marshal.h: gs-marshal.list
	@GLIB_GENMARSHAL@ $< --prefix=gs_marshal --header > $@

229 230 231
xfce4_screensaver_SOURCES =	\
	xfce4-screensaver.c	\
	xfce4-screensaver.h	\
Perberos's avatar
Perberos committed
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
	gs-monitor.c		\
	gs-monitor.h		\
	gs-watcher-x11.c	\
	gs-watcher.h		\
	gs-listener-dbus.c	\
	gs-listener-dbus.h	\
	gs-manager.c		\
	gs-manager.h		\
	gs-window-x11.c		\
	gs-window.h		\
	gs-prefs.c		\
	gs-prefs.h		\
	gs-theme-manager.c	\
	gs-theme-manager.h	\
	gs-job.c		\
	gs-job.h		\
	gs-debug.c		\
	gs-debug.h		\
	subprocs.c		\
	subprocs.h		\
	gs-grab-x11.c		\
	gs-grab.h		\
	gs-fade.c		\
	gs-fade.h		\
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
	xfce-rr.c		\
	xfce-rr.h		\
	xfce-bg.c		\
	xfce-bg.h		\
	xfce-desktop-thumbnail.c		\
	xfce-desktop-thumbnail.h		\
	xfce-desktop-utils.c		\
	xfce-desktop-utils.h		\
	xfcekbd-indicator.c		\
	xfcekbd-indicator.h		\
	xfcekbd-indicator-config.c		\
	xfcekbd-indicator-config.h		\
	xfcekbd-config-private.h		\
	xfcekbd-desktop-config.c \
	xfcekbd-desktop-config.h \
	xfcekbd-keyboard-config.c \
	xfcekbd-keyboard-config.h \
	xfcekbd-util.c \
	xfcekbd-util.h \
	xfcemenu-tree.c \
	xfcemenu-tree.h \
	desktop-entries.c \
	desktop-entries.h \
	menu-layout.c \
	menu-layout.h \
	menu-util.c \
	menu-util.h \
	menu-monitor.c \
	menu-monitor.h \
	canonicalize.c \
	canonicalize.h \
	entry-directories.c \
	entry-directories.h \
Perberos's avatar
Perberos committed
289 290 291
	$(BUILT_SOURCES)	\
	$(NULL)

292
xfce4_screensaver_gl_helper_LDADD =	\
Perberos's avatar
Perberos committed
293 294 295 296
	$(MATE_SCREENSAVER_LIBS)	\
	$(GL_LIBS)			\
	$(NULL)

297 298
xfce4_screensaver_gl_helper_SOURCES =	\
	xfce4-screensaver-gl-helper.c	\
Perberos's avatar
Perberos committed
299 300 301 302
	gs-visual-gl.c			\
	gs-visual-gl.h			\
	$(NULL)

303
xfce4_screensaver_LDADD =		\
Perberos's avatar
Perberos committed
304 305
	$(MATE_SCREENSAVER_LIBS)	\
	$(SAVER_LIBS)			\
306
	$(SYSTEMD_LIBS)			\
Perberos's avatar
Perberos committed
307 308
	$(NULL)

309
xfce4_screensaver_LDFLAGS = -export-dynamic
Perberos's avatar
Perberos committed
310

311 312
xfce4_screensaver_preferences_SOURCES =	\
	xfce4-screensaver-preferences.c	\
Perberos's avatar
Perberos committed
313 314 315 316 317 318 319 320 321 322
	copy-theme-dialog.c		\
	copy-theme-dialog.h		\
	gs-theme-manager.c		\
	gs-theme-manager.h		\
	gs-job.c			\
	gs-job.h			\
	gs-debug.c			\
	gs-debug.h			\
	subprocs.c			\
	subprocs.h			\
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
	xfce-desktop-utils.c		\
	xfce-desktop-utils.h		\
	xfcekbd-indicator.c		\
	xfcekbd-indicator.h		\
	xfcekbd-indicator-config.c		\
	xfcekbd-indicator-config.h		\
	xfcekbd-config-private.h		\
	xfcekbd-desktop-config.c \
	xfcekbd-desktop-config.h \
	xfcekbd-keyboard-config.c \
	xfcekbd-keyboard-config.h \
	xfcekbd-util.c \
	xfcekbd-util.h \
	xfcemenu-tree.c \
	xfcemenu-tree.h \
	canonicalize.c \
	canonicalize.h \
	entry-directories.c \
	entry-directories.h \
	menu-util.c \
	menu-util.h \
	menu-layout.c \
	menu-layout.h \
	menu-monitor.c \
	menu-monitor.h \
	desktop-entries.c \
	desktop-entries.h \
Perberos's avatar
Perberos committed
350 351
	$(NULL)

352
xfce4_screensaver_preferences_LDADD =	\
Perberos's avatar
Perberos committed
353 354 355 356 357 358
	$(MATE_SCREENSAVER_CAPPLET_LIBS)	\
	$(NULL)

EXTRA_DIST =				\
	debug-screensaver.sh		\
	gs-marshal.list			\
359
	xfce4-screensaver.desktop.in	\
Perberos's avatar
Perberos committed
360 361
	$(NULL)

362 363 364 365 366 367 368 369
GLIB_GENMARSHAL = $(shell pkg-config --variable=glib_genmarshal glib-2.0)

xfcekbd-indicator-marshal.h: xfcekbd-indicator-marshal.list
	$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=xfcekbd_indicator $(srcdir)/xfcekbd-indicator-marshal.list --header > $@

xfcekbd-indicator-marshal.c: xfcekbd-indicator-marshal.h
	$(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=xfcekbd_indicator $(srcdir)/xfcekbd-indicator-marshal.list --body > $@

Perberos's avatar
Perberos committed
370 371
CLEANFILES = 				\
	$(desktop_DATA) 		\
372
	xfce4-screensaver.desktop.in	\
Perberos's avatar
Perberos committed
373 374 375 376 377 378 379 380 381
	$(BUILT_SOURCES)

MAINTAINERCLEANFILES =			\
	*~				\
	Makefile.in

install-exec-hook:
	@if [ "x@NEED_SETUID@" = "xyes" ]; then \
	    echo "***" ; \
382
	    echo "***  Warning: xfce4-screensaver has been compiled with support for" ; \
383 384 385 386 387 388 389
	    if [ "x@AUTH_SCHEME@" = "xbsdauth" ]; then \
		echo "***           bsd_auth(3) and must be installed as a setuid root" ; \
	    else \
	        echo "***           shadow passwords. If your system actually uses shadow" ; \
	        echo "***           passwords then it must be installed as a setuid root" ; \
	    fi; \
	    echo "***           program in order for locking to work. To do this, you" ; \
Perberos's avatar
Perberos committed
390 391
	    echo "***           must run:" ; \
	    echo "***" ; \
392 393
	    echo "***           chown root $(DESTDIR)$(libexecdir)/xfce4-screensaver-dialog" ; \
	    echo "***           chmod +s $(DESTDIR)$(libexecdir)/xfce4-screensaver-dialog" ; \
Perberos's avatar
Perberos committed
394 395 396 397 398
	    echo "***" ; \
	    echo "***           For now, it will be installed non-setuid, which" ; \
	    echo "***           means that locking might not work." ; \
	    echo "***" ; \
	fi