From http://www.jwz.org/xscreensaver/xscreensaver-5.24.tar.gz
[xscreensaver] / utils / Makefile.in
1 # utils/Makefile.in --- xscreensaver, Copyright (c) 1997-2010 Jamie Zawinski.
2 # the `../configure' script generates `utils/Makefile' from this file.
3
4
5 # The utilities in this directory are used mostly by the demos in ../hacks/.
6 # The Makefile in that directory builds executables by simply referencing
7 # the .o files in this directory.
8
9
10 ##############################################################################
11 #
12 # Some rambling about dynamic libraries follows, ignore it if you don't care
13 # (which is almost assuredly the case.)
14 #
15 #
16 # It would probably be sensible to just build a single .a file in this
17 # directory, and link the hacks against that (statically.)  I haven't done
18 # that for two reasons: first, it works now, and why fix what ain't broke;
19 # second, it wouldn't actually improve anything for the end user (it would
20 # just make the Makefiles be a little smaller.)
21 #
22 # People sometimes suggest that the stuff in this directory should be in a
23 # dynamic library, and that the hacks should be linked dynamically against
24 # it.  I haven't done this for a number of reasons:
25 #
26 #  *  First, the only thing that would improve would be disk space, in that
27 #     the executable files themselves would be smaller.  That's it.  Many other
28 #     things would get worse if we used a dynamic library:
29 #
30 #  *  Complication of installation procedures: suddenly, before any of the
31 #     hacks will work, you need to have a dynamic library installed, and
32 #     the system configured to use it.  This is, basically, rocket science.
33 #     Most people don't know how to do this, it's a huge pain, and on many
34 #     systems, it requires root access.
35 #
36 #  *  Complication of the Makefile: every system builds dynamic libraries
37 #     differently.  Every compiler takes different flags.  I don't want to
38 #     do the hand-holding for the scores of Unix systems and compilers on 
39 #     which people try to build this program.
40 #
41 #  *  Reduction of maintainability: gdb is remarkably bad at dealing with
42 #     debug info in dynamic libraries, and when debugging a hack, one would
43 #     constantly be fighting the linker and the debugger (or linking
44 #     statically when debugging.)
45 #
46 #  *  Version skew: when things are statically linked, it's perfectly ok to
47 #     make incompatible changes to the APIs defined in this directory, so long
48 #     as the current version in ../hacks/ is in sync.  Much more care would 
49 #     need to be taken with such things if dynamic libraries were involved,
50 #     to make sure that the major and minor versions of the library changed
51 #     at the appropriate time.  This isn't too hard, but it's more work, and
52 #     yet another opportunity to screw up.
53 #
54 #  *  Runtime memory usage goes *up*.  That's right, up!  When a program
55 #     links in a dynamic library, the whole library is brought into the 
56 #     address space, not just the files that are actually used.  Normally,
57 #     this is ok, because if several programs are using (for example)
58 #     libX11.so, chances are that the savings outweighs the overhead.  But
59 #     the nature of xscreensaver is that only one of the hacks ever runs at
60 #     a time -- so there would never be a second program using the utils/
61 #     dynamic library with which things could be shared.
62 #
63 #  *  Runtime speed decreases slightly, since dynamic code is marginally
64 #     slower.  On modern machines, this probably doesn't make a perceptible
65 #     difference, however.
66 #
67 # So basically, I just don't think using libraries would be a win, and it would
68 # definitely cause more of a maintenance and portability headache.  However,
69 # if someone else wants to do the work to make it be an option to configure,
70 # and verifies that it works on several (more than three) different Unixes,
71 # I'd be happy to take the patches.
72 #                                                           -- jwz, 30-Jun-98
73 #
74 ##############################################################################
75
76
77 @SET_MAKE@
78 .SUFFIXES:
79 .SUFFIXES: .c .o
80
81 srcdir          = @srcdir@
82 VPATH           = @srcdir@
83 prefix          = @prefix@
84 datarootdir     = @datarootdir@
85
86 CC              = @CC@
87 CFLAGS          = @CFLAGS@
88 DEFS            = @DEFS@
89
90 DEPEND          = @DEPEND@
91 DEPEND_FLAGS    = @DEPEND_FLAGS@
92 DEPEND_DEFINES  = @DEPEND_DEFINES@
93
94 SHELL           = /bin/sh
95 INSTALL         = @INSTALL@
96 INSTALL_PROGRAM = @INSTALL_PROGRAM@
97 INSTALL_DATA    = @INSTALL_DATA@
98 INSTALL_DIRS    = @INSTALL_DIRS@
99
100 X_CFLAGS        = @X_CFLAGS@
101
102 INCLUDES_1      = -I$(srcdir) -I..
103 INCLUDES        = $(INCLUDES_1) @INCLUDES@
104
105 SRCS            = alpha.c colors.c fade.c grabscreen.c grabclient.c hsv.c \
106                   overlay.c resources.c spline.c usleep.c visual.c \
107                   visual-gl.c xmu.c logo.c yarandom.c erase.c \
108                   xshm.c xdbe.c colorbars.c minixpm.c textclient.c
109 OBJS            = alpha.o colors.o fade.o grabscreen.o grabclient.o hsv.o \
110                   overlay.o resources.o spline.o usleep.o visual.o \
111                   visual-gl.o xmu.o logo.o yarandom.o erase.o \
112                   xshm.o xdbe.o colorbars.o minixpm.o textclient.o
113 HDRS            = alpha.h colors.h fade.h grabscreen.h hsv.h resources.h \
114                   spline.h usleep.h utils.h version.h visual.h vroot.h xmu.h \
115                   yarandom.h erase.h xshm.h xdbe.h colorbars.h minixpm.h \
116                   xscreensaver-intl.h textclient.h
117 STAR            = *
118 LOGOS           = images/$(STAR).xpm \
119                   images/$(STAR).png \
120                   images/$(STAR).gif \
121                   images/$(STAR).eps
122 EXTRAS          = README Makefile.in ad2c
123 VMSFILES        = compile_axp.com compile_decc.com vms-gtod.c vms-gtod.h \
124                   vms-strdup.c
125
126 TARFILES        = $(EXTRAS) $(VMSFILES) $(SRCS) $(HDRS) $(LOGOS)
127
128
129 default: all
130 all: $(OBJS)
131
132 install:   install-program   install-man
133 uninstall: uninstall-program uninstall-man
134
135 install-strip:
136         $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
137
138 install-program:
139 install-man:
140 uninstall-program:
141 uninstall-man:
142
143 clean:
144         -rm -f *.o a.out core
145
146 distclean: clean
147         -rm -f Makefile TAGS *~ "#"*
148
149 # Adds all current dependencies to Makefile
150 depend:
151         $(DEPEND) -s '# DO NOT DELETE: updated by make depend'              \
152         $(DEPEND_FLAGS) --                                                  \
153         $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --      \
154         $(SRCS)
155
156 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
157 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
158 # to include only dependencies on files which are themselves a part of this
159 # package.
160 distdepend::
161         @echo updating dependencies in `pwd`/Makefile.in... ;               \
162         $(DEPEND) -w 0 -f -                                                 \
163         -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
164         $(INCLUDES_1) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) --    \
165         $(SRCS) 2>/dev/null |                                               \
166         sort -d |                                                           \
167         (                                                                   \
168           awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
169           sed -e '/^#.*/d'                                                  \
170               -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d'                        \
171               -e 's@ \([^$$]\)@ $$(srcdir)/\1@g'                            \
172               -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' ;                     \
173           echo ''                                                           \
174         ) > /tmp/distdepend.$$$$ &&                                         \
175         mv Makefile.in Makefile.in.bak &&                                   \
176         mv /tmp/distdepend.$$$$ Makefile.in
177
178 TAGS: tags
179 tags:
180         find $(srcdir) -name '*.[chly]' -print | xargs etags -a
181
182 echo_tarfiles:
183         @echo $(TARFILES)
184
185
186 # How we build object files in this directory.
187 .c.o:
188         $(CC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) $<
189
190
191 # Rules for generating the VMS makefiles on Unix, so that it doesn't have to
192 # be done by hand...
193 #
194 VMS_AXP_COMPILE=$$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-])
195
196 compile_axp.com: Makefile.in
197         @echo generating $@ from $<...  ;                                   \
198         ( ( for c in $(SRCS) vms-*.c ; do                                   \
199               c=`echo $$c | tr a-z A-Z` ;                                   \
200               echo "$(VMS_AXP_COMPILE) $$c" ;                               \
201             done ;                                                          \
202           ) | sort -d ;                                                     \
203           echo '$$ lib/cre utils.olb_axp' ;                                 \
204           echo '$$ lib utils.olb_axp *.obj' ;                               \
205           echo '$$! delete/noconf *.obj;' ;                                 \
206         ) > $@
207
208 compile_decc.com: compile_axp.com
209         @echo generating $@ from $<...  ;                                   \
210         sed 's/axp/decc/g' < $< > $@
211
212 distdepend:: compile_axp.com compile_decc.com
213
214
215 ##############################################################################
216 #
217 # DO NOT DELETE: updated by make distdepend
218
219 alpha.o: $(srcdir)/alpha.h
220 alpha.o: ../config.h
221 alpha.o: $(srcdir)/hsv.h
222 alpha.o: $(srcdir)/resources.h
223 alpha.o: $(srcdir)/utils.h
224 alpha.o: $(srcdir)/visual.h
225 alpha.o: $(srcdir)/yarandom.h
226 colorbars.o: $(srcdir)/colorbars.h
227 colorbars.o: ../config.h
228 colorbars.o: $(srcdir)/resources.h
229 colorbars.o: $(srcdir)/utils.h
230 colors.o: $(srcdir)/colors.h
231 colors.o: ../config.h
232 colors.o: $(srcdir)/hsv.h
233 colors.o: $(srcdir)/utils.h
234 colors.o: $(srcdir)/visual.h
235 colors.o: $(srcdir)/yarandom.h
236 erase.o: ../config.h
237 erase.o: $(srcdir)/erase.h
238 erase.o: $(srcdir)/resources.h
239 erase.o: $(srcdir)/usleep.h
240 erase.o: $(srcdir)/utils.h
241 erase.o: $(srcdir)/yarandom.h
242 fade.o: ../config.h
243 fade.o: $(srcdir)/fade.h
244 fade.o: $(srcdir)/usleep.h
245 fade.o: $(srcdir)/utils.h
246 fade.o: $(srcdir)/visual.h
247 grabclient.o: ../config.h
248 grabclient.o: $(srcdir)/grabscreen.h
249 grabclient.o: $(srcdir)/resources.h
250 grabclient.o: $(srcdir)/utils.h
251 grabclient.o: $(srcdir)/vroot.h
252 grabclient.o: $(srcdir)/yarandom.h
253 grabscreen.o: $(srcdir)/colors.h
254 grabscreen.o: ../config.h
255 grabscreen.o: $(srcdir)/grabscreen.h
256 grabscreen.o: $(srcdir)/resources.h
257 grabscreen.o: $(srcdir)/usleep.h
258 grabscreen.o: $(srcdir)/utils.h
259 grabscreen.o: $(srcdir)/visual.h
260 grabscreen.o: $(srcdir)/vroot.h
261 grabscreen.o: $(srcdir)/yarandom.h
262 hsv.o: ../config.h
263 hsv.o: $(srcdir)/hsv.h
264 hsv.o: $(srcdir)/utils.h
265 logo.o: ../config.h
266 logo.o: $(srcdir)/images/logo-180.xpm
267 logo.o: $(srcdir)/images/logo-50.xpm
268 logo.o: $(srcdir)/minixpm.h
269 logo.o: $(srcdir)/resources.h
270 logo.o: $(srcdir)/utils.h
271 logo.o: $(srcdir)/visual.h
272 minixpm.o: ../config.h
273 minixpm.o: $(srcdir)/minixpm.h
274 overlay.o: ../config.h
275 overlay.o: $(srcdir)/utils.h
276 overlay.o: $(srcdir)/visual.h
277 resources.o: ../config.h
278 resources.o: $(srcdir)/resources.h
279 resources.o: $(srcdir)/utils.h
280 spline.o: ../config.h
281 spline.o: $(srcdir)/spline.h
282 spline.o: $(srcdir)/utils.h
283 textclient.o: ../config.h
284 textclient.o: $(srcdir)/resources.h
285 textclient.o: $(srcdir)/textclient.h
286 textclient.o: $(srcdir)/utils.h
287 usleep.o: ../config.h
288 visual-gl.o: ../config.h
289 visual-gl.o: $(srcdir)/resources.h
290 visual-gl.o: $(srcdir)/utils.h
291 visual-gl.o: $(srcdir)/visual.h
292 visual.o: ../config.h
293 visual.o: $(srcdir)/resources.h
294 visual.o: $(srcdir)/utils.h
295 visual.o: $(srcdir)/visual.h
296 xdbe.o: ../config.h
297 xdbe.o: $(srcdir)/resources.h
298 xdbe.o: $(srcdir)/utils.h
299 xdbe.o: $(srcdir)/xdbe.h
300 xmu.o: ../config.h
301 xshm.o: ../config.h
302 xshm.o: $(srcdir)/resources.h
303 xshm.o: $(srcdir)/utils.h
304 xshm.o: $(srcdir)/xshm.h
305 yarandom.o: ../config.h
306 yarandom.o: $(srcdir)/yarandom.h
307