2830471053e7c9ffa7692d9def6bf4c68f6bbc3e
[xscreensaver] / driver / Makefile.in
1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-2004 Jamie Zawinski.
2 # the `../configure' script generates `driver/Makefile' from this file.
3
4 @SET_MAKE@
5 .SUFFIXES:
6 .SUFFIXES: .c .m .o
7
8 srcdir          = @srcdir@
9 VPATH           = @srcdir@
10 top_srcdir      = @top_srcdir@
11 top_builddir    = ..
12
13 install_prefix  =
14 prefix          = @prefix@
15 exec_prefix     = @exec_prefix@
16 bindir          = @bindir@
17 #datadir        = @datadir@
18 datadir         = $(GNOME_DATADIR)
19 localedir       = $(datadir)/locale
20 mandir          = @mandir@
21 mansuffix       = 1
22 manNdir         = $(mandir)/man$(mansuffix)
23
24 INTLTOOL_MERGE  = @INTLTOOL_MERGE@
25
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@
37
38 CC              = @CC@
39 OBJCC           = @OBJCC@
40 CFLAGS          = @CFLAGS@
41 LDFLAGS         = @LDFLAGS@
42 DEFS            = @DEFS@
43 INTL_DEFS       = -DLOCALEDIR=\"$(localedir)\"
44 SUBP_DEFS       = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
45 GTK_DEFS        = $(DEFS) -DDEFAULT_ICONDIR='"$(GLADE_DATADIR)"'
46 CONF_DEFS       = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"'
47
48 LIBS            = @LIBS@
49 INTL_LIBS       = @INTLLIBS@
50 JPEG_LIBS       = @JPEG_LIBS@
51 PERL            = @PERL@
52
53 DEPEND          = @DEPEND@
54 DEPEND_FLAGS    = @DEPEND_FLAGS@
55 DEPEND_DEFINES  = @DEPEND_DEFINES@
56
57 SHELL           = /bin/sh
58 INSTALL         = @INSTALL@
59 SUID_FLAGS      = -o root -m 4755
60 INSTALL_PROGRAM = @INSTALL_PROGRAM@
61 INSTALL_SCRIPT  = @INSTALL_SCRIPT@
62 INSTALL_SETUID  = @INSTALL_SETUID@
63 INSTALL_DATA    = @INSTALL_DATA@
64 INSTALL_DIRS    = @INSTALL_DIRS@
65
66 X_CFLAGS        = @X_CFLAGS@
67 X_LIBS          = @X_LIBS@
68 X_PRE_LIBS      = @X_PRE_LIBS@
69 X_EXTRA_LIBS    = @X_EXTRA_LIBS@
70 XMU_LIBS        = @XMU_LIBS@
71 XPM_LIBS        = @XPM_LIBS@
72
73 # Note:
74 #
75 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
76 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
77 #         and that must come before -lX11.  (e.g., -lSM and -lICE.)
78 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
79 #         (e.g., -lsocket, -lnsl, etc.)
80 #
81 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
82 #
83 # SAVER_LIBS is the link line for "xscreensaver", and
84 # CMD_LIBS is the link line for "xscreensaver-command".
85 # GETIMG_LIBS is the link line for "xscreensaver-getimage".
86
87
88 AD_DIR          = @APPDEFAULTS@
89 PAM_DIR         = /etc/pam.d
90 PAM_CONF        = /etc/pam.conf
91
92 UTILS_SRC       = $(srcdir)/../utils
93 UTILS_BIN       = ../utils
94
95 INCLUDES        = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
96
97 MOTIF_SRCS      = demo-Xm.c demo-Xm-widgets.c
98 MOTIF_OBJS      = demo-Xm.o demo-Xm-widgets.o
99
100 GTK_SRCS        = demo-Gtk.c demo-Gtk-conf.c \
101                   demo-Gtk-widgets.c demo-Gtk-support.c
102 GTK_EXTRA_OBJS  = demo-Gtk-widgets.o demo-Gtk-support.o
103 GTK_OBJS        = demo-Gtk.o demo-Gtk-conf.o @GTK_EXTRA_OBJS@
104
105 PWENT_SRCS      = passwd-pwent.c
106 PWENT_OBJS      = passwd-pwent.o
107
108 KERBEROS_SRCS   = passwd-kerberos.c
109 KERBEROS_OBJS   = passwd-kerberos.o
110
111 PAM_SRCS        = passwd-pam.c
112 PAM_OBJS        = passwd-pam.o
113
114 PWHELPER_SRCS   = passwd-helper.c
115 PWHELPER_OBJS   = passwd-helper.o
116
117 LOCK_SRCS_1     = lock.c passwd.c
118 LOCK_OBJS_1     = lock.o passwd.o
119 NOLOCK_SRCS_1   = lock.c
120 NOLOCK_OBJS_1   = lock.o
121
122 TEST_SRCS       = test-passwd.c test-uid.c  test-xdpms.c    test-grab.c \
123                   test-apm.c    test-fade.c test-xinerama.c test-vp.c   \
124                   test-randr.c  xdpyinfo.c
125 TEST_EXES       = test-passwd   test-uid    test-xdpms      test-grab   \
126                   test-apm      test-fade   test-xinerama   test-vp     \
127                   test-randr    xdpyinfo
128
129 MOTIF_LIBS      = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS)
130 GTK_LIBS        = @GTK_LIBS@ $(XMU_LIBS)
131 XML_LIBS        = @XML_LIBS@
132
133 XDPMS_LIBS      = @XDPMS_LIBS@
134
135 PASSWD_SRCS     = @PASSWD_SRCS@
136 PASSWD_OBJS     = @PASSWD_OBJS@
137 PASSWD_LIBS     = @PASSWD_LIBS@
138
139 LOCK_SRCS       = @LOCK_SRCS@
140 LOCK_OBJS       = @LOCK_OBJS@
141
142 XMU_SRCS        = @XMU_SRCS@
143 XMU_OBJS        = @XMU_OBJS@
144
145 GL_SRCS         = @SAVER_GL_SRCS@
146 GL_OBJS         = @SAVER_GL_OBJS@
147 GL_LIBS         = @SAVER_GL_LIBS@
148
149 ICON_SRC        = $(UTILS_SRC)/images
150 LOGO            = $(ICON_SRC)/logo-50.xpm
151 GTK_ICONS       = $(ICON_SRC)/screensaver-*.png
152
153 DEMO_UTIL_SRCS  = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
154                   $(UTILS_SRC)/visual.c
155 DEMO_UTIL_OBJS  = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
156                   $(UTILS_BIN)/visual.o
157
158 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
159                   $(UTILS_SRC)/logo.c $(UTILS_SRC)/yarandom.c \
160                   $(DEMO_UTIL_SRCS)
161 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
162                   $(UTILS_BIN)/logo.o $(UTILS_BIN)/yarandom.o \
163                   $(DEMO_UTIL_OBJS)
164
165 GETIMG_SRCS_1   = xscreensaver-getimage.c
166 GETIMG_OBJS_1   = xscreensaver-getimage.o
167
168 GETIMG_SRCS     = $(GETIMG_SRCS_1) \
169                   $(UTILS_SRC)/colorbars.o $(UTILS_SRC)/resources.o \
170                   $(UTILS_SRC)/yarandom.o $(UTILS_SRC)/visual.o \
171                   $(UTILS_SRC)/usleep.o $(UTILS_SRC)/hsv.o \
172                   $(UTILS_SRC)/colors.o $(UTILS_SRC)/grabscreen.o \
173                   $(UTILS_SRC)/logo.o prefs.o $(XMU_SRCS)
174
175 GETIMG_OBJS     = $(GETIMG_OBJS_1) \
176                   $(UTILS_BIN)/colorbars.o $(UTILS_BIN)/resources.o \
177                   $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/visual.o \
178                   $(UTILS_BIN)/usleep.o $(UTILS_BIN)/hsv.o \
179                   $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \
180                   $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS)
181
182 SAVER_SRCS_1    = xscreensaver.c windows.c timers.c subprocs.c exec.c \
183                   xset.c splash.c setuid.c stderr.c
184 SAVER_OBJS_1    = xscreensaver.o windows.o timers.o subprocs.o exec.o \
185                   xset.o splash.o setuid.o stderr.o
186
187 SAVER_SRCS      = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \
188                   $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
189 SAVER_OBJS      = $(SAVER_OBJS_1) prefs.o dpms.o $(LOCK_OBJS) \
190                   $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
191
192 CMD_SRCS        = remote.c xscreensaver-command.c
193 CMD_OBJS        = remote.o xscreensaver-command.o
194
195 DEMO_SRCS_1     = prefs.c dpms.c $(XMU_SRCS)
196 DEMO_OBJS_1     = prefs.o dpms.o $(XMU_OBJS)
197
198 DEMO_SRCS       = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS)
199 DEMO_OBJS       = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS)
200
201 PDF2JPEG_SRCS   = pdf2jpeg.m
202 PDF2JPEG_OBJS   = pdf2jpeg.o
203 PDF2JPEG_LIBS   = -framework Cocoa
204
205 SAVER_LIBS      = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
206                   $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
207                   -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
208                   $(PASSWD_LIBS)
209
210 CMD_LIBS        = $(LIBS) $(X_LIBS) \
211                   $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
212
213 GETIMG_LIBS     = $(LIBS) $(X_LIBS) $(XPM_LIBS) $(JPEG_LIBS) \
214                   $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS)
215
216 EXES            = xscreensaver xscreensaver-command xscreensaver-demo \
217                   xscreensaver-getimage @EXES_OSX@
218 EXES2           = @ALL_DEMO_PROGRAMS@
219 EXES_OSX        = pdf2jpeg
220
221 SCRIPTS_1       = xscreensaver-getimage-file xscreensaver-getimage-video
222 SCRIPTS_OSX     = xscreensaver-getimage-desktop
223 SCRIPTS         = $(SCRIPTS_1) @SCRIPTS_OSX@
224
225 HDRS            = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
226                   demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \
227                   demo-Gtk-conf.h
228 MEN_1           = xscreensaver.man xscreensaver-demo.man \
229                   xscreensaver-command.man \
230                   xscreensaver-getimage.man \
231                   xscreensaver-getimage-file.man \
232                   xscreensaver-getimage-video.man
233 MEN_OSX         = xscreensaver-getimage-desktop.man pdf2jpeg.man
234 MEN             = $(MEN_1) @MEN_OSX@
235
236 EXTRAS          = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
237                   xscreensaver-demo.glade xscreensaver-demo.glade2 \
238                   xscreensaver-demo.glade2p \
239                   screensaver-properties.desktop.in \
240                   screensaver-properties-capplet \
241                   xscreensaver.kss.in \
242                   .gdbinit
243 VMSFILES        = compile_axp.com compile_decc.com link_axp.com link_decc.com \
244                   vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
245                   vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
246
247 TARFILES        = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
248                   $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) $(PWHELPER_SRCS) \
249                   $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
250                   $(CMD_SRCS) $(GETIMG_SRCS_1) $(PDF2JPEG_SRCS) $(HDRS) \
251                   $(SCRIPTS_1) $(SCRIPTS_OSX) $(MEN_1) $(MEN_OSX) \
252                   $(TEST_SRCS)
253
254
255 default: $(EXES)
256 all: $(EXES) $(EXES2)
257 tests: $(TEST_EXES)
258
259 install:   install-program   install-ad    install-scripts \
260            install-gnome     install-kde   install-man   @INSTALL_PAM@
261 uninstall: uninstall-program uninstall-ad  \
262            uninstall-gnome   uninstall-kde uninstall-man
263
264 install-strip:
265         $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
266                 install
267
268 install-program: $(EXES)
269         @if [ ! -d $(install_prefix)$(bindir) ]; then                   \
270           $(INSTALL_DIRS) $(install_prefix)$(bindir) ;                  \
271          fi
272         @inst="$(INSTALL_PROGRAM)" ;                                    \
273         if [ @NEED_SETUID@ = yes ]; then                                \
274            me=`PATH="$$PATH:/usr/ucb" whoami` ;                         \
275            if [ "$$me" = root ]; then                                   \
276              inst="$(INSTALL_SETUID)" ;                                 \
277            else                                                         \
278             e=echo ;                                                    \
279  $$e ""                                                                      ;\
280  $$e "  ####################################################################";\
281  $$e "  Warning: xscreensaver has been compiled with support for shadow"     ;\
282  $$e "           passwords.  If your system actually uses shadow passwords," ;\
283  $$e "           then xscreensaver must be installed as a setuid root"       ;\
284  $$e "           program in order for locking to work.  To do this, you"     ;\
285  $$e "           must run 'make install' as 'root', not as '$$me'."          ;\
286  $$e ""                                                                      ;\
287  $$e "           For now, xscreensaver will be installed non-setuid, which"  ;\
288  $$e "           means that locking might not work.  (Try it and see.)"      ;\
289  $$e "  ####################################################################";\
290  $$e ""                                                                      ;\
291            fi ;                                                               \
292         fi ;                                                                  \
293         echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ;    \
294         $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
295         @for exe in xscreensaver-command xscreensaver-demo                 \
296                     xscreensaver-getimage @EXES_OSX@ ; do                  \
297           echo $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
298                $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \
299          done
300
301 install-ad: XScreenSaver.ad
302         @if [ ! -d $(install_prefix)$(AD_DIR) ]; then                         \
303           $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ;                        \
304          fi
305         @-echo $(INSTALL_DATA) XScreenSaver.ad                                \
306           $(install_prefix)$(AD_DIR)/XScreenSaver ;                           \
307         if $(INSTALL_DATA) XScreenSaver.ad                                    \
308           $(install_prefix)$(AD_DIR)/XScreenSaver ; then                      \
309           true ;                                                              \
310         else                                                                  \
311           e=echo ;                                                            \
312           if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then             \
313  $$e ""                                                                      ;\
314  $$e "  ####################################################################";\
315  $$e "  Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver"  ;\
316  $$e "           That file exists, and is unwritable.  It is probably from"  ;\
317  $$e "           an older version of xscreensaver, and could cause things"   ;\
318  $$e "           to malfunction.  Please delete it!"                         ;\
319  $$e "  ####################################################################";\
320  $$e ""                                                                      ;\
321             exit 1 ;                                                          \
322           else                                                                \
323  $$e ""                                                                      ;\
324  $$e "  ####################################################################";\
325  $$e "  Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver"  ;\
326  $$e "           The directory is unwritable.  This is probably ok;"         ;\
327  $$e "           xscreensaver should work without that file."                ;\
328  $$e "  ####################################################################";\
329  $$e ""                                                                      ;\
330             exit 0 ;                                                          \
331           fi                                                                  \
332         fi
333
334 install-scripts: $(SCRIPTS) munge-scripts
335         @for program in $(SCRIPTS); do                                  \
336           if [ -r $$program ] ; then                                    \
337             p=$$program ;                                               \
338           else                                                          \
339             p=$(srcdir)/$$program ;                                     \
340           fi ;                                                          \
341           echo $(INSTALL_SCRIPT) $$p                                    \
342             $(install_prefix)$(bindir)/$$program ;                      \
343           $(INSTALL_SCRIPT) $$p                                         \
344             $(install_prefix)$(bindir)/$$program ;                      \
345         done
346
347 munge-scripts: $(SCRIPTS)
348         @tmp=/tmp/mf.$$$$ ;                                             \
349         perl="${PERL}" ;                                                \
350         rm -f $$tmp ;                                                   \
351         for program in $(SCRIPTS); do                                   \
352           sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@"      \
353               < $(srcdir)/$$program > $$tmp ;                           \
354           if cmp -s $(srcdir)/$$program $$tmp ; then                    \
355             echo "$$program unchanged" ;                                \
356             true ;                                                      \
357           else                                                          \
358             echo "$$program: setting interpreter to $$perl" ;           \
359             cat $$tmp > ./$$program ;                                   \
360           fi ;                                                          \
361         done ;                                                          \
362         rm -f $$tmp
363
364 install-man: $(MEN)
365         @men="$(MEN)" ;                                                 \
366         if [ ! -d $(install_prefix)$(manNdir) ]; then                   \
367           $(INSTALL_DIRS) $(install_prefix)$(manNdir) ;                 \
368          fi ;                                                           \
369         for man in $$men; do                                            \
370           instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
371           echo $(INSTALL_DATA) $(srcdir)/$$man                          \
372            $(install_prefix)$(manNdir)/$$instname ;                     \
373           $(INSTALL_DATA) $(srcdir)/$$man                               \
374             $(install_prefix)$(manNdir)/$$instname ;                    \
375         done
376
377 uninstall-program:
378         @for program in $(EXES) $(SCRIPTS); do                          \
379           echo rm -f $(install_prefix)$(bindir)/$$program ;             \
380           rm -f $(install_prefix)$(bindir)/$$program ;                  \
381         done
382
383 uninstall-ad:
384         rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
385
386 uninstall-man:
387         @men="$(MEN)" ;                                                 \
388         for man in $$men; do                                            \
389           instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
390           echo rm -f $(install_prefix)$(manNdir)/$$instname ;           \
391           rm -f $(install_prefix)$(manNdir)/$$instname ;                \
392         done
393
394 install-pam:
395         @src="$(srcdir)/xscreensaver.pam" ;                             \
396         dest=`sed -n 's/.*PAM_SERVICE_NAME[     ]*"\([^"]*\)".*$$/\1/p' \
397            < ../config.h` ;                                             \
398         dir="$(install_prefix)$(PAM_DIR)" ;                             \
399         conf="$(PAM_CONF)" ;                                            \
400                                                                         \
401         if [ -d $$dir ] ; then                                          \
402                                                                         \
403           if [ -f $$dir/xdm ]; then                                     \
404             src2=$$dir/xdm ;                                            \
405           elif [ -f $$dir/login ]; then                                 \
406             src2=$$dir/login ;                                          \
407           fi ;                                                          \
408                                                                         \
409           if [ -z "$$src2" ]; then                                      \
410             echo $(INSTALL_DATA) $$src $$dir/$$dest ;                   \
411             $(INSTALL_DATA) $$src $$dir/$$dest ;                        \
412           else                                                          \
413             src="xscreensaver.pam.$$$$" ;                               \
414             echo "grep '^#%\|^auth' $$src2 > $$src" ;                   \
415                   grep '^#%\|^auth' $$src2 > $$src ;                    \
416             echo $(INSTALL_DATA) $$src $$dir/$$dest ;                   \
417                  $(INSTALL_DATA) $$src $$dir/$$dest ;                   \
418             echo rm -f $$src ;                                          \
419                  rm -f $$src ;                                          \
420           fi ;                                                          \
421                                                                         \
422           if [ ! -f $$dir/$$dest ]; then                                \
423             e=echo ;                                                    \
424  $$e ""                                                                      ;\
425  $$e "  ####################################################################";\
426  $$e "  Warning: xscreensaver has been compiled with support for Pluggable"  ;\
427  $$e "           Authentication Modules (PAM).  However, we were unable to"  ;\
428  $$e "           install the file $$dir/$$dest.  PAM is unlikely"            ;\
429  $$e "           to work without this file (and old-style password"          ;\
430  $$e "           authentication will be used instead, which may or may not"  ;\
431  $$e "           work.)"                                                     ;\
432  $$e "  ####################################################################";\
433  $$e ""                                                                      ;\
434           fi ;                                                          \
435         elif [ -f $$conf ]; then                                        \
436           if ( grep $$dest $$conf >/dev/null ); then                    \
437            echo "$$conf unchanged: already has an entry for $$dest" ;   \
438           else                                                          \
439             src="pam.conf.$$$$" ;                                       \
440             echo "grep -v $$dest $$conf > $$src" ;                      \
441                   grep -v $$dest $$conf > $$src ;                       \
442             extras=`sed -n "s/^login\(.*auth.*\)$$/$$dest\1/p" $$conf`; \
443             echo "$$extras" >> $$src ;                                  \
444             if [ "x$$extras" = "x" ]; then                              \
445               echo "Error: no login rules in $$conf?" >&2 ;             \
446             else                                                        \
447               echo "adding $$dest rules to $$src:" ;                    \
448               echo "$$extras" | sed 's/^/       /' ;                    \
449             fi ;                                                        \
450             echo $(INSTALL_DATA) $$src $$conf ;                         \
451                  $(INSTALL_DATA) $$src $$conf ;                         \
452             echo rm -f $$src ;                                          \
453                  rm -f $$src ;                                          \
454           fi ;                                                          \
455           if ! ( grep $$dest $$conf >/dev/null ); then                  \
456             e=echo ;                                                    \
457  $$e ""                                                                      ;\
458  $$e "  ####################################################################";\
459  $$e "  Warning: xscreensaver has been compiled with support for Pluggable"  ;\
460  $$e "           Authentication Modules (PAM).  However, we were unable to"  ;\
461  $$e "           install xscreensaver rules in the file $$conf."             ;\
462  $$e "           PAM is unlikely to work without this (and old-style"        ;\
463  $$e "           password authentication will be used instead, which may"    ;\
464  $$e "           or may not work.)"                                          ;\
465  $$e "  ####################################################################";\
466  $$e ""                                                                      ;\
467           fi ;                                                          \
468         fi
469
470 install-gnome:: screensaver-properties.desktop
471         @lost=""                                                             ;\
472          if [ "$(GNOME_DATADIR)" != "" ]; then                                \
473                                                                               \
474            if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then              \
475              echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)"        ;\
476                   $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)"        ;\
477            fi                                                                ;\
478            if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then              \
479              echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)"        ;\
480                   $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)"        ;\
481            fi                                                                ;\
482            if [ ! -d "$(install_prefix)$(GNOME_CCDIR_3)" ]; then              \
483              echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)"        ;\
484                   $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_3)"        ;\
485            fi                                                                ;\
486            if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then             \
487              echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)"       ;\
488                   $(INSTALL_DIRS) "$(install_prefix)$(GNOME_PANELDIR)"       ;\
489            fi                                                                ;\
490                                                                               \
491            echo $(INSTALL_DATA) screensaver-properties.desktop                \
492              $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
493                                                                               \
494            if   $(INSTALL_DATA) screensaver-properties.desktop                \
495              $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\
496              then true                                                       ;\
497            else                                                               \
498              lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)"                 ;\
499            fi                                                                ;\
500                                                                               \
501            echo $(INSTALL_DATA) screensaver-properties.desktop                \
502              $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
503                                                                               \
504            if   $(INSTALL_DATA) screensaver-properties.desktop                \
505              $(install_prefix)$(GNOME_CCDIR_2)/screensaver-properties.desktop;\
506              then true                                                       ;\
507            else                                                               \
508              lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)"                 ;\
509            fi                                                                ;\
510                                                                               \
511            echo $(INSTALL_DATA) screensaver-properties.desktop                \
512              $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
513                                                                               \
514            if   $(INSTALL_DATA) screensaver-properties.desktop                \
515              $(install_prefix)$(GNOME_CCDIR_3)/screensaver-properties.desktop;\
516              then true                                                       ;\
517            else                                                               \
518              lost="$$lost $(install_prefix)$(GNOME_CCDIR_3)"                 ;\
519            fi                                                                ;\
520                                                                               \
521            echo $(INSTALL_DATA) screensaver-properties.desktop                \
522             $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
523            if   $(INSTALL_DATA) screensaver-properties.desktop                \
524             $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop;\
525              then true                                                       ;\
526            else                                                               \
527              lost="$$lost $(install_prefix)$(GNOME_PANELDIR)"                ;\
528            fi                                                                ;\
529                                                                               \
530            if [ "$$lost" != "" ]; then                                        \
531              e=echo ;                                                         \
532  $$e ""                                                                      ;\
533  $$e "  ####################################################################";\
534  $$e "  Warning: unable to install screensaver-properties.desktop into:"     ;\
535         set - $$lost                                                         ;\
536         for f in $$@ ; do echo "             $$f/" ; done                    ;\
537  $$e '           This means the "Screen Saver" section of the Gnome'         ;\
538  $$e "           Control Center (gnomecc) may not work properly."            ;\
539  $$e "  ####################################################################";\
540  $$e ""                                                                      ;\
541              exit 1 ;                                                         \
542            fi                                                                ;\
543          fi
544
545 install-gnome:: screensaver-properties-capplet
546         @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
547            if [ ! -d "$(install_prefix)$(GNOME_BINDIR)" ]; then               \
548              echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)"         ;\
549                   $(INSTALL_DIRS) "$(install_prefix)$(GNOME_BINDIR)"         ;\
550            fi                                                                ;\
551            program=screensaver-properties-capplet                            ;\
552            echo $(INSTALL_SCRIPT) $(srcdir)/$$program                         \
553                   $(install_prefix)$(GNOME_BINDIR)/$$program                 ;\
554            if   $(INSTALL_SCRIPT) $(srcdir)/$$program                         \
555                   $(install_prefix)$(GNOME_BINDIR)/$$program                 ;\
556              then true                                                       ;\
557            else                                                               \
558              e=echo ;                                                         \
559  $$e ""                                                                      ;\
560  $$e "  ####################################################################";\
561  $$e "  Warning: unable to install $$program into"                           ;\
562  $$e "           $(install_prefix)$(GNOME_BINDIR)/."                         ;\
563  $$e "           Without this file, the Gnome session manager will not"      ;\
564  $$e "           launch xscreensaver properly at login time."                ;\
565  $$e "  ####################################################################";\
566  $$e ""                                                                      ;\
567              exit 1 ;                                                         \
568            fi ;                                                               \
569          fi
570
571 # xscreensaver.xpm
572 # into /usr/share/pixmaps/
573 install-gnome:: $(LOGO)
574         @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
575            if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then              \
576              echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)"        ;\
577                   $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)"        ;\
578            fi                                                                ;\
579            target=xscreensaver.xpm                                           ;\
580            echo $(INSTALL_DATA) $(LOGO)                                       \
581                   $(install_prefix)$(GNOME_ICONDIR)/$$target                 ;\
582                 $(INSTALL_DATA) $(LOGO)                                       \
583                   $(install_prefix)$(GNOME_ICONDIR)/$$target                 ;\
584         fi
585
586 # ../utils/images/screensaver-*.png
587 # into /usr/share/xscreensaver/
588 #
589 # Should these really go in GLADE_DATADIR (/usr/share/xscreensaver/)
590 # or should they instead go in GNOME_ICONDIR (/usr/share/pixmaps/)?
591 # Does it matter?
592 #
593 install-gnome::
594         @if [ "$(GLADE_DATADIR)" != "" ]; then                                \
595            if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then              \
596              echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)"        ;\
597                   $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)"        ;\
598            fi                                                                ;\
599            for target in $(GTK_ICONS) ; do                                    \
600              dest=`echo $$target | sed 's@^.*/@@'`                           ;\
601              echo $(INSTALL_DATA) $$target                                    \
602                   $(install_prefix)$(GLADE_DATADIR)/$$dest                   ;\
603                   $(INSTALL_DATA) $$target                                    \
604                   $(install_prefix)$(GLADE_DATADIR)/$$dest                   ;\
605            done                                                              ;\
606         fi
607
608 # xscreensaver-demo.glade2
609 # into /usr/share/xscreensaver/
610 install-gnome:: xscreensaver-demo.glade2
611         @if [ "$(GLADE_DATADIR)" != "" ]; then                                \
612           if [ ! -d "$(install_prefix)$(GLADE_DATADIR)" ]; then               \
613             echo $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)"         ;\
614                  $(INSTALL_DIRS) "$(install_prefix)$(GLADE_DATADIR)"         ;\
615           fi                                                                 ;\
616           target=xscreensaver-demo.glade2                                    ;\
617           echo $(INSTALL_DATA) $(srcdir)/$$target                             \
618             $(install_prefix)$(GLADE_DATADIR)/$$target                       ;\
619           if   $(INSTALL_DATA) $(srcdir)/$$target                             \
620             $(install_prefix)$(GLADE_DATADIR)/$$target                       ;\
621             then true                                                        ;\
622           else                                                                \
623             e=echo ;                                                          \
624  $$e ""                                                                      ;\
625  $$e "  ####################################################################";\
626  $$e "  Warning: unable to install $$target into"                            ;\
627  $$e "           $(install_prefix)$(GLADE_DATADIR)/."                        ;\
628  $$e "           Without this file, xscreensaver-demo will not"              ;\
629  $$e "           be able to run properly."                                   ;\
630  $$e "  ####################################################################";\
631  $$e ""                                                                      ;\
632              exit 1 ;                                                         \
633            fi ;                                                               \
634          fi
635
636
637 # screensaver-properties.desktop
638 # into /usr/share/gnome/apps/Settings/Desktop/
639 uninstall-gnome::
640         @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
641           f=screensaver-properties.desktop                                   ;\
642           echo rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f                   ;\
643                rm -f $(install_prefix)$(GNOME_CCDIR_1)/$$f                   ;\
644           echo rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f                   ;\
645                rm -f $(install_prefix)$(GNOME_CCDIR_2)/$$f                   ;\
646           echo rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f                   ;\
647                rm -f $(install_prefix)$(GNOME_CCDIR_3)/$$f                   ;\
648           echo rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f                  ;\
649                rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f                  ;\
650         fi
651
652 # screensaver-properties-capplet
653 # into /usr/X11R6/bin/
654 uninstall-gnome::
655         @if [ "$(GNOME_DATADIR)" != "" ]; then                                \
656           program=screensaver-properties-capplet                             ;\
657           echo rm -f $(install_prefix)$(bindir)/$$program                    ;\
658                rm -f $(install_prefix)$(bindir)/$$program                    ;\
659          fi
660
661 # xscreensaver.xpm
662 # into /usr/share/pixmaps/
663 uninstall-gnome::
664         @if [ "$(GNOME_ICONDIR)" != "" ]; then                                \
665           target=xscreensaver.xpm                                            ;\
666           echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target              ;\
667                rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target              ;\
668          fi
669
670 # ../utils/images/screensaver-*.png
671 # into /usr/share/xscreensaver/
672 uninstall-gnome::
673         @if [ "$(GLADE_DATADIR)" != "" ]; then                                \
674            for target in $(GTK_ICONS) ; do                                    \
675              dest=`echo $$target | sed 's@^.*/@@'`                           ;\
676              echo rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest             ;\
677                   rm -f $(install_prefix)$(GLADE_DATADIR)/$$dest             ;\
678            done                                                              ;\
679         fi
680
681 # xscreensaver.kss
682 install-kde:
683         @src="xscreensaver.kss" ;                                             \
684         if [ "$$KDEDIR" != "" ]; then                                         \
685           dir="$(install_prefix)$$KDEDIR/bin" ;                               \
686           dest="$$dir/$$src" ;                                                \
687           echo $(INSTALL_SCRIPT) $$src $$dest ;                               \
688           if $(INSTALL_SCRIPT) $$src $$dest ; then                            \
689             true ;                                                            \
690           else                                                                \
691             e=echo ;                                                          \
692  $$e ""                                                                      ;\
693  $$e "  ####################################################################";\
694  $$e "  Warning: unable to install $$dest"                                   ;\
695             if [ ! -d $(install_prefix)$$KDEDIR ]; then                       \
696  $$e "           $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist."      ;\
697             elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then                 \
698  $$e "           $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
699             elif [ -f $$dest ]; then                                          \
700  $$e "           That file exists, and is unwritable."                       ;\
701             else                                                              \
702  $$e "           The directory is unwritable."                               ;\
703             fi                                                               ;\
704  $$e "  ####################################################################";\
705  $$e ""                                                                      ;\
706             exit 1 ;                                                          \
707           fi ;                                                                \
708         fi
709
710 uninstall-kde:
711         @if [ "$$KDEDIR" != "" ]; then                                  \
712           dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ;       \
713           echo rm -f $$dest ;                                           \
714           rm -f $$dest ;                                                \
715         fi
716
717 clean:
718         -rm -f *.o a.out core $(EXES) $(EXES2) $(TEST_EXES) XScreenSaver_ad.h
719
720 distclean: clean
721         -rm -f Makefile XScreenSaver.ad TAGS *~ "#"* screensaver-properties.desktop
722
723 # Adds all current dependencies to Makefile
724 depend: XScreenSaver_ad.h
725         $(DEPEND) -s '# DO NOT DELETE: updated by make depend'              \
726         $(DEPEND_FLAGS) --                                                  \
727         $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
728         $(SAVER_SRCS) $(CMD_SRCS) $(GETIMG_SRCS_1)
729
730 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
731 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
732 # to include only dependencies on files which are themselves a part of this
733 # package.
734 distdepend: check_men update_ad_version update_man_version XScreenSaver_ad.h
735         @echo updating dependencies in `pwd`/Makefile.in... ;               \
736         $(DEPEND) -w 0 -f -                                                 \
737         -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
738         $(INCLUDES) -I$(ICON_SRC) $(DEFS) $(DEPEND_DEFINES)                 \
739         $(CFLAGS) $(X_CFLAGS) --                                            \
740         $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1)          \
741         $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS)             \
742         $(TEST_SRCS) 2>/dev/null |                                          \
743         sort -d |                                                           \
744         (                                                                   \
745           awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
746           sed -e '/^#.*/d'                                                  \
747               -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d'                        \
748               -e 's@\.\./utils@$$(UTILS_SRC)@g'                             \
749               -e 's@ \([^$$]\)@ $$(srcdir)/\1@g'                            \
750               -e 's@$$.*\(XScreenSaver_ad\)@\1@g'                           \
751               -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ;                    \
752           echo ''                                                           \
753         ) > /tmp/distdepend.$$$$ &&                                         \
754         mv Makefile.in Makefile.in.bak &&                                   \
755         mv /tmp/distdepend.$$$$ Makefile.in
756
757 # Updates the version number in the app-defaults file to be in sync with 
758 # the version number in version.h.  This is so people can tell when they
759 # have a version skew between the app-defaults file and the executable.
760 # Also update hacks/config/README in the same way.
761 update_ad_version::
762         @files="XScreenSaver.ad.in ../hacks/config/README" ;                \
763         U=$(UTILS_SRC)/version.h ;                                          \
764         V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
765         D=`date '+%d-%b-%Y'` ;                                              \
766         for S in $$files ; do                                               \
767           echo -n "Updating $$S to $$V $$D... " ;                           \
768           T=/tmp/xs.$$$$ ;                                                  \
769           sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/"       \
770               -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/"   \
771             < $$S > $$T ;                                                   \
772           if cmp -s $$S $$T ; then                                          \
773             echo "unchanged." ;                                             \
774           else                                                              \
775             cat $$T > $$S ;                                                 \
776             echo "done." ;                                                  \
777           fi ;                                                              \
778         done ;                                                              \
779         rm $$T
780
781 update_man_version::
782         @for S in $(MEN); do                                                \
783         U=$(UTILS_SRC)/version.h ;                                          \
784         V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
785         V="`date '+%d-%b-%Y'` ($$V)" ;                                      \
786         echo -n "Updating $$S to \"$$V\"... " ;                             \
787         T=/tmp/xs.$$$$ ;                                                    \
788         sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/"                \
789           < $$S > $$T ;                                                     \
790         if cmp -s $$S $$T ; then                                            \
791           echo "unchanged." ;                                               \
792         else                                                                \
793           cat $$T > $$S ;                                                   \
794           echo "done." ;                                                    \
795         fi ;                                                                \
796         rm $$T ;                                                            \
797         done
798
799 TAGS: tags
800 tags:
801         find $(srcdir) -name '*.[chly]' -print | xargs etags -a
802
803 echo_tarfiles:
804         @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
805         @echo $(TARFILES)
806
807 check_men:
808         @badmen="" ;                                                    \
809          for exe in $(EXES); do                                         \
810            if ! [ -f $(srcdir)/$$exe.man ]; then                        \
811              badmen="$$badmen $$exe" ;                                  \
812            fi ;                                                         \
813          done ;                                                         \
814          if [ -n "$$badmen" ]; then                                     \
815            echo "" ;                                                    \
816            echo "Warning: The following programs have no manuals:" ;    \
817            echo "" ;                                                    \
818            for m in $$badmen ; do                                       \
819              echo "    $$m" ;                                           \
820            done ;                                                       \
821            echo "" ;                                                    \
822          fi
823
824
825 # Rules for noticing when the objects from the utils directory are out of
826 # date with respect to their sources, and going and building them according
827 # to the rules in their own Makefile...
828 #
829 $(UTILS_BIN)/fade.o:            $(UTILS_SRC)/fade.c
830 $(UTILS_BIN)/overlay.o:         $(UTILS_SRC)/overlay.c
831 $(UTILS_BIN)/resources.o:       $(UTILS_SRC)/resources.c
832 $(UTILS_BIN)/usleep.o:          $(UTILS_SRC)/usleep.c
833 $(UTILS_BIN)/visual.o:          $(UTILS_SRC)/visual.c
834 $(UTILS_BIN)/xmu.o:             $(UTILS_SRC)/xmu.c
835 $(UTILS_BIN)/logo.o:            $(UTILS_SRC)/logo.c
836 $(UTILS_BIN)/yarandom.o:        $(UTILS_SRC)/yarandom.c
837 $(UTILS_BIN)/colorbars.o:       $(UTILS_SRC)/colorbars.c
838
839 $(SAVER_UTIL_OBJS):
840         cd $(UTILS_BIN) ; \
841         $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
842
843 # How we build object files in this directory.
844 .c.o:
845         $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
846
847 .m.o:
848         $(OBJCC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
849
850 # subprocs takes an extra -D option.
851 subprocs.o: subprocs.c
852         $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \
853           $(srcdir)/subprocs.c
854
855 # demo-Gtk takes extra -D options, and an extra -I option.
856 demo-Gtk.o: demo-Gtk.c
857         $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) \
858           $(GTK_DEFS) $(INTL_DEFS) $(CFLAGS) $(X_CFLAGS) \
859           $(srcdir)/demo-Gtk.c
860
861 # demo-Gtk-conf takes an extra -D option.
862 demo-Gtk-conf.o: demo-Gtk-conf.c
863         $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \
864           $(srcdir)/demo-Gtk-conf.c
865
866
867 # How we build the default app-defaults file into the program.
868 #
869 XScreenSaver_ad.h: XScreenSaver.ad
870         $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
871
872 @INTLTOOL_DESKTOP_RULE@
873
874 # The executables linked in this directory.
875 #
876 xscreensaver: $(SAVER_OBJS)
877         $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
878
879 xscreensaver-command: $(CMD_OBJS)
880         $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
881
882
883 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
884         @if [ "@PREFERRED_DEMO_PROGRAM@" = "" ]; then                   \
885           echo "WARNING: neither GTK nor Motif are available,"          \
886                "therefore no xscreensaver-demo!"                      ; \
887           rm -f $@@EXEEXT@                                            ; \
888         else                                                            \
889           echo cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@      ; \
890                cp -p @PREFERRED_DEMO_PROGRAM@@EXEEXT@ $@@EXEEXT@      ; \
891         fi
892
893 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
894         $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
895         $(MOTIF_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) -lXt -lX11 \
896         $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
897
898 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
899         $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
900         $(GTK_LIBS) $(XPM_LIBS) $(XML_LIBS) $(INTL_LIBS) $(X_PRE_LIBS) \
901         -lXt -lX11 $(XDPMS_LIBS) -lXext $(X_EXTRA_LIBS)
902
903 xscreensaver-getimage: $(GETIMG_OBJS)
904         $(CC) $(LDFLAGS) -o $@ $(GETIMG_OBJS) $(GETIMG_LIBS) -lm
905
906 pdf2jpeg: $(PDF2JPEG_OBJS)
907         $(OBJCC) $(LDFLAGS) -o $@ $(PDF2JPEG_OBJS) $(PDF2JPEG_LIBS) -lm
908
909
910 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
911          subprocs.o setuid.o splash.o prefs.o \
912         $(SAVER_UTIL_OBJS)
913 test-passwd.o: XScreenSaver_ad.h
914
915 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
916         $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
917
918 test-uid: test-uid.o
919         $(CC) $(LDFLAGS) -o $@ test-uid.o
920
921 test-xdpms: test-xdpms.o
922         $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(LIBS) $(X_LIBS) $(XDPMS_LIBS) \
923         $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
924
925 test-xinerama: test-xinerama.o
926         $(CC) $(LDFLAGS) -o $@ test-xinerama.o $(LIBS) $(X_LIBS) $(SAVER_LIBS)\
927         $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
928
929 test-vp: test-vp.o
930         $(CC) $(LDFLAGS) -o $@ test-vp.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
931         $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
932
933 test-randr: test-randr.o
934         $(CC) $(LDFLAGS) -o $@ test-randr.o $(LIBS) $(X_LIBS) $(SAVER_LIBS) \
935         $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
936
937 test-grab: test-grab.o
938         $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
939
940 test-apm: test-apm.o
941         $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
942
943 TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS)
944 test-fade: test-fade.o $(UTILS_BIN)/fade.o
945         $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS)
946
947
948 xdpyinfo.o: xdpyinfo.c
949         $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
950           $(srcdir)/xdpyinfo.c
951
952 xdpyinfo: xdpyinfo.o
953         $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
954                 $(LIBS) $(X_LIBS) @GL_LIBS@ \
955                 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
956
957
958 ##############################################################################
959 #
960 # DO NOT DELETE: updated by make distdepend
961
962 demo-Gtk-conf.o: ../config.h
963 demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h
964 demo-Gtk.o: ../config.h
965 demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h
966 demo-Gtk.o: $(srcdir)/demo-Gtk-support.h
967 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
968 demo-Gtk.o: $(srcdir)/prefs.h
969 demo-Gtk.o: $(srcdir)/remote.h
970 demo-Gtk.o: XScreenSaver_ad.h
971 demo-Gtk-support.o: ../config.h
972 demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h
973 demo-Gtk-widgets.o: ../config.h
974 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
975 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h
976 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
977 demo-Xm.o: ../config.h
978 demo-Xm-widgets.o: ../config.h
979 dpms.o: ../config.h
980 dpms.o: $(srcdir)/prefs.h
981 dpms.o: $(srcdir)/xscreensaver.h
982 exec.o: ../config.h
983 lock.o: ../config.h
984 lock.o: $(srcdir)/prefs.h
985 lock.o: $(srcdir)/xscreensaver.h
986 passwd.o: ../config.h
987 passwd-pwent.o: ../config.h
988 prefs.o: ../config.h
989 prefs.o: $(srcdir)/prefs.h
990 remote.o: ../config.h
991 remote.o: $(srcdir)/remote.h
992 setuid.o: ../config.h
993 setuid.o: $(srcdir)/prefs.h
994 setuid.o: $(srcdir)/xscreensaver.h
995 splash.o: ../config.h
996 splash.o: $(srcdir)/prefs.h
997 splash.o: $(srcdir)/xscreensaver.h
998 stderr.o: ../config.h
999 stderr.o: $(srcdir)/prefs.h
1000 stderr.o: $(srcdir)/xscreensaver.h
1001 subprocs.o: ../config.h
1002 subprocs.o: $(srcdir)/prefs.h
1003 subprocs.o: $(srcdir)/xscreensaver.h
1004 test-apm.o: ../config.h
1005 test-fade.o: ../config.h
1006 test-fade.o: $(srcdir)/prefs.h
1007 test-fade.o: $(srcdir)/xscreensaver.h
1008 test-grab.o: ../config.h
1009 test-passwd.o: ../config.h
1010 test-passwd.o: $(srcdir)/prefs.h
1011 test-passwd.o: XScreenSaver_ad.h
1012 test-passwd.o: $(srcdir)/xscreensaver.h
1013 test-randr.o: ../config.h
1014 test-uid.o: ../config.h
1015 test-vp.o: ../config.h
1016 test-xdpms.o: ../config.h
1017 test-xinerama.o: ../config.h
1018 timers.o: ../config.h
1019 timers.o: $(srcdir)/prefs.h
1020 timers.o: $(srcdir)/xscreensaver.h
1021 windows.o: ../config.h
1022 windows.o: $(srcdir)/prefs.h
1023 windows.o: $(srcdir)/xscreensaver.h
1024 xscreensaver-command.o: ../config.h
1025 xscreensaver-command.o: $(srcdir)/remote.h
1026 xscreensaver-getimage.o: ../config.h
1027 xscreensaver-getimage.o: XScreenSaver_ad.h
1028 xscreensaver-getimage.o: $(srcdir)/prefs.h
1029 xscreensaver.o: ../config.h
1030 xscreensaver.o: $(srcdir)/prefs.h
1031 xscreensaver.o: XScreenSaver_ad.h
1032 xscreensaver.o: $(srcdir)/xscreensaver.h
1033 xset.o: ../config.h
1034 xset.o: $(srcdir)/prefs.h
1035 xset.o: $(srcdir)/xscreensaver.h
1036