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