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 man1dir = $(mandir)/man1
21 localedir = $(datadir)/locale
23 INTLTOOL_MERGE = @INTLTOOL_MERGE@
25 GNOME_DATADIR = @GNOME_DATADIR@
26 GNOME_CCDIR = $(GNOME_DATADIR)/control-center/Desktop
27 GNOME_PANELDIR = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop
28 GNOME_BINDIR = $(bindir)
29 HACK_CONF_DIR = @HACK_CONF_DIR@
30 GTK_ICONDIR = @GTK_ICONDIR@
36 INTL_DEFS = -DLOCALEDIR=\"$(localedir)\"
37 SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
38 GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GTK_ICONDIR)"'
39 CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
42 INTL_LIBS = @INTLLIBS@
46 DEPEND_FLAGS = @DEPEND_FLAGS@
47 DEPEND_DEFINES = @DEPEND_DEFINES@
51 SUID_FLAGS = -o root -m 4755
52 INSTALL_PROGRAM = @INSTALL_PROGRAM@
53 INSTALL_SCRIPT = @INSTALL_SCRIPT@
54 INSTALL_SETUID = @INSTALL_SETUID@
55 INSTALL_DATA = @INSTALL_DATA@
56 INSTALL_DIRS = @INSTALL_DIRS@
60 X_PRE_LIBS = @X_PRE_LIBS@
61 X_EXTRA_LIBS = @X_EXTRA_LIBS@
66 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
67 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
68 # and that must come before -lX11. (e.g., -lSM and -lICE.)
69 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
70 # (e.g., -lsocket, -lnsl, etc.)
72 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
74 # SAVER_LIBS is the link line for "xscreensaver", and
75 # CMD_LIBS is the link line for "xscreensaver-command".
76 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
79 AD_DIR = @APPDEFAULTS@
81 PAM_CONF = /etc/pam.conf
83 UTILS_SRC = $(srcdir)/../utils
86 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
88 MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
89 MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
91 GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \
92 demo-Gtk-widgets.c demo-Gtk-support.c
93 GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o \
94 demo-Gtk-widgets.o demo-Gtk-support.o
96 PWENT_SRCS = passwd-pwent.c
97 PWENT_OBJS = passwd-pwent.o
99 KERBEROS_SRCS = passwd-kerberos.c
100 KERBEROS_OBJS = passwd-kerberos.o
102 PAM_SRCS = passwd-pam.c
103 PAM_OBJS = passwd-pam.o
105 LOCK_SRCS_1 = lock.c passwd.c
106 LOCK_OBJS_1 = lock.o passwd.o
107 NOLOCK_SRCS_1 = lock.c
108 NOLOCK_OBJS_1 = lock.o
110 TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
111 test-apm.c test-fade.c xdpyinfo.c
112 TEST_EXES = test-passwd test-uid test-xdpms test-grab \
113 test-apm test-fade xdpyinfo
115 MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
116 GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS)
117 XML_LIBS = @XML_LIBS@
119 XDPMS_LIBS = @XDPMS_LIBS@
121 PASSWD_SRCS = @PASSWD_SRCS@
122 PASSWD_OBJS = @PASSWD_OBJS@
123 PASSWD_LIBS = @PASSWD_LIBS@
125 LOCK_SRCS = @LOCK_SRCS@
126 LOCK_OBJS = @LOCK_OBJS@
128 XMU_SRCS = @XMU_SRCS@
129 XMU_OBJS = @XMU_OBJS@
131 GL_SRCS = @SAVER_GL_SRCS@
132 GL_OBJS = @SAVER_GL_OBJS@
133 GL_LIBS = @SAVER_GL_LIBS@
135 ICON_SRC = $(UTILS_SRC)/images
136 LOGO = $(ICON_SRC)/logo-50.xpm
137 GTK_ICONS = $(ICON_SRC)/screensaver-*.xpm
139 DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
140 $(UTILS_SRC)/visual.c
141 DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
142 $(UTILS_BIN)/visual.o
144 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
145 $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
147 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
148 $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
151 GETIMG_SRCS_1 = xscreensaver-getimage.c
152 GETIMG_OBJS_1 = xscreensaver-getimage.o
154 GETIMG_SRCS = $(GETIMG_SRCS_1) \
155 $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
156 $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
157 $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
158 $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
159 $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
161 GETIMG_OBJS = $(GETIMG_OBJS_1) \
162 $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
163 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
164 $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
165 $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
166 $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
168 SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \
169 xset.c splash.c setuid.c stderr.c
170 SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \
171 xset.o splash.o setuid.o stderr.o
173 SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
174 $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
175 SAVER_OBJS = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
176 $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
178 CMD_SRCS = remote.c xscreensaver-command.c
179 CMD_OBJS = remote.o xscreensaver-command.o
181 DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS)
182 DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS)
184 DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
185 DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
187 SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
188 $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
189 -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
192 CMD_LIBS = $(LIBS) $(X_LIBS) \
193 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
195 GETIMG_LIBS = $(LIBS) $(X_LIBS) \
196 $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
198 EXES = xscreensaver xscreensaver-command xscreensaver-demo \
199 xscreensaver-getimage
200 EXES2 = @ALL_DEMO_PROGRAMS@
201 SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video
203 HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
204 demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
206 MEN = xscreensaver.man xscreensaver-demo.man \
207 xscreensaver-command.man \
208 xscreensaver-getimage.man \
209 xscreensaver-getimage-file.man \
210 xscreensaver-getimage-video.man
211 EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
212 xscreensaver.kss xscreensaver-demo.glade \
213 screensaver-properties.desktop.in \
214 screensaver-properties-capplet \
216 VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
217 vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
218 vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
220 TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
221 $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
222 $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
223 $(CMD_SRCS) $(GETIMG_SRCS_1) $(HDRS) $(SCRIPTS) \
228 all: $(EXES) $(EXES2)
231 install: install-program install-ad install-scripts \
232 install-gnome install-kde install-man @INSTALL_PAM@
233 uninstall: uninstall-program uninstall-ad \
234 uninstall-gnome uninstall-kde uninstall-man
237 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
240 install-program: $(EXES)
241 @if [ ! -d $(install_prefix)$(bindir) ]; then \
242 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
244 @inst="$(INSTALL_PROGRAM)" ; \
245 if [ @NEED_SETUID@ = yes ]; then \
246 me=`PATH="$$PATH:/usr/ucb" whoami` ; \
247 if [ "$$me" = root ]; then \
248 inst="$(INSTALL_SETUID)" ; \
252 $$e " ####################################################################";\
253 $$e " Warning: xscreensaver has been compiled with support for shadow" ;\
254 $$e " passwords. If your system actually uses shadow passwords," ;\
255 $$e " then xscreensaver must be installed as a setuid root" ;\
256 $$e " program in order for locking to work. To do this, you" ;\
257 $$e " must run 'make install' as 'root', not as '$$me'." ;\
259 $$e " For now, xscreensaver will be installed non-setuid, which" ;\
260 $$e " means that locking might not work. (Try it and see.)" ;\
261 $$e " ####################################################################";\
265 echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \
266 $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
267 @echo $(INSTALL_PROGRAM) xscreensaver-command \
268 $(install_prefix)$(bindir)/xscreensaver-command ; \
269 $(INSTALL_PROGRAM) xscreensaver-command \
270 $(install_prefix)$(bindir)/xscreensaver-command
271 @echo $(INSTALL_PROGRAM) xscreensaver-demo \
272 $(install_prefix)$(bindir)/xscreensaver-demo ; \
273 $(INSTALL_PROGRAM) xscreensaver-demo \
274 $(install_prefix)$(bindir)/xscreensaver-demo
275 @echo $(INSTALL_PROGRAM) xscreensaver-getimage \
276 $(install_prefix)$(bindir)/xscreensaver-getimage ; \
277 $(INSTALL_PROGRAM) xscreensaver-getimage \
278 $(install_prefix)$(bindir)/xscreensaver-getimage
280 install-ad: XScreenSaver.ad
281 @if [ ! -d $(install_prefix)$(AD_DIR) ]; then \
282 $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ; \
284 @-echo $(INSTALL_DATA) XScreenSaver.ad \
285 $(install_prefix)$(AD_DIR)/XScreenSaver ; \
286 if $(INSTALL_DATA) XScreenSaver.ad \
287 $(install_prefix)$(AD_DIR)/XScreenSaver ; then \
291 if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then \
293 $$e " ####################################################################";\
294 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
295 $$e " That file exists, and is unwritable. It is probably from" ;\
296 $$e " an older version of xscreensaver, and could cause things" ;\
297 $$e " to malfunction. Please delete it!" ;\
298 $$e " ####################################################################";\
303 $$e " ####################################################################";\
304 $$e " Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver" ;\
305 $$e " The directory is unwritable. This is probably ok;" ;\
306 $$e " xscreensaver should work without that file." ;\
307 $$e " ####################################################################";\
313 install-scripts: $(SCRIPTS) munge-scripts
314 @for program in $(SCRIPTS); do \
315 if [ -r $$program ] ; then \
318 p=$(srcdir)/$$program ; \
320 echo $(INSTALL_SCRIPT) $$p \
321 $(install_prefix)$(bindir)/$$program ; \
322 $(INSTALL_SCRIPT) $$p \
323 $(install_prefix)$(bindir)/$$program ; \
326 munge-scripts: $(SCRIPTS)
327 @tmp=/tmp/mf.$$$$ ; \
330 for program in $(SCRIPTS); do \
331 echo "adjusting location of perl in $$program..." ; \
332 sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \
333 < $(srcdir)/$$program > $$tmp ; \
334 if cmp -s $(srcdir)/$$program $$tmp ; then \
337 cat $$tmp > ./$$program ; \
344 if [ ! -d $(install_prefix)$(man1dir) ]; then \
345 $(INSTALL_DIRS) $(install_prefix)$(man1dir) ; \
347 for man in $$men; do \
348 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
349 echo $(INSTALL_DATA) $(srcdir)/$$man \
350 $(install_prefix)$(man1dir)/$$instname ; \
351 $(INSTALL_DATA) $(srcdir)/$$man \
352 $(install_prefix)$(man1dir)/$$instname ; \
356 @for program in $(EXES) $(SCRIPTS); do \
357 echo rm -f $(install_prefix)$(bindir)/$$program ; \
358 rm -f $(install_prefix)$(bindir)/$$program ; \
362 rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
366 for man in $$men; do \
367 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
368 echo rm -f $(install_prefix)$(man1dir)/$$instname ; \
369 rm -f $(install_prefix)$(man1dir)/$$instname ; \
373 @src="$(srcdir)/xscreensaver.pam" ; \
374 dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
376 dir="$(install_prefix)$(PAM_DIR)" ; \
377 conf="$(PAM_CONF)" ; \
379 if [ -d $$dir ] ; then \
381 if [ -f $$dir/xdm ]; then \
383 elif [ -f $$dir/login ]; then \
387 if [ -z "$$src2" ]; then \
388 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
389 $(INSTALL_DATA) $$src $$dir/$$dest ; \
391 src="xscreensaver.pam.$$$$" ; \
392 echo "grep '^#%\|^auth' $$src2 > $$src" ; \
393 grep '^#%\|^auth' $$src2 > $$src ; \
394 echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
395 $(INSTALL_DATA) $$src $$dir/$$dest ; \
400 if [ ! -f $$dir/$$dest ]; then \
403 $$e " ####################################################################";\
404 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
405 $$e " Authentication Modules (PAM). However, we were unable to" ;\
406 $$e " install the file $$dir/$$dest. PAM is unlikely" ;\
407 $$e " to work without this file (and old-style password" ;\
408 $$e " authentication will be used instead, which may or may not" ;\
410 $$e " ####################################################################";\
413 elif [ -f $$conf ]; then \
414 if ( grep $$dest $$conf >/dev/null ); then \
419 $$e " ####################################################################";\
420 $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
421 $$e " Authentication Modules (PAM). To complete the installation";\
422 $$e " of PAM support, you must add the following line to the file";\
425 $$e " $$dest auth required /usr/lib/security/pam_unix.so.1" ;\
427 $$e " Be careful: if you mess up that file, you could completely" ;\
428 $$e " hose your machine (e.g., \`login' and \`su' won't work, and";\
429 $$e " you'll have to boot single-user to fix it.)" ;\
430 $$e " ####################################################################";\
435 install-gnome:: screensaver-properties.desktop
437 if [ "$(GNOME_DATADIR)" != "" ]; then \
439 if [ ! -d "$(install_prefix)$(GNOME_CCDIR)" ]; then \
440 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
441 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\
444 echo $(INSTALL_DATA) screensaver-properties.desktop \
445 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop; \
447 if $(INSTALL_DATA) screensaver-properties.desktop \
448 $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop; \
451 lost="$$lost $(install_prefix)$(GNOME_CCDIR)" ;\
454 if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \
455 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
456 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)" ;\
459 echo $(INSTALL_DATA) screensaver-properties.desktop \
460 $(GNOME_PANELDIR)/screensaver-properties.desktop ;\
461 if $(INSTALL_DATA) screensaver-properties.desktop \
462 $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop ;\
465 lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\
468 if [ "$$lost" != "" ]; then \
471 $$e " ####################################################################";\
472 $$e " Warning: unable to install screensaver-properties.desktop into:" ;\
474 for f in $$@ ; do echo " $$f/" ; done ;\
475 $$e ' This means the "Screen Saver" section of the Gnome' ;\
476 $$e " Control Center (gnomecc) may not work properly." ;\
477 $$e " ####################################################################";\
483 install-gnome:: screensaver-properties-capplet
484 @if [ "$(GNOME_DATADIR)" != "" ]; then \
485 if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then \
486 echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
487 $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)" ;\
489 program=screensaver-properties-capplet ;\
490 echo $(INSTALL_SCRIPT) $(srcdir)/$$program \
491 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
492 if $(INSTALL_SCRIPT) $(srcdir)/$$program \
493 $(install_prefix)$(GNOME_BINDIR)/$$program ;\
498 $$e " ####################################################################";\
499 $$e " Warning: unable to install $$program into" ;\
500 $$e " $(install_prefix)$(GNOME_BINDIR)/." ;\
501 $$e " Without this file, the Gnome session manager will not" ;\
502 $$e " launch xscreensaver properly at login time." ;\
503 $$e " ####################################################################";\
510 install-gnome:: $(LOGO)
511 @if [ "$(GTK_ICONDIR)" != "" ]; then \
512 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
513 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
514 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
516 target=xscreensaver.xpm ;\
517 echo $(INSTALL_DATA) $(LOGO) \
518 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
519 $(INSTALL_DATA) $(LOGO) \
520 $(install_prefix)$(GTK_ICONDIR)/$$target ;\
523 # ../utils/images/screensaver-*.xpm
525 @if [ "$(GTK_ICONDIR)" != "" ]; then \
526 if [ ! -d "$(install_prefix)$(GTK_ICONDIR)" ]; then \
527 echo $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
528 $(INSTALL_DIRS) "$(install_prefix)$(GTK_ICONDIR)" ;\
530 for target in $(GTK_ICONS) ; do \
531 dest=`echo $$target | sed 's@^.*/@@'` ;\
532 echo $(INSTALL_DATA) $$target \
533 $(install_prefix)$(GTK_ICONDIR)/$$dest ;\
534 $(INSTALL_DATA) $$target \
535 $(install_prefix)$(GTK_ICONDIR)/$$dest ;\
539 # screensaver-properties.desktop
541 @if [ "$(GNOME_DATADIR)" != "" ]; then \
542 f=screensaver-properties.desktop ;\
543 echo rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
544 rm -f $(install_prefix)$(GNOME_CCDIR)/$$f ;\
545 echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
546 rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\
549 # screensaver-properties-capplet
551 @if [ "$(GNOME_DATADIR)" != "" ]; then \
552 program=screensaver-properties-capplet ;\
553 echo rm -f $(install_prefix)$(bindir)/$$program ;\
554 rm -f $(install_prefix)$(bindir)/$$program ;\
559 @if [ "$(GTK_ICONDIR)" != "" ]; then \
560 target=xscreensaver.xpm ;\
561 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
562 rm -f $(install_prefix)$(GTK_ICONDIR)/$$target ;\
567 @if [ "$(GTK_ICONDIR)" != "" ]; then \
568 for target in $(GTK_ICONS) ; do \
569 dest=`echo $$target | sed 's@^.*/@@'` ;\
570 echo rm -f $(install_prefix)$(GTK_ICONDIR)/$$dest ;\
571 rm -f $(install_prefix)$(GTK_ICONDIR)/$$dest ;\
576 @src="$(srcdir)/xscreensaver.kss" ; \
577 if [ "$$KDEDIR" != "" ]; then \
578 dir="$(install_prefix)$$KDEDIR/bin" ; \
579 dest="$$dir/xscreensaver.kss" ; \
580 echo $(INSTALL_SCRIPT) $$src $$dest ; \
581 if $(INSTALL_SCRIPT) $$src $$dest ; then \
586 $$e " ####################################################################";\
587 $$e " Warning: unable to install $$dest" ;\
588 if [ ! -d $(install_prefix)$$KDEDIR ]; then \
589 $$e " $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist." ;\
590 elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then \
591 $$e " $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
592 elif [ -f $$dest ]; then \
593 $$e " That file exists, and is unwritable." ;\
595 $$e " The directory is unwritable." ;\
597 $$e " ####################################################################";\
604 @if [ "$$KDEDIR" != "" ]; then \
605 dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ; \
606 echo rm -f $$dest ; \
611 -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
614 -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
616 # Adds all current dependencies to Makefile
617 depend: XScreenSaver_ad.h
618 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
620 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
621 $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
623 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
624 # close. This excludes dependencies on files in /usr/include, etc. It tries
625 # to include only dependencies on files which are themselves a part of this
627 distdepend: update_ad_version update_man_version XScreenSaver_ad.h
628 @echo updating dependencies in `pwd`/Makefile.in... ; \
629 $(DEPEND) -w 0 -f - \
630 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
631 $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES) \
632 $(CFLAGS) $(X_CFLAGS) -- \
633 $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \
634 $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
635 $(TEST_SRCS) 2>/dev/null | \
638 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
640 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
641 -e 's@\.\./utils@$$(UTILS_SRC)@g' \
642 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
643 -e 's@$$.*\(XScreenSaver_ad\)@\1@g' \
644 -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ; \
646 ) > /tmp/distdepend.$$$$ && \
647 mv Makefile.in Makefile.in.bak && \
648 mv /tmp/distdepend.$$$$ Makefile.in
650 # Updates the version number in the app-defaults file to be in sync with
651 # the version number in version.h. This is so people can tell when they
652 # have a version skew between the app-defaults file and the executable.
653 # Also update hacks/config/README in the same way.
655 @files="XScreenSaver.ad.in ../hacks/config/README" ; \
656 U=$(UTILS_SRC)/version.h ; \
657 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
658 D=`date '+%d-%b-%Y'` ; \
659 for S in $$files ; do \
660 echo -n "Updating version number in $$S to $$V $$D... " ; \
662 sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \
663 -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \
665 if cmp -s $$S $$T ; then \
666 echo "unchanged." ; \
675 @for S in $(MEN); do \
676 U=$(UTILS_SRC)/version.h ; \
677 V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
678 V="`date '+%d-%b-%Y'` ($$V)" ; \
679 echo -n "Updating footer in $$S to \"$$V\"... " ; \
681 sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/" \
683 if cmp -s $$S $$T ; then \
684 echo "unchanged." ; \
694 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
697 @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
701 # Rules for noticing when the objects from the utils directory are out of
702 # date with respect to their sources, and going and building them according
703 # to the rules in their own Makefile...
705 $(UTILS_BIN)/fade.o: $(UTILS_SRC)/fade.c
706 $(UTILS_BIN)/overlay.o: $(UTILS_SRC)/overlay.c
707 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
708 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
709 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
710 $(UTILS_BIN)/xmu.o: $(UTILS_SRC)/xmu.c
711 $(UTILS_BIN)/logo.o: $(UTILS_SRC)/logo.c
712 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
713 $(UTILS_BIN)/colorbars.o: $(UTILS_SRC)/colorbars.c
717 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
719 # How we build object files in this directory.
721 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
723 # subprocs takes an extra -D option.
724 subprocs.o: subprocs.c
725 $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
728 # demo-Gtk takes extra -D options, and an extra -I option.
729 demo-Gtk.o: demo-Gtk.c
730 $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
731 $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
734 # demo-Gtk-conf takes an extra -D option.
735 demo-Gtk-conf.o: demo-Gtk-conf.c
736 $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
737 $(srcdir)/demo-Gtk-conf.c
740 # How we build the default app-defaults file into the program.
742 XScreenSaver_ad.h: XScreenSaver.ad
743 $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
745 @INTLTOOL_DESKTOP_RULE@
747 # The executables linked in this directory.
749 xscreensaver: $(SAVER_OBJS)
750 $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
752 xscreensaver-command: $(CMD_OBJS)
753 $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
756 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
757 cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@
758 # $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@
760 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
761 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
762 $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
763 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
765 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
766 $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
767 $(GTK_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
768 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
770 xscreensaver-getimage: $(GETIMG_OBJS)
771 $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
774 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
775 subprocs.o setuid.o splash.o prefs.o \
777 test-passwd.o: XScreenSaver_ad.h
779 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
780 $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
783 $(CC) $(LDFLAGS) -o $@ test-uid.o
785 test-xdpms: test-xdpms.o
786 $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
787 $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
789 test-grab: test-grab.o
790 $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
793 $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
795 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
796 test-fade: test-fade.o $(UTILS_BIN)/fade.o
797 $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
800 xdpyinfo.o: xdpyinfo.c
801 $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
805 $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
806 $(LIBS) $(X_LIBS) @GL_LIBS@ \
807 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
810 ##############################################################################
812 # DO NOT DELETE: updated by make distdepend
814 demo-Gtk-conf.o: ../config.h
815 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
816 demo-Gtk.o: XScreenSaver_ad.h
817 demo-Gtk.o: ../config.h
818 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
819 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
820 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
821 demo-Gtk.o: $(srcdir)/prefs.h
822 demo-Gtk.o: $(srcdir)/remote.h
823 demo-Gtk-support.o: ../config.h
824 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
825 demo-Gtk-widgets.o: ../config.h
826 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
827 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
828 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
829 demo-Xm.o: XScreenSaver_ad.h
830 demo-Xm.o: ../config.h
831 demo-Xm.o: $(srcdir)/prefs.h
832 demo-Xm.o: $(srcdir)/remote.h
833 demo-Xm-widgets.o: ../config.h
835 dpms.o: $(srcdir)/prefs.h
836 dpms.o: $(srcdir)/xscreensaver.h
839 lock.o: $(srcdir)/prefs.h
840 lock.o: $(srcdir)/xscreensaver.h
841 passwd.o: ../config.h
842 passwd-pwent.o: ../config.h
844 prefs.o: $(srcdir)/prefs.h
845 remote.o: ../config.h
846 remote.o: $(srcdir)/remote.h
847 setuid.o: ../config.h
848 setuid.o: $(srcdir)/prefs.h
849 setuid.o: $(srcdir)/xscreensaver.h
850 splash.o: ../config.h
851 splash.o: $(srcdir)/prefs.h
852 splash.o: $(srcdir)/xscreensaver.h
853 stderr.o: ../config.h
854 stderr.o: $(srcdir)/prefs.h
855 stderr.o: $(srcdir)/xscreensaver.h
856 subprocs.o: ../config.h
857 subprocs.o: $(srcdir)/prefs.h
858 subprocs.o: $(srcdir)/xscreensaver.h
859 test-apm.o: ../config.h
860 test-fade.o: ../config.h
861 test-fade.o: $(srcdir)/prefs.h
862 test-fade.o: $(srcdir)/xscreensaver.h
863 test-grab.o: ../config.h
864 test-passwd.o: XScreenSaver_ad.h
865 test-passwd.o: ../config.h
866 test-passwd.o: $(srcdir)/prefs.h
867 test-passwd.o: $(srcdir)/xscreensaver.h
868 test-uid.o: ../config.h
869 test-xdpms.o: ../config.h
870 timers.o: ../config.h
871 timers.o: $(srcdir)/prefs.h
872 timers.o: $(srcdir)/xscreensaver.h
873 windows.o: ../config.h
874 windows.o: $(srcdir)/prefs.h
875 windows.o: $(srcdir)/xscreensaver.h
876 xscreensaver-command.o: ../config.h
877 xscreensaver-command.o: $(srcdir)/remote.h
878 xscreensaver-getimage.o: ../config.h
879 xscreensaver-getimage.o: XScreenSaver_ad.h
880 xscreensaver-getimage.o: $(srcdir)/prefs.h
881 xscreensaver.o: XScreenSaver_ad.h
882 xscreensaver.o: ../config.h
883 xscreensaver.o: $(srcdir)/prefs.h
884 xscreensaver.o: $(srcdir)/xscreensaver.h
886 xset.o: $(srcdir)/prefs.h
887 xset.o: $(srcdir)/xscreensaver.h