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@
48 JPEG_LIBS = @JPEG_LIBS@
52 DEPEND_FLAGS = @DEPEND_FLAGS@
53 DEPEND_DEFINES = @DEPEND_DEFINES@
57 SUID_FLAGS = -o root -m 4755
58 INSTALL_PROGRAM = @INSTALL_PROGRAM@
59 INSTALL_SCRIPT = @INSTALL_SCRIPT@
60 INSTALL_SETUID = @INSTALL_SETUID@
61 INSTALL_DATA = @INSTALL_DATA@
62 INSTALL_DIRS = @INSTALL_DIRS@
66 X_PRE_LIBS = @X_PRE_LIBS@
67 X_EXTRA_LIBS = @X_EXTRA_LIBS@
73 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
74 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
75 # and that must come before -lX11. (e.g., -lSM and -lICE.)
76 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
77 # (e.g., -lsocket, -lnsl, etc.)
79 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
81 # SAVER_LIBS is the link line for "xscreensaver", and
82 # CMD_LIBS is the link line for "xscreensaver-command".
83 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
86 AD_DIR = @APPDEFAULTS@
88 PAM_CONF = /etc/pam.conf
90 UTILS_SRC = $(srcdir)/../utils
93 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
95 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
96 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
98 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
99 demo-Gtk-widgets.c demo-Gtk-support.c
100 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
101 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
103 PWENT_SRCS = passwd-pwent.c
104 PWENT_OBJS = passwd-pwent.o
106 KERBEROS_SRCS = passwd-kerberos.c
107 KERBEROS_OBJS = passwd-kerberos.o
109 PAM_SRCS = passwd-pam.c
110 PAM_OBJS = passwd-pam.o
112 LOCK_SRCS_1 = lock.c passwd.c
113 LOCK_OBJS_1 = lock.o passwd.o
114 NOLOCK_SRCS_1 = lock.c
115 NOLOCK_OBJS_1 = lock.o
117 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
118 test-apm.c test-fade.c xdpyinfo.c
119 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
120 test-apm test-fade xdpyinfo
122 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
123 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
124 XML_LIBS = @XML_LIBS@
126 XDPMS_LIBS = @XDPMS_LIBS@
128 PASSWD_SRCS = @PASSWD_SRCS@
129 PASSWD_OBJS = @PASSWD_OBJS@
130 PASSWD_LIBS = @PASSWD_LIBS@
132 LOCK_SRCS = @LOCK_SRCS@
133 LOCK_OBJS = @LOCK_OBJS@
135 XMU_SRCS = @XMU_SRCS@
136 XMU_OBJS = @XMU_OBJS@
138 GL_SRCS = @SAVER_GL_SRCS@
139 GL_OBJS = @SAVER_GL_OBJS@
140 GL_LIBS = @SAVER_GL_LIBS@
142 ICON_SRC = $(UTILS_SRC)/images
143 LOGO = $(ICON_SRC)/logo-50.xpm
144 GTK_ICONS = $(ICON_SRC)/screensaver-*.xpm
146 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
147 $(UTILS_SRC)/visual.c
148 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
149 $(UTILS_BIN)/visual.o
151 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
152 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
154 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
155 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
158 GETIMG_SRCS_1 = xscreensaver-getimage.c
159 GETIMG_OBJS_1 = xscreensaver-getimage.o
161 GETIMG_SRCS = $(GETIMG_SRCS_1) \
162 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
163 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
164 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
165 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
166 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
168 GETIMG_OBJS = $(GETIMG_OBJS_1) \
169 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
170 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
171 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
172 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
173 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
175 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
176 xset.c splash.c setuid.c stderr.c
177 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
178 xset.o splash.o setuid.o stderr.o
180 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
181 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
182 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
183 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
185 CMD_SRCS = remote.c xscreensaver-command.c
186 CMD_OBJS = remote.o xscreensaver-command.o
188 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
189 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
191 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
192 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
194 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
195 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
196 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
199 CMD_LIBS = $(LIBS) $(X_LIBS) \
200 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
202 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
203 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
205 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
206 xscreensaver-getimage
207 EXES2 = @ALL_DEMO_PROGRAMS@
208 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
210 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
211 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
213 MEN = xscreensaver.man xscreensaver-demo.man \
214 xscreensaver-command.man \
215 xscreensaver-getimage.man \
216 xscreensaver-getimage-file.man \
217 xscreensaver-getimage-video.man
218 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
219 xscreensaver-demo.glade xscreensaver-demo.glade2 \
220 xscreensaver-demo.glade2p \
221 screensaver-properties.desktop.in \
222 screensaver-properties-capplet \
223 xscreensaver.kss.in \
225 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
226 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
227 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
229 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
230 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
231 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
232 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
237 all: $(EXES) $(EXES2)
240 install: install-program install-ad install-scripts \
241 install-gnome install-kde install-man @INSTALL_PAM@
242 uninstall: uninstall-program uninstall-ad \
243 uninstall-gnome uninstall-kde uninstall-man
246 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
249 install-program: $(EXES)
250 @if [ ! -d $(install_prefix)$(bindir) ]; then \
251 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
253 @inst="$(INSTALL_PROGRAM)" ; \
254 if [ @NEED_SETUID@ = yes ]; then \
255 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
256 if [ "$$me" = root ]; then \
257 inst="$(INSTALL_SETUID)" ; \
261 $$e " ####################################################################";\
262 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
263 $$e " passwords. If your system actually uses shadow passwords," ;\
264 $$e " then xscreensaver must be installed as a setuid root" ;\
265 $$e " program in order for locking to work. To do this, you" ;\
266 $$e " must run 'make install' as 'root', not as '$$me'." ;\
268 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
269 $$e " means that locking might not work. (Try it and see.)" ;\
270 $$e " ####################################################################";\
274 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
275 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
276 @echo $(INSTALL_PROGRAM) xscreensaver-command \
277 $(install_prefix)$(bindir)/xscreensaver-command ; \
278 $(INSTALL_PROGRAM) xscreensaver-command \
279 $(install_prefix)$(bindir)/xscreensaver-command
280 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
281 $(install_prefix)$(bindir)/xscreensaver-demo ; \
282 $(INSTALL_PROGRAM) xscreensaver-demo \
283 $(install_prefix)$(bindir)/xscreensaver-demo
284 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
285 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
286 $(INSTALL_PROGRAM) xscreensaver-getimage \
287 $(install_prefix)$(bindir)/xscreensaver-getimage
289 install-ad: XScreenSaver.ad
290 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
291 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
293 @-echo $(INSTALL_DATA) XScreenSaver.ad \
294 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
295 if $(INSTALL_DATA) XScreenSaver.ad \
296 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
300 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
302 $$e " ####################################################################";\
303 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
304 $$e " That file exists, and is unwritable. It is probably from" ;\
305 $$e " an older version of xscreensaver, and could cause things" ;\
306 $$e " to malfunction. Please delete it!" ;\
307 $$e " ####################################################################";\
312 $$e " ####################################################################";\
313 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
314 $$e " The directory is unwritable. This is probably ok;" ;\
315 $$e " xscreensaver should work without that file." ;\
316 $$e " ####################################################################";\
322 install-scripts: $(SCRIPTS) munge-scripts
323 @for program in $(SCRIPTS); do \
324 if [ -r $$program ] ; then \
327 p=$(srcdir)/$$program ; \
329 echo $(INSTALL_SCRIPT) $$p \
330 $(install_prefix)$(bindir)/$$program ; \
331 $(INSTALL_SCRIPT) $$p \
332 $(install_prefix)$(bindir)/$$program ; \
335 munge-scripts: $(SCRIPTS)
336 @tmp=/tmp/mf.$$$$ ; \
339 for program in $(SCRIPTS); do \
340 echo "adjusting location of perl in $$program..." ; \
341 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
342 < $(srcdir)/$$program > $$tmp ; \
343 if cmp -s $(srcdir)/$$program $$tmp ; then \
346 cat $$tmp > ./$$program ; \
353 if [ ! -d $(install_prefix)$(manNdir) ]; then \
354 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
356 for man in $$men; do \
357 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
358 echo $(INSTALL_DATA) $(srcdir)/$$man \
359 $(install_prefix)$(manNdir)/$$instname ; \
360 $(INSTALL_DATA) $(srcdir)/$$man \
361 $(install_prefix)$(manNdir)/$$instname ; \
365 @for program in $(EXES) $(SCRIPTS); do \
366 echo rm -f $(install_prefix)$(bindir)/$$program ; \
367 rm -f $(install_prefix)$(bindir)/$$program ; \
371 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
375 for man in $$men; do \
376 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
377 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
378 rm -f $(install_prefix)$(manNdir)/$$instname ; \
382 @src="$(srcdir)/xscreensaver.pam" ; \
383 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
385 dir="$(install_prefix)$(PAM_DIR)" ; \
386 conf="$(PAM_CONF)" ; \
388 if [ -d $$dir ] ; then \
390 if [ -f $$dir/xdm ]; then \
392 elif [ -f $$dir/login ]; then \
396 if [ -z "$$src2" ]; then \
397 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
398 $(INSTALL_DATA) $$src $$dir/$$dest ; \
400 src="xscreensaver.pam.$$$$" ; \
401 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
402 grep '^#%\|^auth' $$src2 > $$src ; \
403 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
404 $(INSTALL_DATA) $$src $$dir/$$dest ; \
409 if [ ! -f $$dir/$$dest ]; then \
412 $$e " ####################################################################";\
413 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
414 $$e " Authentication Modules (PAM). However, we were unable to" ;\
415 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
416 $$e " to work without this file (and old-style password" ;\
417 $$e " authentication will be used instead, which may or may not" ;\
419 $$e " ####################################################################";\
422 elif [ -f $$conf ]; then \
423 if ( grep $$dest $$conf >/dev/null ); then \
424 echo "$$conf unchanged: already has an entry for $$dest" ; \
426 src="pam.conf.$$$$" ; \
427 echo "grep -v $$dest $$conf > $$src" ; \
428 grep -v $$dest $$conf > $$src ; \
429 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
430 echo "$$extras" >> $$src ; \
431 if [ "x$$extras" = "x" ]; then \
432 echo "Error: no login rules in $$conf?" >&2 ; \
434 echo "adding $$dest rules to $$src:" ; \
435 echo "$$extras" | sed 's/^/ /' ; \
437 echo $(INSTALL_DATA) $$src $$conf ; \
438 $(INSTALL_DATA) $$src $$conf ; \
442 if ! ( grep $$dest $$conf >/dev/null ); then \
445 $$e " ####################################################################";\
446 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
447 $$e " Authentication Modules (PAM). However, we were unable to" ;\
448 $$e " install xscreensaver rules in the file $$conf." ;\
449 $$e " PAM is unlikely to work without this (and old-style" ;\
450 $$e " password authentication will be used instead, which may" ;\
451 $$e " or may not work.)" ;\
452 $$e " ####################################################################";\
457 install-gnome:: screensaver-properties.desktop
459 if [ "$(GNOME_DATADIR)" != "" ]; then \
461 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
462 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
463 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
465 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
466 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
467 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
469 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then \
470 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
471 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
473 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
474 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
475 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
478 echo $(INSTALL_DATA) screensaver-properties.desktop \
479 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
481 if $(INSTALL_DATA) screensaver-properties.desktop \
482 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
485 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
488 echo $(INSTALL_DATA) screensaver-properties.desktop \
489 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
491 if $(INSTALL_DATA) screensaver-properties.desktop \
492 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
495 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
498 echo $(INSTALL_DATA) screensaver-properties.desktop \
499 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
501 if $(INSTALL_DATA) screensaver-properties.desktop \
502 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
505 lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)" ;\
508 echo $(INSTALL_DATA) screensaver-properties.desktop \
509 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
510 if $(INSTALL_DATA) screensaver-properties.desktop \
511 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
514 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
517 if [ "$$lost" != "" ]; then \
520 $$e " ####################################################################";\
521 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
523 for f in $$@ ; do echo " $$f/" ; done ;\
524 $$e ' This means the "Screen Saver" section of the Gnome' ;\
525 $$e " Control Center (gnomecc) may not work properly." ;\
526 $$e " ####################################################################";\
532 install-gnome:: screensaver-properties-capplet
533 @if [ "$(GNOME_DATADIR)" != "" ]; then \
534 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
535 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
536 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
538 program=screensaver-properties-capplet ;\
539 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
540 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
541 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
542 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
547 $$e " ####################################################################";\
548 $$e " Warning: unable to install $$program into" ;\
549 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
550 $$e " Without this file, the Gnome session manager will not" ;\
551 $$e " launch xscreensaver properly at login time." ;\
552 $$e " ####################################################################";\
559 install-gnome:: $(LOGO)
560 @if [ "$(GLADE_DATADIR)" != "" ]; then \
561 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
562 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
563 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
565 target=xscreensaver.xpm ;\
566 echo $(INSTALL_DATA) $(LOGO) \
567 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
568 $(INSTALL_DATA) $(LOGO) \
569 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
572 # ../utils/images/screensaver-*.xpm
574 @if [ "$(GLADE_DATADIR)" != "" ]; then \
575 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
576 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
577 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
579 for target in $(GTK_ICONS) ; do \
580 dest=`echo $$target | sed 's@^.*/@@'` ;\
581 echo $(INSTALL_DATA) $$target \
582 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
583 $(INSTALL_DATA) $$target \
584 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
588 # xscreensaver-demo.glade2
589 install-gnome:: xscreensaver-demo.glade2
590 @if [ "$(GLADE_DATADIR)" != "" ]; then \
591 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
592 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
593 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
595 target=xscreensaver-demo.glade2 ;\
596 echo $(INSTALL_DATA) $(srcdir)/$$target \
597 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
598 if $(INSTALL_DATA) $(srcdir)/$$target \
599 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
604 $$e " ####################################################################";\
605 $$e " Warning: unable to install $$target into" ;\
606 $$e " $(install_prefix)$(GLADE_DATADIR)/." ;\
607 $$e " Without this file, xscreensaver-demo will not" ;\
608 $$e " be able to run properly." ;\
609 $$e " ####################################################################";\
616 # screensaver-properties.desktop
618 @if [ "$(GNOME_DATADIR)" != "" ]; then \
619 f=screensaver-properties.desktop ;\
620 echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
621 rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
622 echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
623 rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
624 echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
625 rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
626 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
627 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
630 # screensaver-properties-capplet
632 @if [ "$(GNOME_DATADIR)" != "" ]; then \
633 program=screensaver-properties-capplet ;\
634 echo rm -f $(install_prefix)$(bindir)/$$program ;\
635 rm -f $(install_prefix)$(bindir)/$$program ;\
640 @if [ "$(GLADE_DATADIR)" != "" ]; then \
641 target=xscreensaver.xpm ;\
642 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$target ;\
643 rm -f $(install_prefix)$(GLADE_DATADIR)/$$target ;\
648 @if [ "$(GLADE_DATADIR)" != "" ]; then \
649 for target in $(GTK_ICONS) ; do \
650 dest=`echo $$target | sed 's@^.*/@@'` ;\
651 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
652 rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
657 @src="xscreensaver.kss" ; \
658 if [ "$$KDEDIR" != "" ]; then \
659 dir="$(install_prefix)$$KDEDIR/bin" ; \
660 dest="$$dir/$$src" ; \
661 echo $(INSTALL_SCRIPT) $$src $$dest ; \
662 if $(INSTALL_SCRIPT) $$src $$dest ; then \
667 $$e " ####################################################################";\
668 $$e " Warning: unable to install $$dest" ;\
669 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
670 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
671 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
672 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
673 elif [ -f $$dest ]; then \
674 $$e " That file exists, and is unwritable." ;\
676 $$e " The directory is unwritable." ;\
678 $$e " ####################################################################";\
685 @if [ "$$KDEDIR" != "" ]; then \
686 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
687 echo rm -f $$dest ; \
692 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
695 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
697 # Adds all current dependencies to Makefile
698 depend: XScreenSaver_ad.h
699 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
701 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
702 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
704 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
705 # close. This excludes dependencies on files in /usr/include, etc. It tries
706 # to include only dependencies on files which are themselves a part of this
708 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
709 @echo updating dependencies in `pwd`/Makefile.in... ; \
710 $(DEPEND) -w 0 -f - \
711 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
712 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
713 $(CFLAGS) $(X_CFLAGS) -- \
714 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
715 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
716 $(TEST_SRCS) 2>/dev/null | \
719 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
721 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
722 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
723 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
724 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
725 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
727 ) > /tmp/distdepend.$$$$ && \
728 mv Makefile.in Makefile.in.bak && \
729 mv /tmp/distdepend.$$$$ Makefile.in
731 # Updates the version number in the app-defaults file to be in sync with
732 # the version number in version.h. This is so people can tell when they
733 # have a version skew between the app-defaults file and the executable.
734 # Also update hacks/config/README in the same way.
736 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
737 U=$(UTILS_SRC)/version.h ; \
738 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
739 D=`date '+%d-%b-%Y'` ; \
740 for S in $$files ; do \
741 echo -n "Updating $$S to $$V $$D... " ; \
743 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
744 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
746 if cmp -s $$S $$T ; then \
747 echo "unchanged." ; \
756 @for S in $(MEN); do \
757 U=$(UTILS_SRC)/version.h ; \
758 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
759 V="`date '+%d-%b-%Y'` ($$V)" ; \
760 echo -n "Updating $$S to \"$$V\"... " ; \
762 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
764 if cmp -s $$S $$T ; then \
765 echo "unchanged." ; \
775 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
778 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
783 for exe in $(EXES); do \
784 if ! [ -f $(srcdir)/$$exe.man ]; then \
785 badmen="$$badmen $$exe" ; \
788 if [ -n "$$badmen" ]; then \
790 echo "Warning: The following programs have no manuals:" ; \
792 for m in $$badmen ; do \
799 # Rules for noticing when the objects from the utils directory are out of
800 # date with respect to their sources, and going and building them according
801 # to the rules in their own Makefile...
803 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
804 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
805 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
806 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
807 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
808 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
809 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
810 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
811 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
815 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
817 # How we build object files in this directory.
819 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
821 # subprocs takes an extra -D option.
822 subprocs.o: subprocs.c
823 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
826 # demo-Gtk takes extra -D options, and an extra -I option.
827 demo-Gtk.o: demo-Gtk.c
828 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
829 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
832 # demo-Gtk-conf takes an extra -D option.
833 demo-Gtk-conf.o: demo-Gtk-conf.c
834 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
835 $(srcdir)/demo-Gtk-conf.c
838 # How we build the default app-defaults file into the program.
840 XScreenSaver_ad.h: XScreenSaver.ad
841 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
843 @INTLTOOL_DESKTOP_RULE@
845 # The executables linked in this directory.
847 xscreensaver: $(SAVER_OBJS)
848 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
850 xscreensaver-command: $(CMD_OBJS)
851 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
854 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
855 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@
856 # $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
858 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
859 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
860 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
861 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
863 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
864 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
865 $(GTK_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
866 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
868 xscreensaver-getimage: $(GETIMG_OBJS)
869 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
872 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
873 subprocs.o setuid.o splash.o prefs.o \
875 test-passwd.o: XScreenSaver_ad.h
877 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
878 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
881 $(CC) $(LDFLAGS) -o $@ test-uid.o
883 test-xdpms: test-xdpms.o
884 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
885 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
887 test-grab: test-grab.o
888 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
891 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
893 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
894 test-fade: test-fade.o $(UTILS_BIN)/fade.o
895 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
898 xdpyinfo.o: xdpyinfo.c
899 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
903 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
904 $(LIBS) $(X_LIBS) @GL_LIBS@ \
905 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
908 ##############################################################################
910 # DO NOT DELETE: updated by make distdepend
912 demo-Gtk-conf.o: ../config.h
913 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
914 demo-Gtk.o: XScreenSaver_ad.h
915 demo-Gtk.o: ../config.h
916 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
917 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
918 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
919 demo-Gtk.o: $(srcdir)/prefs.h
920 demo-Gtk.o: $(srcdir)/remote.h
921 demo-Gtk-support.o: ../config.h
922 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
923 demo-Gtk-widgets.o: ../config.h
924 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
925 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
926 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
927 demo-Xm.o: XScreenSaver_ad.h
928 demo-Xm.o: ../config.h
929 demo-Xm.o: $(srcdir)/prefs.h
930 demo-Xm.o: $(srcdir)/remote.h
931 demo-Xm-widgets.o: ../config.h
933 dpms.o: $(srcdir)/prefs.h
934 dpms.o: $(srcdir)/xscreensaver.h
937 lock.o: $(srcdir)/prefs.h
938 lock.o: $(srcdir)/xscreensaver.h
939 passwd.o: ../config.h
940 passwd-pwent.o: ../config.h
942 prefs.o: $(srcdir)/prefs.h
943 remote.o: ../config.h
944 remote.o: $(srcdir)/remote.h
945 setuid.o: ../config.h
946 setuid.o: $(srcdir)/prefs.h
947 setuid.o: $(srcdir)/xscreensaver.h
948 splash.o: ../config.h
949 splash.o: $(srcdir)/prefs.h
950 splash.o: $(srcdir)/xscreensaver.h
951 stderr.o: ../config.h
952 stderr.o: $(srcdir)/prefs.h
953 stderr.o: $(srcdir)/xscreensaver.h
954 subprocs.o: ../config.h
955 subprocs.o: $(srcdir)/prefs.h
956 subprocs.o: $(srcdir)/xscreensaver.h
957 test-apm.o: ../config.h
958 test-fade.o: ../config.h
959 test-fade.o: $(srcdir)/prefs.h
960 test-fade.o: $(srcdir)/xscreensaver.h
961 test-grab.o: ../config.h
962 test-passwd.o: XScreenSaver_ad.h
963 test-passwd.o: ../config.h
964 test-passwd.o: $(srcdir)/prefs.h
965 test-passwd.o: $(srcdir)/xscreensaver.h
966 test-uid.o: ../config.h
967 test-xdpms.o: ../config.h
968 timers.o: ../config.h
969 timers.o: $(srcdir)/prefs.h
970 timers.o: $(srcdir)/xscreensaver.h
971 windows.o: ../config.h
972 windows.o: $(srcdir)/prefs.h
973 windows.o: $(srcdir)/xscreensaver.h
974 xscreensaver-command.o: ../config.h
975 xscreensaver-command.o: $(srcdir)/remote.h
976 xscreensaver-getimage.o: ../config.h
977 xscreensaver-getimage.o: XScreenSaver_ad.h
978 xscreensaver-getimage.o: $(srcdir)/prefs.h
979 xscreensaver.o: XScreenSaver_ad.h
980 xscreensaver.o: ../config.h
981 xscreensaver.o: $(srcdir)/prefs.h
982 xscreensaver.o: $(srcdir)/xscreensaver.h
984 xset.o: $(srcdir)/prefs.h
985 xset.o: $(srcdir)/xscreensaver.h