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 localedir = $(datadir)/locale
21 manNdir = $(mandir)/man$(mansuffix)
23 INTLTOOL_MERGE = @INTLTOOL_MERGE@
25 GNOME_DATADIR = @GNOME_DATADIR@
26 GNOME_CCDIR_1 = $(GNOME_DATADIR)/control-center/Desktop
27 GNOME_CCDIR_2 = $(GNOME_DATADIR)/control-center/capplets
28 GNOME_CCDIR_3 = $(GNOME_DATADIR)/control-center-2.0/capplets
29 GNOME_PANELDIR1 = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
30 GNOME_PANELDIR2 = $(GNOME_DATADIR)/applications
31 GNOME_PANELDIR = @GNOME_PANELDIR@
32 GLADE_DATADIR = @GLADE_DATADIR@
33 GNOME_BINDIR = $(bindir)
34 HACK_CONF_DIR = @HACK_CONF_DIR@
40 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
41 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
42 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GLADE_DATADIR)"'
43 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
46 INTL_LIBS = @INTLLIBS@
50 DEPEND_FLAGS = @DEPEND_FLAGS@
51 DEPEND_DEFINES = @DEPEND_DEFINES@
55 SUID_FLAGS = -o root -m 4755
56 INSTALL_PROGRAM = @INSTALL_PROGRAM@
57 INSTALL_SCRIPT = @INSTALL_SCRIPT@
58 INSTALL_SETUID = @INSTALL_SETUID@
59 INSTALL_DATA = @INSTALL_DATA@
60 INSTALL_DIRS = @INSTALL_DIRS@
64 X_PRE_LIBS = @X_PRE_LIBS@
65 X_EXTRA_LIBS = @X_EXTRA_LIBS@
71 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
72 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
73 # and that must come before -lX11. (e.g., -lSM and -lICE.)
74 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
75 # (e.g., -lsocket, -lnsl, etc.)
77 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
79 # SAVER_LIBS is the link line for "xscreensaver", and
80 # CMD_LIBS is the link line for "xscreensaver-command".
81 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
84 AD_DIR = @APPDEFAULTS@
86 PAM_CONF = /etc/pam.conf
88 UTILS_SRC = $(srcdir)/../utils
91 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
93 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
94 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
96 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
97 demo-Gtk-widgets.c demo-Gtk-support.c
98 GTK_EXTRA_OBJS = demo-Gtk-widgets.o demo-Gtk-support.o
99 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
101 PWENT_SRCS = passwd-pwent.c
102 PWENT_OBJS = passwd-pwent.o
104 KERBEROS_SRCS = passwd-kerberos.c
105 KERBEROS_OBJS = passwd-kerberos.o
107 PAM_SRCS = passwd-pam.c
108 PAM_OBJS = passwd-pam.o
110 LOCK_SRCS_1 = lock.c passwd.c
111 LOCK_OBJS_1 = lock.o passwd.o
112 NOLOCK_SRCS_1 = lock.c
113 NOLOCK_OBJS_1 = lock.o
115 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
116 test-apm.c test-fade.c xdpyinfo.c
117 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
118 test-apm test-fade xdpyinfo
120 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
121 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
122 XML_LIBS = @XML_LIBS@
124 XDPMS_LIBS = @XDPMS_LIBS@
126 PASSWD_SRCS = @PASSWD_SRCS@
127 PASSWD_OBJS = @PASSWD_OBJS@
128 PASSWD_LIBS = @PASSWD_LIBS@
130 LOCK_SRCS = @LOCK_SRCS@
131 LOCK_OBJS = @LOCK_OBJS@
133 XMU_SRCS = @XMU_SRCS@
134 XMU_OBJS = @XMU_OBJS@
136 GL_SRCS = @SAVER_GL_SRCS@
137 GL_OBJS = @SAVER_GL_OBJS@
138 GL_LIBS = @SAVER_GL_LIBS@
140 ICON_SRC = $(UTILS_SRC)/images
141 LOGO = $(ICON_SRC)/logo-50.xpm
142 GTK_ICONS = $(ICON_SRC)/screensaver-*.xpm
144 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
145 $(UTILS_SRC)/visual.c
146 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
147 $(UTILS_BIN)/visual.o
149 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
150 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
152 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
153 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
156 GETIMG_SRCS_1 = xscreensaver-getimage.c
157 GETIMG_OBJS_1 = xscreensaver-getimage.o
159 GETIMG_SRCS = $(GETIMG_SRCS_1) \
160 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
161 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
162 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
163 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
164 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
166 GETIMG_OBJS = $(GETIMG_OBJS_1) \
167 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
168 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
169 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
170 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
171 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
173 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
174 xset.c splash.c setuid.c stderr.c
175 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
176 xset.o splash.o setuid.o stderr.o
178 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
179 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
180 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
181 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
183 CMD_SRCS = remote.c xscreensaver-command.c
184 CMD_OBJS = remote.o xscreensaver-command.o
186 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
187 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
189 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
190 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
192 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
193 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
194 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
197 CMD_LIBS = $(LIBS) $(X_LIBS) \
198 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
200 GETIMG_LIBS = $(LIBS) $(X_LIBS) $(XPM_LIBS) \
201 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
203 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
204 xscreensaver-getimage
205 EXES2 = @ALL_DEMO_PROGRAMS@
206 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
208 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
209 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
211 MEN = xscreensaver.man xscreensaver-demo.man \
212 xscreensaver-command.man \
213 xscreensaver-getimage.man \
214 xscreensaver-getimage-file.man \
215 xscreensaver-getimage-video.man
216 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
217 xscreensaver-demo.glade xscreensaver-demo.glade2 \
218 xscreensaver-demo.glade2p \
219 screensaver-properties.desktop.in \
220 screensaver-properties-capplet \
221 xscreensaver.kss.in \
223 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
224 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
225 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
227 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
228 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
229 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
230 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
235 all: $(EXES) $(EXES2)
238 install: install-program install-ad install-scripts \
239 install-gnome install-kde install-man @INSTALL_PAM@
240 uninstall: uninstall-program uninstall-ad \
241 uninstall-gnome uninstall-kde uninstall-man
244 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
247 install-program: $(EXES)
248 @if [ ! -d $(install_prefix)$(bindir) ]; then \
249 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
251 @inst="$(INSTALL_PROGRAM)" ; \
252 if [ @NEED_SETUID@ = yes ]; then \
253 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
254 if [ "$$me" = root ]; then \
255 inst="$(INSTALL_SETUID)" ; \
259 $$e " ####################################################################";\
260 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
261 $$e " passwords. If your system actually uses shadow passwords," ;\
262 $$e " then xscreensaver must be installed as a setuid root" ;\
263 $$e " program in order for locking to work. To do this, you" ;\
264 $$e " must run 'make install' as 'root', not as '$$me'." ;\
266 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
267 $$e " means that locking might not work. (Try it and see.)" ;\
268 $$e " ####################################################################";\
272 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
273 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
274 @echo $(INSTALL_PROGRAM) xscreensaver-command \
275 $(install_prefix)$(bindir)/xscreensaver-command ; \
276 $(INSTALL_PROGRAM) xscreensaver-command \
277 $(install_prefix)$(bindir)/xscreensaver-command
278 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
279 $(install_prefix)$(bindir)/xscreensaver-demo ; \
280 $(INSTALL_PROGRAM) xscreensaver-demo \
281 $(install_prefix)$(bindir)/xscreensaver-demo
282 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
283 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
284 $(INSTALL_PROGRAM) xscreensaver-getimage \
285 $(install_prefix)$(bindir)/xscreensaver-getimage
287 install-ad: XScreenSaver.ad
288 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
289 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
291 @-echo $(INSTALL_DATA) XScreenSaver.ad \
292 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
293 if $(INSTALL_DATA) XScreenSaver.ad \
294 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
298 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
300 $$e " ####################################################################";\
301 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
302 $$e " That file exists, and is unwritable. It is probably from" ;\
303 $$e " an older version of xscreensaver, and could cause things" ;\
304 $$e " to malfunction. Please delete it!" ;\
305 $$e " ####################################################################";\
310 $$e " ####################################################################";\
311 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
312 $$e " The directory is unwritable. This is probably ok;" ;\
313 $$e " xscreensaver should work without that file." ;\
314 $$e " ####################################################################";\
320 install-scripts: $(SCRIPTS) munge-scripts
321 @for program in $(SCRIPTS); do \
322 if [ -r $$program ] ; then \
325 p=$(srcdir)/$$program ; \
327 echo $(INSTALL_SCRIPT) $$p \
328 $(install_prefix)$(bindir)/$$program ; \
329 $(INSTALL_SCRIPT) $$p \
330 $(install_prefix)$(bindir)/$$program ; \
333 munge-scripts: $(SCRIPTS)
334 @tmp=/tmp/mf.$$$$ ; \
337 for program in $(SCRIPTS); do \
338 echo "adjusting location of perl in $$program..." ; \
339 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
340 < $(srcdir)/$$program > $$tmp ; \
341 if cmp -s $(srcdir)/$$program $$tmp ; then \
344 cat $$tmp > ./$$program ; \
351 if [ ! -d $(install_prefix)$(manNdir) ]; then \
352 $(INSTALL_DIRS) $(install_prefix)$(manNdir) ; \
354 for man in $$men; do \
355 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
356 echo $(INSTALL_DATA) $(srcdir)/$$man \
357 $(install_prefix)$(manNdir)/$$instname ; \
358 $(INSTALL_DATA) $(srcdir)/$$man \
359 $(install_prefix)$(manNdir)/$$instname ; \
363 @for program in $(EXES) $(SCRIPTS); do \
364 echo rm -f $(install_prefix)$(bindir)/$$program ; \
365 rm -f $(install_prefix)$(bindir)/$$program ; \
369 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
373 for man in $$men; do \
374 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
375 echo rm -f $(install_prefix)$(manNdir)/$$instname ; \
376 rm -f $(install_prefix)$(manNdir)/$$instname ; \
380 @src="$(srcdir)/xscreensaver.pam" ; \
381 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
383 dir="$(install_prefix)$(PAM_DIR)" ; \
384 conf="$(PAM_CONF)" ; \
386 if [ -d $$dir ] ; then \
388 if [ -f $$dir/xdm ]; then \
390 elif [ -f $$dir/login ]; then \
394 if [ -z "$$src2" ]; then \
395 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
396 $(INSTALL_DATA) $$src $$dir/$$dest ; \
398 src="xscreensaver.pam.$$$$" ; \
399 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
400 grep '^#%\|^auth' $$src2 > $$src ; \
401 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
402 $(INSTALL_DATA) $$src $$dir/$$dest ; \
407 if [ ! -f $$dir/$$dest ]; then \
410 $$e " ####################################################################";\
411 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
412 $$e " Authentication Modules (PAM). However, we were unable to" ;\
413 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
414 $$e " to work without this file (and old-style password" ;\
415 $$e " authentication will be used instead, which may or may not" ;\
417 $$e " ####################################################################";\
420 elif [ -f $$conf ]; then \
421 if ( grep $$dest $$conf >/dev/null ); then \
422 echo "$$conf unchanged: already has an entry for $$dest" ; \
424 src="pam.conf.$$$$" ; \
425 echo "grep -v $$dest $$conf > $$src" ; \
426 grep -v $$dest $$conf > $$src ; \
427 extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
428 echo "$$extras" >> $$src ; \
429 if [ "x$$extras" = "x" ]; then \
430 echo "Error: no login rules in $$conf?" >&2 ; \
432 echo "adding $$dest rules to $$src:" ; \
433 echo "$$extras" | sed 's/^/ /' ; \
435 echo $(INSTALL_DATA) $$src $$conf ; \
436 $(INSTALL_DATA) $$src $$conf ; \
440 if ! ( grep $$dest $$conf >/dev/null ); then \
443 $$e " ####################################################################";\
444 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
445 $$e " Authentication Modules (PAM). However, we were unable to" ;\
446 $$e " install xscreensaver rules in the file $$conf." ;\
447 $$e " PAM is unlikely to work without this (and old-style" ;\
448 $$e " password authentication will be used instead, which may" ;\
449 $$e " or may not work.)" ;\
450 $$e " ####################################################################";\
455 install-gnome:: screensaver-properties.desktop
457 if [ "$(GNOME_DATADIR)" != "" ]; then \
459 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \
460 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
461 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\
463 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \
464 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
465 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\
467 if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then \
468 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
469 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)" ;\
471 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
472 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
473 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
476 echo $(INSTALL_DATA) screensaver-properties.desktop \
477 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
479 if $(INSTALL_DATA) screensaver-properties.desktop \
480 $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
483 lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\
486 echo $(INSTALL_DATA) screensaver-properties.desktop \
487 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
489 if $(INSTALL_DATA) screensaver-properties.desktop \
490 $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
493 lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\
496 echo $(INSTALL_DATA) screensaver-properties.desktop \
497 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
499 if $(INSTALL_DATA) screensaver-properties.desktop \
500 $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
503 lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)" ;\
506 echo $(INSTALL_DATA) screensaver-properties.desktop \
507 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
508 if $(INSTALL_DATA) screensaver-properties.desktop \
509 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
512 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
515 if [ "$$lost" != "" ]; then \
518 $$e " ####################################################################";\
519 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
521 for f in $$@ ; do echo " $$f/" ; done ;\
522 $$e ' This means the "Screen Saver" section of the Gnome' ;\
523 $$e " Control Center (gnomecc) may not work properly." ;\
524 $$e " ####################################################################";\
530 install-gnome:: screensaver-properties-capplet
531 @if [ "$(GNOME_DATADIR)" != "" ]; then \
532 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
533 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
534 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
536 program=screensaver-properties-capplet ;\
537 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
538 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
539 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
540 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
545 $$e " ####################################################################";\
546 $$e " Warning: unable to install $$program into" ;\
547 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
548 $$e " Without this file, the Gnome session manager will not" ;\
549 $$e " launch xscreensaver properly at login time." ;\
550 $$e " ####################################################################";\
557 install-gnome:: $(LOGO)
558 @if [ "$(GLADE_DATADIR)" != "" ]; then \
559 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
560 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
561 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
563 target=xscreensaver.xpm ;\
564 echo $(INSTALL_DATA) $(LOGO) \
565 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
566 $(INSTALL_DATA) $(LOGO) \
567 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
570 # ../utils/images/screensaver-*.xpm
572 @if [ "$(GLADE_DATADIR)" != "" ]; then \
573 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
574 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
575 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
577 for target in $(GTK_ICONS) ; do \
578 dest=`echo $$target | sed 's@^.*/@@'` ;\
579 echo $(INSTALL_DATA) $$target \
580 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
581 $(INSTALL_DATA) $$target \
582 $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
586 # xscreensaver-demo.glade2
587 install-gnome:: xscreensaver-demo.glade2
588 @if [ "$(GLADE_DATADIR)" != "" ]; then \
589 if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then \
590 echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
591 $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)" ;\
593 target=xscreensaver-demo.glade2 ;\
594 echo $(INSTALL_DATA) $(srcdir)/$$target \
595 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
596 if $(INSTALL_DATA) $(srcdir)/$$target \
597 $(install_prefix)$(GLADE_DATADIR)/$$target ;\
602 $$e " ####################################################################";\
603 $$e " Warning: unable to install $$target into" ;\
604 $$e " $(install_prefix)$(GLADE_DATADIR)/." ;\
605 $$e " Without this file, xscreensaver-demo will not" ;\
606 $$e " be able to run properly." ;\
607 $$e " ####################################################################";\
614 # screensaver-properties.desktop
616 @if [ "$(GNOME_DATADIR)" != "" ]; then \
617 f=screensaver-properties.desktop ;\
618 echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
619 rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f ;\
620 echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
621 rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f ;\
622 echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
623 rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f ;\
624 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
625 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
628 # screensaver-properties-capplet
630 @if [ "$(GNOME_DATADIR)" != "" ]; then \
631 program=screensaver-properties-capplet ;\
632 echo rm -f $(install_prefix)$(bindir)/$$program ;\
633 rm -f $(install_prefix)$(bindir)/$$program ;\
638 @if [ "$(GLADE_DATADIR)" != "" ]; then \
639 target=xscreensaver.xpm ;\
640 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$target ;\
641 rm -f $(install_prefix)$(GLADE_DATADIR)/$$target ;\
646 @if [ "$(GLADE_DATADIR)" != "" ]; then \
647 for target in $(GTK_ICONS) ; do \
648 dest=`echo $$target | sed 's@^.*/@@'` ;\
649 echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
650 rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest ;\
655 @src="xscreensaver.kss" ; \
656 if [ "$$KDEDIR" != "" ]; then \
657 dir="$(install_prefix)$$KDEDIR/bin" ; \
658 dest="$$dir/$$src" ; \
659 echo $(INSTALL_SCRIPT) $$src $$dest ; \
660 if $(INSTALL_SCRIPT) $$src $$dest ; then \
665 $$e " ####################################################################";\
666 $$e " Warning: unable to install $$dest" ;\
667 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
668 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
669 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
670 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
671 elif [ -f $$dest ]; then \
672 $$e " That file exists, and is unwritable." ;\
674 $$e " The directory is unwritable." ;\
676 $$e " ####################################################################";\
683 @if [ "$$KDEDIR" != "" ]; then \
684 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
685 echo rm -f $$dest ; \
690 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
693 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
695 # Adds all current dependencies to Makefile
696 depend: XScreenSaver_ad.h
697 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
699 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
700 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
702 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
703 # close. This excludes dependencies on files in /usr/include, etc. It tries
704 # to include only dependencies on files which are themselves a part of this
706 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
707 @echo updating dependencies in `pwd`/Makefile.in... ; \
708 $(DEPEND) -w 0 -f - \
709 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
710 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
711 $(CFLAGS) $(X_CFLAGS) -- \
712 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
713 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
714 $(TEST_SRCS) 2>/dev/null | \
717 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
719 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
720 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
721 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
722 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
723 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
725 ) > /tmp/distdepend.$$$$ && \
726 mv Makefile.in Makefile.in.bak && \
727 mv /tmp/distdepend.$$$$ Makefile.in
729 # Updates the version number in the app-defaults file to be in sync with
730 # the version number in version.h. This is so people can tell when they
731 # have a version skew between the app-defaults file and the executable.
732 # Also update hacks/config/README in the same way.
734 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
735 U=$(UTILS_SRC)/version.h ; \
736 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
737 D=`date '+%d-%b-%Y'` ; \
738 for S in $$files ; do \
739 echo -n "Updating $$S to $$V $$D... " ; \
741 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
742 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
744 if cmp -s $$S $$T ; then \
745 echo "unchanged." ; \
754 @for S in $(MEN); do \
755 U=$(UTILS_SRC)/version.h ; \
756 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
757 V="`date '+%d-%b-%Y'` ($$V)" ; \
758 echo -n "Updating $$S to \"$$V\"... " ; \
760 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
762 if cmp -s $$S $$T ; then \
763 echo "unchanged." ; \
773 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
776 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
781 for exe in $(EXES); do \
782 if ! [ -f $(srcdir)/$$exe.man ]; then \
783 badmen="$$badmen $$exe" ; \
786 if [ -n "$$badmen" ]; then \
788 echo "Warning: The following programs have no manuals:" ; \
790 for m in $$badmen ; do \
797 # Rules for noticing when the objects from the utils directory are out of
798 # date with respect to their sources, and going and building them according
799 # to the rules in their own Makefile...
801 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
802 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
803 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
804 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
805 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
806 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
807 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
808 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
809 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
813 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
815 # How we build object files in this directory.
817 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
819 # subprocs takes an extra -D option.
820 subprocs.o: subprocs.c
821 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
824 # demo-Gtk takes extra -D options, and an extra -I option.
825 demo-Gtk.o: demo-Gtk.c
826 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
827 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
830 # demo-Gtk-conf takes an extra -D option.
831 demo-Gtk-conf.o: demo-Gtk-conf.c
832 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
833 $(srcdir)/demo-Gtk-conf.c
836 # How we build the default app-defaults file into the program.
838 XScreenSaver_ad.h: XScreenSaver.ad
839 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
841 @INTLTOOL_DESKTOP_RULE@
843 # The executables linked in this directory.
845 xscreensaver: $(SAVER_OBJS)
846 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
848 xscreensaver-command: $(CMD_OBJS)
849 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
852 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
853 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@
854 # $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
856 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
857 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
858 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
859 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
861 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
862 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
863 $(GTK_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
864 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
866 xscreensaver-getimage: $(GETIMG_OBJS)
867 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
870 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
871 subprocs.o setuid.o splash.o prefs.o \
873 test-passwd.o: XScreenSaver_ad.h
875 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
876 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
879 $(CC) $(LDFLAGS) -o $@ test-uid.o
881 test-xdpms: test-xdpms.o
882 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
883 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
885 test-grab: test-grab.o
886 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
889 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
891 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
892 test-fade: test-fade.o $(UTILS_BIN)/fade.o
893 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
896 xdpyinfo.o: xdpyinfo.c
897 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
901 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
902 $(LIBS) $(X_LIBS) @GL_LIBS@ \
903 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
906 ##############################################################################
908 # DO NOT DELETE: updated by make distdepend
910 demo-Gtk-conf.o: ../config.h
911 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
912 demo-Gtk.o: XScreenSaver_ad.h
913 demo-Gtk.o: ../config.h
914 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
915 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
916 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
917 demo-Gtk.o: $(srcdir)/prefs.h
918 demo-Gtk.o: $(srcdir)/remote.h
919 demo-Gtk-support.o: ../config.h
920 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
921 demo-Gtk-widgets.o: ../config.h
922 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
923 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
924 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
925 demo-Xm.o: XScreenSaver_ad.h
926 demo-Xm.o: ../config.h
927 demo-Xm.o: $(srcdir)/prefs.h
928 demo-Xm.o: $(srcdir)/remote.h
929 demo-Xm-widgets.o: ../config.h
931 dpms.o: $(srcdir)/prefs.h
932 dpms.o: $(srcdir)/xscreensaver.h
935 lock.o: $(srcdir)/prefs.h
936 lock.o: $(srcdir)/xscreensaver.h
937 passwd.o: ../config.h
938 passwd-pwent.o: ../config.h
940 prefs.o: $(srcdir)/prefs.h
941 remote.o: ../config.h
942 remote.o: $(srcdir)/remote.h
943 setuid.o: ../config.h
944 setuid.o: $(srcdir)/prefs.h
945 setuid.o: $(srcdir)/xscreensaver.h
946 splash.o: ../config.h
947 splash.o: $(srcdir)/prefs.h
948 splash.o: $(srcdir)/xscreensaver.h
949 stderr.o: ../config.h
950 stderr.o: $(srcdir)/prefs.h
951 stderr.o: $(srcdir)/xscreensaver.h
952 subprocs.o: ../config.h
953 subprocs.o: $(srcdir)/prefs.h
954 subprocs.o: $(srcdir)/xscreensaver.h
955 test-apm.o: ../config.h
956 test-fade.o: ../config.h
957 test-fade.o: $(srcdir)/prefs.h
958 test-fade.o: $(srcdir)/xscreensaver.h
959 test-grab.o: ../config.h
960 test-passwd.o: XScreenSaver_ad.h
961 test-passwd.o: ../config.h
962 test-passwd.o: $(srcdir)/prefs.h
963 test-passwd.o: $(srcdir)/xscreensaver.h
964 test-uid.o: ../config.h
965 test-xdpms.o: ../config.h
966 timers.o: ../config.h
967 timers.o: $(srcdir)/prefs.h
968 timers.o: $(srcdir)/xscreensaver.h
969 windows.o: ../config.h
970 windows.o: $(srcdir)/prefs.h
971 windows.o: $(srcdir)/xscreensaver.h
972 xscreensaver-command.o: ../config.h
973 xscreensaver-command.o: $(srcdir)/remote.h
974 xscreensaver-getimage.o: ../config.h
975 xscreensaver-getimage.o: XScreenSaver_ad.h
976 xscreensaver-getimage.o: $(srcdir)/prefs.h
977 xscreensaver.o: XScreenSaver_ad.h
978 xscreensaver.o: ../config.h
979 xscreensaver.o: $(srcdir)/prefs.h
980 xscreensaver.o: $(srcdir)/xscreensaver.h
982 xset.o: $(srcdir)/prefs.h
983 xset.o: $(srcdir)/xscreensaver.h