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