http://ftp.x.org/contrib/applications/xscreensaver-3.22.tar.gz
[xscreensaver] / driver / Makefile.in
1 # driver/Makefile.in --- xscreensaver, Copyright (c) 1997-1999 Jamie Zawinski.
2 # the `../configure' script generates `driver/Makefile' from this file.
3
4 @SET_MAKE@
5 .SUFFIXES:
6 .SUFFIXES: .c .o
7
8 srcdir          = @srcdir@
9 VPATH           = @srcdir@
10
11 install_prefix  =
12 prefix          = @prefix@
13 exec_prefix     = @exec_prefix@
14 bindir          = @bindir@
15 mandir          = @mandir@
16 man1dir         = $(mandir)/man1
17 mansuffix       = 1
18
19 CC              = @CC@
20 CFLAGS          = @CFLAGS@
21 LDFLAGS         = @LDFLAGS@
22 DEFS            = @DEFS@
23 DEFS2           = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"'
24 LIBS            = @LIBS@
25
26 DEPEND          = @DEPEND@
27 DEPEND_FLAGS    = @DEPEND_FLAGS@
28 DEPEND_DEFINES  = @DEPEND_DEFINES@
29
30 SHELL           = /bin/sh
31 INSTALL         = @INSTALL@
32 SUID_FLAGS      = -o root -m 4755
33 INSTALL_PROGRAM = @INSTALL_PROGRAM@
34 INSTALL_SETUID  = @INSTALL_SETUID@
35 INSTALL_DATA    = @INSTALL_DATA@
36 INSTALL_DIRS    = @INSTALL_DIRS@
37
38 X_CFLAGS        = @X_CFLAGS@
39 X_LIBS          = @X_LIBS@
40 X_PRE_LIBS      = @X_PRE_LIBS@
41 X_EXTRA_LIBS    = @X_EXTRA_LIBS@
42
43 # Note:
44 #
45 # X_LIBS would more properly be called X_LDFLAGS (it contains the -L args.)
46 # X_PRE_LIBS contains extra libraries you have to link against on some systems,
47 #         and that must come before -lX11.  (e.g., -lSM and -lICE.)
48 # X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
49 #         (e.g., -lsocket, -lnsl, etc.)
50 #
51 # I think (but am not totally sure) that LIBS is also really "LDFLAGS".
52 #
53 # SAVER_LIBS is the link line for "xscreensaver", and
54 # CMD_LIBS is the link line for "xscreensaver-command".
55
56
57 AD_DIR          = @APPDEFAULTS@
58 PAM_DIR         = /etc/pam.d
59 PAM_CONF        = /etc/pam.conf
60
61 UTILS_SRC       = $(srcdir)/../utils
62 UTILS_BIN       = ../utils
63
64 INCLUDES        = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
65
66 MOTIF_SRCS      = demo-Xm.c demo-Xm-widgets.c
67 MOTIF_OBJS      = demo-Xm.o demo-Xm-widgets.o
68
69 GTK_SRCS        = demo-Gtk.c demo-Gtk-widgets.c
70 GTK_OBJS        = demo-Gtk.o demo-Gtk-widgets.o
71
72 PWENT_SRCS      = passwd-pwent.c
73 PWENT_OBJS      = passwd-pwent.o
74
75 KERBEROS_SRCS   = passwd-kerberos.c
76 KERBEROS_OBJS   = passwd-kerberos.o
77
78 PAM_SRCS        = passwd-pam.c
79 PAM_OBJS        = passwd-pam.o
80
81 LOCK_SRCS_1     = lock.c passwd.c
82 LOCK_OBJS_1     = lock.o passwd.o
83 NOLOCK_SRCS_1   = lock.c
84 NOLOCK_OBJS_1   = lock.o
85
86 TEST_SRCS       = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
87                   test-apm.c xdpyinfo.c
88
89 MOTIF_LIBS      = @MOTIF_LIBS@ @XPM_LIBS@
90 GTK_LIBS        = @GTK_LIBS@
91
92 PASSWD_SRCS     = @PASSWD_SRCS@
93 PASSWD_OBJS     = @PASSWD_OBJS@
94 PASSWD_LIBS     = @PASSWD_LIBS@
95
96 LOCK_SRCS       = @LOCK_SRCS@
97 LOCK_OBJS       = @LOCK_OBJS@
98
99 XMU_SRCS        = @XMU_SRCS@
100 XMU_OBJS        = @XMU_OBJS@
101
102 GL_SRCS         = @SAVER_GL_SRCS@
103 GL_OBJS         = @SAVER_GL_OBJS@
104 GL_LIBS         = @SAVER_GL_LIBS@
105
106 DEMO_UTIL_SRCS  = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
107                   $(UTILS_SRC)/visual.c
108 DEMO_UTIL_OBJS  = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \
109                   $(UTILS_BIN)/visual.o
110
111 SAVER_UTIL_SRCS = $(UTILS_SRC)/fade.c $(UTILS_SRC)/overlay.c \
112                   $(UTILS_SRC)/xroger.c $(UTILS_SRC)/spline.c \
113                   $(UTILS_SRC)/yarandom.c \
114                   $(DEMO_UTIL_SRCS)
115 SAVER_UTIL_OBJS = $(UTILS_BIN)/fade.o $(UTILS_BIN)/overlay.o \
116                   $(UTILS_BIN)/xroger.o $(UTILS_BIN)/spline.o \
117                   $(UTILS_BIN)/yarandom.o \
118                   $(DEMO_UTIL_OBJS)
119
120 SAVER_SRCS_1    = xscreensaver.c windows.c timers.c subprocs.c \
121                   xset.c splash.c setuid.c stderr.c
122 SAVER_OBJS_1    = xscreensaver.o windows.o timers.o subprocs.o \
123                   xset.o splash.o setuid.o stderr.o
124
125 SAVER_SRCS      = $(SAVER_SRCS_1) prefs.c $(LOCK_SRCS) \
126                   $(SAVER_UTIL_SRCS) $(GL_SRCS) $(XMU_SRCS)
127 SAVER_OBJS      = $(SAVER_OBJS_1) prefs.o $(LOCK_OBJS) \
128                   $(SAVER_UTIL_OBJS) $(GL_OBJS) $(XMU_OBJS)
129
130 CMD_SRCS        = remote.c xscreensaver-command.c
131 CMD_OBJS        = remote.o xscreensaver-command.o
132
133 DEMO_SRCS_1     = prefs.c $(XMU_SRCS)
134 DEMO_OBJS_1     = prefs.o $(XMU_OBJS)
135
136 DEMO_SRCS       = prefs.c remote.c $(DEMO_UTIL_SRCS)
137 DEMO_OBJS       = prefs.o remote.o $(DEMO_UTIL_OBJS)
138
139 SAVER_LIBS      = $(LIBS) $(X_LIBS) @SAVER_LIBS@ $(GL_LIBS) \
140                   $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
141                   $(PASSWD_LIBS)
142
143 CMD_LIBS        = $(LIBS) $(X_LIBS) \
144                   $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
145
146 EXES            = xscreensaver xscreensaver-command xscreensaver-demo
147 EXES2           = @ALL_DEMO_PROGRAMS@
148
149 HDRS            = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
150                   demo-Gtk-widgets.h demo-Gtk-stubs.h
151 MEN             = xscreensaver.man xscreensaver-demo.man \
152                   xscreensaver-command.man
153 ALL_MEN         = xscreensaver.man \
154                   xscreensaver-demo.man xscreensaver-command.man
155 EXTRAS          = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
156                   xscreensaver.kss xscreensaver-demo.glade .gdbinit
157 VMSFILES        = compile_axp.com compile_decc.com link_axp.com link_decc.com \
158                   vms-getpwnam.c vms-pwd.h vms-hpwd.c vms-validate.c \
159                   vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
160
161 TARFILES        = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
162                   $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
163                   $(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
164                   $(CMD_SRCS) $(HDRS) $(TEST_SRCS) $(ALL_MEN)
165
166
167 default: $(EXES)
168 all: $(EXES) $(EXES2)
169
170 install:   install-program   install-ad   install-kde   install-man   @INSTALL_PAM@
171 uninstall: uninstall-program uninstall-ad uninstall-kde uninstall-man
172
173 install-strip:
174         $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
175                 INSTALL_SETUID='$(INSTALL_SETUID) -s' \
176                 install
177
178 install-program: $(EXES)
179         @if [ ! -d $(install_prefix)$(bindir) ]; then                   \
180           $(INSTALL_DIRS) $(install_prefix)$(bindir) ;                  \
181          fi
182         @inst="$(INSTALL_PROGRAM)" ;                                    \
183         if [ @NEED_SETUID@ = yes ]; then                                \
184            me=`PATH="$$PATH:/usr/ucb" whoami` ;                         \
185            if [ "$$me" = root ]; then                                   \
186              inst="$(INSTALL_SETUID)" ;                                 \
187            else                                                         \
188             e=echo ;                                                    \
189  $$e ""                                                                      ;\
190  $$e "  ####################################################################";\
191  $$e "  Warning: xscreensaver has been compiled with support for shadow"     ;\
192  $$e "           passwords.  If your system actually uses shadow passwords," ;\
193  $$e "           then xscreensaver must be installed as a setuid root"       ;\
194  $$e "           program in order for locking to work.  To do this, you"     ;\
195  $$e "           must run 'make install' as 'root', not as '$$me'."          ;\
196  $$e ""                                                                      ;\
197  $$e "           For now, xscreensaver will be installed non-setuid, which"  ;\
198  $$e "           means that locking might not work.  (Try it and see.)"      ;\
199  $$e "  ####################################################################";\
200  $$e ""                                                                      ;\
201            fi ;                                                               \
202         fi ;                                                                  \
203         echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ;    \
204         $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver
205         $(INSTALL_PROGRAM) xscreensaver-command \
206           $(install_prefix)$(bindir)/xscreensaver-command
207         $(INSTALL_PROGRAM) xscreensaver-demo \
208           $(install_prefix)$(bindir)/xscreensaver-demo
209
210 install-ad: XScreenSaver.ad
211         @if [ ! -d $(install_prefix)$(AD_DIR) ]; then                         \
212           $(INSTALL_DIRS) $(install_prefix)$(AD_DIR) ;                        \
213          fi
214         @-echo $(INSTALL_DATA) XScreenSaver.ad                                \
215           $(install_prefix)$(AD_DIR)/XScreenSaver ;                           \
216         if $(INSTALL_DATA) XScreenSaver.ad                                    \
217           $(install_prefix)$(AD_DIR)/XScreenSaver ; then                      \
218           true ;                                                              \
219         else                                                                  \
220           e=echo ;                                                            \
221           if [ -f $(install_prefix)$(AD_DIR)/XScreenSaver ]; then             \
222  $$e ""                                                                      ;\
223  $$e "  ####################################################################";\
224  $$e "  Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver"  ;\
225  $$e "           That file exists, and is unwritable.  It is probably from"  ;\
226  $$e "           an older version of xscreensaver, and could cause things"   ;\
227  $$e "           to malfunction.  Please delete it!"                         ;\
228  $$e "  ####################################################################";\
229  $$e ""                                                                      ;\
230             exit 1 ;                                                          \
231           else                                                                \
232  $$e ""                                                                      ;\
233  $$e "  ####################################################################";\
234  $$e "  Warning: unable to install $(install_prefix)$(AD_DIR)/XScreenSaver"  ;\
235  $$e "           The directory is unwritable.  This is probably ok;"         ;\
236  $$e "           xscreensaver should work without that file."                ;\
237  $$e "  ####################################################################";\
238  $$e ""                                                                      ;\
239             exit 0 ;                                                          \
240           fi                                                                  \
241         fi
242
243 install-man: $(MEN)
244         @men="$(MEN)" ;                                                 \
245         if [ ! -d $(install_prefix)$(man1dir) ]; then                   \
246           $(INSTALL_DIRS) $(install_prefix)$(man1dir) ;                 \
247          fi ;                                                           \
248         for man in $$men; do                                            \
249           instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
250           echo $(INSTALL_DATA) $(srcdir)/$$man                          \
251            $(install_prefix)$(man1dir)/$$instname ;                     \
252           $(INSTALL_DATA) $(srcdir)/$$man                               \
253             $(install_prefix)$(man1dir)/$$instname ;                    \
254         done
255
256 uninstall-program:
257         @for program in $(EXES); do                                     \
258           echo rm -f $(install_prefix)$(bindir)/$$program ;             \
259           rm -f $(install_prefix)$(bindir)/$$program ;                  \
260         done
261
262 uninstall-ad:
263         rm -f $(install_prefix)$(AD_DIR)/XScreenSaver
264
265 uninstall-man:
266         @men="$(MEN)" ;                                                 \
267         for man in $$men; do                                            \
268           instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ;     \
269           echo rm -f $(install_prefix)$(man1dir)/$$instname ;           \
270           rm -f $(install_prefix)$(man1dir)/$$instname ;                \
271         done
272
273 install-pam:
274         @src="$(srcdir)/xscreensaver.pam" ;                             \
275         dest=`sed -n 's/.*PAM_SERVICE_NAME[     ]*"\([^"]*\)".*$$/\1/p' \
276            < ../config.h` ;                                             \
277         dir="$(install_prefix)$(PAM_DIR)" ;                             \
278         conf="$(PAM_CONF)" ;                                            \
279                                                                         \
280         if [ -d $$dir ] ; then                                          \
281           echo $(INSTALL_DATA) $$src $$dir/$$dest ;                     \
282           $(INSTALL_DATA) $$src $$dir/$$dest ;                          \
283           if [ ! -f $$dir/$$dest ]; then                                \
284             e=echo ;                                                    \
285  $$e ""                                                                      ;\
286  $$e "  ####################################################################";\
287  $$e "  Warning: xscreensaver has been compiled with support for Pluggable"  ;\
288  $$e "           Authentication Modules (PAM).  However, we were unable to"  ;\
289  $$e "           install the file $$dir/$$dest.  PAM is unlikely"            ;\
290  $$e "           to work without this file (and old-style password"          ;\
291  $$e "           authentication will be used instead, which may or may not"  ;\
292  $$e "           work.)"                                                     ;\
293  $$e "  ####################################################################";\
294  $$e ""                                                                      ;\
295           fi ;                                                          \
296         elif [ -f $$conf ]; then                                        \
297           if ( grep $$dest $$conf >/dev/null ); then                    \
298            true ;                                                       \
299           else                                                          \
300             e=echo ;                                                    \
301  $$e ""                                                                      ;\
302  $$e "  ####################################################################";\
303  $$e "  Warning: xscreensaver has been compiled with support for Pluggable"  ;\
304  $$e "           Authentication Modules (PAM).  To complete the installation";\
305  $$e "           of PAM support, you must add the following line to the file";\
306  $$e "           $$conf:"                                                    ;\
307  $$e ""                                                                      ;\
308  $$e    "       $$dest  auth required   /usr/lib/security/pam_unix.so.1"     ;\
309  $$e ""                                                                      ;\
310  $$e "           Be careful: if you mess up that file, you could completely" ;\
311  $$e "           hose your machine (e.g., \`login' and \`su' won't work, and";\
312  $$e "           you'll have to boot single-user to fix it.)"                ;\
313  $$e "  ####################################################################";\
314             echo "";                                                    \
315           fi ;                                                          \
316         fi
317
318 install-kde:
319         @src="$(srcdir)/xscreensaver.kss" ;                                   \
320         if [ "$$KDEDIR" != "" ]; then                                         \
321           dir="$(install_prefix)$$KDEDIR/bin" ;                               \
322           dest="$$dir/xscreensaver.kss" ;                                     \
323           echo $(INSTALL_PROGRAM) $$src $$dest ;                              \
324           if $(INSTALL_PROGRAM) $$src $$dest ; then                           \
325             true ;                                                            \
326           else                                                                \
327             e=echo ;                                                          \
328  $$e ""                                                                      ;\
329  $$e "  ####################################################################";\
330  $$e "  Warning: unable to install $$dest"                                   ;\
331             if [ ! -d $(install_prefix)$$KDEDIR ]; then                       \
332  $$e "           $(install_prefix)$$KDEDIR (\$$KDEDIR) does not exist."      ;\
333             elif [ ! -d $(install_prefix)$$KDEDIR/bin ]; then                 \
334  $$e "           $(install_prefix)$$KDEDIR/bin (\$$KDEDIR/bin) does not exist.";\
335             elif [ -f $$dest ]; then                                          \
336  $$e "           That file exists, and is unwritable."                       ;\
337             else                                                              \
338  $$e "           The directory is unwritable."                               ;\
339             fi                                                               ;\
340  $$e "  ####################################################################";\
341  $$e ""                                                                      ;\
342             exit 1 ;                                                          \
343           fi ;                                                                \
344         fi
345
346 uninstall-kde:
347         @if [ "$$KDEDIR" != "" ]; then                                  \
348           dest="$(install_prefix)$$KDEDIR/bin/xscreensaver.kss" ;       \
349           echo rm -f $$dest ;                                           \
350           rm -f $$dest ;                                                \
351         fi
352
353 clean:
354         -rm -f *.o a.out core $(EXES) $(EXES2) XScreenSaver_ad.h
355
356 distclean: clean
357         -rm -f Makefile XScreenSaver.ad TAGS *~ "#"*
358
359 # Adds all current dependencies to Makefile
360 depend: XScreenSaver_ad.h
361         $(DEPEND) -s '# DO NOT DELETE: updated by make depend'              \
362         $(DEPEND_FLAGS) --                                                  \
363         $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
364         $(SAVER_SRCS) $(CMD_SRCS)
365
366 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
367 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
368 # to include only dependencies on files which are themselves a part of this
369 # package.
370 distdepend: update_ad_version update_man_version XScreenSaver_ad.h
371         @echo updating dependencies in `pwd`/Makefile.in... ;               \
372         $(DEPEND) -w 0 -f -                                                 \
373         -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
374         $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
375         $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS)                           \
376         $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS)             \
377         $(TEST_SRCS) |                                                      \
378         (                                                                   \
379           awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
380           sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d'                        \
381               -e 's@\.\./utils@$$(UTILS_SRC)@g'                             \
382               -e 's@ \([^$$]\)@ $$(srcdir)/\1@g'                            \
383               -e 's@$$.*\(XScreenSaver_ad\)@\1@g'                           \
384               -e 's@ $$(srcdir)/\(.*config\.h\)@ \1@g' ;                    \
385           echo ''                                                           \
386         ) > /tmp/distdepend.$$$$ &&                                         \
387         mv Makefile.in Makefile.in.bak &&                                   \
388         mv /tmp/distdepend.$$$$ Makefile.in
389
390 # Updates the version number in the app-defaults file to be in sync with 
391 # the version number in version.h.  This is so people can tell when they
392 # have a version skew between the app-defaults file and the executable.
393 update_ad_version::
394         @S=XScreenSaver.ad.in ;                                             \
395         U=$(UTILS_SRC)/version.h ;                                          \
396         V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
397         D=`date '+%d-%b-%y'` ;                                              \
398         echo -n "Updating version number in $$S to $$V $$D... " ;           \
399         T=/tmp/xs.$$$$ ;                                                    \
400         sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/"         \
401             -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9]\)/$$D/"           \
402           < $$S > $$T ;                                                     \
403         if cmp -s $$S $$T ; then                                            \
404           echo "unchanged." ;                                               \
405         else                                                                \
406           cat $$T > $$S ;                                                   \
407           echo "done." ;                                                    \
408         fi ;                                                                \
409         rm $$T
410
411 update_man_version::
412         @for S in $(MEN); do                                                \
413         U=$(UTILS_SRC)/version.h ;                                          \
414         V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ;             \
415         V="`date '+%d-%b-%y'` ($$V)" ;                                      \
416         echo -n "Updating footer in $$S to \"$$V\"... " ;                   \
417         T=/tmp/xs.$$$$ ;                                                    \
418         sed "s/^\(\.TH[^\"]*\)\"[^\"]*\"\(.*\)/\1\"$$V\"\2/"                \
419           < $$S > $$T ;                                                     \
420         if cmp -s $$S $$T ; then                                            \
421           echo "unchanged." ;                                               \
422         else                                                                \
423           cat $$T > $$S ;                                                   \
424           echo "done." ;                                                    \
425         fi ;                                                                \
426         rm $$T ;                                                            \
427         done
428
429 TAGS: tags
430 tags:
431         find $(srcdir) -name '*.[chly]' -print | xargs etags -a
432
433 echo_tarfiles:
434         @$(MAKE) XScreenSaver_ad.h 2>&1 >&- /dev/null
435         @echo $(TARFILES)
436
437
438 # Rules for noticing when the objects from the utils directory are out of
439 # date with respect to their sources, and going and building them according
440 # to the rules in their own Makefile...
441 #
442 $(UTILS_BIN)/fade.o:            $(UTILS_SRC)/fade.c
443 $(UTILS_BIN)/overlay.o:         $(UTILS_SRC)/overlay.c
444 $(UTILS_BIN)/resources.o:       $(UTILS_SRC)/resources.c
445 $(UTILS_BIN)/usleep.o:          $(UTILS_SRC)/usleep.c
446 $(UTILS_BIN)/visual.o:          $(UTILS_SRC)/visual.c
447 $(UTILS_BIN)/xmu.o:             $(UTILS_SRC)/xmu.c
448 $(UTILS_BIN)/xroger.o:          $(UTILS_SRC)/xroger.c
449 $(UTILS_BIN)/spline.o:          $(UTILS_SRC)/spline.c
450 $(UTILS_BIN)/yarandom.o:        $(UTILS_SRC)/yarandom.c
451
452 $(SAVER_UTIL_OBJS):
453         cd $(UTILS_BIN) ; \
454         $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
455
456 # How we build object files in this directory.
457 .c.o:
458         $(CC) -c $(INCLUDES) $(DEFS)  $(CFLAGS) $(X_CFLAGS) $<
459
460 # subprocs is the only one that takes an extra -D option.
461 subprocs.o: subprocs.c
462         $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) \
463           $(srcdir)/subprocs.c
464
465
466 # How we build the default app-defaults file into the program.
467 #
468 XScreenSaver_ad.h: XScreenSaver.ad
469         $(SHELL) $(UTILS_SRC)/ad2c XScreenSaver.ad > XScreenSaver_ad.h
470
471 # The executables linked in this directory.
472 #
473 xscreensaver: $(SAVER_OBJS)
474         $(CC) $(LDFLAGS) -o $@ $(SAVER_OBJS) $(SAVER_LIBS)
475
476 xscreensaver-command: $(CMD_OBJS)
477         $(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
478
479
480 xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
481         cp -p @PREFERRED_DEMO_PROGRAM@ $@
482
483 xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
484         $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
485         $(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
486
487 xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
488         $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
489         $(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
490
491
492
493 TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
494          subprocs.o setuid.o splash.o prefs.o \
495         $(SAVER_UTIL_OBJS)
496 test-passwd.o: XScreenSaver_ad.h
497
498 tests:: test-passwd
499 test-passwd: $(TEST_PASSWD_OBJS) XScreenSaver_ad.h
500         $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
501
502 tests:: test-uid
503 test-uid: test-uid.o
504         $(CC) $(LDFLAGS) -o $@ test-uid.o
505
506 tests:: test-xdpms
507 test-xdpms: test-xdpms.o
508         $(CC) $(LDFLAGS) -o $@ test-xdpms.o $(SAVER_LIBS)
509
510 tests:: test-grab
511 test-grab: test-grab.o
512         $(CC) $(LDFLAGS) -o $@ test-grab.o $(SAVER_LIBS)
513
514 tests:: test-apm
515 test-apm: test-apm.o
516         $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm
517
518
519 xdpyinfo.o: xdpyinfo.c
520         $(CC) -c $(INCLUDES) -DHAVE_GLX $(CFLAGS) $(X_CFLAGS) \
521           $(srcdir)/xdpyinfo.c
522
523 xdpyinfo: xdpyinfo.o
524         $(CC) $(LDFLAGS) -o $@ xdpyinfo.o \
525                 $(LIBS) $(X_LIBS) @GL_LIBS@ \
526                 $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS) -lm
527
528
529 ##############################################################################
530 #
531 # DO NOT DELETE: updated by make distdepend
532 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
533
534 xscreensaver.o: ../config.h
535 xscreensaver.o: $(srcdir)/xscreensaver.h
536 xscreensaver.o: $(srcdir)/prefs.h
537 xscreensaver.o: $(UTILS_SRC)/version.h
538 xscreensaver.o: $(UTILS_SRC)/yarandom.h
539 xscreensaver.o: $(UTILS_SRC)/resources.h
540 xscreensaver.o: $(UTILS_SRC)/visual.h
541 xscreensaver.o: $(UTILS_SRC)/usleep.h
542 xscreensaver.o: XScreenSaver_ad.h
543 windows.o: ../config.h
544 windows.o: $(srcdir)/xscreensaver.h
545 windows.o: $(srcdir)/prefs.h
546 windows.o: $(UTILS_SRC)/visual.h
547 windows.o: $(UTILS_SRC)/fade.h
548 timers.o: ../config.h
549 timers.o: $(srcdir)/xscreensaver.h
550 timers.o: $(srcdir)/prefs.h
551 subprocs.o: ../config.h
552 subprocs.o: $(srcdir)/xscreensaver.h
553 subprocs.o: $(srcdir)/prefs.h
554 subprocs.o: $(UTILS_SRC)/yarandom.h
555 xset.o: ../config.h
556 xset.o: $(srcdir)/xscreensaver.h
557 xset.o: $(srcdir)/prefs.h
558 splash.o: ../config.h
559 splash.o: $(srcdir)/xscreensaver.h
560 splash.o: $(srcdir)/prefs.h
561 splash.o: $(UTILS_SRC)/resources.h
562 setuid.o: ../config.h
563 setuid.o: $(srcdir)/xscreensaver.h
564 setuid.o: $(srcdir)/prefs.h
565 stderr.o: ../config.h
566 stderr.o: $(srcdir)/xscreensaver.h
567 stderr.o: $(srcdir)/prefs.h
568 stderr.o: $(UTILS_SRC)/resources.h
569 stderr.o: $(UTILS_SRC)/visual.h
570 demo-Xm.o: ../config.h
571 demo-Xm.o: $(UTILS_SRC)/version.h
572 demo-Xm.o: $(srcdir)/prefs.h
573 demo-Xm.o: $(UTILS_SRC)/resources.h
574 demo-Xm.o: $(UTILS_SRC)/visual.h
575 demo-Xm.o: $(srcdir)/remote.h
576 demo-Xm.o: $(UTILS_SRC)/usleep.h
577 demo-Xm.o: XScreenSaver_ad.h
578 demo-Xm-widgets.o: ../config.h
579 demo-Gtk.o: ../config.h
580 demo-Gtk.o: $(UTILS_SRC)/version.h
581 demo-Gtk.o: $(srcdir)/prefs.h
582 demo-Gtk.o: $(UTILS_SRC)/resources.h
583 demo-Gtk.o: $(UTILS_SRC)/visual.h
584 demo-Gtk.o: $(srcdir)/remote.h
585 demo-Gtk.o: $(UTILS_SRC)/usleep.h
586 demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h
587 demo-Gtk.o: XScreenSaver_ad.h
588 demo-Gtk-widgets.o: ../config.h
589 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
590 demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
591 passwd-pwent.o: ../config.h
592 lock.o: ../config.h
593 lock.o: $(srcdir)/xscreensaver.h
594 lock.o: $(srcdir)/prefs.h
595 lock.o: $(UTILS_SRC)/resources.h
596 passwd.o: ../config.h
597 prefs.o: ../config.h
598 prefs.o: $(srcdir)/prefs.h
599 prefs.o: $(UTILS_SRC)/resources.h
600 remote.o: ../config.h
601 remote.o: $(srcdir)/remote.h
602 xscreensaver-command.o: ../config.h
603 xscreensaver-command.o: $(srcdir)/remote.h
604 xscreensaver-command.o: $(UTILS_SRC)/version.h
605 test-passwd.o: ../config.h
606 test-passwd.o: $(srcdir)/xscreensaver.h
607 test-passwd.o: $(srcdir)/prefs.h
608 test-passwd.o: $(UTILS_SRC)/resources.h
609 test-passwd.o: $(UTILS_SRC)/version.h
610 test-passwd.o: $(UTILS_SRC)/visual.h
611 test-passwd.o: XScreenSaver_ad.h
612 test-uid.o: ../config.h
613 test-xdpms.o: ../config.h
614 test-grab.o: ../config.h
615 test-apm.o: ../config.h
616