1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-1999 Jamie Zawinski.
2 # the `../configure' script generates `driver/Makefile' from this file.
13 exec_prefix = @exec_prefix@
16 man1dir = $(mandir)/man1
19 GNOME_DATADIR = @GNOME_DATADIR@
20 GNOME_CCDIR_1 = $(GNOME_DATADIR)/control-center/Desktop
21 GNOME_CCDIR_2 = $(GNOME_DATADIR)/control-center/capplets
22 GNOME_PANELDIR = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
23 GNOME_ICONDIR = $(GNOME_DATADIR)/pixmaps
24 GNOME_BINDIR = $(bindir)
25 HACK_CONF_DIR = @HACK_CONF_DIR@
31 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
32 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GNOME_ICONDIR)"'
33 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
39 DEPEND_FLAGS = @DEPEND_FLAGS@
40 DEPEND_DEFINES = @DEPEND_DEFINES@
44 SUID_FLAGS = -o root -m 4755
45 INSTALL_PROGRAM = @INSTALL_PROGRAM@
46 INSTALL_SCRIPT = @INSTALL_SCRIPT@
47 INSTALL_SETUID = @INSTALL_SETUID@
48 INSTALL_DATA = @INSTALL_DATA@
49 INSTALL_DIRS = @INSTALL_DIRS@
53 X_PRE_LIBS = @X_PRE_LIBS@
54 X_EXTRA_LIBS = @X_EXTRA_LIBS@
59 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
60 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
61 # and that must come before -lX11. (e.g., -lSM and -lICE.)
62 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
63 # (e.g., -lsocket, -lnsl, etc.)
65 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
67 # SAVER_LIBS is the link line for "xscreensaver", and
68 # CMD_LIBS is the link line for "xscreensaver-command".
69 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
72 AD_DIR = @APPDEFAULTS@
74 PAM_CONF = /etc/pam.conf
76 UTILS_SRC = $(srcdir)/../utils
79 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
81 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
82 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
84 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
85 demo-Gtk-widgets.c demo-Gtk-support.c
86 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o \
87 demo-Gtk-widgets.o demo-Gtk-support.o
89 PWENT_SRCS = passwd-pwent.c
90 PWENT_OBJS = passwd-pwent.o
92 KERBEROS_SRCS = passwd-kerberos.c
93 KERBEROS_OBJS = passwd-kerberos.o
95 PAM_SRCS = passwd-pam.c
96 PAM_OBJS = passwd-pam.o
98 LOCK_SRCS_1 = lock.c passwd.c
99 LOCK_OBJS_1 = lock.o passwd.o
100 NOLOCK_SRCS_1 = lock.c
101 NOLOCK_OBJS_1 = lock.o
103 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
104 test-apm.c test-fade.c xdpyinfo.c
105 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
106 test-apm test-fade xdpyinfo
108 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
109 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
110 XML_LIBS = @XML_LIBS@
112 XDPMS_LIBS = @XDPMS_LIBS@
114 PASSWD_SRCS = @PASSWD_SRCS@
115 PASSWD_OBJS = @PASSWD_OBJS@
116 PASSWD_LIBS = @PASSWD_LIBS@
118 LOCK_SRCS = @LOCK_SRCS@
119 LOCK_OBJS = @LOCK_OBJS@
121 XMU_SRCS = @XMU_SRCS@
122 XMU_OBJS = @XMU_OBJS@
124 GL_SRCS = @SAVER_GL_SRCS@
125 GL_OBJS = @SAVER_GL_OBJS@
126 GL_LIBS = @SAVER_GL_LIBS@
128 ICON_SRC = $(UTILS_SRC)/images
129 LOGO = $(ICON_SRC)/logo-50.xpm
130 GNOME_ICONS = $(ICON_SRC)/screensaver-*.xpm
132 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
133 $(UTILS_SRC)/visual.c
134 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
135 $(UTILS_BIN)/visual.o
137 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
138 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
140 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
141 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
144 GETIMG_SRCS_1 = xscreensaver-getimage.c
145 GETIMG_OBJS_1 = xscreensaver-getimage.o
147 GETIMG_SRCS = $(GETIMG_SRCS_1) \
148 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
149 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
150 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
151 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
152 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
154 GETIMG_OBJS = $(GETIMG_OBJS_1) \
155 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
156 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
157 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
158 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
159 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
161 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
162 xset.c splash.c setuid.c stderr.c
163 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
164 xset.o splash.o setuid.o stderr.o
166 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
167 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
168 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
169 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
171 CMD_SRCS = remote.c xscreensaver-command.c
172 CMD_OBJS = remote.o xscreensaver-command.o
174 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
175 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
177 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
178 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
180 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
181 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
182 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
185 CMD_LIBS = $(LIBS) $(X_LIBS) \
186 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
188 GETIMG_LIBS = $(LIBS) $(X_LIBS) \
189 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
191 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
192 xscreensaver-getimage
193 EXES2 = @ALL_DEMO_PROGRAMS@
194 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
196 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
197 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
199 MEN = xscreensaver.man xscreensaver-demo.man \
200 xscreensaver-command.man \
201 xscreensaver-getimage.man \
202 xscreensaver-getimage-file.man \
203 xscreensaver-getimage-video.man
204 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
205 xscreensaver.kss xscreensaver-demo.glade \
206 screensaver-properties.desktop.in \
207 screensaver-properties-capplet \
209 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
210 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
211 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
213 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
214 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
215 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
216 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
221 all: $(EXES) $(EXES2)
224 install: install-program install-ad install-scripts \
225 install-gnome install-kde install-man @INSTALL_PAM@
226 uninstall: uninstall-program uninstall-ad \
227 uninstall-gnome uninstall-kde uninstall-man
230 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
233 install-program: $(EXES)
234 @if [ ! -d $(install_prefix)$(bindir) ]; then \
235 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
237 @inst="$(INSTALL_PROGRAM)" ; \
238 if [ @NEED_SETUID@ = yes ]; then \
239 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
240 if [ "$$me" = root ]; then \
241 inst="$(INSTALL_SETUID)" ; \
245 $$e " ####################################################################";\
246 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
247 $$e " passwords. If your system actually uses shadow passwords," ;\
248 $$e " then xscreensaver must be installed as a setuid root" ;\
249 $$e " program in order for locking to work. To do this, you" ;\
250 $$e " must run 'make install' as 'root', not as '$$me'." ;\
252 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
253 $$e " means that locking might not work. (Try it and see.)" ;\
254 $$e " ####################################################################";\
258 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
259 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
260 @echo $(INSTALL_PROGRAM) xscreensaver-command \
261 $(install_prefix)$(bindir)/xscreensaver-command ; \
262 $(INSTALL_PROGRAM) xscreensaver-command \
263 $(install_prefix)$(bindir)/xscreensaver-command
264 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
265 $(install_prefix)$(bindir)/xscreensaver-demo ; \
266 $(INSTALL_PROGRAM) xscreensaver-demo \
267 $(install_prefix)$(bindir)/xscreensaver-demo
268 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
269 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
270 $(INSTALL_PROGRAM) xscreensaver-getimage \
271 $(install_prefix)$(bindir)/xscreensaver-getimage
273 install-ad: XScreenSaver.ad
274 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
275 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
277 @-echo $(INSTALL_DATA) XScreenSaver.ad \
278 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
279 if $(INSTALL_DATA) XScreenSaver.ad \
280 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
284 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
286 $$e " ####################################################################";\
287 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
288 $$e " That file exists, and is unwritable. It is probably from" ;\
289 $$e " an older version of xscreensaver, and could cause things" ;\
290 $$e " to malfunction. Please delete it!" ;\
291 $$e " ####################################################################";\
296 $$e " ####################################################################";\
297 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
298 $$e " The directory is unwritable. This is probably ok;" ;\
299 $$e " xscreensaver should work without that file." ;\
300 $$e " ####################################################################";\
306 install-scripts: $(SCRIPTS) munge-scripts
307 @for program in $(SCRIPTS); do \
308 if [ -r $$program ] ; then \
311 p=$(srcdir)/$$program ; \
313 echo $(INSTALL_SCRIPT) $$p \
314 $(install_prefix)$(bindir)/$$program ; \
315 $(INSTALL_SCRIPT) $$p \
316 $(install_prefix)$(bindir)/$$program ; \
319 munge-scripts: $(SCRIPTS)
320 @tmp=/tmp/mf.$$$$ ; \
323 for program in $(SCRIPTS); do \
324 echo "adjusting location of perl in $$program..." ; \
325 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
326 < $(srcdir)/$$program > $$tmp ; \
327 if cmp -s $(srcdir)/$$program $$tmp ; then \
330 cat $$tmp > ./$$program ; \
337 if [ ! -d $(install_prefix)$(man1dir) ]; then \
338 $(INSTALL_DIRS) $(install_prefix)$(man1dir) ; \
340 for man in $$men; do \
341 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
342 echo $(INSTALL_DATA) $(srcdir)/$$man \
343 $(install_prefix)$(man1dir)/$$instname ; \
344 $(INSTALL_DATA) $(srcdir)/$$man \
345 $(install_prefix)$(man1dir)/$$instname ; \
349 @for program in $(EXES) $(SCRIPTS); do \
350 echo rm -f $(install_prefix)$(bindir)/$$program ; \
351 rm -f $(install_prefix)$(bindir)/$$program ; \
355 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
359 for man in $$men; do \
360 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
361 echo rm -f $(install_prefix)$(man1dir)/$$instname ; \
362 rm -f $(install_prefix)$(man1dir)/$$instname ; \
366 @src="$(srcdir)/xscreensaver.pam" ; \
367 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
369 dir="$(install_prefix)$(PAM_DIR)" ; \
370 conf="$(PAM_CONF)" ; \
372 if [ -d $$dir ] ; then \
374 if [ -f $$dir/xdm ]; then \
376 elif [ -f $$dir/login ]; then \
380 if [ -z "$$src2" ]; then \
381 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
382 $(INSTALL_DATA) $$src $$dir/$$dest ; \
384 src="xscreensaver.pam.$$$$" ; \
385 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
386 grep '^#%\|^auth' $$src2 > $$src ; \
387 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
388 $(INSTALL_DATA) $$src $$dir/$$dest ; \
393 if [ ! -f $$dir/$$dest ]; then \
396 $$e " ####################################################################";\
397 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
398 $$e " Authentication Modules (PAM). However, we were unable to" ;\
399 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
400 $$e " to work without this file (and old-style password" ;\
401 $$e " authentication will be used instead, which may or may not" ;\
403 $$e " ####################################################################";\
406 elif [ -f $$conf ]; then \
407 if ( grep $$dest $$conf >/dev/null ); then \
412 $$e " ####################################################################";\
413 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
414 $$e " Authentication Modules (PAM). To complete the installation";\
415 $$e " of PAM support, you must add the following line to the file";\
418 $$e " $$dest auth required /usr/lib/security/pam_unix.so.1" ;\
420 $$e " Be careful: if you mess up that file, you could completely" ;\
421 $$e " hose your machine (e.g., \`login' and \`su' won't work, and";\
422 $$e " you'll have to boot single-user to fix it.)" ;\
423 $$e " ####################################################################";\
428 install-gnome:: screensaver-properties.desktop
430 if [ "$(GNOME_DATADIR)" != "" ]; then \
432 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
433 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
434 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
436 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
437 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
438 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
441 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
442 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
444 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
445 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
448 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
451 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
452 $(install_prefix)$(GNOME_CCDIR_2)/screensaver.desktop ;\
454 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
455 $(install_prefix)$(GNOME_CCDIR_2)/screensaver.desktop ;\
458 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
461 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
462 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
463 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
466 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
467 $(GNOME_PANELDIR)/screensaver-properties.desktop ;\
468 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
469 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop ;\
472 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
475 if [ "$$lost" != "" ]; then \
478 $$e " ####################################################################";\
479 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
481 for f in $$@ ; do echo " $$f/" ; done ;\
482 $$e ' This means the "Screen Saver" section of the Gnome' ;\
483 $$e " Control Center (gnomecc) may not work properly." ;\
484 $$e " ####################################################################";\
490 install-gnome:: screensaver-properties-capplet
491 @if [ "$(GNOME_DATADIR)" != "" ]; then \
492 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
493 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
494 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
496 program=screensaver-properties-capplet ;\
497 echo $(INSTALL_SCRIPT) $$program \
498 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
499 if $(INSTALL_SCRIPT) $$program \
500 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
505 $$e " ####################################################################";\
506 $$e " Warning: unable to install $$program into" ;\
507 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
508 $$e " Without this file, the Gnome session manager will not" ;\
509 $$e " launch xscreensaver properly at login time." ;\
510 $$e " ####################################################################";\
517 install-gnome:: $(LOGO)
518 @if [ "$(GNOME_DATADIR)" != "" ]; then \
519 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
520 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
521 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
523 target=xscreensaver.xpm ;\
524 echo $(INSTALL_DATA) $(LOGO) \
525 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
526 $(INSTALL_DATA) $(LOGO) \
527 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
530 # ../utils/images/screensaver-*.xpm
532 @if [ "$(GNOME_DATADIR)" != "" ]; then \
533 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
534 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
535 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
537 for target in $(GNOME_ICONS) ; do \
538 dest=`echo $$target | sed 's@^.*/@@'` ;\
539 echo $(INSTALL_DATA) $$target \
540 $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
541 $(INSTALL_DATA) $$target \
542 $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
546 # screensaver-properties.desktop
548 @if [ "$(GNOME_DATADIR)" != "" ]; then \
549 f=screensaver-properties.desktop ;\
550 echo rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
551 rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
552 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
553 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
556 # screensaver-properties-capplet
558 @if [ "$(GNOME_DATADIR)" != "" ]; then \
559 program=screensaver-properties-capplet ;\
560 echo rm -f $(install_prefix)$(bindir)/$$program ;\
561 rm -f $(install_prefix)$(bindir)/$$program ;\
566 @if [ "$(GNOME_DATADIR)" != "" ]; then \
567 target=xscreensaver.xpm ;\
568 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
569 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
574 @if [ "$(GNOME_DATADIR)" != "" ]; then \
575 for target in $(GNOME_ICONS) ; do \
576 dest=`echo $$target | sed 's@^.*/@@'` ;\
577 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
578 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
583 @src="$(srcdir)/xscreensaver.kss" ; \
584 if [ "$$KDEDIR" != "" ]; then \
585 dir="$(install_prefix)$$KDEDIR/bin" ; \
586 dest="$$dir/xscreensaver.kss" ; \
587 echo $(INSTALL_SCRIPT) $$src $$dest ; \
588 if $(INSTALL_SCRIPT) $$src $$dest ; then \
593 $$e " ####################################################################";\
594 $$e " Warning: unable to install $$dest" ;\
595 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
596 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
597 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
598 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
599 elif [ -f $$dest ]; then \
600 $$e " That file exists, and is unwritable." ;\
602 $$e " The directory is unwritable." ;\
604 $$e " ####################################################################";\
611 @if [ "$$KDEDIR" != "" ]; then \
612 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
613 echo rm -f $$dest ; \
618 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
621 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"*
623 # Adds all current dependencies to Makefile
624 depend: XScreenSaver_ad.h
625 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
627 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
628 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
630 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
631 # close. This excludes dependencies on files in /usr/include, etc. It tries
632 # to include only dependencies on files which are themselves a part of this
634 distdepend: update_ad_version update_man_version XScreenSaver_ad.h
635 @echo updating dependencies in `pwd`/Makefile.in... ; \
636 $(DEPEND) -w 0 -f - \
637 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
638 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
639 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
640 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
643 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
644 sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
645 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
646 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
647 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
648 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
650 ) > /tmp/distdepend.$$$$ && \
651 mv Makefile.in Makefile.in.bak && \
652 mv /tmp/distdepend.$$$$ Makefile.in
654 # Updates the version number in the app-defaults file to be in sync with
655 # the version number in version.h. This is so people can tell when they
656 # have a version skew between the app-defaults file and the executable.
657 # Also update hacks/config/README in the same way.
659 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
660 U=$(UTILS_SRC)/version.h ; \
661 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
662 D=`date '+%d-%b-%Y'` ; \
663 for S in $$files ; do \
664 echo -n "Updating version number in $$S to $$V $$D... " ; \
666 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
667 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
669 if cmp -s $$S $$T ; then \
670 echo "unchanged." ; \
679 @for S in $(MEN); do \
680 U=$(UTILS_SRC)/version.h ; \
681 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
682 V="`date '+%d-%b-%Y'` ($$V)" ; \
683 echo -n "Updating footer in $$S to \"$$V\"... " ; \
685 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
687 if cmp -s $$S $$T ; then \
688 echo "unchanged." ; \
698 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
701 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
705 # Rules for noticing when the objects from the utils directory are out of
706 # date with respect to their sources, and going and building them according
707 # to the rules in their own Makefile...
709 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
710 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
711 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
712 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
713 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
714 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
715 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
716 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
717 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
721 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
723 # How we build object files in this directory.
725 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
727 # subprocs takes an extra -D option.
728 subprocs.o: subprocs.c
729 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
732 # demo-Gtk takes an extra -D option, and an extra -I option.
733 demo-Gtk.o: demo-Gtk.c
734 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) $(GTK_DEFS) \
735 $(CFLAGS) $(X_CFLAGS) \
738 # demo-Gtk-conf takes an extra -D option.
739 demo-Gtk-conf.o: demo-Gtk-conf.c
740 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
741 $(srcdir)/demo-Gtk-conf.c
744 # How we build the default app-defaults file into the program.
746 XScreenSaver_ad.h: XScreenSaver.ad
747 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
749 screensaver-properties.desktop: screensaver-properties.desktop.in Makefile
750 @echo generating $@... ; \
751 sed "s%[@]bindir[@]%${bindir}%g" \
752 < ${srcdir}/screensaver-properties.desktop.in \
755 # The executables linked in this directory.
757 xscreensaver: $(SAVER_OBJS)
758 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
760 xscreensaver-command: $(CMD_OBJS)
761 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
764 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
765 $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
767 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
768 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
769 $(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
772 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
773 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
774 $(GTK_LIBS) $(XML_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
777 xscreensaver-getimage: $(GETIMG_OBJS)
778 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
781 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
782 subprocs.o setuid.o splash.o prefs.o \
784 test-passwd.o: XScreenSaver_ad.h
786 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
787 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
790 $(CC) $(LDFLAGS) -o $@ test-uid.o
792 test-xdpms: test-xdpms.o
793 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
794 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
796 test-grab: test-grab.o
797 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
800 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
802 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
803 test-fade: test-fade.o $(UTILS_BIN)/fade.o
804 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
807 xdpyinfo.o: xdpyinfo.c
808 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
812 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
813 $(LIBS) $(X_LIBS) @GL_LIBS@ \
814 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
817 ##############################################################################
819 # DO NOT DELETE: updated by make distdepend
820 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
822 xscreensaver.o: ../config.h
823 xscreensaver.o: $(srcdir)/xscreensaver.h
824 xscreensaver.o: $(srcdir)/prefs.h
825 xscreensaver.o: XScreenSaver_ad.h
826 windows.o: ../config.h
827 windows.o: $(srcdir)/xscreensaver.h
828 windows.o: $(srcdir)/prefs.h
829 timers.o: ../config.h
830 timers.o: $(srcdir)/xscreensaver.h
831 timers.o: $(srcdir)/prefs.h
832 subprocs.o: ../config.h
833 subprocs.o: $(srcdir)/xscreensaver.h
834 subprocs.o: $(srcdir)/prefs.h
837 xset.o: $(srcdir)/xscreensaver.h
838 xset.o: $(srcdir)/prefs.h
839 splash.o: ../config.h
840 splash.o: $(srcdir)/xscreensaver.h
841 splash.o: $(srcdir)/prefs.h
842 setuid.o: ../config.h
843 setuid.o: $(srcdir)/xscreensaver.h
844 setuid.o: $(srcdir)/prefs.h
845 stderr.o: ../config.h
846 stderr.o: $(srcdir)/xscreensaver.h
847 stderr.o: $(srcdir)/prefs.h
848 demo-Xm.o: ../config.h
849 demo-Xm.o: $(srcdir)/prefs.h
850 demo-Xm.o: $(srcdir)/remote.h
851 demo-Xm.o: XScreenSaver_ad.h
852 demo-Xm-widgets.o: ../config.h
853 demo-Gtk.o: ../config.h
854 demo-Gtk.o: $(srcdir)/prefs.h
855 demo-Gtk.o: $(srcdir)/remote.h
856 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
857 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
858 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
859 demo-Gtk.o: XScreenSaver_ad.h
860 demo-Gtk-conf.o: ../config.h
861 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
862 demo-Gtk-widgets.o: ../config.h
863 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
864 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
865 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
866 demo-Gtk-support.o: ../config.h
867 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
868 xscreensaver-getimage.o: ../config.h
869 xscreensaver-getimage.o: $(srcdir)/prefs.h
870 xscreensaver-getimage.o: XScreenSaver_ad.h
871 passwd-pwent.o: ../config.h
873 lock.o: $(srcdir)/xscreensaver.h
874 lock.o: $(srcdir)/prefs.h
875 passwd.o: ../config.h
877 prefs.o: $(srcdir)/prefs.h
879 dpms.o: $(srcdir)/xscreensaver.h
880 dpms.o: $(srcdir)/prefs.h
881 remote.o: ../config.h
882 remote.o: $(srcdir)/remote.h
883 xscreensaver-command.o: ../config.h
884 xscreensaver-command.o: $(srcdir)/remote.h
885 test-passwd.o: ../config.h
886 test-passwd.o: $(srcdir)/xscreensaver.h
887 test-passwd.o: $(srcdir)/prefs.h
888 test-passwd.o: XScreenSaver_ad.h
889 test-uid.o: ../config.h
890 test-xdpms.o: ../config.h
891 test-grab.o: ../config.h
892 test-apm.o: ../config.h
893 test-fade.o: ../config.h
894 test-fade.o: $(srcdir)/xscreensaver.h
895 test-fade.o: $(srcdir)/prefs.h