1 # utils/Makefile.in --- xscreensaver, Copyright © 1997-2023 Jamie Zawinski.
2 # the `../configure' script generates `utils/Makefile' from this file.
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.
10 ##############################################################################
12 # Some rambling about dynamic libraries follows, ignore it if you don't care
13 # (which is almost assuredly the case.)
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.)
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:
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:
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.
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.
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.)
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.
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.
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.
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.
74 ##############################################################################
84 datarootdir = @datarootdir@
91 DEPEND_FLAGS = @DEPEND_FLAGS@
92 DEPEND_DEFINES = @DEPEND_DEFINES@
96 INSTALL_PROGRAM = @INSTALL_PROGRAM@
97 INSTALL_DATA = @INSTALL_DATA@
98 INSTALL_DIRS = @INSTALL_DIRS@
100 X_CFLAGS = @X_CFLAGS@
102 INCLUDES_1 = -I$(srcdir) -I..
103 INCLUDES = $(INCLUDES_1) @INCLUDES@
105 SRCS = alpha.c colors.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 textclient-mobile.c aligned_malloc.c thread_util.c \
110 async_netdb.c xft.c xftwrap.c utf8wc.c pow2.c font-retry.c \
112 OBJS = alpha.o colors.o grabclient.o hsv.o \
113 overlay.o resources.o spline.o usleep.o visual.o \
114 visual-gl.o xmu.o logo.o yarandom.o erase.o \
115 xshm.o xdbe.o colorbars.o minixpm.o textclient.o \
116 aligned_malloc.o thread_util.o \
117 async_netdb.o xft.o xftwrap.o utf8wc.o pow2.o font-retry.o \
119 HDRS = alpha.h colors.h grabclient.h hsv.h resources.h \
120 spline.h usleep.h utils.h version.h visual.h vroot.h xmu.h \
121 yarandom.h erase.h xshm.h xdbe.h colorbars.h minixpm.h \
122 xscreensaver-intl.h textclient.h aligned_malloc.h \
123 thread_util.h async_netdb.h xft.h xftwrap.h utf8wc.h pow2.h \
124 font-retry.h queue.h screenshot.h
126 LOGOS = images/$(STAR).xpm \
130 EXTRAS = README Makefile.in ad2c bin2c
132 TARFILES = $(EXTRAS) $(SRCS) $(HDRS) $(LOGOS)
134 # Using $(MAKE) directly means the shell executes things even with "make -n"
140 install: install-program install-man
141 uninstall: uninstall-program uninstall-man
144 $(MAKE2) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
152 -rm -f *.o a.out core
155 -rm -f Makefile TAGS *~ "#"*
157 # Adds all current dependencies to Makefile
159 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
161 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
164 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
165 # close. This excludes dependencies on files in /usr/include, etc. It tries
166 # to include only dependencies on files which are themselves a part of this
169 @echo updating dependencies in `pwd`/Makefile.in... ; \
170 $(DEPEND) -w 0 -f - \
171 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
172 $(INCLUDES_1) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
173 $(SRCS) 2>/dev/null | \
176 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
178 -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
179 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
180 -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' ; \
182 ) > /tmp/distdepend.$$$$ && \
183 mv /tmp/distdepend.$$$$ Makefile.in
187 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
190 @find $(TARFILES) -type f -print | sort
192 # How we build object files in this directory.
193 CCUTILS = $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS)
195 $(CC) -c $(CCUTILS) $<
197 font-retry.o: $(srcdir)/font-retry.c
198 $(CC) -c $(CCUTILS) -DUSE_XFT $< -o $@
201 ##############################################################################
203 # DO NOT DELETE: updated by make distdepend
205 aligned_malloc.o: $(srcdir)/aligned_malloc.h
206 aligned_malloc.o: ../config.h
207 alpha.o: $(srcdir)/alpha.h
209 alpha.o: $(srcdir)/hsv.h
210 alpha.o: $(srcdir)/resources.h
211 alpha.o: $(srcdir)/utils.h
212 alpha.o: $(srcdir)/visual.h
213 alpha.o: $(srcdir)/yarandom.h
214 async_netdb.o: $(srcdir)/aligned_malloc.h
215 async_netdb.o: $(srcdir)/async_netdb.h
216 async_netdb.o: ../config.h
217 async_netdb.o: $(srcdir)/thread_util.h
218 colorbars.o: $(srcdir)/colorbars.h
219 colorbars.o: ../config.h
220 colorbars.o: $(srcdir)/../hacks/ximage-loader.h
221 colorbars.o: $(srcdir)/resources.h
222 colorbars.o: $(srcdir)/utils.h
223 colors.o: $(srcdir)/colors.h
224 colors.o: ../config.h
225 colors.o: $(srcdir)/hsv.h
226 colors.o: $(srcdir)/utils.h
227 colors.o: $(srcdir)/visual.h
228 colors.o: $(srcdir)/yarandom.h
230 erase.o: $(srcdir)/erase.h
231 erase.o: $(srcdir)/resources.h
232 erase.o: $(srcdir)/usleep.h
233 erase.o: $(srcdir)/utils.h
234 erase.o: $(srcdir)/yarandom.h
235 font-retry.o: ../config.h
236 font-retry.o: $(srcdir)/font-retry.h
237 font-retry.o: $(srcdir)/utils.h
238 font-retry.o: $(srcdir)/visual.h
239 font-retry.o: $(srcdir)/xft.h
240 grabclient.o: ../config.h
241 grabclient.o: $(srcdir)/font-retry.h
242 grabclient.o: $(srcdir)/grabclient.h
243 grabclient.o: $(srcdir)/resources.h
244 grabclient.o: $(srcdir)/utils.h
245 grabclient.o: $(srcdir)/vroot.h
246 grabclient.o: $(srcdir)/xft.h
247 grabclient.o: $(srcdir)/yarandom.h
249 hsv.o: $(srcdir)/hsv.h
250 hsv.o: $(srcdir)/utils.h
252 logo.o: $(srcdir)/images/logo-180.xpm
253 logo.o: $(srcdir)/images/logo-360.xpm
254 logo.o: $(srcdir)/images/logo-50.xpm
255 logo.o: $(srcdir)/minixpm.h
256 logo.o: $(srcdir)/resources.h
257 logo.o: $(srcdir)/utils.h
258 minixpm.o: ../config.h
259 minixpm.o: $(srcdir)/minixpm.h
260 overlay.o: ../config.h
261 overlay.o: $(srcdir)/utils.h
262 overlay.o: $(srcdir)/visual.h
263 pow2.o: $(srcdir)/pow2.h
264 resources.o: ../config.h
265 resources.o: $(srcdir)/resources.h
266 resources.o: $(srcdir)/utils.h
267 screenshot.o: ../config.h
268 screenshot.o: $(srcdir)/../driver/blurb.h
269 screenshot.o: $(srcdir)/screenshot.h
270 screenshot.o: $(srcdir)/visual.h
271 spline.o: ../config.h
272 spline.o: $(srcdir)/spline.h
273 spline.o: $(srcdir)/utils.h
274 textclient-mobile.o: ../config.h
275 textclient-mobile.o: $(srcdir)/utils.h
276 textclient.o: ../config.h
277 textclient.o: $(srcdir)/resources.h
278 textclient.o: $(srcdir)/textclient.h
279 textclient.o: $(srcdir)/utils.h
280 thread_util.o: $(srcdir)/aligned_malloc.h
281 thread_util.o: ../config.h
282 thread_util.o: $(srcdir)/resources.h
283 thread_util.o: $(srcdir)/thread_util.h
284 usleep.o: ../config.h
285 utf8wc.o: ../config.h
286 utf8wc.o: $(srcdir)/utf8wc.h
287 visual-gl.o: ../config.h
288 visual-gl.o: $(srcdir)/resources.h
289 visual-gl.o: $(srcdir)/utils.h
290 visual-gl.o: $(srcdir)/visual.h
291 visual.o: ../config.h
292 visual.o: $(srcdir)/resources.h
293 visual.o: $(srcdir)/utils.h
294 visual.o: $(srcdir)/visual.h
296 xdbe.o: $(srcdir)/resources.h
297 xdbe.o: $(srcdir)/utils.h
298 xdbe.o: $(srcdir)/xdbe.h
299 xdbe.o: $(srcdir)/xmu.h
301 xftwrap.o: ../config.h
302 xftwrap.o: $(srcdir)/utils.h
303 xftwrap.o: $(srcdir)/xft.h
304 xftwrap.o: $(srcdir)/xftwrap.h
306 xmu.o: $(srcdir)/xmu.h
307 xshm.o: $(srcdir)/aligned_malloc.h
309 xshm.o: $(srcdir)/resources.h
310 xshm.o: $(srcdir)/utils.h
311 xshm.o: $(srcdir)/xshm.h
312 yarandom.o: ../config.h
313 yarandom.o: $(srcdir)/yarandom.h