1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-2004 Jamie Zawinski.
2 # the `../configure' script generates `driver/Makefile' from this file.
10 top_srcdir = @top_srcdir@
15 exec_prefix = @exec_prefix@
18 datadir = $(GNOME_DATADIR)
19 localedir = $(datadir)/locale
22 manNdir = $(mandir)/man$(mansuffix)
24 INTLTOOL_MERGE = @INTLTOOL_MERGE@
26 GNOME_DATADIR = @GNOME_DATADIR@
27 GNOME_CCDIR_1 = $(GNOME_DATADIR)/control-center/Desktop
28 GNOME_CCDIR_2 = $(GNOME_DATADIR)/control-center/capplets
29 GNOME_CCDIR_3 = $(GNOME_DATADIR)/control-center-2.0/capplets
30 GNOME_PANELDIR1 = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
31 GNOME_PANELDIR2 = $(GNOME_DATADIR)/applications
32 GNOME_PANELDIR = @GNOME_PANELDIR@
33 GLADE_DATADIR = @GLADE_DATADIR@
34 GNOME_ICONDIR = $(GNOME_DATADIR)/pixmaps
35 GNOME_BINDIR = $(bindir)
36 HACK_CONF_DIR = @HACK_CONF_DIR@
43 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
44 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
45 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GLADE_DATADIR)"'
46 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
49 INTL_LIBS = @INTLLIBS@
50 JPEG_LIBS = @JPEG_LIBS@
54 DEPEND_FLAGS = @DEPEND_FLAGS@
55 DEPEND_DEFINES = @DEPEND_DEFINES@
59 SUID_FLAGS = -o root -m 4755
60 INSTALL_PROGRAM = @INSTALL_PROGRAM@
61 INSTALL_SCRIPT = @INSTALL_SCRIPT@
62 INSTALL_SETUID = @INSTALL_SETUID@
63 INSTALL_DATA = @INSTALL_DATA@
64 INSTALL_DIRS = @INSTALL_DIRS@
68 X_PRE_LIBS = @X_PRE_LIBS@
69 X_EXTRA_LIBS = @X_EXTRA_LIBS@
75 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
76 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
77 # and that must come before -lX11. (e.g., -lSM and -lICE.)
78 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
79 # (e.g., -lsocket, -lnsl, etc.)
81 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
83 # SAVER_LIBS is the link line for "xscreensaver", and
84 # CMD_LIBS is the link line for "xscreensaver-command".
85 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
88 AD_DIR = @APPDEFAULTS@
90 PAM_CONF = /etc/pam.conf
92 UTILS_SRC = $(srcdir)/../utils
95 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
97 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
98 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
100 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
101 demo-Gtk-widgets.c demo-Gtk-support.c
102 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
103 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
105 PWENT_SRCS = passwd-pwent.c
106 PWENT_OBJS = passwd-pwent.o
108 KERBEROS_SRCS = passwd-kerberos.c
109 KERBEROS_OBJS = passwd-kerberos.o
111 PAM_SRCS = passwd-pam.c
112 PAM_OBJS = passwd-pam.o
114 PWHELPER_SRCS = passwd-helper.c
115 PWHELPER_OBJS = passwd-helper.o
117 LOCK_SRCS_1 = lock.c passwd.c
118 LOCK_OBJS_1 = lock.o passwd.o
119 NOLOCK_SRCS_1 = lock.c
120 NOLOCK_OBJS_1 = lock.o
122 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
123 test-apm.c test-fade.c test-xinerama.c test-vp.c \
124 test-randr.c xdpyinfo.c
125 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
126 test-apm test-fade test-xinerama test-vp \
129 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
130 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
131 XML_LIBS = @XML_LIBS@
133 XDPMS_LIBS = @XDPMS_LIBS@
135 PASSWD_SRCS = @PASSWD_SRCS@
136 PASSWD_OBJS = @PASSWD_OBJS@
137 PASSWD_LIBS = @PASSWD_LIBS@
139 LOCK_SRCS = @LOCK_SRCS@
140 LOCK_OBJS = @LOCK_OBJS@
142 XMU_SRCS = @XMU_SRCS@
143 XMU_OBJS = @XMU_OBJS@
145 GL_SRCS = @SAVER_GL_SRCS@
146 GL_OBJS = @SAVER_GL_OBJS@
147 GL_LIBS = @SAVER_GL_LIBS@
149 ICON_SRC = $(UTILS_SRC)/images
150 LOGO = $(ICON_SRC)/logo-50.xpm
151 GTK_ICONS = $(ICON_SRC)/screensaver-*.png
153 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
154 $(UTILS_SRC)/visual.c
155 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
156 $(UTILS_BIN)/visual.o
158 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
159 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
161 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
162 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
165 GETIMG_SRCS_1 = xscreensaver-getimage.c
166 GETIMG_OBJS_1 = xscreensaver-getimage.o
168 GETIMG_SRCS = $(GETIMG_SRCS_1) \
169 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
170 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
171 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
172 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
173 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
175 GETIMG_OBJS = $(GETIMG_OBJS_1) \
176 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
177 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
178 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
179 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
180 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
182 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
183 xset.c splash.c setuid.c stderr.c
184 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
185 xset.o splash.o setuid.o stderr.o
187 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
188 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
189 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
190 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
192 CMD_SRCS = remote.c xscreensaver-command.c
193 CMD_OBJS = remote.o xscreensaver-command.o
195 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
196 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
198 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
199 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
201 PDF2JPEG_SRCS = pdf2jpeg.m
202 PDF2JPEG_OBJS = pdf2jpeg.o
203 PDF2JPEG_LIBS = -framework Cocoa
205 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
206 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
207 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
210 CMD_LIBS = $(LIBS) $(X_LIBS) \
211 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
213 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
214 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
216 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
217 xscreensaver-getimage @EXES_OSX@
218 EXES2 = @ALL_DEMO_PROGRAMS@
221 SCRIPTS_1 = xscreensaver-getimage-file xscreensaver-getimage-video
222 SCRIPTS_OSX = xscreensaver-getimage-desktop
223 SCRIPTS = $(SCRIPTS_1) @SCRIPTS_OSX@
225 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
226 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
228 MEN_1 = xscreensaver.man xscreensaver-demo.man \
229 xscreensaver-command.man \
230 xscreensaver-getimage.man \
231 xscreensaver-getimage-file.man \
232 xscreensaver-getimage-video.man
233 MEN_OSX = xscreensaver-getimage-desktop.man pdf2jpeg.man
234 MEN = $(MEN_1) @MEN_OSX@
236 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
237 xscreensaver-demo.glade xscreensaver-demo.glade2 \
238 xscreensaver-demo.glade2p \
239 screensaver-properties.desktop.in \
240 screensaver-properties-capplet \
241 xscreensaver.kss.in \
243 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
244 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
245 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
247 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
248 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) $(PWHELPER_SRCS) \
249 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
250 $(CMD_SRCS) $(GETIMG_SRCS_1) $(PDF2JPEG_SRCS) $(HDRS) \
251 $(SCRIPTS_1) $(SCRIPTS_OSX) $(MEN_1) $(MEN_OSX) \
256 all: $(EXES) $(EXES2)
259 install: install-program install-ad install-scripts \
260 install-gnome install-kde install-man @INSTALL_PAM@
261 uninstall: uninstall-program uninstall-ad \
262 uninstall-gnome uninstall-kde uninstall-man
265 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
268 install-program: $(EXES)
269 @if [ ! -d $(install_prefix)$(bindir) ]; then \
270 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
272 @inst="$(INSTALL_PROGRAM)" ; \
273 if [ @NEED_SETUID@ = yes ]; then \
274 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
275 if [ "$$me" = root ]; then \
276 inst="$(INSTALL_SETUID)" ; \
280 $$e " ####################################################################";\
281 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
282 $$e " passwords. If your system actually uses shadow passwords," ;\
283 $$e " then xscreensaver must be installed as a setuid root" ;\
284 $$e " program in order for locking to work. To do this, you" ;\
285 $$e " must run 'make install' as 'root', not as '$$me'." ;\
287 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
288 $$e " means that locking might not work. (Try it and see.)" ;\
289 $$e " ####################################################################";\
293 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
294 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
295 @for exe in xscreensaver-command xscreensaver-demo \
296 xscreensaver-getimage @EXES_OSX@ ; do \
297 echo $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
298 $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
301 install-ad: XScreenSaver.ad
302 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
303 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
305 @-echo $(INSTALL_DATA) XScreenSaver.ad \
306 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
307 if $(INSTALL_DATA) XScreenSaver.ad \
308 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
312 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
314 $$e " ####################################################################";\
315 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
316 $$e " That file exists, and is unwritable. It is probably from" ;\
317 $$e " an older version of xscreensaver, and could cause things" ;\
318 $$e " to malfunction. Please delete it!" ;\
319 $$e " ####################################################################";\
324 $$e " ####################################################################";\
325 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
326 $$e " The directory is unwritable. This is probably ok;" ;\
327 $$e " xscreensaver should work without that file." ;\
328 $$e " ####################################################################";\
334 install-scripts: $(SCRIPTS) munge-scripts
335 @for program in $(SCRIPTS); do \
336 if [ -r $$program ] ; then \
339 p=$(srcdir)/$$program ; \
341 echo $(INSTALL_SCRIPT) $$p \
342 $(install_prefix)$(bindir)/$$program ; \
343 $(INSTALL_SCRIPT) $$p \
344 $(install_prefix)$(bindir)/$$program ; \
347 munge-scripts: $(SCRIPTS)
348 @tmp=/tmp/mf.$$$$ ; \
351 for program in $(SCRIPTS); do \
352 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
353 < $(srcdir)/$$program > $$tmp ; \
354 if cmp -s $(srcdir)/$$program $$tmp ; then \
355 echo "$$program unchanged" ; \
358 echo "$$program: setting interpreter to $$perl" ; \
359 cat $$tmp > ./$$program ; \
366 if [ ! -d $(install_prefix)$(manNdir) ]; then \
367 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
369 for man in $$men; do \
370 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
371 echo $(INSTALL_DATA) $(srcdir)/$$man \
372 $(install_prefix)$(manNdir)/$$instname ; \
373 $(INSTALL_DATA) $(srcdir)/$$man \
374 $(install_prefix)$(manNdir)/$$instname ; \
378 @for program in $(EXES) $(SCRIPTS); do \
379 echo rm -f $(install_prefix)$(bindir)/$$program ; \
380 rm -f $(install_prefix)$(bindir)/$$program ; \
384 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
388 for man in $$men; do \
389 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
390 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
391 rm -f $(install_prefix)$(manNdir)/$$instname ; \
395 @src="$(srcdir)/xscreensaver.pam" ; \
396 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
398 dir="$(install_prefix)$(PAM_DIR)" ; \
399 conf="$(PAM_CONF)" ; \
401 if [ -d $$dir ] ; then \
403 if [ -f $$dir/xdm ]; then \
405 elif [ -f $$dir/login ]; then \
409 if [ -z "$$src2" ]; then \
410 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
411 $(INSTALL_DATA) $$src $$dir/$$dest ; \
413 src="xscreensaver.pam.$$$$" ; \
414 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
415 grep '^#%\|^auth' $$src2 > $$src ; \
416 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
417 $(INSTALL_DATA) $$src $$dir/$$dest ; \
422 if [ ! -f $$dir/$$dest ]; then \
425 $$e " ####################################################################";\
426 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
427 $$e " Authentication Modules (PAM). However, we were unable to" ;\
428 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
429 $$e " to work without this file (and old-style password" ;\
430 $$e " authentication will be used instead, which may or may not" ;\
432 $$e " ####################################################################";\
435 elif [ -f $$conf ]; then \
436 if ( grep $$dest $$conf >/dev/null ); then \
437 echo "$$conf unchanged: already has an entry for $$dest" ; \
439 src="pam.conf.$$$$" ; \
440 echo "grep -v $$dest $$conf > $$src" ; \
441 grep -v $$dest $$conf > $$src ; \
442 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
443 echo "$$extras" >> $$src ; \
444 if [ "x$$extras" = "x" ]; then \
445 echo "Error: no login rules in $$conf?" >&2 ; \
447 echo "adding $$dest rules to $$src:" ; \
448 echo "$$extras" | sed 's/^/ /' ; \
450 echo $(INSTALL_DATA) $$src $$conf ; \
451 $(INSTALL_DATA) $$src $$conf ; \
455 if ! ( grep $$dest $$conf >/dev/null ); then \
458 $$e " ####################################################################";\
459 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
460 $$e " Authentication Modules (PAM). However, we were unable to" ;\
461 $$e " install xscreensaver rules in the file $$conf." ;\
462 $$e " PAM is unlikely to work without this (and old-style" ;\
463 $$e " password authentication will be used instead, which may" ;\
464 $$e " or may not work.)" ;\
465 $$e " ####################################################################";\
470 install-gnome:: screensaver-properties.desktop
472 if [ "$(GNOME_DATADIR)" != "" ]; then \
474 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
475 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
476 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
478 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
479 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
480 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
482 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then \
483 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
484 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
486 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
487 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
488 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
491 echo $(INSTALL_DATA) screensaver-properties.desktop \
492 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
494 if $(INSTALL_DATA) screensaver-properties.desktop \
495 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
498 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
501 echo $(INSTALL_DATA) screensaver-properties.desktop \
502 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
504 if $(INSTALL_DATA) screensaver-properties.desktop \
505 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
508 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
511 echo $(INSTALL_DATA) screensaver-properties.desktop \
512 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
514 if $(INSTALL_DATA) screensaver-properties.desktop \
515 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
518 lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)" ;\
521 echo $(INSTALL_DATA) screensaver-properties.desktop \
522 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
523 if $(INSTALL_DATA) screensaver-properties.desktop \
524 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
527 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
530 if [ "$$lost" != "" ]; then \
533 $$e " ####################################################################";\
534 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
536 for f in $$@ ; do echo " $$f/" ; done ;\
537 $$e ' This means the "Screen Saver" section of the Gnome' ;\
538 $$e " Control Center (gnomecc) may not work properly." ;\
539 $$e " ####################################################################";\
545 install-gnome:: screensaver-properties-capplet
546 @if [ "$(GNOME_DATADIR)" != "" ]; then \
547 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
548 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
549 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
551 program=screensaver-properties-capplet ;\
552 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
553 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
554 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
555 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
560 $$e " ####################################################################";\
561 $$e " Warning: unable to install $$program into" ;\
562 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
563 $$e " Without this file, the Gnome session manager will not" ;\
564 $$e " launch xscreensaver properly at login time." ;\
565 $$e " ####################################################################";\
572 # into /usr/share/pixmaps/
573 install-gnome:: $(LOGO)
574 @if [ "$(GNOME_DATADIR)" != "" ]; then \
575 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
576 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
577 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
579 target=xscreensaver.xpm ;\
580 echo $(INSTALL_DATA) $(LOGO) \
581 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
582 $(INSTALL_DATA) $(LOGO) \
583 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
586 # ../utils/images/screensaver-*.png
587 # into /usr/share/xscreensaver/
589 # Should these really go in GLADE_DATADIR (/usr/share/xscreensaver/)
590 # or should they instead go in GNOME_ICONDIR (/usr/share/pixmaps/)?
594 @if [ "$(GLADE_DATADIR)" != "" ]; then \
595 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
596 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
597 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
599 for target in $(GTK_ICONS) ; do \
600 dest=`echo $$target | sed 's@^.*/@@'` ;\
601 echo $(INSTALL_DATA) $$target \
602 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
603 $(INSTALL_DATA) $$target \
604 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
608 # xscreensaver-demo.glade2
609 # into /usr/share/xscreensaver/
610 install-gnome:: xscreensaver-demo.glade2
611 @if [ "$(GLADE_DATADIR)" != "" ]; then \
612 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
613 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
614 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
616 target=xscreensaver-demo.glade2 ;\
617 echo $(INSTALL_DATA) $(srcdir)/$$target \
618 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
619 if $(INSTALL_DATA) $(srcdir)/$$target \
620 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
625 $$e " ####################################################################";\
626 $$e " Warning: unable to install $$target into" ;\
627 $$e " $(install_prefix)$(GLADE_DATADIR)/." ;\
628 $$e " Without this file, xscreensaver-demo will not" ;\
629 $$e " be able to run properly." ;\
630 $$e " ####################################################################";\
637 # screensaver-properties.desktop
638 # into /usr/share/gnome/apps/Settings/Desktop/
640 @if [ "$(GNOME_DATADIR)" != "" ]; then \
641 f=screensaver-properties.desktop ;\
642 echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
643 rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
644 echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
645 rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
646 echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
647 rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
648 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
649 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
652 # screensaver-properties-capplet
653 # into /usr/X11R6/bin/
655 @if [ "$(GNOME_DATADIR)" != "" ]; then \
656 program=screensaver-properties-capplet ;\
657 echo rm -f $(install_prefix)$(bindir)/$$program ;\
658 rm -f $(install_prefix)$(bindir)/$$program ;\
662 # into /usr/share/pixmaps/
664 @if [ "$(GNOME_ICONDIR)" != "" ]; then \
665 target=xscreensaver.xpm ;\
666 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
667 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
670 # ../utils/images/screensaver-*.png
671 # into /usr/share/xscreensaver/
673 @if [ "$(GLADE_DATADIR)" != "" ]; then \
674 for target in $(GTK_ICONS) ; do \
675 dest=`echo $$target | sed 's@^.*/@@'` ;\
676 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
677 rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
683 @src="xscreensaver.kss" ; \
684 if [ "$$KDEDIR" != "" ]; then \
685 dir="$(install_prefix)$$KDEDIR/bin" ; \
686 dest="$$dir/$$src" ; \
687 echo $(INSTALL_SCRIPT) $$src $$dest ; \
688 if $(INSTALL_SCRIPT) $$src $$dest ; then \
693 $$e " ####################################################################";\
694 $$e " Warning: unable to install $$dest" ;\
695 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
696 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
697 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
698 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
699 elif [ -f $$dest ]; then \
700 $$e " That file exists, and is unwritable." ;\
702 $$e " The directory is unwritable." ;\
704 $$e " ####################################################################";\
711 @if [ "$$KDEDIR" != "" ]; then \
712 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
713 echo rm -f $$dest ; \
718 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
721 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
723 # Adds all current dependencies to Makefile
724 depend: XScreenSaver_ad.h
725 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
727 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
728 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
730 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
731 # close. This excludes dependencies on files in /usr/include, etc. It tries
732 # to include only dependencies on files which are themselves a part of this
734 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
735 @echo updating dependencies in `pwd`/Makefile.in... ; \
736 $(DEPEND) -w 0 -f - \
737 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
738 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
739 $(CFLAGS) $(X_CFLAGS) -- \
740 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
741 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
742 $(TEST_SRCS) 2>/dev/null | \
745 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
747 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
748 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
749 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
750 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
751 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
753 ) > /tmp/distdepend.$$$$ && \
754 mv Makefile.in Makefile.in.bak && \
755 mv /tmp/distdepend.$$$$ Makefile.in
757 # Updates the version number in the app-defaults file to be in sync with
758 # the version number in version.h. This is so people can tell when they
759 # have a version skew between the app-defaults file and the executable.
760 # Also update hacks/config/README in the same way.
762 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
763 U=$(UTILS_SRC)/version.h ; \
764 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
765 D=`date '+%d-%b-%Y'` ; \
766 for S in $$files ; do \
767 echo -n "Updating $$S to $$V $$D... " ; \
769 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
770 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
772 if cmp -s $$S $$T ; then \
773 echo "unchanged." ; \
782 @for S in $(MEN); do \
783 U=$(UTILS_SRC)/version.h ; \
784 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
785 V="`date '+%d-%b-%Y'` ($$V)" ; \
786 echo -n "Updating $$S to \"$$V\"... " ; \
788 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
790 if cmp -s $$S $$T ; then \
791 echo "unchanged." ; \
801 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
804 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
809 for exe in $(EXES); do \
810 if ! [ -f $(srcdir)/$$exe.man ]; then \
811 badmen="$$badmen $$exe" ; \
814 if [ -n "$$badmen" ]; then \
816 echo "Warning: The following programs have no manuals:" ; \
818 for m in $$badmen ; do \
825 # Rules for noticing when the objects from the utils directory are out of
826 # date with respect to their sources, and going and building them according
827 # to the rules in their own Makefile...
829 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
830 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
831 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
832 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
833 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
834 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
835 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
836 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
837 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
841 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
843 # How we build object files in this directory.
845 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
848 $(OBJCC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
850 # subprocs takes an extra -D option.
851 subprocs.o: subprocs.c
852 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
855 # demo-Gtk takes extra -D options, and an extra -I option.
856 demo-Gtk.o: demo-Gtk.c
857 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
858 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
861 # demo-Gtk-conf takes an extra -D option.
862 demo-Gtk-conf.o: demo-Gtk-conf.c
863 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
864 $(srcdir)/demo-Gtk-conf.c
867 # How we build the default app-defaults file into the program.
869 XScreenSaver_ad.h: XScreenSaver.ad
870 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
872 @INTLTOOL_DESKTOP_RULE@
874 # The executables linked in this directory.
876 xscreensaver: $(SAVER_OBJS)
877 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
879 xscreensaver-command: $(CMD_OBJS)
880 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
883 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
884 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
885 echo "WARNING: neither GTK nor Motif are available," \
886 "therefore no xscreensaver-demo!" ; \
889 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
890 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
893 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
894 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
895 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
896 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
898 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
899 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
900 $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
901 -lXt -lX11 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
903 xscreensaver-getimage: $(GETIMG_OBJS)
904 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
906 pdf2jpeg: $(PDF2JPEG_OBJS)
907 $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
910 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
911 subprocs.o setuid.o splash.o prefs.o \
913 test-passwd.o: XScreenSaver_ad.h
915 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
916 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
919 $(CC) $(LDFLAGS) -o $@ test-uid.o
921 test-xdpms: test-xdpms.o
922 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
923 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
925 test-xinerama: test-xinerama.o
926 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS)\
927 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
930 $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
931 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
933 test-randr: test-randr.o
934 $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
935 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
937 test-grab: test-grab.o
938 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
941 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
943 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
944 test-fade: test-fade.o $(UTILS_BIN)/fade.o
945 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
948 xdpyinfo.o: xdpyinfo.c
949 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
953 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
954 $(LIBS) $(X_LIBS) @GL_LIBS@ \
955 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
958 ##############################################################################
960 # DO NOT DELETE: updated by make distdepend
962 demo-Gtk-conf.o: ../config.h
963 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
964 demo-Gtk.o: ../config.h
965 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
966 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
967 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
968 demo-Gtk.o: $(srcdir)/prefs.h
969 demo-Gtk.o: $(srcdir)/remote.h
970 demo-Gtk.o: XScreenSaver_ad.h
971 demo-Gtk-support.o: ../config.h
972 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
973 demo-Gtk-widgets.o: ../config.h
974 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
975 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
976 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
977 demo-Xm.o: ../config.h
978 demo-Xm-widgets.o: ../config.h
980 dpms.o: $(srcdir)/prefs.h
981 dpms.o: $(srcdir)/xscreensaver.h
984 lock.o: $(srcdir)/prefs.h
985 lock.o: $(srcdir)/xscreensaver.h
986 passwd.o: ../config.h
987 passwd-pwent.o: ../config.h
989 prefs.o: $(srcdir)/prefs.h
990 remote.o: ../config.h
991 remote.o: $(srcdir)/remote.h
992 setuid.o: ../config.h
993 setuid.o: $(srcdir)/prefs.h
994 setuid.o: $(srcdir)/xscreensaver.h
995 splash.o: ../config.h
996 splash.o: $(srcdir)/prefs.h
997 splash.o: $(srcdir)/xscreensaver.h
998 stderr.o: ../config.h
999 stderr.o: $(srcdir)/prefs.h
1000 stderr.o: $(srcdir)/xscreensaver.h
1001 subprocs.o: ../config.h
1002 subprocs.o: $(srcdir)/prefs.h
1003 subprocs.o: $(srcdir)/xscreensaver.h
1004 test-apm.o: ../config.h
1005 test-fade.o: ../config.h
1006 test-fade.o: $(srcdir)/prefs.h
1007 test-fade.o: $(srcdir)/xscreensaver.h
1008 test-grab.o: ../config.h
1009 test-passwd.o: ../config.h
1010 test-passwd.o: $(srcdir)/prefs.h
1011 test-passwd.o: XScreenSaver_ad.h
1012 test-passwd.o: $(srcdir)/xscreensaver.h
1013 test-randr.o: ../config.h
1014 test-uid.o: ../config.h
1015 test-vp.o: ../config.h
1016 test-xdpms.o: ../config.h
1017 test-xinerama.o: ../config.h
1018 timers.o: ../config.h
1019 timers.o: $(srcdir)/prefs.h
1020 timers.o: $(srcdir)/xscreensaver.h
1021 windows.o: ../config.h
1022 windows.o: $(srcdir)/prefs.h
1023 windows.o: $(srcdir)/xscreensaver.h
1024 xscreensaver-command.o: ../config.h
1025 xscreensaver-command.o: $(srcdir)/remote.h
1026 xscreensaver-getimage.o: ../config.h
1027 xscreensaver-getimage.o: XScreenSaver_ad.h
1028 xscreensaver-getimage.o: $(srcdir)/prefs.h
1029 xscreensaver.o: ../config.h
1030 xscreensaver.o: $(srcdir)/prefs.h
1031 xscreensaver.o: XScreenSaver_ad.h
1032 xscreensaver.o: $(srcdir)/xscreensaver.h
1034 xset.o: $(srcdir)/prefs.h
1035 xset.o: $(srcdir)/xscreensaver.h