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 $(INSTALL_PROGRAM) xscreensaver-command \
249 $(install_prefix)$(bindir)/xscreensaver-command
250 $(INSTALL_PROGRAM) xscreensaver-demo \
251 $(install_prefix)$(bindir)/xscreensaver-demo
252 $(INSTALL_PROGRAM) xscreensaver-getimage \
253 $(install_prefix)$(bindir)/xscreensaver-getimage
255 install-ad: XScreenSaver.ad
256 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
257 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
259 @-echo $(INSTALL_DATA) XScreenSaver.ad \
260 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
261 if $(INSTALL_DATA) XScreenSaver.ad \
262 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
266 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
268 $$e " ####################################################################";\
269 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
270 $$e " That file exists, and is unwritable. It is probably from" ;\
271 $$e " an older version of xscreensaver, and could cause things" ;\
272 $$e " to malfunction. Please delete it!" ;\
273 $$e " ####################################################################";\
278 $$e " ####################################################################";\
279 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
280 $$e " The directory is unwritable. This is probably ok;" ;\
281 $$e " xscreensaver should work without that file." ;\
282 $$e " ####################################################################";\
288 install-scripts: $(SCRIPTS) munge-scripts
289 @for program in $(SCRIPTS); do \
290 if [ -r $$program ] ; then \
293 p=$(srcdir)/$$program ; \
295 echo $(INSTALL_SCRIPT) $$p \
296 $(install_prefix)$(bindir)/$$program ; \
297 $(INSTALL_SCRIPT) $$p \
298 $(install_prefix)$(bindir)/$$program ; \
301 munge-scripts: $(SCRIPTS)
302 @tmp=/tmp/mf.$$$$ ; \
304 for program in $(SCRIPTS); do \
305 echo "adjusting location of perl in $$program..." ; \
306 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
307 < $(srcdir)/$$program > $$tmp ; \
308 if cmp -s $(srcdir)/$$program $$tmp ; then \
311 cat $$tmp > ./$$program ; \
317 if [ ! -d $(install_prefix)$(man1dir) ]; then \
318 $(INSTALL_DIRS) $(install_prefix)$(man1dir) ; \
320 for man in $$men; do \
321 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
322 echo $(INSTALL_DATA) $(srcdir)/$$man \
323 $(install_prefix)$(man1dir)/$$instname ; \
324 $(INSTALL_DATA) $(srcdir)/$$man \
325 $(install_prefix)$(man1dir)/$$instname ; \
329 @for program in $(EXES) $(SCRIPTS); do \
330 echo rm -f $(install_prefix)$(bindir)/$$program ; \
331 rm -f $(install_prefix)$(bindir)/$$program ; \
335 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
339 for man in $$men; do \
340 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
341 echo rm -f $(install_prefix)$(man1dir)/$$instname ; \
342 rm -f $(install_prefix)$(man1dir)/$$instname ; \
346 @src="$(srcdir)/xscreensaver.pam" ; \
347 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
349 dir="$(install_prefix)$(PAM_DIR)" ; \
350 conf="$(PAM_CONF)" ; \
352 if [ -d $$dir ] ; then \
354 if [ -f $$dir/xdm ]; then \
356 elif [ -f $$dir/login ]; then \
360 if [ -z "$$src2" ]; then \
361 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
362 $(INSTALL_DATA) $$src $$dir/$$dest ; \
364 src="xscreensaver.pam.$$$$" ; \
365 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
366 grep '^#%\|^auth' $$src2 > $$src ; \
367 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
368 $(INSTALL_DATA) $$src $$dir/$$dest ; \
373 if [ ! -f $$dir/$$dest ]; then \
376 $$e " ####################################################################";\
377 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
378 $$e " Authentication Modules (PAM). However, we were unable to" ;\
379 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
380 $$e " to work without this file (and old-style password" ;\
381 $$e " authentication will be used instead, which may or may not" ;\
383 $$e " ####################################################################";\
386 elif [ -f $$conf ]; then \
387 if ( grep $$dest $$conf >/dev/null ); then \
392 $$e " ####################################################################";\
393 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
394 $$e " Authentication Modules (PAM). To complete the installation";\
395 $$e " of PAM support, you must add the following line to the file";\
398 $$e " $$dest auth required /usr/lib/security/pam_unix.so.1" ;\
400 $$e " Be careful: if you mess up that file, you could completely" ;\
401 $$e " hose your machine (e.g., \`login' and \`su' won't work, and";\
402 $$e " you'll have to boot single-user to fix it.)" ;\
403 $$e " ####################################################################";\
408 install-gnome:: screensaver-properties.desktop
411 if [ "$(GNOME_DATADIR)" != "" ]; then \
413 if [ ! -d "$(install_prefix)$(GNOME_CCDIR)" ]; then \
414 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
415 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
418 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
419 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\
421 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
422 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\
425 lost1="$(install_prefix)$(GNOME_CCDIR)" ;\
428 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
429 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
430 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
433 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
434 $(GNOME_PANELDIR)/screensaver-properties.desktop ;\
435 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
436 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop ;\
439 lost2="$(install_prefix)$(GNOME_PANELDIR)" ;\
442 if [ "$$lost1" != "" -o "$$lost2" != "" ]; then \
445 $$e " ####################################################################";\
446 $$e " Warning: unable to install screensaver-properties.desktop into" ;\
447 plurality="this file" ;\
448 if [ "$$lost1" != "" -a "$$lost2" != "" ]; then \
449 $$e " $$lost1/ or into" ;\
451 plurality="these files" ;\
452 elif [ "$$lost1" != "" ]; then \
457 $$e " Without $$plurality," 'the "Screen Saver" section of the' ;\
458 $$e " Gnome Control Center (gnomecc) will not work properly." ;\
459 $$e " ####################################################################";\
465 install-gnome:: screensaver-properties-capplet
466 @if [ "$(GNOME_DATADIR)" != "" ]; then \
467 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
468 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
469 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
471 program=screensaver-properties-capplet ;\
472 echo $(INSTALL_SCRIPT) $$program \
473 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
474 if $(INSTALL_SCRIPT) $$program \
475 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
480 $$e " ####################################################################";\
481 $$e " Warning: unable to install $$program into" ;\
482 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
483 $$e " Without this file, the Gnome session manager will not" ;\
484 $$e " launch xscreensaver properly at login time." ;\
485 $$e " ####################################################################";\
491 install-gnome:: $(LOGO)
492 @if [ "$(GNOME_DATADIR)" != "" ]; then \
493 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
494 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
495 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
497 target=xscreensaver.xpm ;\
498 echo $(INSTALL_DATA) $(LOGO) \
499 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
500 $(INSTALL_DATA) $(LOGO) \
501 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
505 @if [ "$(GNOME_DATADIR)" != "" ]; then \
506 f=screensaver-properties.desktop ;\
507 echo rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
508 rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
509 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
510 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
514 @if [ "$(GNOME_DATADIR)" != "" ]; then \
515 program=screensaver-properties-capplet ;\
516 echo rm -f $(install_prefix)$(bindir)/$$program ;\
517 rm -f $(install_prefix)$(bindir)/$$program ;\
521 @if [ "$(GNOME_DATADIR)" != "" ]; then \
522 target=xscreensaver.xpm ;\
523 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
524 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
528 @src="$(srcdir)/xscreensaver.kss" ; \
529 if [ "$$KDEDIR" != "" ]; then \
530 dir="$(install_prefix)$$KDEDIR/bin" ; \
531 dest="$$dir/xscreensaver.kss" ; \
532 echo $(INSTALL_SCRIPT) $$src $$dest ; \
533 if $(INSTALL_SCRIPT) $$src $$dest ; then \
538 $$e " ####################################################################";\
539 $$e " Warning: unable to install $$dest" ;\
540 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
541 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
542 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
543 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
544 elif [ -f $$dest ]; then \
545 $$e " That file exists, and is unwritable." ;\
547 $$e " The directory is unwritable." ;\
549 $$e " ####################################################################";\
556 @if [ "$$KDEDIR" != "" ]; then \
557 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
558 echo rm -f $$dest ; \
563 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
566 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"*
568 # Adds all current dependencies to Makefile
569 depend: XScreenSaver_ad.h
570 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
572 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
573 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
575 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
576 # close. This excludes dependencies on files in /usr/include, etc. It tries
577 # to include only dependencies on files which are themselves a part of this
579 distdepend: update_ad_version update_man_version XScreenSaver_ad.h
580 @echo updating dependencies in `pwd`/Makefile.in... ; \
581 $(DEPEND) -w 0 -f - \
582 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
583 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
584 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
585 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
588 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
589 sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
590 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
591 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
592 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
593 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
595 ) > /tmp/distdepend.$$$$ && \
596 mv Makefile.in Makefile.in.bak && \
597 mv /tmp/distdepend.$$$$ Makefile.in
599 # Updates the version number in the app-defaults file to be in sync with
600 # the version number in version.h. This is so people can tell when they
601 # have a version skew between the app-defaults file and the executable.
603 @S=XScreenSaver.ad.in ; \
604 U=$(UTILS_SRC)/version.h ; \
605 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
606 D=`date '+%d-%b-%Y'` ; \
607 echo -n "Updating version number in $$S to $$V $$D... " ; \
609 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
610 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
612 if cmp -s $$S $$T ; then \
613 echo "unchanged." ; \
621 @for S in $(MEN); do \
622 U=$(UTILS_SRC)/version.h ; \
623 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
624 V="`date '+%d-%b-%Y'` ($$V)" ; \
625 echo -n "Updating footer in $$S to \"$$V\"... " ; \
627 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
629 if cmp -s $$S $$T ; then \
630 echo "unchanged." ; \
640 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
643 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
647 # Rules for noticing when the objects from the utils directory are out of
648 # date with respect to their sources, and going and building them according
649 # to the rules in their own Makefile...
651 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
652 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
653 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
654 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
655 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
656 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
657 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
658 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
659 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
663 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
665 # How we build object files in this directory.
667 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
669 # subprocs is the only one that takes an extra -D option.
670 subprocs.o: subprocs.c
671 $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) \
675 # How we build the default app-defaults file into the program.
677 XScreenSaver_ad.h: XScreenSaver.ad
678 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
680 screensaver-properties.desktop: screensaver-properties.desktop.in Makefile
681 @echo generating $@... ; \
682 sed "s%[@]bindir[@]%${bindir}%g" \
683 < ${srcdir}/screensaver-properties.desktop.in \
686 # The executables linked in this directory.
688 xscreensaver: $(SAVER_OBJS)
689 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
691 xscreensaver-command: $(CMD_OBJS)
692 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
695 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
696 cp -p @PREFERRED_DEMO_PROGRAM@ $@
698 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
699 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
700 $(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
703 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
704 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
705 $(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
708 xscreensaver-getimage: $(GETIMG_OBJS)
709 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
712 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
713 subprocs.o setuid.o splash.o prefs.o \
715 test-passwd.o: XScreenSaver_ad.h
717 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
718 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
721 $(CC) $(LDFLAGS) -o $@ test-uid.o
723 test-xdpms: test-xdpms.o
724 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
725 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
727 test-grab: test-grab.o
728 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
731 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
733 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
734 test-fade: test-fade.o
735 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
738 xdpyinfo.o: xdpyinfo.c
739 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
743 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
744 $(LIBS) $(X_LIBS) @GL_LIBS@ \
745 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
748 ##############################################################################
750 # DO NOT DELETE: updated by make distdepend
751 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
753 xscreensaver.o: ../config.h
754 xscreensaver.o: $(srcdir)/xscreensaver.h
755 xscreensaver.o: $(srcdir)/prefs.h
756 xscreensaver.o: XScreenSaver_ad.h
757 windows.o: ../config.h
758 windows.o: $(srcdir)/xscreensaver.h
759 windows.o: $(srcdir)/prefs.h
760 timers.o: ../config.h
761 timers.o: $(srcdir)/xscreensaver.h
762 timers.o: $(srcdir)/prefs.h
763 subprocs.o: ../config.h
764 subprocs.o: $(srcdir)/xscreensaver.h
765 subprocs.o: $(srcdir)/prefs.h
767 xset.o: $(srcdir)/xscreensaver.h
768 xset.o: $(srcdir)/prefs.h
769 splash.o: ../config.h
770 splash.o: $(srcdir)/xscreensaver.h
771 splash.o: $(srcdir)/prefs.h
772 setuid.o: ../config.h
773 setuid.o: $(srcdir)/xscreensaver.h
774 setuid.o: $(srcdir)/prefs.h
775 stderr.o: ../config.h
776 stderr.o: $(srcdir)/xscreensaver.h
777 stderr.o: $(srcdir)/prefs.h
778 demo-Xm.o: ../config.h
779 demo-Xm.o: $(srcdir)/prefs.h
780 demo-Xm.o: $(srcdir)/remote.h
781 demo-Xm.o: XScreenSaver_ad.h
782 demo-Xm-widgets.o: ../config.h
783 demo-Gtk.o: ../config.h
784 demo-Gtk.o: $(srcdir)/prefs.h
785 demo-Gtk.o: $(srcdir)/remote.h
786 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
787 demo-Gtk.o: XScreenSaver_ad.h
788 demo-Gtk-widgets.o: ../config.h
789 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
790 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
791 xscreensaver-getimage.o: ../config.h
792 xscreensaver-getimage.o: $(srcdir)/prefs.h
793 xscreensaver-getimage.o: XScreenSaver_ad.h
794 passwd-pwent.o: ../config.h
796 lock.o: $(srcdir)/xscreensaver.h
797 lock.o: $(srcdir)/prefs.h
798 passwd.o: ../config.h
800 prefs.o: $(srcdir)/prefs.h
802 dpms.o: $(srcdir)/xscreensaver.h
803 dpms.o: $(srcdir)/prefs.h
804 remote.o: ../config.h
805 remote.o: $(srcdir)/remote.h
806 xscreensaver-command.o: ../config.h
807 xscreensaver-command.o: $(srcdir)/remote.h
808 test-passwd.o: ../config.h
809 test-passwd.o: $(srcdir)/xscreensaver.h
810 test-passwd.o: $(srcdir)/prefs.h
811 test-passwd.o: XScreenSaver_ad.h
812 test-uid.o: ../config.h
813 test-xdpms.o: ../config.h
814 test-grab.o: ../config.h
815 test-apm.o: ../config.h
816 test-fade.o: ../config.h
817 test-fade.o: $(srcdir)/xscreensaver.h
818 test-fade.o: $(srcdir)/prefs.h