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 = $(GNOME_DATADIR)/control-center/Desktop
21 GNOME_PANELDIR = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
22 GNOME_ICONDIR = $(GNOME_DATADIR)/pixmaps
23 GNOME_BINDIR = $(bindir)
29 DEFS2 = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
34 DEPEND_FLAGS = @DEPEND_FLAGS@
35 DEPEND_DEFINES = @DEPEND_DEFINES@
39 SUID_FLAGS = -o root -m 4755
40 INSTALL_PROGRAM = @INSTALL_PROGRAM@
41 INSTALL_SCRIPT = @INSTALL_SCRIPT@
42 INSTALL_SETUID = @INSTALL_SETUID@
43 INSTALL_DATA = @INSTALL_DATA@
44 INSTALL_DIRS = @INSTALL_DIRS@
48 X_PRE_LIBS = @X_PRE_LIBS@
49 X_EXTRA_LIBS = @X_EXTRA_LIBS@
54 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
55 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
56 # and that must come before -lX11. (e.g., -lSM and -lICE.)
57 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
58 # (e.g., -lsocket, -lnsl, etc.)
60 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
62 # SAVER_LIBS is the link line for "xscreensaver", and
63 # CMD_LIBS is the link line for "xscreensaver-command".
64 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
67 AD_DIR = @APPDEFAULTS@
69 PAM_CONF = /etc/pam.conf
71 UTILS_SRC = $(srcdir)/../utils
74 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
76 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
77 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
79 GTK_SRCS = demo-Gtk.c demo-Gtk-widgets.c
80 GTK_OBJS = demo-Gtk.o demo-Gtk-widgets.o
82 PWENT_SRCS = passwd-pwent.c
83 PWENT_OBJS = passwd-pwent.o
85 KERBEROS_SRCS = passwd-kerberos.c
86 KERBEROS_OBJS = passwd-kerberos.o
88 PAM_SRCS = passwd-pam.c
89 PAM_OBJS = passwd-pam.o
91 LOCK_SRCS_1 = lock.c passwd.c
92 LOCK_OBJS_1 = lock.o passwd.o
93 NOLOCK_SRCS_1 = lock.c
94 NOLOCK_OBJS_1 = lock.o
96 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
97 test-apm.c test-fade.c xdpyinfo.c
98 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
99 test-apm test-fade xdpyinfo
101 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
102 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
104 XDPMS_LIBS = @XDPMS_LIBS@
106 PASSWD_SRCS = @PASSWD_SRCS@
107 PASSWD_OBJS = @PASSWD_OBJS@
108 PASSWD_LIBS = @PASSWD_LIBS@
110 LOCK_SRCS = @LOCK_SRCS@
111 LOCK_OBJS = @LOCK_OBJS@
113 XMU_SRCS = @XMU_SRCS@
114 XMU_OBJS = @XMU_OBJS@
116 GL_SRCS = @SAVER_GL_SRCS@
117 GL_OBJS = @SAVER_GL_OBJS@
118 GL_LIBS = @SAVER_GL_LIBS@
120 LOGO = $(UTILS_SRC)/logo-50.xpm
121 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
122 $(UTILS_SRC)/visual.c
123 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
124 $(UTILS_BIN)/visual.o
126 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
127 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
129 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
130 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
133 GETIMG_SRCS_1 = xscreensaver-getimage.c
134 GETIMG_OBJS_1 = xscreensaver-getimage.o
136 GETIMG_SRCS = $(GETIMG_SRCS_1) \
137 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
138 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
139 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
140 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
141 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
143 GETIMG_OBJS = $(GETIMG_OBJS_1) \
144 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
145 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
146 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
147 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
148 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
150 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c \
151 xset.c splash.c setuid.c stderr.c
152 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o \
153 xset.o splash.o setuid.o stderr.o
155 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
156 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
157 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
158 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
160 CMD_SRCS = remote.c xscreensaver-command.c
161 CMD_OBJS = remote.o xscreensaver-command.o
163 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
164 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
166 DEMO_SRCS = prefs.c dpms.c remote.c $(DEMO_UTIL_SRCS)
167 DEMO_OBJS = prefs.o dpms.o remote.o $(DEMO_UTIL_OBJS)
169 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
170 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
171 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
174 CMD_LIBS = $(LIBS) $(X_LIBS) \
175 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
177 GETIMG_LIBS = $(LIBS) $(X_LIBS) \
178 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
180 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
181 xscreensaver-getimage
182 EXES2 = @ALL_DEMO_PROGRAMS@
183 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
185 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
186 demo-Gtk-widgets.h demo-Gtk-stubs.h
187 MEN = xscreensaver.man xscreensaver-demo.man \
188 xscreensaver-command.man \
189 xscreensaver-getimage.man \
190 xscreensaver-getimage-file.man \
191 xscreensaver-getimage-video.man
192 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
193 xscreensaver.kss xscreensaver-demo.glade \
194 screensaver-properties.desktop.in \
195 screensaver-properties-capplet \
197 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
198 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
199 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
201 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
202 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
203 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
204 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
209 all: $(EXES) $(EXES2)
212 install: install-program install-ad install-scripts \
213 install-gnome install-kde install-man @INSTALL_PAM@
214 uninstall: uninstall-program uninstall-ad \
215 uninstall-gnome uninstall-kde uninstall-man
218 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
221 install-program: $(EXES)
222 @if [ ! -d $(install_prefix)$(bindir) ]; then \
223 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
225 @inst="$(INSTALL_PROGRAM)" ; \
226 if [ @NEED_SETUID@ = yes ]; then \
227 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
228 if [ "$$me" = root ]; then \
229 inst="$(INSTALL_SETUID)" ; \
233 $$e " ####################################################################";\
234 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
235 $$e " passwords. If your system actually uses shadow passwords," ;\
236 $$e " then xscreensaver must be installed as a setuid root" ;\
237 $$e " program in order for locking to work. To do this, you" ;\
238 $$e " must run 'make install' as 'root', not as '$$me'." ;\
240 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
241 $$e " means that locking might not work. (Try it and see.)" ;\
242 $$e " ####################################################################";\
246 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
247 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
248 @echo $(INSTALL_PROGRAM) xscreensaver-command \
249 $(install_prefix)$(bindir)/xscreensaver-command ; \
250 $(INSTALL_PROGRAM) xscreensaver-command \
251 $(install_prefix)$(bindir)/xscreensaver-command
252 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
253 $(install_prefix)$(bindir)/xscreensaver-demo ; \
254 $(INSTALL_PROGRAM) xscreensaver-demo \
255 $(install_prefix)$(bindir)/xscreensaver-demo
256 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
257 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
258 $(INSTALL_PROGRAM) xscreensaver-getimage \
259 $(install_prefix)$(bindir)/xscreensaver-getimage
261 install-ad: XScreenSaver.ad
262 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
263 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
265 @-echo $(INSTALL_DATA) XScreenSaver.ad \
266 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
267 if $(INSTALL_DATA) XScreenSaver.ad \
268 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
272 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
274 $$e " ####################################################################";\
275 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
276 $$e " That file exists, and is unwritable. It is probably from" ;\
277 $$e " an older version of xscreensaver, and could cause things" ;\
278 $$e " to malfunction. Please delete it!" ;\
279 $$e " ####################################################################";\
284 $$e " ####################################################################";\
285 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
286 $$e " The directory is unwritable. This is probably ok;" ;\
287 $$e " xscreensaver should work without that file." ;\
288 $$e " ####################################################################";\
294 install-scripts: $(SCRIPTS) munge-scripts
295 @for program in $(SCRIPTS); do \
296 if [ -r $$program ] ; then \
299 p=$(srcdir)/$$program ; \
301 echo $(INSTALL_SCRIPT) $$p \
302 $(install_prefix)$(bindir)/$$program ; \
303 $(INSTALL_SCRIPT) $$p \
304 $(install_prefix)$(bindir)/$$program ; \
307 munge-scripts: $(SCRIPTS)
308 @tmp=/tmp/mf.$$$$ ; \
310 for program in $(SCRIPTS); do \
311 echo "adjusting location of perl in $$program..." ; \
312 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
313 < $(srcdir)/$$program > $$tmp ; \
314 if cmp -s $(srcdir)/$$program $$tmp ; then \
317 cat $$tmp > ./$$program ; \
323 if [ ! -d $(install_prefix)$(man1dir) ]; then \
324 $(INSTALL_DIRS) $(install_prefix)$(man1dir) ; \
326 for man in $$men; do \
327 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
328 echo $(INSTALL_DATA) $(srcdir)/$$man \
329 $(install_prefix)$(man1dir)/$$instname ; \
330 $(INSTALL_DATA) $(srcdir)/$$man \
331 $(install_prefix)$(man1dir)/$$instname ; \
335 @for program in $(EXES) $(SCRIPTS); do \
336 echo rm -f $(install_prefix)$(bindir)/$$program ; \
337 rm -f $(install_prefix)$(bindir)/$$program ; \
341 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
345 for man in $$men; do \
346 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
347 echo rm -f $(install_prefix)$(man1dir)/$$instname ; \
348 rm -f $(install_prefix)$(man1dir)/$$instname ; \
352 @src="$(srcdir)/xscreensaver.pam" ; \
353 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
355 dir="$(install_prefix)$(PAM_DIR)" ; \
356 conf="$(PAM_CONF)" ; \
358 if [ -d $$dir ] ; then \
360 if [ -f $$dir/xdm ]; then \
362 elif [ -f $$dir/login ]; then \
366 if [ -z "$$src2" ]; then \
367 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
368 $(INSTALL_DATA) $$src $$dir/$$dest ; \
370 src="xscreensaver.pam.$$$$" ; \
371 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
372 grep '^#%\|^auth' $$src2 > $$src ; \
373 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
374 $(INSTALL_DATA) $$src $$dir/$$dest ; \
379 if [ ! -f $$dir/$$dest ]; then \
382 $$e " ####################################################################";\
383 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
384 $$e " Authentication Modules (PAM). However, we were unable to" ;\
385 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
386 $$e " to work without this file (and old-style password" ;\
387 $$e " authentication will be used instead, which may or may not" ;\
389 $$e " ####################################################################";\
392 elif [ -f $$conf ]; then \
393 if ( grep $$dest $$conf >/dev/null ); then \
398 $$e " ####################################################################";\
399 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
400 $$e " Authentication Modules (PAM). To complete the installation";\
401 $$e " of PAM support, you must add the following line to the file";\
404 $$e " $$dest auth required /usr/lib/security/pam_unix.so.1" ;\
406 $$e " Be careful: if you mess up that file, you could completely" ;\
407 $$e " hose your machine (e.g., \`login' and \`su' won't work, and";\
408 $$e " you'll have to boot single-user to fix it.)" ;\
409 $$e " ####################################################################";\
414 install-gnome:: screensaver-properties.desktop
417 if [ "$(GNOME_DATADIR)" != "" ]; then \
419 if [ ! -d "$(install_prefix)$(GNOME_CCDIR)" ]; then \
420 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
421 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
424 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
425 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\
427 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
428 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\
431 lost1="$(install_prefix)$(GNOME_CCDIR)" ;\
434 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
435 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
436 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
439 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
440 $(GNOME_PANELDIR)/screensaver-properties.desktop ;\
441 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
442 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop ;\
445 lost2="$(install_prefix)$(GNOME_PANELDIR)" ;\
448 if [ "$$lost1" != "" -o "$$lost2" != "" ]; then \
451 $$e " ####################################################################";\
452 $$e " Warning: unable to install screensaver-properties.desktop into" ;\
453 plurality="this file" ;\
454 if [ "$$lost1" != "" -a "$$lost2" != "" ]; then \
455 $$e " $$lost1/ or into" ;\
457 plurality="these files" ;\
458 elif [ "$$lost1" != "" ]; then \
463 $$e " Without $$plurality," 'the "Screen Saver" section of the' ;\
464 $$e " Gnome Control Center (gnomecc) will not work properly." ;\
465 $$e " ####################################################################";\
471 install-gnome:: screensaver-properties-capplet
472 @if [ "$(GNOME_DATADIR)" != "" ]; then \
473 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
474 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
475 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
477 program=screensaver-properties-capplet ;\
478 echo $(INSTALL_SCRIPT) $$program \
479 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
480 if $(INSTALL_SCRIPT) $$program \
481 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
486 $$e " ####################################################################";\
487 $$e " Warning: unable to install $$program into" ;\
488 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
489 $$e " Without this file, the Gnome session manager will not" ;\
490 $$e " launch xscreensaver properly at login time." ;\
491 $$e " ####################################################################";\
497 install-gnome:: $(LOGO)
498 @if [ "$(GNOME_DATADIR)" != "" ]; then \
499 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
500 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
501 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
503 target=xscreensaver.xpm ;\
504 echo $(INSTALL_DATA) $(LOGO) \
505 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
506 $(INSTALL_DATA) $(LOGO) \
507 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
511 @if [ "$(GNOME_DATADIR)" != "" ]; then \
512 f=screensaver-properties.desktop ;\
513 echo rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
514 rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
515 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
516 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
520 @if [ "$(GNOME_DATADIR)" != "" ]; then \
521 program=screensaver-properties-capplet ;\
522 echo rm -f $(install_prefix)$(bindir)/$$program ;\
523 rm -f $(install_prefix)$(bindir)/$$program ;\
527 @if [ "$(GNOME_DATADIR)" != "" ]; then \
528 target=xscreensaver.xpm ;\
529 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
530 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
534 @src="$(srcdir)/xscreensaver.kss" ; \
535 if [ "$$KDEDIR" != "" ]; then \
536 dir="$(install_prefix)$$KDEDIR/bin" ; \
537 dest="$$dir/xscreensaver.kss" ; \
538 echo $(INSTALL_SCRIPT) $$src $$dest ; \
539 if $(INSTALL_SCRIPT) $$src $$dest ; then \
544 $$e " ####################################################################";\
545 $$e " Warning: unable to install $$dest" ;\
546 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
547 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
548 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
549 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
550 elif [ -f $$dest ]; then \
551 $$e " That file exists, and is unwritable." ;\
553 $$e " The directory is unwritable." ;\
555 $$e " ####################################################################";\
562 @if [ "$$KDEDIR" != "" ]; then \
563 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
564 echo rm -f $$dest ; \
569 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
572 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"*
574 # Adds all current dependencies to Makefile
575 depend: XScreenSaver_ad.h
576 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
578 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
579 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
581 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
582 # close. This excludes dependencies on files in /usr/include, etc. It tries
583 # to include only dependencies on files which are themselves a part of this
585 distdepend: update_ad_version update_man_version XScreenSaver_ad.h
586 @echo updating dependencies in `pwd`/Makefile.in... ; \
587 $(DEPEND) -w 0 -f - \
588 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
589 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
590 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
591 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
594 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
595 sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
596 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
597 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
598 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
599 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
601 ) > /tmp/distdepend.$$$$ && \
602 mv Makefile.in Makefile.in.bak && \
603 mv /tmp/distdepend.$$$$ Makefile.in
605 # Updates the version number in the app-defaults file to be in sync with
606 # the version number in version.h. This is so people can tell when they
607 # have a version skew between the app-defaults file and the executable.
609 @S=XScreenSaver.ad.in ; \
610 U=$(UTILS_SRC)/version.h ; \
611 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
612 D=`date '+%d-%b-%Y'` ; \
613 echo -n "Updating version number in $$S to $$V $$D... " ; \
615 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
616 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
618 if cmp -s $$S $$T ; then \
619 echo "unchanged." ; \
627 @for S in $(MEN); do \
628 U=$(UTILS_SRC)/version.h ; \
629 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
630 V="`date '+%d-%b-%Y'` ($$V)" ; \
631 echo -n "Updating footer in $$S to \"$$V\"... " ; \
633 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
635 if cmp -s $$S $$T ; then \
636 echo "unchanged." ; \
646 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
649 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
653 # Rules for noticing when the objects from the utils directory are out of
654 # date with respect to their sources, and going and building them according
655 # to the rules in their own Makefile...
657 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
658 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
659 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
660 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
661 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
662 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
663 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
664 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
665 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
669 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
671 # How we build object files in this directory.
673 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
675 # subprocs is the only one that takes an extra -D option.
676 subprocs.o: subprocs.c
677 $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) \
681 # How we build the default app-defaults file into the program.
683 XScreenSaver_ad.h: XScreenSaver.ad
684 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
686 screensaver-properties.desktop: screensaver-properties.desktop.in Makefile
687 @echo generating $@... ; \
688 sed "s%[@]bindir[@]%${bindir}%g" \
689 < ${srcdir}/screensaver-properties.desktop.in \
692 # The executables linked in this directory.
694 xscreensaver: $(SAVER_OBJS)
695 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
697 xscreensaver-command: $(CMD_OBJS)
698 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
701 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
702 cp -p @PREFERRED_DEMO_PROGRAM@ $@
704 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
705 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
706 $(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
709 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
710 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
711 $(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
714 xscreensaver-getimage: $(GETIMG_OBJS)
715 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
718 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
719 subprocs.o setuid.o splash.o prefs.o \
721 test-passwd.o: XScreenSaver_ad.h
723 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
724 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
727 $(CC) $(LDFLAGS) -o $@ test-uid.o
729 test-xdpms: test-xdpms.o
730 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
731 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
733 test-grab: test-grab.o
734 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
737 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
739 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
740 test-fade: test-fade.o
741 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
744 xdpyinfo.o: xdpyinfo.c
745 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
749 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
750 $(LIBS) $(X_LIBS) @GL_LIBS@ \
751 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
754 ##############################################################################
756 # DO NOT DELETE: updated by make distdepend
757 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
759 xscreensaver.o: ../config.h
760 xscreensaver.o: $(srcdir)/xscreensaver.h
761 xscreensaver.o: $(srcdir)/prefs.h
762 xscreensaver.o: $(UTILS_SRC)/version.h
763 xscreensaver.o: $(UTILS_SRC)/yarandom.h
764 xscreensaver.o: $(UTILS_SRC)/resources.h
765 xscreensaver.o: $(UTILS_SRC)/visual.h
766 xscreensaver.o: $(UTILS_SRC)/usleep.h
767 xscreensaver.o: XScreenSaver_ad.h
768 windows.o: ../config.h
769 windows.o: $(srcdir)/xscreensaver.h
770 windows.o: $(srcdir)/prefs.h
771 windows.o: $(UTILS_SRC)/visual.h
772 windows.o: $(UTILS_SRC)/fade.h
773 timers.o: ../config.h
774 timers.o: $(srcdir)/xscreensaver.h
775 timers.o: $(srcdir)/prefs.h
776 subprocs.o: ../config.h
777 subprocs.o: $(srcdir)/xscreensaver.h
778 subprocs.o: $(srcdir)/prefs.h
779 subprocs.o: $(UTILS_SRC)/yarandom.h
780 subprocs.o: $(UTILS_SRC)/visual.h
782 xset.o: $(srcdir)/xscreensaver.h
783 xset.o: $(srcdir)/prefs.h
784 splash.o: ../config.h
785 splash.o: $(srcdir)/xscreensaver.h
786 splash.o: $(srcdir)/prefs.h
787 splash.o: $(UTILS_SRC)/resources.h
788 setuid.o: ../config.h
789 setuid.o: $(srcdir)/xscreensaver.h
790 setuid.o: $(srcdir)/prefs.h
791 stderr.o: ../config.h
792 stderr.o: $(srcdir)/xscreensaver.h
793 stderr.o: $(srcdir)/prefs.h
794 stderr.o: $(UTILS_SRC)/resources.h
795 stderr.o: $(UTILS_SRC)/visual.h
796 demo-Xm.o: ../config.h
797 demo-Xm.o: $(UTILS_SRC)/version.h
798 demo-Xm.o: $(srcdir)/prefs.h
799 demo-Xm.o: $(UTILS_SRC)/resources.h
800 demo-Xm.o: $(UTILS_SRC)/visual.h
801 demo-Xm.o: $(srcdir)/remote.h
802 demo-Xm.o: $(UTILS_SRC)/usleep.h
803 demo-Xm.o: XScreenSaver_ad.h
804 demo-Xm-widgets.o: ../config.h
805 demo-Gtk.o: ../config.h
806 demo-Gtk.o: $(UTILS_SRC)/version.h
807 demo-Gtk.o: $(srcdir)/prefs.h
808 demo-Gtk.o: $(UTILS_SRC)/resources.h
809 demo-Gtk.o: $(UTILS_SRC)/visual.h
810 demo-Gtk.o: $(srcdir)/remote.h
811 demo-Gtk.o: $(UTILS_SRC)/usleep.h
812 demo-Gtk.o: $(UTILS_SRC)/logo-50.xpm
813 demo-Gtk.o: $(UTILS_SRC)/logo-180.xpm
814 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
815 demo-Gtk.o: XScreenSaver_ad.h
816 demo-Gtk-widgets.o: ../config.h
817 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
818 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
819 xscreensaver-getimage.o: $(UTILS_SRC)/utils.h
820 xscreensaver-getimage.o: ../config.h
821 xscreensaver-getimage.o: $(UTILS_SRC)/yarandom.h
822 xscreensaver-getimage.o: $(UTILS_SRC)/grabscreen.h
823 xscreensaver-getimage.o: $(UTILS_SRC)/resources.h
824 xscreensaver-getimage.o: $(UTILS_SRC)/colorbars.h
825 xscreensaver-getimage.o: $(srcdir)/prefs.h
826 xscreensaver-getimage.o: $(UTILS_SRC)/vroot.h
827 xscreensaver-getimage.o: XScreenSaver_ad.h
828 passwd-pwent.o: ../config.h
830 lock.o: $(srcdir)/xscreensaver.h
831 lock.o: $(srcdir)/prefs.h
832 lock.o: $(UTILS_SRC)/resources.h
833 passwd.o: ../config.h
835 prefs.o: $(srcdir)/prefs.h
836 prefs.o: $(UTILS_SRC)/resources.h
838 dpms.o: $(srcdir)/xscreensaver.h
839 dpms.o: $(srcdir)/prefs.h
840 remote.o: ../config.h
841 remote.o: $(srcdir)/remote.h
842 xscreensaver-command.o: ../config.h
843 xscreensaver-command.o: $(srcdir)/remote.h
844 xscreensaver-command.o: $(UTILS_SRC)/version.h
845 test-passwd.o: ../config.h
846 test-passwd.o: $(srcdir)/xscreensaver.h
847 test-passwd.o: $(srcdir)/prefs.h
848 test-passwd.o: $(UTILS_SRC)/resources.h
849 test-passwd.o: $(UTILS_SRC)/version.h
850 test-passwd.o: $(UTILS_SRC)/visual.h
851 test-passwd.o: XScreenSaver_ad.h
852 test-uid.o: ../config.h
853 test-xdpms.o: ../config.h
854 test-grab.o: ../config.h
855 test-apm.o: ../config.h
856 test-fade.o: ../config.h
857 test-fade.o: $(srcdir)/xscreensaver.h
858 test-fade.o: $(srcdir)/prefs.h
859 test-fade.o: $(UTILS_SRC)/fade.h