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_ICONDIR = $(GNOME_DATADIR)/pixmaps
35 GNOME_BINDIR = $(bindir)
36 HACK_CONF_DIR = @HACK_CONF_DIR@
42 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
43 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
44 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GLADE_DATADIR)"'
45 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
48 INTL_LIBS = @INTLLIBS@
49 JPEG_LIBS = @JPEG_LIBS@
53 DEPEND_FLAGS = @DEPEND_FLAGS@
54 DEPEND_DEFINES = @DEPEND_DEFINES@
58 SUID_FLAGS = -o root -m 4755
59 INSTALL_PROGRAM = @INSTALL_PROGRAM@
60 INSTALL_SCRIPT = @INSTALL_SCRIPT@
61 INSTALL_SETUID = @INSTALL_SETUID@
62 INSTALL_DATA = @INSTALL_DATA@
63 INSTALL_DIRS = @INSTALL_DIRS@
67 X_PRE_LIBS = @X_PRE_LIBS@
68 X_EXTRA_LIBS = @X_EXTRA_LIBS@
74 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
75 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
76 # and that must come before -lX11. (e.g., -lSM and -lICE.)
77 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
78 # (e.g., -lsocket, -lnsl, etc.)
80 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
82 # SAVER_LIBS is the link line for "xscreensaver", and
83 # CMD_LIBS is the link line for "xscreensaver-command".
84 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
87 AD_DIR = @APPDEFAULTS@
89 PAM_CONF = /etc/pam.conf
91 UTILS_SRC = $(srcdir)/../utils
94 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
96 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
97 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
99 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
100 demo-Gtk-widgets.c demo-Gtk-support.c
101 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
102 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
104 PWENT_SRCS = passwd-pwent.c
105 PWENT_OBJS = passwd-pwent.o
107 KERBEROS_SRCS = passwd-kerberos.c
108 KERBEROS_OBJS = passwd-kerberos.o
110 PAM_SRCS = passwd-pam.c
111 PAM_OBJS = passwd-pam.o
113 LOCK_SRCS_1 = lock.c passwd.c
114 LOCK_OBJS_1 = lock.o passwd.o
115 NOLOCK_SRCS_1 = lock.c
116 NOLOCK_OBJS_1 = lock.o
118 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
119 test-apm.c test-fade.c xdpyinfo.c
120 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
121 test-apm test-fade xdpyinfo
123 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
124 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
125 XML_LIBS = @XML_LIBS@
127 XDPMS_LIBS = @XDPMS_LIBS@
129 PASSWD_SRCS = @PASSWD_SRCS@
130 PASSWD_OBJS = @PASSWD_OBJS@
131 PASSWD_LIBS = @PASSWD_LIBS@
133 LOCK_SRCS = @LOCK_SRCS@
134 LOCK_OBJS = @LOCK_OBJS@
136 XMU_SRCS = @XMU_SRCS@
137 XMU_OBJS = @XMU_OBJS@
139 GL_SRCS = @SAVER_GL_SRCS@
140 GL_OBJS = @SAVER_GL_OBJS@
141 GL_LIBS = @SAVER_GL_LIBS@
143 ICON_SRC = $(UTILS_SRC)/images
144 LOGO = $(ICON_SRC)/logo-50.xpm
145 GTK_ICONS = $(ICON_SRC)/screensaver-*.png
147 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
148 $(UTILS_SRC)/visual.c
149 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
150 $(UTILS_BIN)/visual.o
152 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
153 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
155 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
156 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
159 GETIMG_SRCS_1 = xscreensaver-getimage.c
160 GETIMG_OBJS_1 = xscreensaver-getimage.o
162 GETIMG_SRCS = $(GETIMG_SRCS_1) \
163 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
164 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
165 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
166 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
167 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
169 GETIMG_OBJS = $(GETIMG_OBJS_1) \
170 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
171 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
172 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
173 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
174 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
176 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
177 xset.c splash.c setuid.c stderr.c
178 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
179 xset.o splash.o setuid.o stderr.o
181 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
182 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
183 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
184 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
186 CMD_SRCS = remote.c xscreensaver-command.c
187 CMD_OBJS = remote.o xscreensaver-command.o
189 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
190 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
192 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
193 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
195 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
196 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
197 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
200 CMD_LIBS = $(LIBS) $(X_LIBS) \
201 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
203 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
204 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
206 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
207 xscreensaver-getimage
208 EXES2 = @ALL_DEMO_PROGRAMS@
209 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
211 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
212 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
214 MEN = xscreensaver.man xscreensaver-demo.man \
215 xscreensaver-command.man \
216 xscreensaver-getimage.man \
217 xscreensaver-getimage-file.man \
218 xscreensaver-getimage-video.man
219 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
220 xscreensaver-demo.glade xscreensaver-demo.glade2 \
221 xscreensaver-demo.glade2p \
222 screensaver-properties.desktop.in \
223 screensaver-properties-capplet \
224 xscreensaver.kss.in \
226 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
227 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
228 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
230 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
231 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
232 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
233 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
238 all: $(EXES) $(EXES2)
241 install: install-program install-ad install-scripts \
242 install-gnome install-kde install-man @INSTALL_PAM@
243 uninstall: uninstall-program uninstall-ad \
244 uninstall-gnome uninstall-kde uninstall-man
247 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
250 install-program: $(EXES)
251 @if [ ! -d $(install_prefix)$(bindir) ]; then \
252 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
254 @inst="$(INSTALL_PROGRAM)" ; \
255 if [ @NEED_SETUID@ = yes ]; then \
256 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
257 if [ "$$me" = root ]; then \
258 inst="$(INSTALL_SETUID)" ; \
262 $$e " ####################################################################";\
263 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
264 $$e " passwords. If your system actually uses shadow passwords," ;\
265 $$e " then xscreensaver must be installed as a setuid root" ;\
266 $$e " program in order for locking to work. To do this, you" ;\
267 $$e " must run 'make install' as 'root', not as '$$me'." ;\
269 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
270 $$e " means that locking might not work. (Try it and see.)" ;\
271 $$e " ####################################################################";\
275 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
276 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
277 @echo $(INSTALL_PROGRAM) xscreensaver-command \
278 $(install_prefix)$(bindir)/xscreensaver-command ; \
279 $(INSTALL_PROGRAM) xscreensaver-command \
280 $(install_prefix)$(bindir)/xscreensaver-command
281 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
282 $(install_prefix)$(bindir)/xscreensaver-demo ; \
283 $(INSTALL_PROGRAM) xscreensaver-demo \
284 $(install_prefix)$(bindir)/xscreensaver-demo
285 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
286 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
287 $(INSTALL_PROGRAM) xscreensaver-getimage \
288 $(install_prefix)$(bindir)/xscreensaver-getimage
290 install-ad: XScreenSaver.ad
291 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
292 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
294 @-echo $(INSTALL_DATA) XScreenSaver.ad \
295 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
296 if $(INSTALL_DATA) XScreenSaver.ad \
297 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
301 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
303 $$e " ####################################################################";\
304 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
305 $$e " That file exists, and is unwritable. It is probably from" ;\
306 $$e " an older version of xscreensaver, and could cause things" ;\
307 $$e " to malfunction. Please delete it!" ;\
308 $$e " ####################################################################";\
313 $$e " ####################################################################";\
314 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
315 $$e " The directory is unwritable. This is probably ok;" ;\
316 $$e " xscreensaver should work without that file." ;\
317 $$e " ####################################################################";\
323 install-scripts: $(SCRIPTS) munge-scripts
324 @for program in $(SCRIPTS); do \
325 if [ -r $$program ] ; then \
328 p=$(srcdir)/$$program ; \
330 echo $(INSTALL_SCRIPT) $$p \
331 $(install_prefix)$(bindir)/$$program ; \
332 $(INSTALL_SCRIPT) $$p \
333 $(install_prefix)$(bindir)/$$program ; \
336 munge-scripts: $(SCRIPTS)
337 @tmp=/tmp/mf.$$$$ ; \
340 for program in $(SCRIPTS); do \
341 echo "adjusting location of perl in $$program..." ; \
342 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
343 < $(srcdir)/$$program > $$tmp ; \
344 if cmp -s $(srcdir)/$$program $$tmp ; then \
347 cat $$tmp > ./$$program ; \
354 if [ ! -d $(install_prefix)$(manNdir) ]; then \
355 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
357 for man in $$men; do \
358 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
359 echo $(INSTALL_DATA) $(srcdir)/$$man \
360 $(install_prefix)$(manNdir)/$$instname ; \
361 $(INSTALL_DATA) $(srcdir)/$$man \
362 $(install_prefix)$(manNdir)/$$instname ; \
366 @for program in $(EXES) $(SCRIPTS); do \
367 echo rm -f $(install_prefix)$(bindir)/$$program ; \
368 rm -f $(install_prefix)$(bindir)/$$program ; \
372 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
376 for man in $$men; do \
377 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
378 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
379 rm -f $(install_prefix)$(manNdir)/$$instname ; \
383 @src="$(srcdir)/xscreensaver.pam" ; \
384 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
386 dir="$(install_prefix)$(PAM_DIR)" ; \
387 conf="$(PAM_CONF)" ; \
389 if [ -d $$dir ] ; then \
391 if [ -f $$dir/xdm ]; then \
393 elif [ -f $$dir/login ]; then \
397 if [ -z "$$src2" ]; then \
398 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
399 $(INSTALL_DATA) $$src $$dir/$$dest ; \
401 src="xscreensaver.pam.$$$$" ; \
402 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
403 grep '^#%\|^auth' $$src2 > $$src ; \
404 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
405 $(INSTALL_DATA) $$src $$dir/$$dest ; \
410 if [ ! -f $$dir/$$dest ]; then \
413 $$e " ####################################################################";\
414 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
415 $$e " Authentication Modules (PAM). However, we were unable to" ;\
416 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
417 $$e " to work without this file (and old-style password" ;\
418 $$e " authentication will be used instead, which may or may not" ;\
420 $$e " ####################################################################";\
423 elif [ -f $$conf ]; then \
424 if ( grep $$dest $$conf >/dev/null ); then \
425 echo "$$conf unchanged: already has an entry for $$dest" ; \
427 src="pam.conf.$$$$" ; \
428 echo "grep -v $$dest $$conf > $$src" ; \
429 grep -v $$dest $$conf > $$src ; \
430 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
431 echo "$$extras" >> $$src ; \
432 if [ "x$$extras" = "x" ]; then \
433 echo "Error: no login rules in $$conf?" >&2 ; \
435 echo "adding $$dest rules to $$src:" ; \
436 echo "$$extras" | sed 's/^/ /' ; \
438 echo $(INSTALL_DATA) $$src $$conf ; \
439 $(INSTALL_DATA) $$src $$conf ; \
443 if ! ( grep $$dest $$conf >/dev/null ); then \
446 $$e " ####################################################################";\
447 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
448 $$e " Authentication Modules (PAM). However, we were unable to" ;\
449 $$e " install xscreensaver rules in the file $$conf." ;\
450 $$e " PAM is unlikely to work without this (and old-style" ;\
451 $$e " password authentication will be used instead, which may" ;\
452 $$e " or may not work.)" ;\
453 $$e " ####################################################################";\
458 install-gnome:: screensaver-properties.desktop
460 if [ "$(GNOME_DATADIR)" != "" ]; then \
462 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
463 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
464 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
466 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
467 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
468 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
470 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then \
471 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
472 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
474 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
475 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
476 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
479 echo $(INSTALL_DATA) screensaver-properties.desktop \
480 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
482 if $(INSTALL_DATA) screensaver-properties.desktop \
483 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
486 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
489 echo $(INSTALL_DATA) screensaver-properties.desktop \
490 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
492 if $(INSTALL_DATA) screensaver-properties.desktop \
493 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
496 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
499 echo $(INSTALL_DATA) screensaver-properties.desktop \
500 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
502 if $(INSTALL_DATA) screensaver-properties.desktop \
503 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
506 lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)" ;\
509 echo $(INSTALL_DATA) screensaver-properties.desktop \
510 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
511 if $(INSTALL_DATA) screensaver-properties.desktop \
512 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
515 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
518 if [ "$$lost" != "" ]; then \
521 $$e " ####################################################################";\
522 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
524 for f in $$@ ; do echo " $$f/" ; done ;\
525 $$e ' This means the "Screen Saver" section of the Gnome' ;\
526 $$e " Control Center (gnomecc) may not work properly." ;\
527 $$e " ####################################################################";\
533 install-gnome:: screensaver-properties-capplet
534 @if [ "$(GNOME_DATADIR)" != "" ]; then \
535 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
536 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
537 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
539 program=screensaver-properties-capplet ;\
540 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
541 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
542 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
543 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
548 $$e " ####################################################################";\
549 $$e " Warning: unable to install $$program into" ;\
550 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
551 $$e " Without this file, the Gnome session manager will not" ;\
552 $$e " launch xscreensaver properly at login time." ;\
553 $$e " ####################################################################";\
560 # into /usr/share/pixmaps/
561 install-gnome:: $(LOGO)
562 @if [ "$(GNOME_DATADIR)" != "" ]; then \
563 if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \
564 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
565 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\
567 target=xscreensaver.xpm ;\
568 echo $(INSTALL_DATA) $(LOGO) \
569 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
570 $(INSTALL_DATA) $(LOGO) \
571 $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
574 # ../utils/images/screensaver-*.png
575 # into /usr/share/xscreensaver/
577 # Should these really go in GLADE_DATADIR (/usr/share/xscreensaver/)
578 # or should they instead go in GNOME_ICONDIR (/usr/share/pixmaps/)?
582 @if [ "$(GLADE_DATADIR)" != "" ]; then \
583 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
584 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
585 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
587 for target in $(GTK_ICONS) ; do \
588 dest=`echo $$target | sed 's@^.*/@@'` ;\
589 echo $(INSTALL_DATA) $$target \
590 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
591 $(INSTALL_DATA) $$target \
592 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
596 # xscreensaver-demo.glade2
597 # into /usr/share/xscreensaver/
598 install-gnome:: xscreensaver-demo.glade2
599 @if [ "$(GLADE_DATADIR)" != "" ]; then \
600 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
601 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
602 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
604 target=xscreensaver-demo.glade2 ;\
605 echo $(INSTALL_DATA) $(srcdir)/$$target \
606 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
607 if $(INSTALL_DATA) $(srcdir)/$$target \
608 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
613 $$e " ####################################################################";\
614 $$e " Warning: unable to install $$target into" ;\
615 $$e " $(install_prefix)$(GLADE_DATADIR)/." ;\
616 $$e " Without this file, xscreensaver-demo will not" ;\
617 $$e " be able to run properly." ;\
618 $$e " ####################################################################";\
625 # screensaver-properties.desktop
626 # into /usr/share/gnome/apps/Settings/Desktop/
628 @if [ "$(GNOME_DATADIR)" != "" ]; then \
629 f=screensaver-properties.desktop ;\
630 echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
631 rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
632 echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
633 rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
634 echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
635 rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
636 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
637 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
640 # screensaver-properties-capplet
641 # into /usr/X11R6/bin/
643 @if [ "$(GNOME_DATADIR)" != "" ]; then \
644 program=screensaver-properties-capplet ;\
645 echo rm -f $(install_prefix)$(bindir)/$$program ;\
646 rm -f $(install_prefix)$(bindir)/$$program ;\
650 # into /usr/share/pixmaps/
652 @if [ "$(GNOME_ICONDIR)" != "" ]; then \
653 target=xscreensaver.xpm ;\
654 echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
655 rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\
658 # ../utils/images/screensaver-*.png
659 # into /usr/share/xscreensaver/
661 @if [ "$(GLADE_DATADIR)" != "" ]; then \
662 for target in $(GTK_ICONS) ; do \
663 dest=`echo $$target | sed 's@^.*/@@'` ;\
664 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
665 rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
671 @src="xscreensaver.kss" ; \
672 if [ "$$KDEDIR" != "" ]; then \
673 dir="$(install_prefix)$$KDEDIR/bin" ; \
674 dest="$$dir/$$src" ; \
675 echo $(INSTALL_SCRIPT) $$src $$dest ; \
676 if $(INSTALL_SCRIPT) $$src $$dest ; then \
681 $$e " ####################################################################";\
682 $$e " Warning: unable to install $$dest" ;\
683 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
684 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
685 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
686 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
687 elif [ -f $$dest ]; then \
688 $$e " That file exists, and is unwritable." ;\
690 $$e " The directory is unwritable." ;\
692 $$e " ####################################################################";\
699 @if [ "$$KDEDIR" != "" ]; then \
700 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
701 echo rm -f $$dest ; \
706 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
709 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
711 # Adds all current dependencies to Makefile
712 depend: XScreenSaver_ad.h
713 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
715 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
716 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
718 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
719 # close. This excludes dependencies on files in /usr/include, etc. It tries
720 # to include only dependencies on files which are themselves a part of this
722 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
723 @echo updating dependencies in `pwd`/Makefile.in... ; \
724 $(DEPEND) -w 0 -f - \
725 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
726 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
727 $(CFLAGS) $(X_CFLAGS) -- \
728 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
729 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
730 $(TEST_SRCS) 2>/dev/null | \
733 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
735 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
736 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
737 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
738 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
739 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
741 ) > /tmp/distdepend.$$$$ && \
742 mv Makefile.in Makefile.in.bak && \
743 mv /tmp/distdepend.$$$$ Makefile.in
745 # Updates the version number in the app-defaults file to be in sync with
746 # the version number in version.h. This is so people can tell when they
747 # have a version skew between the app-defaults file and the executable.
748 # Also update hacks/config/README in the same way.
750 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
751 U=$(UTILS_SRC)/version.h ; \
752 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
753 D=`date '+%d-%b-%Y'` ; \
754 for S in $$files ; do \
755 echo -n "Updating $$S to $$V $$D... " ; \
757 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
758 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
760 if cmp -s $$S $$T ; then \
761 echo "unchanged." ; \
770 @for S in $(MEN); do \
771 U=$(UTILS_SRC)/version.h ; \
772 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
773 V="`date '+%d-%b-%Y'` ($$V)" ; \
774 echo -n "Updating $$S to \"$$V\"... " ; \
776 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
778 if cmp -s $$S $$T ; then \
779 echo "unchanged." ; \
789 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
792 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
797 for exe in $(EXES); do \
798 if ! [ -f $(srcdir)/$$exe.man ]; then \
799 badmen="$$badmen $$exe" ; \
802 if [ -n "$$badmen" ]; then \
804 echo "Warning: The following programs have no manuals:" ; \
806 for m in $$badmen ; do \
813 # Rules for noticing when the objects from the utils directory are out of
814 # date with respect to their sources, and going and building them according
815 # to the rules in their own Makefile...
817 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
818 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
819 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
820 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
821 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
822 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
823 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
824 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
825 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
829 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
831 # How we build object files in this directory.
833 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
835 # subprocs takes an extra -D option.
836 subprocs.o: subprocs.c
837 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
840 # demo-Gtk takes extra -D options, and an extra -I option.
841 demo-Gtk.o: demo-Gtk.c
842 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
843 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
846 # demo-Gtk-conf takes an extra -D option.
847 demo-Gtk-conf.o: demo-Gtk-conf.c
848 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
849 $(srcdir)/demo-Gtk-conf.c
852 # How we build the default app-defaults file into the program.
854 XScreenSaver_ad.h: XScreenSaver.ad
855 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
857 @INTLTOOL_DESKTOP_RULE@
859 # The executables linked in this directory.
861 xscreensaver: $(SAVER_OBJS)
862 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
864 xscreensaver-command: $(CMD_OBJS)
865 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
868 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
869 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@
870 # $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
872 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
873 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
874 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
875 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
877 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
878 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
879 $(GTK_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
880 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
882 xscreensaver-getimage: $(GETIMG_OBJS)
883 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
886 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
887 subprocs.o setuid.o splash.o prefs.o \
889 test-passwd.o: XScreenSaver_ad.h
891 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
892 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
895 $(CC) $(LDFLAGS) -o $@ test-uid.o
897 test-xdpms: test-xdpms.o
898 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
899 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
901 test-grab: test-grab.o
902 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
905 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
907 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
908 test-fade: test-fade.o $(UTILS_BIN)/fade.o
909 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
912 xdpyinfo.o: xdpyinfo.c
913 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
917 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
918 $(LIBS) $(X_LIBS) @GL_LIBS@ \
919 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
922 ##############################################################################
924 # DO NOT DELETE: updated by make distdepend
926 demo-Gtk-conf.o: ../config.h
927 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
928 demo-Gtk.o: XScreenSaver_ad.h
929 demo-Gtk.o: ../config.h
930 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
931 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
932 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
933 demo-Gtk.o: $(srcdir)/prefs.h
934 demo-Gtk.o: $(srcdir)/remote.h
935 demo-Gtk-support.o: ../config.h
936 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
937 demo-Gtk-widgets.o: ../config.h
938 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
939 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
940 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
941 demo-Xm.o: XScreenSaver_ad.h
942 demo-Xm.o: ../config.h
943 demo-Xm.o: $(srcdir)/prefs.h
944 demo-Xm.o: $(srcdir)/remote.h
945 demo-Xm-widgets.o: ../config.h
947 dpms.o: $(srcdir)/prefs.h
948 dpms.o: $(srcdir)/xscreensaver.h
951 lock.o: $(srcdir)/prefs.h
952 lock.o: $(srcdir)/xscreensaver.h
953 passwd.o: ../config.h
954 passwd-pwent.o: ../config.h
956 prefs.o: $(srcdir)/prefs.h
957 remote.o: ../config.h
958 remote.o: $(srcdir)/remote.h
959 setuid.o: ../config.h
960 setuid.o: $(srcdir)/prefs.h
961 setuid.o: $(srcdir)/xscreensaver.h
962 splash.o: ../config.h
963 splash.o: $(srcdir)/prefs.h
964 splash.o: $(srcdir)/xscreensaver.h
965 stderr.o: ../config.h
966 stderr.o: $(srcdir)/prefs.h
967 stderr.o: $(srcdir)/xscreensaver.h
968 subprocs.o: ../config.h
969 subprocs.o: $(srcdir)/prefs.h
970 subprocs.o: $(srcdir)/xscreensaver.h
971 test-apm.o: ../config.h
972 test-fade.o: ../config.h
973 test-fade.o: $(srcdir)/prefs.h
974 test-fade.o: $(srcdir)/xscreensaver.h
975 test-grab.o: ../config.h
976 test-passwd.o: XScreenSaver_ad.h
977 test-passwd.o: ../config.h
978 test-passwd.o: $(srcdir)/prefs.h
979 test-passwd.o: $(srcdir)/xscreensaver.h
980 test-uid.o: ../config.h
981 test-xdpms.o: ../config.h
982 timers.o: ../config.h
983 timers.o: $(srcdir)/prefs.h
984 timers.o: $(srcdir)/xscreensaver.h
985 windows.o: ../config.h
986 windows.o: $(srcdir)/prefs.h
987 windows.o: $(srcdir)/xscreensaver.h
988 xscreensaver-command.o: ../config.h
989 xscreensaver-command.o: $(srcdir)/remote.h
990 xscreensaver-getimage.o: ../config.h
991 xscreensaver-getimage.o: XScreenSaver_ad.h
992 xscreensaver-getimage.o: $(srcdir)/prefs.h
993 xscreensaver.o: XScreenSaver_ad.h
994 xscreensaver.o: ../config.h
995 xscreensaver.o: $(srcdir)/prefs.h
996 xscreensaver.o: $(srcdir)/xscreensaver.h
998 xset.o: $(srcdir)/prefs.h
999 xset.o: $(srcdir)/xscreensaver.h