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)
24 HACK_CONF_DIR = @HACK_CONF_DIR@
30 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
31 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GNOME_ICONDIR)"'
32 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
38 DEPEND_FLAGS = @DEPEND_FLAGS@
39 DEPEND_DEFINES = @DEPEND_DEFINES@
43 SUID_FLAGS = -o root -m 4755
44 INSTALL_PROGRAM = @INSTALL_PROGRAM@
45 INSTALL_SCRIPT = @INSTALL_SCRIPT@
46 INSTALL_SETUID = @INSTALL_SETUID@
47 INSTALL_DATA = @INSTALL_DATA@
48 INSTALL_DIRS = @INSTALL_DIRS@
52 X_PRE_LIBS = @X_PRE_LIBS@
53 X_EXTRA_LIBS = @X_EXTRA_LIBS@
58 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
59 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
60 # and that must come before -lX11. (e.g., -lSM and -lICE.)
61 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
62 # (e.g., -lsocket, -lnsl, etc.)
64 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
66 # SAVER_LIBS is the link line for "xscreensaver", and
67 # CMD_LIBS is the link line for "xscreensaver-command".
68 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
71 AD_DIR = @APPDEFAULTS@
73 PAM_CONF = /etc/pam.conf
75 UTILS_SRC = $(srcdir)/../utils
78 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
80 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
81 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
83 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
84 demo-Gtk-widgets.c demo-Gtk-support.c
85 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o \
86 demo-Gtk-widgets.o demo-Gtk-support.o
88 PWENT_SRCS = passwd-pwent.c
89 PWENT_OBJS = passwd-pwent.o
91 KERBEROS_SRCS = passwd-kerberos.c
92 KERBEROS_OBJS = passwd-kerberos.o
94 PAM_SRCS = passwd-pam.c
95 PAM_OBJS = passwd-pam.o
97 LOCK_SRCS_1 = lock.c passwd.c
98 LOCK_OBJS_1 = lock.o passwd.o
99 NOLOCK_SRCS_1 = lock.c
100 NOLOCK_OBJS_1 = lock.o
102 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
103 test-apm.c test-fade.c xdpyinfo.c
104 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
105 test-apm test-fade xdpyinfo
107 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
108 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
109 XML_LIBS = @XML_LIBS@
111 XDPMS_LIBS = @XDPMS_LIBS@
113 PASSWD_SRCS = @PASSWD_SRCS@
114 PASSWD_OBJS = @PASSWD_OBJS@
115 PASSWD_LIBS = @PASSWD_LIBS@
117 LOCK_SRCS = @LOCK_SRCS@
118 LOCK_OBJS = @LOCK_OBJS@
120 XMU_SRCS = @XMU_SRCS@
121 XMU_OBJS = @XMU_OBJS@
123 GL_SRCS = @SAVER_GL_SRCS@
124 GL_OBJS = @SAVER_GL_OBJS@
125 GL_LIBS = @SAVER_GL_LIBS@
127 ICON_SRC = $(UTILS_SRC)/images
128 LOGO = $(ICON_SRC)/logo-50.xpm
129 GNOME_ICONS = $(ICON_SRC)/screensaver-*.xpm
131 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
132 $(UTILS_SRC)/visual.c
133 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
134 $(UTILS_BIN)/visual.o
136 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
137 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
139 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
140 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
143 GETIMG_SRCS_1 = xscreensaver-getimage.c
144 GETIMG_OBJS_1 = xscreensaver-getimage.o
146 GETIMG_SRCS = $(GETIMG_SRCS_1) \
147 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
148 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
149 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
150 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
151 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
153 GETIMG_OBJS = $(GETIMG_OBJS_1) \
154 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
155 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
156 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
157 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
158 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
160 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c \
161 xset.c splash.c setuid.c stderr.c
162 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o \
163 xset.o splash.o setuid.o stderr.o
165 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
166 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
167 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
168 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
170 CMD_SRCS = remote.c xscreensaver-command.c
171 CMD_OBJS = remote.o xscreensaver-command.o
173 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
174 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
176 DEMO_SRCS = prefs.c dpms.c remote.c $(DEMO_UTIL_SRCS)
177 DEMO_OBJS = prefs.o dpms.o remote.o $(DEMO_UTIL_OBJS)
179 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
180 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
181 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
184 CMD_LIBS = $(LIBS) $(X_LIBS) \
185 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
187 GETIMG_LIBS = $(LIBS) $(X_LIBS) \
188 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
190 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
191 xscreensaver-getimage
192 EXES2 = @ALL_DEMO_PROGRAMS@
193 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
195 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
196 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
198 MEN = xscreensaver.man xscreensaver-demo.man \
199 xscreensaver-command.man \
200 xscreensaver-getimage.man \
201 xscreensaver-getimage-file.man \
202 xscreensaver-getimage-video.man
203 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
204 xscreensaver.kss xscreensaver-demo.glade \
205 screensaver-properties.desktop.in \
206 screensaver-properties-capplet \
208 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
209 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
210 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
212 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
213 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
214 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
215 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
220 all: $(EXES) $(EXES2)
223 install: install-program install-ad install-scripts \
224 install-gnome install-kde install-man @INSTALL_PAM@
225 uninstall: uninstall-program uninstall-ad \
226 uninstall-gnome uninstall-kde uninstall-man
229 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
232 install-program: $(EXES)
233 @if [ ! -d $(install_prefix)$(bindir) ]; then \
234 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
236 @inst="$(INSTALL_PROGRAM)" ; \
237 if [ @NEED_SETUID@ = yes ]; then \
238 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
239 if [ "$$me" = root ]; then \
240 inst="$(INSTALL_SETUID)" ; \
244 $$e " ####################################################################";\
245 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
246 $$e " passwords. If your system actually uses shadow passwords," ;\
247 $$e " then xscreensaver must be installed as a setuid root" ;\
248 $$e " program in order for locking to work. To do this, you" ;\
249 $$e " must run 'make install' as 'root', not as '$$me'." ;\
251 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
252 $$e " means that locking might not work. (Try it and see.)" ;\
253 $$e " ####################################################################";\
257 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
258 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
259 @echo $(INSTALL_PROGRAM) xscreensaver-command \
260 $(install_prefix)$(bindir)/xscreensaver-command ; \
261 $(INSTALL_PROGRAM) xscreensaver-command \
262 $(install_prefix)$(bindir)/xscreensaver-command
263 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
264 $(install_prefix)$(bindir)/xscreensaver-demo ; \
265 $(INSTALL_PROGRAM) xscreensaver-demo \
266 $(install_prefix)$(bindir)/xscreensaver-demo
267 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
268 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
269 $(INSTALL_PROGRAM) xscreensaver-getimage \
270 $(install_prefix)$(bindir)/xscreensaver-getimage
272 install-ad: XScreenSaver.ad
273 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
274 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
276 @-echo $(INSTALL_DATA) XScreenSaver.ad \
277 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
278 if $(INSTALL_DATA) XScreenSaver.ad \
279 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
283 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
285 $$e " ####################################################################";\
286 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
287 $$e " That file exists, and is unwritable. It is probably from" ;\
288 $$e " an older version of xscreensaver, and could cause things" ;\
289 $$e " to malfunction. Please delete it!" ;\
290 $$e " ####################################################################";\
295 $$e " ####################################################################";\
296 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
297 $$e " The directory is unwritable. This is probably ok;" ;\
298 $$e " xscreensaver should work without that file." ;\
299 $$e " ####################################################################";\
305 install-scripts: $(SCRIPTS) munge-scripts
306 @for program in $(SCRIPTS); do \
307 if [ -r $$program ] ; then \
310 p=$(srcdir)/$$program ; \
312 echo $(INSTALL_SCRIPT) $$p \
313 $(install_prefix)$(bindir)/$$program ; \
314 $(INSTALL_SCRIPT) $$p \
315 $(install_prefix)$(bindir)/$$program ; \
318 munge-scripts: $(SCRIPTS)
319 @tmp=/tmp/mf.$$$$ ; \
322 for program in $(SCRIPTS); do \
323 echo "adjusting location of perl in $$program..." ; \
324 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
325 < $(srcdir)/$$program > $$tmp ; \
326 if cmp -s $(srcdir)/$$program $$tmp ; then \
329 cat $$tmp > ./$$program ; \
336 if [ ! -d $(install_prefix)$(man1dir) ]; then \
337 $(INSTALL_DIRS) $(install_prefix)$(man1dir) ; \
339 for man in $$men; do \
340 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
341 echo $(INSTALL_DATA) $(srcdir)/$$man \
342 $(install_prefix)$(man1dir)/$$instname ; \
343 $(INSTALL_DATA) $(srcdir)/$$man \
344 $(install_prefix)$(man1dir)/$$instname ; \
348 @for program in $(EXES) $(SCRIPTS); do \
349 echo rm -f $(install_prefix)$(bindir)/$$program ; \
350 rm -f $(install_prefix)$(bindir)/$$program ; \
354 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
358 for man in $$men; do \
359 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
360 echo rm -f $(install_prefix)$(man1dir)/$$instname ; \
361 rm -f $(install_prefix)$(man1dir)/$$instname ; \
365 @src="$(srcdir)/xscreensaver.pam" ; \
366 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
368 dir="$(install_prefix)$(PAM_DIR)" ; \
369 conf="$(PAM_CONF)" ; \
371 if [ -d $$dir ] ; then \
373 if [ -f $$dir/xdm ]; then \
375 elif [ -f $$dir/login ]; then \
379 if [ -z "$$src2" ]; then \
380 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
381 $(INSTALL_DATA) $$src $$dir/$$dest ; \
383 src="xscreensaver.pam.$$$$" ; \
384 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
385 grep '^#%\|^auth' $$src2 > $$src ; \
386 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
387 $(INSTALL_DATA) $$src $$dir/$$dest ; \
392 if [ ! -f $$dir/$$dest ]; then \
395 $$e " ####################################################################";\
396 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
397 $$e " Authentication Modules (PAM). However, we were unable to" ;\
398 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
399 $$e " to work without this file (and old-style password" ;\
400 $$e " authentication will be used instead, which may or may not" ;\
402 $$e " ####################################################################";\
405 elif [ -f $$conf ]; then \
406 if ( grep $$dest $$conf >/dev/null ); then \
411 $$e " ####################################################################";\
412 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
413 $$e " Authentication Modules (PAM). To complete the installation";\
414 $$e " of PAM support, you must add the following line to the file";\
417 $$e " $$dest auth required /usr/lib/security/pam_unix.so.1" ;\
419 $$e " Be careful: if you mess up that file, you could completely" ;\
420 $$e " hose your machine (e.g., \`login' and \`su' won't work, and";\
421 $$e " you'll have to boot single-user to fix it.)" ;\
422 $$e " ####################################################################";\
427 install-gnome:: screensaver-properties.desktop
430 if [ "$(GNOME_DATADIR)" != "" ]; then \
432 if [ ! -d "$(install_prefix)$(GNOME_CCDIR)" ]; then \
433 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
434 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
437 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
438 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\
440 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
441 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\
444 lost1="$(install_prefix)$(GNOME_CCDIR)" ;\
447 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
448 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
449 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
452 echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
453 $(GNOME_PANELDIR)/screensaver-properties.desktop ;\
454 if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \
455 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop ;\
458 lost2="$(install_prefix)$(GNOME_PANELDIR)" ;\
461 if [ "$$lost1" != "" -o "$$lost2" != "" ]; then \
464 $$e " ####################################################################";\
465 $$e " Warning: unable to install screensaver-properties.desktop into" ;\
466 plurality="this file" ;\
467 if [ "$$lost1" != "" -a "$$lost2" != "" ]; then \
468 $$e " $$lost1/ or into" ;\
470 plurality="these files" ;\
471 elif [ "$$lost1" != "" ]; then \
476 $$e " Without $$plurality," 'the "Screen Saver" section of the' ;\
477 $$e " Gnome Control Center (gnomecc) will not work properly." ;\
478 $$e " ####################################################################";\
484 install-gnome:: screensaver-properties-capplet
485 @if [ "$(GNOME_DATADIR)" != "" ]; then \
486 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
487 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
488 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
490 program=screensaver-properties-capplet ;\
491 echo $(INSTALL_SCRIPT) $$program \
492 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
493 if $(INSTALL_SCRIPT) $$program \
494 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
499 $$e " ####################################################################";\
500 $$e " Warning: unable to install $$program into" ;\
501 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
502 $$e " Without this file, the Gnome session manager will not" ;\
503 $$e " launch xscreensaver properly at login time." ;\
504 $$e " ####################################################################";\
511 install-gnome:: $(LOGO)
512 @if [ "$(GNOME_DATADIR)" != "" ]; then \
513 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
514 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
515 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
517 target=xscreensaver.xpm ;\
518 echo $(INSTALL_DATA) $(LOGO) \
519 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
520 $(INSTALL_DATA) $(LOGO) \
521 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
524 # ../utils/images/screensaver-*.xpm
526 @if [ "$(GNOME_DATADIR)" != "" ]; then \
527 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
528 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
529 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
531 for target in $(GNOME_ICONS) ; do \
532 dest=`echo $$target | sed 's@^.*/@@'` ;\
533 echo $(INSTALL_DATA) $$target \
534 $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
535 $(INSTALL_DATA) $$target \
536 $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
540 # screensaver-properties.desktop
542 @if [ "$(GNOME_DATADIR)" != "" ]; then \
543 f=screensaver-properties.desktop ;\
544 echo rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
545 rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
546 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
547 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
550 # screensaver-properties-capplet
552 @if [ "$(GNOME_DATADIR)" != "" ]; then \
553 program=screensaver-properties-capplet ;\
554 echo rm -f $(install_prefix)$(bindir)/$$program ;\
555 rm -f $(install_prefix)$(bindir)/$$program ;\
560 @if [ "$(GNOME_DATADIR)" != "" ]; then \
561 target=xscreensaver.xpm ;\
562 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
563 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
568 @if [ "$(GNOME_DATADIR)" != "" ]; then \
569 for target in $(GNOME_ICONS) ; do \
570 dest=`echo $$target | sed 's@^.*/@@'` ;\
571 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
572 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\
577 @src="$(srcdir)/xscreensaver.kss" ; \
578 if [ "$$KDEDIR" != "" ]; then \
579 dir="$(install_prefix)$$KDEDIR/bin" ; \
580 dest="$$dir/xscreensaver.kss" ; \
581 echo $(INSTALL_SCRIPT) $$src $$dest ; \
582 if $(INSTALL_SCRIPT) $$src $$dest ; then \
587 $$e " ####################################################################";\
588 $$e " Warning: unable to install $$dest" ;\
589 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
590 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
591 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
592 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
593 elif [ -f $$dest ]; then \
594 $$e " That file exists, and is unwritable." ;\
596 $$e " The directory is unwritable." ;\
598 $$e " ####################################################################";\
605 @if [ "$$KDEDIR" != "" ]; then \
606 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
607 echo rm -f $$dest ; \
612 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
615 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"*
617 # Adds all current dependencies to Makefile
618 depend: XScreenSaver_ad.h
619 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
621 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
622 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
624 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
625 # close. This excludes dependencies on files in /usr/include, etc. It tries
626 # to include only dependencies on files which are themselves a part of this
628 distdepend: update_ad_version update_man_version XScreenSaver_ad.h
629 @echo updating dependencies in `pwd`/Makefile.in... ; \
630 $(DEPEND) -w 0 -f - \
631 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
632 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
633 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
634 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
637 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
638 sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
639 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
640 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
641 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
642 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
644 ) > /tmp/distdepend.$$$$ && \
645 mv Makefile.in Makefile.in.bak && \
646 mv /tmp/distdepend.$$$$ Makefile.in
648 # Updates the version number in the app-defaults file to be in sync with
649 # the version number in version.h. This is so people can tell when they
650 # have a version skew between the app-defaults file and the executable.
651 # Also update hacks/config/README in the same way.
653 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
654 U=$(UTILS_SRC)/version.h ; \
655 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
656 D=`date '+%d-%b-%Y'` ; \
657 for S in $$files ; do \
658 echo -n "Updating version number in $$S to $$V $$D... " ; \
660 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
661 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
663 if cmp -s $$S $$T ; then \
664 echo "unchanged." ; \
673 @for S in $(MEN); do \
674 U=$(UTILS_SRC)/version.h ; \
675 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
676 V="`date '+%d-%b-%Y'` ($$V)" ; \
677 echo -n "Updating footer in $$S to \"$$V\"... " ; \
679 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
681 if cmp -s $$S $$T ; then \
682 echo "unchanged." ; \
692 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
695 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
699 # Rules for noticing when the objects from the utils directory are out of
700 # date with respect to their sources, and going and building them according
701 # to the rules in their own Makefile...
703 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
704 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
705 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
706 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
707 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
708 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
709 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
710 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
711 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
715 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
717 # How we build object files in this directory.
719 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
721 # subprocs takes an extra -D option.
722 subprocs.o: subprocs.c
723 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
726 # demo-Gtk takes an extra -D option, and an extra -I option.
727 demo-Gtk.o: demo-Gtk.c
728 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) $(GTK_DEFS) \
729 $(CFLAGS) $(X_CFLAGS) \
732 # demo-Gtk-conf takes an extra -D option.
733 demo-Gtk-conf.o: demo-Gtk-conf.c
734 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
735 $(srcdir)/demo-Gtk-conf.c
738 # How we build the default app-defaults file into the program.
740 XScreenSaver_ad.h: XScreenSaver.ad
741 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
743 screensaver-properties.desktop: screensaver-properties.desktop.in Makefile
744 @echo generating $@... ; \
745 sed "s%[@]bindir[@]%${bindir}%g" \
746 < ${srcdir}/screensaver-properties.desktop.in \
749 # The executables linked in this directory.
751 xscreensaver: $(SAVER_OBJS)
752 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
754 xscreensaver-command: $(CMD_OBJS)
755 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
758 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
759 cp -p @PREFERRED_DEMO_PROGRAM@ $@
761 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
762 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
763 $(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
766 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
767 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
768 $(GTK_LIBS) $(XML_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \
771 xscreensaver-getimage: $(GETIMG_OBJS)
772 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
775 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
776 subprocs.o setuid.o splash.o prefs.o \
778 test-passwd.o: XScreenSaver_ad.h
780 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
781 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
784 $(CC) $(LDFLAGS) -o $@ test-uid.o
786 test-xdpms: test-xdpms.o
787 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
788 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
790 test-grab: test-grab.o
791 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
794 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
796 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
797 test-fade: test-fade.o $(UTILS_BIN)/fade.o
798 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
801 xdpyinfo.o: xdpyinfo.c
802 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
806 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
807 $(LIBS) $(X_LIBS) @GL_LIBS@ \
808 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
811 ##############################################################################
813 # DO NOT DELETE: updated by make distdepend
814 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
816 xscreensaver.o: ../config.h
817 xscreensaver.o: $(srcdir)/xscreensaver.h
818 xscreensaver.o: $(srcdir)/prefs.h
819 xscreensaver.o: XScreenSaver_ad.h
820 windows.o: ../config.h
821 windows.o: $(srcdir)/xscreensaver.h
822 windows.o: $(srcdir)/prefs.h
823 timers.o: ../config.h
824 timers.o: $(srcdir)/xscreensaver.h
825 timers.o: $(srcdir)/prefs.h
826 subprocs.o: ../config.h
827 subprocs.o: $(srcdir)/xscreensaver.h
828 subprocs.o: $(srcdir)/prefs.h
830 xset.o: $(srcdir)/xscreensaver.h
831 xset.o: $(srcdir)/prefs.h
832 splash.o: ../config.h
833 splash.o: $(srcdir)/xscreensaver.h
834 splash.o: $(srcdir)/prefs.h
835 setuid.o: ../config.h
836 setuid.o: $(srcdir)/xscreensaver.h
837 setuid.o: $(srcdir)/prefs.h
838 stderr.o: ../config.h
839 stderr.o: $(srcdir)/xscreensaver.h
840 stderr.o: $(srcdir)/prefs.h
841 demo-Xm.o: ../config.h
842 demo-Xm.o: $(srcdir)/prefs.h
843 demo-Xm.o: $(srcdir)/remote.h
844 demo-Xm.o: XScreenSaver_ad.h
845 demo-Xm-widgets.o: ../config.h
846 demo-Gtk.o: ../config.h
847 demo-Gtk.o: $(srcdir)/prefs.h
848 demo-Gtk.o: $(srcdir)/remote.h
849 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
850 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
851 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
852 demo-Gtk.o: XScreenSaver_ad.h
853 demo-Gtk-conf.o: ../config.h
854 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
855 demo-Gtk-widgets.o: ../config.h
856 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
857 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
858 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
859 demo-Gtk-support.o: ../config.h
860 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
861 xscreensaver-getimage.o: ../config.h
862 xscreensaver-getimage.o: $(srcdir)/prefs.h
863 xscreensaver-getimage.o: XScreenSaver_ad.h
864 passwd-pwent.o: ../config.h
866 lock.o: $(srcdir)/xscreensaver.h
867 lock.o: $(srcdir)/prefs.h
868 passwd.o: ../config.h
870 prefs.o: $(srcdir)/prefs.h
872 dpms.o: $(srcdir)/xscreensaver.h
873 dpms.o: $(srcdir)/prefs.h
874 remote.o: ../config.h
875 remote.o: $(srcdir)/remote.h
876 xscreensaver-command.o: ../config.h
877 xscreensaver-command.o: $(srcdir)/remote.h
878 test-passwd.o: ../config.h
879 test-passwd.o: $(srcdir)/xscreensaver.h
880 test-passwd.o: $(srcdir)/prefs.h
881 test-passwd.o: XScreenSaver_ad.h
882 test-uid.o: ../config.h
883 test-xdpms.o: ../config.h
884 test-grab.o: ../config.h
885 test-apm.o: ../config.h
886 test-fade.o: ../config.h
887 test-fade.o: $(srcdir)/xscreensaver.h
888 test-fade.o: $(srcdir)/prefs.h