1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-1999 Jamie Zawinski.
2 # the `../configure' script generates `driver/Makefile' from this file.
10 top_srcdir = @top_srcdir@
15 exec_prefix = @exec_prefix@
18 datadir = $(GNOME_DATADIR)
19 localedir = $(datadir)/locale
22 manNdir = $(mandir)/man$(mansuffix)
24 INTLTOOL_MERGE = @INTLTOOL_MERGE@
26 GNOME_DATADIR = @GNOME_DATADIR@
27 GNOME_CCDIR_1 = $(GNOME_DATADIR)/control-center/Desktop
28 GNOME_CCDIR_2 = $(GNOME_DATADIR)/control-center/capplets
29 GNOME_CCDIR_3 = $(GNOME_DATADIR)/control-center-2.0/capplets
30 GNOME_PANELDIR1 = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
31 GNOME_PANELDIR2 = $(GNOME_DATADIR)/applications
32 GNOME_PANELDIR = @GNOME_PANELDIR@
33 GLADE_DATADIR = @GLADE_DATADIR@
34 GNOME_BINDIR = $(bindir)
35 HACK_CONF_DIR = @HACK_CONF_DIR@
41 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
42 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
43 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GLADE_DATADIR)"'
44 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
47 INTL_LIBS = @INTLLIBS@
51 DEPEND_FLAGS = @DEPEND_FLAGS@
52 DEPEND_DEFINES = @DEPEND_DEFINES@
56 SUID_FLAGS = -o root -m 4755
57 INSTALL_PROGRAM = @INSTALL_PROGRAM@
58 INSTALL_SCRIPT = @INSTALL_SCRIPT@
59 INSTALL_SETUID = @INSTALL_SETUID@
60 INSTALL_DATA = @INSTALL_DATA@
61 INSTALL_DIRS = @INSTALL_DIRS@
65 X_PRE_LIBS = @X_PRE_LIBS@
66 X_EXTRA_LIBS = @X_EXTRA_LIBS@
72 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
73 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
74 # and that must come before -lX11. (e.g., -lSM and -lICE.)
75 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
76 # (e.g., -lsocket, -lnsl, etc.)
78 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
80 # SAVER_LIBS is the link line for "xscreensaver", and
81 # CMD_LIBS is the link line for "xscreensaver-command".
82 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
85 AD_DIR = @APPDEFAULTS@
87 PAM_CONF = /etc/pam.conf
89 UTILS_SRC = $(srcdir)/../utils
92 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
94 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
95 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
97 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
98 demo-Gtk-widgets.c demo-Gtk-support.c
99 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
100 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
102 PWENT_SRCS = passwd-pwent.c
103 PWENT_OBJS = passwd-pwent.o
105 KERBEROS_SRCS = passwd-kerberos.c
106 KERBEROS_OBJS = passwd-kerberos.o
108 PAM_SRCS = passwd-pam.c
109 PAM_OBJS = passwd-pam.o
111 LOCK_SRCS_1 = lock.c passwd.c
112 LOCK_OBJS_1 = lock.o passwd.o
113 NOLOCK_SRCS_1 = lock.c
114 NOLOCK_OBJS_1 = lock.o
116 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
117 test-apm.c test-fade.c xdpyinfo.c
118 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
119 test-apm test-fade xdpyinfo
121 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
122 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
123 XML_LIBS = @XML_LIBS@
125 XDPMS_LIBS = @XDPMS_LIBS@
127 PASSWD_SRCS = @PASSWD_SRCS@
128 PASSWD_OBJS = @PASSWD_OBJS@
129 PASSWD_LIBS = @PASSWD_LIBS@
131 LOCK_SRCS = @LOCK_SRCS@
132 LOCK_OBJS = @LOCK_OBJS@
134 XMU_SRCS = @XMU_SRCS@
135 XMU_OBJS = @XMU_OBJS@
137 GL_SRCS = @SAVER_GL_SRCS@
138 GL_OBJS = @SAVER_GL_OBJS@
139 GL_LIBS = @SAVER_GL_LIBS@
141 ICON_SRC = $(UTILS_SRC)/images
142 LOGO = $(ICON_SRC)/logo-50.xpm
143 GTK_ICONS = $(ICON_SRC)/screensaver-*.xpm
145 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
146 $(UTILS_SRC)/visual.c
147 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
148 $(UTILS_BIN)/visual.o
150 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
151 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
153 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
154 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
157 GETIMG_SRCS_1 = xscreensaver-getimage.c
158 GETIMG_OBJS_1 = xscreensaver-getimage.o
160 GETIMG_SRCS = $(GETIMG_SRCS_1) \
161 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
162 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
163 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
164 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
165 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
167 GETIMG_OBJS = $(GETIMG_OBJS_1) \
168 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
169 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
170 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
171 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
172 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
174 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
175 xset.c splash.c setuid.c stderr.c
176 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
177 xset.o splash.o setuid.o stderr.o
179 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
180 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
181 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
182 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
184 CMD_SRCS = remote.c xscreensaver-command.c
185 CMD_OBJS = remote.o xscreensaver-command.o
187 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
188 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
190 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
191 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
193 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
194 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
195 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
198 CMD_LIBS = $(LIBS) $(X_LIBS) \
199 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
201 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) \
202 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
204 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
205 xscreensaver-getimage
206 EXES2 = @ALL_DEMO_PROGRAMS@
207 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
209 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
210 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
212 MEN = xscreensaver.man xscreensaver-demo.man \
213 xscreensaver-command.man \
214 xscreensaver-getimage.man \
215 xscreensaver-getimage-file.man \
216 xscreensaver-getimage-video.man
217 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
218 xscreensaver-demo.glade xscreensaver-demo.glade2 \
219 xscreensaver-demo.glade2p \
220 screensaver-properties.desktop.in \
221 screensaver-properties-capplet \
222 xscreensaver.kss.in \
224 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
225 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
226 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
228 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
229 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
230 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
231 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
236 all: $(EXES) $(EXES2)
239 install: install-program install-ad install-scripts \
240 install-gnome install-kde install-man @INSTALL_PAM@
241 uninstall: uninstall-program uninstall-ad \
242 uninstall-gnome uninstall-kde uninstall-man
245 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
248 install-program: $(EXES)
249 @if [ ! -d $(install_prefix)$(bindir) ]; then \
250 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
252 @inst="$(INSTALL_PROGRAM)" ; \
253 if [ @NEED_SETUID@ = yes ]; then \
254 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
255 if [ "$$me" = root ]; then \
256 inst="$(INSTALL_SETUID)" ; \
260 $$e " ####################################################################";\
261 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
262 $$e " passwords. If your system actually uses shadow passwords," ;\
263 $$e " then xscreensaver must be installed as a setuid root" ;\
264 $$e " program in order for locking to work. To do this, you" ;\
265 $$e " must run 'make install' as 'root', not as '$$me'." ;\
267 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
268 $$e " means that locking might not work. (Try it and see.)" ;\
269 $$e " ####################################################################";\
273 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
274 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
275 @echo $(INSTALL_PROGRAM) xscreensaver-command \
276 $(install_prefix)$(bindir)/xscreensaver-command ; \
277 $(INSTALL_PROGRAM) xscreensaver-command \
278 $(install_prefix)$(bindir)/xscreensaver-command
279 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
280 $(install_prefix)$(bindir)/xscreensaver-demo ; \
281 $(INSTALL_PROGRAM) xscreensaver-demo \
282 $(install_prefix)$(bindir)/xscreensaver-demo
283 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
284 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
285 $(INSTALL_PROGRAM) xscreensaver-getimage \
286 $(install_prefix)$(bindir)/xscreensaver-getimage
288 install-ad: XScreenSaver.ad
289 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
290 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
292 @-echo $(INSTALL_DATA) XScreenSaver.ad \
293 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
294 if $(INSTALL_DATA) XScreenSaver.ad \
295 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
299 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
301 $$e " ####################################################################";\
302 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
303 $$e " That file exists, and is unwritable. It is probably from" ;\
304 $$e " an older version of xscreensaver, and could cause things" ;\
305 $$e " to malfunction. Please delete it!" ;\
306 $$e " ####################################################################";\
311 $$e " ####################################################################";\
312 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
313 $$e " The directory is unwritable. This is probably ok;" ;\
314 $$e " xscreensaver should work without that file." ;\
315 $$e " ####################################################################";\
321 install-scripts: $(SCRIPTS) munge-scripts
322 @for program in $(SCRIPTS); do \
323 if [ -r $$program ] ; then \
326 p=$(srcdir)/$$program ; \
328 echo $(INSTALL_SCRIPT) $$p \
329 $(install_prefix)$(bindir)/$$program ; \
330 $(INSTALL_SCRIPT) $$p \
331 $(install_prefix)$(bindir)/$$program ; \
334 munge-scripts: $(SCRIPTS)
335 @tmp=/tmp/mf.$$$$ ; \
338 for program in $(SCRIPTS); do \
339 echo "adjusting location of perl in $$program..." ; \
340 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
341 < $(srcdir)/$$program > $$tmp ; \
342 if cmp -s $(srcdir)/$$program $$tmp ; then \
345 cat $$tmp > ./$$program ; \
352 if [ ! -d $(install_prefix)$(manNdir) ]; then \
353 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
355 for man in $$men; do \
356 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
357 echo $(INSTALL_DATA) $(srcdir)/$$man \
358 $(install_prefix)$(manNdir)/$$instname ; \
359 $(INSTALL_DATA) $(srcdir)/$$man \
360 $(install_prefix)$(manNdir)/$$instname ; \
364 @for program in $(EXES) $(SCRIPTS); do \
365 echo rm -f $(install_prefix)$(bindir)/$$program ; \
366 rm -f $(install_prefix)$(bindir)/$$program ; \
370 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
374 for man in $$men; do \
375 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
376 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
377 rm -f $(install_prefix)$(manNdir)/$$instname ; \
381 @src="$(srcdir)/xscreensaver.pam" ; \
382 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
384 dir="$(install_prefix)$(PAM_DIR)" ; \
385 conf="$(PAM_CONF)" ; \
387 if [ -d $$dir ] ; then \
389 if [ -f $$dir/xdm ]; then \
391 elif [ -f $$dir/login ]; then \
395 if [ -z "$$src2" ]; then \
396 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
397 $(INSTALL_DATA) $$src $$dir/$$dest ; \
399 src="xscreensaver.pam.$$$$" ; \
400 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
401 grep '^#%\|^auth' $$src2 > $$src ; \
402 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
403 $(INSTALL_DATA) $$src $$dir/$$dest ; \
408 if [ ! -f $$dir/$$dest ]; then \
411 $$e " ####################################################################";\
412 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
413 $$e " Authentication Modules (PAM). However, we were unable to" ;\
414 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
415 $$e " to work without this file (and old-style password" ;\
416 $$e " authentication will be used instead, which may or may not" ;\
418 $$e " ####################################################################";\
421 elif [ -f $$conf ]; then \
422 if ( grep $$dest $$conf >/dev/null ); then \
423 echo "$$conf unchanged: already has an entry for $$dest" ; \
425 src="pam.conf.$$$$" ; \
426 echo "grep -v $$dest $$conf > $$src" ; \
427 grep -v $$dest $$conf > $$src ; \
428 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
429 echo "$$extras" >> $$src ; \
430 if [ "x$$extras" = "x" ]; then \
431 echo "Error: no login rules in $$conf?" >&2 ; \
433 echo "adding $$dest rules to $$src:" ; \
434 echo "$$extras" | sed 's/^/ /' ; \
436 echo $(INSTALL_DATA) $$src $$conf ; \
437 $(INSTALL_DATA) $$src $$conf ; \
441 if ! ( grep $$dest $$conf >/dev/null ); then \
444 $$e " ####################################################################";\
445 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
446 $$e " Authentication Modules (PAM). However, we were unable to" ;\
447 $$e " install xscreensaver rules in the file $$conf." ;\
448 $$e " PAM is unlikely to work without this (and old-style" ;\
449 $$e " password authentication will be used instead, which may" ;\
450 $$e " or may not work.)" ;\
451 $$e " ####################################################################";\
456 install-gnome:: screensaver-properties.desktop
458 if [ "$(GNOME_DATADIR)" != "" ]; then \
460 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
461 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
462 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
464 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
465 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
466 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
468 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then \
469 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
470 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
472 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
473 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
474 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
477 echo $(INSTALL_DATA) screensaver-properties.desktop \
478 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
480 if $(INSTALL_DATA) screensaver-properties.desktop \
481 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
484 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
487 echo $(INSTALL_DATA) screensaver-properties.desktop \
488 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
490 if $(INSTALL_DATA) screensaver-properties.desktop \
491 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
494 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
497 echo $(INSTALL_DATA) screensaver-properties.desktop \
498 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
500 if $(INSTALL_DATA) screensaver-properties.desktop \
501 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
504 lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)" ;\
507 echo $(INSTALL_DATA) screensaver-properties.desktop \
508 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
509 if $(INSTALL_DATA) screensaver-properties.desktop \
510 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
513 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
516 if [ "$$lost" != "" ]; then \
519 $$e " ####################################################################";\
520 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
522 for f in $$@ ; do echo " $$f/" ; done ;\
523 $$e ' This means the "Screen Saver" section of the Gnome' ;\
524 $$e " Control Center (gnomecc) may not work properly." ;\
525 $$e " ####################################################################";\
531 install-gnome:: screensaver-properties-capplet
532 @if [ "$(GNOME_DATADIR)" != "" ]; then \
533 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
534 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
535 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
537 program=screensaver-properties-capplet ;\
538 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
539 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
540 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
541 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
546 $$e " ####################################################################";\
547 $$e " Warning: unable to install $$program into" ;\
548 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
549 $$e " Without this file, the Gnome session manager will not" ;\
550 $$e " launch xscreensaver properly at login time." ;\
551 $$e " ####################################################################";\
558 install-gnome:: $(LOGO)
559 @if [ "$(GLADE_DATADIR)" != "" ]; then \
560 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
561 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
562 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
564 target=xscreensaver.xpm ;\
565 echo $(INSTALL_DATA) $(LOGO) \
566 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
567 $(INSTALL_DATA) $(LOGO) \
568 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
571 # ../utils/images/screensaver-*.xpm
573 @if [ "$(GLADE_DATADIR)" != "" ]; then \
574 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
575 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
576 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
578 for target in $(GTK_ICONS) ; do \
579 dest=`echo $$target | sed 's@^.*/@@'` ;\
580 echo $(INSTALL_DATA) $$target \
581 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
582 $(INSTALL_DATA) $$target \
583 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
587 # xscreensaver-demo.glade2
588 install-gnome:: xscreensaver-demo.glade2
589 @if [ "$(GLADE_DATADIR)" != "" ]; then \
590 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
591 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
592 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
594 target=xscreensaver-demo.glade2 ;\
595 echo $(INSTALL_DATA) $(srcdir)/$$target \
596 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
597 if $(INSTALL_DATA) $(srcdir)/$$target \
598 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
603 $$e " ####################################################################";\
604 $$e " Warning: unable to install $$target into" ;\
605 $$e " $(install_prefix)$(GLADE_DATADIR)/." ;\
606 $$e " Without this file, xscreensaver-demo will not" ;\
607 $$e " be able to run properly." ;\
608 $$e " ####################################################################";\
615 # screensaver-properties.desktop
617 @if [ "$(GNOME_DATADIR)" != "" ]; then \
618 f=screensaver-properties.desktop ;\
619 echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
620 rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
621 echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
622 rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
623 echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
624 rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
625 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
626 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
629 # screensaver-properties-capplet
631 @if [ "$(GNOME_DATADIR)" != "" ]; then \
632 program=screensaver-properties-capplet ;\
633 echo rm -f $(install_prefix)$(bindir)/$$program ;\
634 rm -f $(install_prefix)$(bindir)/$$program ;\
639 @if [ "$(GLADE_DATADIR)" != "" ]; then \
640 target=xscreensaver.xpm ;\
641 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$target ;\
642 rm -f $(install_prefix)$(GLADE_DATADIR)/$$target ;\
647 @if [ "$(GLADE_DATADIR)" != "" ]; then \
648 for target in $(GTK_ICONS) ; do \
649 dest=`echo $$target | sed 's@^.*/@@'` ;\
650 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
651 rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
656 @src="xscreensaver.kss" ; \
657 if [ "$$KDEDIR" != "" ]; then \
658 dir="$(install_prefix)$$KDEDIR/bin" ; \
659 dest="$$dir/$$src" ; \
660 echo $(INSTALL_SCRIPT) $$src $$dest ; \
661 if $(INSTALL_SCRIPT) $$src $$dest ; then \
666 $$e " ####################################################################";\
667 $$e " Warning: unable to install $$dest" ;\
668 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
669 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
670 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
671 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
672 elif [ -f $$dest ]; then \
673 $$e " That file exists, and is unwritable." ;\
675 $$e " The directory is unwritable." ;\
677 $$e " ####################################################################";\
684 @if [ "$$KDEDIR" != "" ]; then \
685 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
686 echo rm -f $$dest ; \
691 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
694 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
696 # Adds all current dependencies to Makefile
697 depend: XScreenSaver_ad.h
698 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
700 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
701 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
703 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
704 # close. This excludes dependencies on files in /usr/include, etc. It tries
705 # to include only dependencies on files which are themselves a part of this
707 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
708 @echo updating dependencies in `pwd`/Makefile.in... ; \
709 $(DEPEND) -w 0 -f - \
710 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
711 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
712 $(CFLAGS) $(X_CFLAGS) -- \
713 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
714 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
715 $(TEST_SRCS) 2>/dev/null | \
718 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
720 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
721 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
722 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
723 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
724 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
726 ) > /tmp/distdepend.$$$$ && \
727 mv Makefile.in Makefile.in.bak && \
728 mv /tmp/distdepend.$$$$ Makefile.in
730 # Updates the version number in the app-defaults file to be in sync with
731 # the version number in version.h. This is so people can tell when they
732 # have a version skew between the app-defaults file and the executable.
733 # Also update hacks/config/README in the same way.
735 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
736 U=$(UTILS_SRC)/version.h ; \
737 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
738 D=`date '+%d-%b-%Y'` ; \
739 for S in $$files ; do \
740 echo -n "Updating $$S to $$V $$D... " ; \
742 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
743 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
745 if cmp -s $$S $$T ; then \
746 echo "unchanged." ; \
755 @for S in $(MEN); do \
756 U=$(UTILS_SRC)/version.h ; \
757 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
758 V="`date '+%d-%b-%Y'` ($$V)" ; \
759 echo -n "Updating $$S to \"$$V\"... " ; \
761 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
763 if cmp -s $$S $$T ; then \
764 echo "unchanged." ; \
774 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
777 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
782 for exe in $(EXES); do \
783 if ! [ -f $(srcdir)/$$exe.man ]; then \
784 badmen="$$badmen $$exe" ; \
787 if [ -n "$$badmen" ]; then \
789 echo "Warning: The following programs have no manuals:" ; \
791 for m in $$badmen ; do \
798 # Rules for noticing when the objects from the utils directory are out of
799 # date with respect to their sources, and going and building them according
800 # to the rules in their own Makefile...
802 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
803 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
804 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
805 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
806 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
807 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
808 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
809 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
810 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
814 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
816 # How we build object files in this directory.
818 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
820 # subprocs takes an extra -D option.
821 subprocs.o: subprocs.c
822 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
825 # demo-Gtk takes extra -D options, and an extra -I option.
826 demo-Gtk.o: demo-Gtk.c
827 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
828 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
831 # demo-Gtk-conf takes an extra -D option.
832 demo-Gtk-conf.o: demo-Gtk-conf.c
833 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
834 $(srcdir)/demo-Gtk-conf.c
837 # How we build the default app-defaults file into the program.
839 XScreenSaver_ad.h: XScreenSaver.ad
840 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
842 @INTLTOOL_DESKTOP_RULE@
844 # The executables linked in this directory.
846 xscreensaver: $(SAVER_OBJS)
847 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
849 xscreensaver-command: $(CMD_OBJS)
850 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
853 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
854 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@
855 # $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
857 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
858 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
859 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
860 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
862 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
863 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
864 $(GTK_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
865 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
867 xscreensaver-getimage: $(GETIMG_OBJS)
868 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
871 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
872 subprocs.o setuid.o splash.o prefs.o \
874 test-passwd.o: XScreenSaver_ad.h
876 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
877 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
880 $(CC) $(LDFLAGS) -o $@ test-uid.o
882 test-xdpms: test-xdpms.o
883 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
884 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
886 test-grab: test-grab.o
887 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
890 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
892 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
893 test-fade: test-fade.o $(UTILS_BIN)/fade.o
894 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
897 xdpyinfo.o: xdpyinfo.c
898 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
902 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
903 $(LIBS) $(X_LIBS) @GL_LIBS@ \
904 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
907 ##############################################################################
909 # DO NOT DELETE: updated by make distdepend
911 demo-Gtk-conf.o: ../config.h
912 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
913 demo-Gtk.o: XScreenSaver_ad.h
914 demo-Gtk.o: ../config.h
915 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
916 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
917 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
918 demo-Gtk.o: $(srcdir)/prefs.h
919 demo-Gtk.o: $(srcdir)/remote.h
920 demo-Gtk-support.o: ../config.h
921 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
922 demo-Gtk-widgets.o: ../config.h
923 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
924 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
925 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
926 demo-Xm.o: XScreenSaver_ad.h
927 demo-Xm.o: ../config.h
928 demo-Xm.o: $(srcdir)/prefs.h
929 demo-Xm.o: $(srcdir)/remote.h
930 demo-Xm-widgets.o: ../config.h
932 dpms.o: $(srcdir)/prefs.h
933 dpms.o: $(srcdir)/xscreensaver.h
936 lock.o: $(srcdir)/prefs.h
937 lock.o: $(srcdir)/xscreensaver.h
938 passwd.o: ../config.h
939 passwd-pwent.o: ../config.h
941 prefs.o: $(srcdir)/prefs.h
942 remote.o: ../config.h
943 remote.o: $(srcdir)/remote.h
944 setuid.o: ../config.h
945 setuid.o: $(srcdir)/prefs.h
946 setuid.o: $(srcdir)/xscreensaver.h
947 splash.o: ../config.h
948 splash.o: $(srcdir)/prefs.h
949 splash.o: $(srcdir)/xscreensaver.h
950 stderr.o: ../config.h
951 stderr.o: $(srcdir)/prefs.h
952 stderr.o: $(srcdir)/xscreensaver.h
953 subprocs.o: ../config.h
954 subprocs.o: $(srcdir)/prefs.h
955 subprocs.o: $(srcdir)/xscreensaver.h
956 test-apm.o: ../config.h
957 test-fade.o: ../config.h
958 test-fade.o: $(srcdir)/prefs.h
959 test-fade.o: $(srcdir)/xscreensaver.h
960 test-grab.o: ../config.h
961 test-passwd.o: XScreenSaver_ad.h
962 test-passwd.o: ../config.h
963 test-passwd.o: $(srcdir)/prefs.h
964 test-passwd.o: $(srcdir)/xscreensaver.h
965 test-uid.o: ../config.h
966 test-xdpms.o: ../config.h
967 timers.o: ../config.h
968 timers.o: $(srcdir)/prefs.h
969 timers.o: $(srcdir)/xscreensaver.h
970 windows.o: ../config.h
971 windows.o: $(srcdir)/prefs.h
972 windows.o: $(srcdir)/xscreensaver.h
973 xscreensaver-command.o: ../config.h
974 xscreensaver-command.o: $(srcdir)/remote.h
975 xscreensaver-getimage.o: ../config.h
976 xscreensaver-getimage.o: XScreenSaver_ad.h
977 xscreensaver-getimage.o: $(srcdir)/prefs.h
978 xscreensaver.o: XScreenSaver_ad.h
979 xscreensaver.o: ../config.h
980 xscreensaver.o: $(srcdir)/prefs.h
981 xscreensaver.o: $(srcdir)/xscreensaver.h
983 xset.o: $(srcdir)/prefs.h
984 xset.o: $(srcdir)/xscreensaver.h