1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-1999 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@
42 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
43 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
44 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GLADE_DATADIR)"'
45 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
48 INTL_LIBS = @INTLLIBS@
49 JPEG_LIBS = @JPEG_LIBS@
53 DEPEND_FLAGS = @DEPEND_FLAGS@
54 DEPEND_DEFINES = @DEPEND_DEFINES@
58 SUID_FLAGS = -o root -m 4755
59 INSTALL_PROGRAM = @INSTALL_PROGRAM@
60 INSTALL_SCRIPT = @INSTALL_SCRIPT@
61 INSTALL_SETUID = @INSTALL_SETUID@
62 INSTALL_DATA = @INSTALL_DATA@
63 INSTALL_DIRS = @INSTALL_DIRS@
67 X_PRE_LIBS = @X_PRE_LIBS@
68 X_EXTRA_LIBS = @X_EXTRA_LIBS@
74 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
75 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
76 # and that must come before -lX11. (e.g., -lSM and -lICE.)
77 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
78 # (e.g., -lsocket, -lnsl, etc.)
80 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
82 # SAVER_LIBS is the link line for "xscreensaver", and
83 # CMD_LIBS is the link line for "xscreensaver-command".
84 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
87 AD_DIR = @APPDEFAULTS@
89 PAM_CONF = /etc/pam.conf
91 UTILS_SRC = $(srcdir)/../utils
94 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
96 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
97 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
99 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
100 demo-Gtk-widgets.c demo-Gtk-support.c
101 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
102 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
104 PWENT_SRCS = passwd-pwent.c
105 PWENT_OBJS = passwd-pwent.o
107 KERBEROS_SRCS = passwd-kerberos.c
108 KERBEROS_OBJS = passwd-kerberos.o
110 PAM_SRCS = passwd-pam.c
111 PAM_OBJS = passwd-pam.o
113 LOCK_SRCS_1 = lock.c passwd.c
114 LOCK_OBJS_1 = lock.o passwd.o
115 NOLOCK_SRCS_1 = lock.c
116 NOLOCK_OBJS_1 = lock.o
118 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
119 test-apm.c test-fade.c test-xinerama.c xdpyinfo.c
120 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
121 test-apm test-fade test-xinerama xdpyinfo
123 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
124 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
125 XML_LIBS = @XML_LIBS@
127 XDPMS_LIBS = @XDPMS_LIBS@
129 PASSWD_SRCS = @PASSWD_SRCS@
130 PASSWD_OBJS = @PASSWD_OBJS@
131 PASSWD_LIBS = @PASSWD_LIBS@
133 LOCK_SRCS = @LOCK_SRCS@
134 LOCK_OBJS = @LOCK_OBJS@
136 XMU_SRCS = @XMU_SRCS@
137 XMU_OBJS = @XMU_OBJS@
139 GL_SRCS = @SAVER_GL_SRCS@
140 GL_OBJS = @SAVER_GL_OBJS@
141 GL_LIBS = @SAVER_GL_LIBS@
143 ICON_SRC = $(UTILS_SRC)/images
144 LOGO = $(ICON_SRC)/logo-50.xpm
145 GTK_ICONS = $(ICON_SRC)/screensaver-*.png
147 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
148 $(UTILS_SRC)/visual.c
149 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
150 $(UTILS_BIN)/visual.o
152 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
153 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
155 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
156 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
159 GETIMG_SRCS_1 = xscreensaver-getimage.c
160 GETIMG_OBJS_1 = xscreensaver-getimage.o
162 GETIMG_SRCS = $(GETIMG_SRCS_1) \
163 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
164 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
165 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
166 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
167 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
169 GETIMG_OBJS = $(GETIMG_OBJS_1) \
170 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
171 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
172 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
173 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
174 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
176 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
177 xset.c splash.c setuid.c stderr.c
178 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
179 xset.o splash.o setuid.o stderr.o
181 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
182 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
183 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
184 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
186 CMD_SRCS = remote.c xscreensaver-command.c
187 CMD_OBJS = remote.o xscreensaver-command.o
189 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
190 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
192 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
193 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
195 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
196 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
197 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
200 CMD_LIBS = $(LIBS) $(X_LIBS) \
201 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
203 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
204 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
206 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
207 xscreensaver-getimage
208 EXES2 = @ALL_DEMO_PROGRAMS@
209 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
211 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
212 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
214 MEN = xscreensaver.man xscreensaver-demo.man \
215 xscreensaver-command.man \
216 xscreensaver-getimage.man \
217 xscreensaver-getimage-file.man \
218 xscreensaver-getimage-video.man
219 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
220 xscreensaver-demo.glade xscreensaver-demo.glade2 \
221 xscreensaver-demo.glade2p \
222 screensaver-properties.desktop.in \
223 screensaver-properties-capplet \
224 xscreensaver.kss.in \
226 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
227 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
228 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
230 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
231 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
232 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
233 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
238 all: $(EXES) $(EXES2)
241 install: install-program install-ad install-scripts \
242 install-gnome install-kde install-man @INSTALL_PAM@
243 uninstall: uninstall-program uninstall-ad \
244 uninstall-gnome uninstall-kde uninstall-man
247 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
250 install-program: $(EXES)
251 @if [ ! -d $(install_prefix)$(bindir) ]; then \
252 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
254 @inst="$(INSTALL_PROGRAM)" ; \
255 if [ @NEED_SETUID@ = yes ]; then \
256 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
257 if [ "$$me" = root ]; then \
258 inst="$(INSTALL_SETUID)" ; \
262 $$e " ####################################################################";\
263 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
264 $$e " passwords. If your system actually uses shadow passwords," ;\
265 $$e " then xscreensaver must be installed as a setuid root" ;\
266 $$e " program in order for locking to work. To do this, you" ;\
267 $$e " must run 'make install' as 'root', not as '$$me'." ;\
269 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
270 $$e " means that locking might not work. (Try it and see.)" ;\
271 $$e " ####################################################################";\
275 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
276 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
277 @echo $(INSTALL_PROGRAM) xscreensaver-command \
278 $(install_prefix)$(bindir)/xscreensaver-command ; \
279 $(INSTALL_PROGRAM) xscreensaver-command \
280 $(install_prefix)$(bindir)/xscreensaver-command
281 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
282 $(install_prefix)$(bindir)/xscreensaver-demo ; \
283 $(INSTALL_PROGRAM) xscreensaver-demo \
284 $(install_prefix)$(bindir)/xscreensaver-demo
285 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
286 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
287 $(INSTALL_PROGRAM) xscreensaver-getimage \
288 $(install_prefix)$(bindir)/xscreensaver-getimage
290 install-ad: XScreenSaver.ad
291 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
292 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
294 @-echo $(INSTALL_DATA) XScreenSaver.ad \
295 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
296 if $(INSTALL_DATA) XScreenSaver.ad \
297 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
301 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
303 $$e " ####################################################################";\
304 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
305 $$e " That file exists, and is unwritable. It is probably from" ;\
306 $$e " an older version of xscreensaver, and could cause things" ;\
307 $$e " to malfunction. Please delete it!" ;\
308 $$e " ####################################################################";\
313 $$e " ####################################################################";\
314 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
315 $$e " The directory is unwritable. This is probably ok;" ;\
316 $$e " xscreensaver should work without that file." ;\
317 $$e " ####################################################################";\
323 install-scripts: $(SCRIPTS) munge-scripts
324 @for program in $(SCRIPTS); do \
325 if [ -r $$program ] ; then \
328 p=$(srcdir)/$$program ; \
330 echo $(INSTALL_SCRIPT) $$p \
331 $(install_prefix)$(bindir)/$$program ; \
332 $(INSTALL_SCRIPT) $$p \
333 $(install_prefix)$(bindir)/$$program ; \
336 munge-scripts: $(SCRIPTS)
337 @tmp=/tmp/mf.$$$$ ; \
340 for program in $(SCRIPTS); do \
341 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
342 < $(srcdir)/$$program > $$tmp ; \
343 if cmp -s $(srcdir)/$$program $$tmp ; then \
344 echo "$$program unchanged" ; \
347 echo "$$program: setting interpreter to $$perl" ; \
348 cat $$tmp > ./$$program ; \
355 if [ ! -d $(install_prefix)$(manNdir) ]; then \
356 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
358 for man in $$men; do \
359 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
360 echo $(INSTALL_DATA) $(srcdir)/$$man \
361 $(install_prefix)$(manNdir)/$$instname ; \
362 $(INSTALL_DATA) $(srcdir)/$$man \
363 $(install_prefix)$(manNdir)/$$instname ; \
367 @for program in $(EXES) $(SCRIPTS); do \
368 echo rm -f $(install_prefix)$(bindir)/$$program ; \
369 rm -f $(install_prefix)$(bindir)/$$program ; \
373 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
377 for man in $$men; do \
378 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
379 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
380 rm -f $(install_prefix)$(manNdir)/$$instname ; \
384 @src="$(srcdir)/xscreensaver.pam" ; \
385 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
387 dir="$(install_prefix)$(PAM_DIR)" ; \
388 conf="$(PAM_CONF)" ; \
390 if [ -d $$dir ] ; then \
392 if [ -f $$dir/xdm ]; then \
394 elif [ -f $$dir/login ]; then \
398 if [ -z "$$src2" ]; then \
399 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
400 $(INSTALL_DATA) $$src $$dir/$$dest ; \
402 src="xscreensaver.pam.$$$$" ; \
403 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
404 grep '^#%\|^auth' $$src2 > $$src ; \
405 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
406 $(INSTALL_DATA) $$src $$dir/$$dest ; \
411 if [ ! -f $$dir/$$dest ]; then \
414 $$e " ####################################################################";\
415 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
416 $$e " Authentication Modules (PAM). However, we were unable to" ;\
417 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
418 $$e " to work without this file (and old-style password" ;\
419 $$e " authentication will be used instead, which may or may not" ;\
421 $$e " ####################################################################";\
424 elif [ -f $$conf ]; then \
425 if ( grep $$dest $$conf >/dev/null ); then \
426 echo "$$conf unchanged: already has an entry for $$dest" ; \
428 src="pam.conf.$$$$" ; \
429 echo "grep -v $$dest $$conf > $$src" ; \
430 grep -v $$dest $$conf > $$src ; \
431 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
432 echo "$$extras" >> $$src ; \
433 if [ "x$$extras" = "x" ]; then \
434 echo "Error: no login rules in $$conf?" >&2 ; \
436 echo "adding $$dest rules to $$src:" ; \
437 echo "$$extras" | sed 's/^/ /' ; \
439 echo $(INSTALL_DATA) $$src $$conf ; \
440 $(INSTALL_DATA) $$src $$conf ; \
444 if ! ( grep $$dest $$conf >/dev/null ); then \
447 $$e " ####################################################################";\
448 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
449 $$e " Authentication Modules (PAM). However, we were unable to" ;\
450 $$e " install xscreensaver rules in the file $$conf." ;\
451 $$e " PAM is unlikely to work without this (and old-style" ;\
452 $$e " password authentication will be used instead, which may" ;\
453 $$e " or may not work.)" ;\
454 $$e " ####################################################################";\
459 install-gnome:: screensaver-properties.desktop
461 if [ "$(GNOME_DATADIR)" != "" ]; then \
463 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
464 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
465 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
467 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
468 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
469 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
471 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then \
472 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
473 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
475 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
476 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
477 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
480 echo $(INSTALL_DATA) screensaver-properties.desktop \
481 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
483 if $(INSTALL_DATA) screensaver-properties.desktop \
484 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
487 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
490 echo $(INSTALL_DATA) screensaver-properties.desktop \
491 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
493 if $(INSTALL_DATA) screensaver-properties.desktop \
494 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
497 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
500 echo $(INSTALL_DATA) screensaver-properties.desktop \
501 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
503 if $(INSTALL_DATA) screensaver-properties.desktop \
504 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
507 lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)" ;\
510 echo $(INSTALL_DATA) screensaver-properties.desktop \
511 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
512 if $(INSTALL_DATA) screensaver-properties.desktop \
513 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
516 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
519 if [ "$$lost" != "" ]; then \
522 $$e " ####################################################################";\
523 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
525 for f in $$@ ; do echo " $$f/" ; done ;\
526 $$e ' This means the "Screen Saver" section of the Gnome' ;\
527 $$e " Control Center (gnomecc) may not work properly." ;\
528 $$e " ####################################################################";\
534 install-gnome:: screensaver-properties-capplet
535 @if [ "$(GNOME_DATADIR)" != "" ]; then \
536 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
537 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
538 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
540 program=screensaver-properties-capplet ;\
541 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
542 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
543 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
544 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
549 $$e " ####################################################################";\
550 $$e " Warning: unable to install $$program into" ;\
551 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
552 $$e " Without this file, the Gnome session manager will not" ;\
553 $$e " launch xscreensaver properly at login time." ;\
554 $$e " ####################################################################";\
561 # into /usr/share/pixmaps/
562 install-gnome:: $(LOGO)
563 @if [ "$(GNOME_DATADIR)" != "" ]; then \
564 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
565 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
566 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
568 target=xscreensaver.xpm ;\
569 echo $(INSTALL_DATA) $(LOGO) \
570 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
571 $(INSTALL_DATA) $(LOGO) \
572 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
575 # ../utils/images/screensaver-*.png
576 # into /usr/share/xscreensaver/
578 # Should these really go in GLADE_DATADIR (/usr/share/xscreensaver/)
579 # or should they instead go in GNOME_ICONDIR (/usr/share/pixmaps/)?
583 @if [ "$(GLADE_DATADIR)" != "" ]; then \
584 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
585 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
586 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
588 for target in $(GTK_ICONS) ; do \
589 dest=`echo $$target | sed 's@^.*/@@'` ;\
590 echo $(INSTALL_DATA) $$target \
591 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
592 $(INSTALL_DATA) $$target \
593 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
597 # xscreensaver-demo.glade2
598 # into /usr/share/xscreensaver/
599 install-gnome:: xscreensaver-demo.glade2
600 @if [ "$(GLADE_DATADIR)" != "" ]; then \
601 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
602 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
603 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
605 target=xscreensaver-demo.glade2 ;\
606 echo $(INSTALL_DATA) $(srcdir)/$$target \
607 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
608 if $(INSTALL_DATA) $(srcdir)/$$target \
609 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
614 $$e " ####################################################################";\
615 $$e " Warning: unable to install $$target into" ;\
616 $$e " $(install_prefix)$(GLADE_DATADIR)/." ;\
617 $$e " Without this file, xscreensaver-demo will not" ;\
618 $$e " be able to run properly." ;\
619 $$e " ####################################################################";\
626 # screensaver-properties.desktop
627 # into /usr/share/gnome/apps/Settings/Desktop/
629 @if [ "$(GNOME_DATADIR)" != "" ]; then \
630 f=screensaver-properties.desktop ;\
631 echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
632 rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
633 echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
634 rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
635 echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
636 rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
637 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
638 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
641 # screensaver-properties-capplet
642 # into /usr/X11R6/bin/
644 @if [ "$(GNOME_DATADIR)" != "" ]; then \
645 program=screensaver-properties-capplet ;\
646 echo rm -f $(install_prefix)$(bindir)/$$program ;\
647 rm -f $(install_prefix)$(bindir)/$$program ;\
651 # into /usr/share/pixmaps/
653 @if [ "$(GNOME_ICONDIR)" != "" ]; then \
654 target=xscreensaver.xpm ;\
655 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
656 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
659 # ../utils/images/screensaver-*.png
660 # into /usr/share/xscreensaver/
662 @if [ "$(GLADE_DATADIR)" != "" ]; then \
663 for target in $(GTK_ICONS) ; do \
664 dest=`echo $$target | sed 's@^.*/@@'` ;\
665 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
666 rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
672 @src="xscreensaver.kss" ; \
673 if [ "$$KDEDIR" != "" ]; then \
674 dir="$(install_prefix)$$KDEDIR/bin" ; \
675 dest="$$dir/$$src" ; \
676 echo $(INSTALL_SCRIPT) $$src $$dest ; \
677 if $(INSTALL_SCRIPT) $$src $$dest ; then \
682 $$e " ####################################################################";\
683 $$e " Warning: unable to install $$dest" ;\
684 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
685 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
686 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
687 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
688 elif [ -f $$dest ]; then \
689 $$e " That file exists, and is unwritable." ;\
691 $$e " The directory is unwritable." ;\
693 $$e " ####################################################################";\
700 @if [ "$$KDEDIR" != "" ]; then \
701 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
702 echo rm -f $$dest ; \
707 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
710 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
712 # Adds all current dependencies to Makefile
713 depend: XScreenSaver_ad.h
714 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
716 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
717 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
719 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
720 # close. This excludes dependencies on files in /usr/include, etc. It tries
721 # to include only dependencies on files which are themselves a part of this
723 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
724 @echo updating dependencies in `pwd`/Makefile.in... ; \
725 $(DEPEND) -w 0 -f - \
726 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
727 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
728 $(CFLAGS) $(X_CFLAGS) -- \
729 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
730 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
731 $(TEST_SRCS) 2>/dev/null | \
734 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
736 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
737 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
738 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
739 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
740 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
742 ) > /tmp/distdepend.$$$$ && \
743 mv Makefile.in Makefile.in.bak && \
744 mv /tmp/distdepend.$$$$ Makefile.in
746 # Updates the version number in the app-defaults file to be in sync with
747 # the version number in version.h. This is so people can tell when they
748 # have a version skew between the app-defaults file and the executable.
749 # Also update hacks/config/README in the same way.
751 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
752 U=$(UTILS_SRC)/version.h ; \
753 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
754 D=`date '+%d-%b-%Y'` ; \
755 for S in $$files ; do \
756 echo -n "Updating $$S to $$V $$D... " ; \
758 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
759 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
761 if cmp -s $$S $$T ; then \
762 echo "unchanged." ; \
771 @for S in $(MEN); do \
772 U=$(UTILS_SRC)/version.h ; \
773 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
774 V="`date '+%d-%b-%Y'` ($$V)" ; \
775 echo -n "Updating $$S to \"$$V\"... " ; \
777 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
779 if cmp -s $$S $$T ; then \
780 echo "unchanged." ; \
790 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
793 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
798 for exe in $(EXES); do \
799 if ! [ -f $(srcdir)/$$exe.man ]; then \
800 badmen="$$badmen $$exe" ; \
803 if [ -n "$$badmen" ]; then \
805 echo "Warning: The following programs have no manuals:" ; \
807 for m in $$badmen ; do \
814 # Rules for noticing when the objects from the utils directory are out of
815 # date with respect to their sources, and going and building them according
816 # to the rules in their own Makefile...
818 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
819 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
820 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
821 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
822 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
823 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
824 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
825 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
826 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
830 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
832 # How we build object files in this directory.
834 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
836 # subprocs takes an extra -D option.
837 subprocs.o: subprocs.c
838 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
841 # demo-Gtk takes extra -D options, and an extra -I option.
842 demo-Gtk.o: demo-Gtk.c
843 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
844 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
847 # demo-Gtk-conf takes an extra -D option.
848 demo-Gtk-conf.o: demo-Gtk-conf.c
849 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
850 $(srcdir)/demo-Gtk-conf.c
853 # How we build the default app-defaults file into the program.
855 XScreenSaver_ad.h: XScreenSaver.ad
856 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
858 @INTLTOOL_DESKTOP_RULE@
860 # The executables linked in this directory.
862 xscreensaver: $(SAVER_OBJS)
863 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
865 xscreensaver-command: $(CMD_OBJS)
866 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
869 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
870 @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then \
871 echo "WARNING: neither GTK nor Motif are available," \
872 "therefore no xscreensaver-demo!" ; \
875 echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
876 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@ ; \
879 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
880 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
881 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
882 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
884 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
885 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
886 $(GTK_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
887 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
889 xscreensaver-getimage: $(GETIMG_OBJS)
890 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
893 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
894 subprocs.o setuid.o splash.o prefs.o \
896 test-passwd.o: XScreenSaver_ad.h
898 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
899 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
902 $(CC) $(LDFLAGS) -o $@ test-uid.o
904 test-xdpms: test-xdpms.o
905 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
906 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
908 test-xinerama: test-xinerama.o
909 $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS)\
910 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
912 test-grab: test-grab.o
913 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
916 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
918 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
919 test-fade: test-fade.o $(UTILS_BIN)/fade.o
920 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
923 xdpyinfo.o: xdpyinfo.c
924 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
928 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
929 $(LIBS) $(X_LIBS) @GL_LIBS@ \
930 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
933 ##############################################################################
935 # DO NOT DELETE: updated by make distdepend
937 demo-Gtk-conf.o: ../config.h
938 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
939 demo-Gtk.o: ../config.h
940 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
941 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
942 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
943 demo-Gtk.o: $(srcdir)/prefs.h
944 demo-Gtk.o: $(srcdir)/remote.h
945 demo-Gtk.o: XScreenSaver_ad.h
946 demo-Gtk-support.o: ../config.h
947 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
948 demo-Gtk-widgets.o: ../config.h
949 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
950 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
951 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
952 demo-Xm.o: ../config.h
953 demo-Xm-widgets.o: ../config.h
955 dpms.o: $(srcdir)/prefs.h
956 dpms.o: $(srcdir)/xscreensaver.h
959 lock.o: $(srcdir)/prefs.h
960 lock.o: $(srcdir)/xscreensaver.h
961 passwd.o: ../config.h
962 passwd-pwent.o: ../config.h
964 prefs.o: $(srcdir)/prefs.h
965 remote.o: ../config.h
966 remote.o: $(srcdir)/remote.h
967 setuid.o: ../config.h
968 setuid.o: $(srcdir)/prefs.h
969 setuid.o: $(srcdir)/xscreensaver.h
970 splash.o: ../config.h
971 splash.o: $(srcdir)/prefs.h
972 splash.o: $(srcdir)/xscreensaver.h
973 stderr.o: ../config.h
974 stderr.o: $(srcdir)/prefs.h
975 stderr.o: $(srcdir)/xscreensaver.h
976 subprocs.o: ../config.h
977 subprocs.o: $(srcdir)/prefs.h
978 subprocs.o: $(srcdir)/xscreensaver.h
979 test-apm.o: ../config.h
980 test-fade.o: ../config.h
981 test-fade.o: $(srcdir)/prefs.h
982 test-fade.o: $(srcdir)/xscreensaver.h
983 test-grab.o: ../config.h
984 test-passwd.o: ../config.h
985 test-passwd.o: $(srcdir)/prefs.h
986 test-passwd.o: XScreenSaver_ad.h
987 test-passwd.o: $(srcdir)/xscreensaver.h
988 test-uid.o: ../config.h
989 test-xdpms.o: ../config.h
990 test-xinerama.o: ../config.h
991 timers.o: ../config.h
992 timers.o: $(srcdir)/prefs.h
993 timers.o: $(srcdir)/xscreensaver.h
994 windows.o: ../config.h
995 windows.o: $(srcdir)/prefs.h
996 windows.o: $(srcdir)/xscreensaver.h
997 xscreensaver-command.o: ../config.h
998 xscreensaver-command.o: $(srcdir)/remote.h
999 xscreensaver-getimage.o: ../config.h
1000 xscreensaver-getimage.o: XScreenSaver_ad.h
1001 xscreensaver-getimage.o: $(srcdir)/prefs.h
1002 xscreensaver.o: ../config.h
1003 xscreensaver.o: $(srcdir)/prefs.h
1004 xscreensaver.o: XScreenSaver_ad.h
1005 xscreensaver.o: $(srcdir)/xscreensaver.h
1007 xset.o: $(srcdir)/prefs.h
1008 xset.o: $(srcdir)/xscreensaver.h