1 # hacks/glx/Makefile.in --- xscreensaver, Copyright (c) 1999, 2000
3 # the `../../configure' script generates `hacks/glx/Makefile' from this file.
14 exec_prefix = @exec_prefix@
17 man1dir = $(mandir)/man1
23 DEFS = -DSTANDALONE -DUSE_GL @DEFS@
27 DEPEND_FLAGS = @DEPEND_FLAGS@
28 DEPEND_DEFINES = @DEPEND_DEFINES@
32 INSTALL_PROGRAM = @INSTALL_PROGRAM@
33 INSTALL_DATA = @INSTALL_DATA@
34 INSTALL_DIRS = @INSTALL_DIRS@
39 X_PRE_LIBS = @X_PRE_LIBS@
40 X_EXTRA_LIBS = @X_EXTRA_LIBS@
43 # Note: see comment in ../../driver/Makefile.in for explanation of X_LIBS, etc.
45 HACK_PRE = $(LIBS) $(X_LIBS)
46 HACK_POST = $(X_PRE_LIBS) -lXt -lX11 $(XMU_LIBS) -lXext $(X_EXTRA_LIBS) -lm
47 HACK_POST2 = @GL_LIBS@ @HACK_LIBS@ $(HACK_POST)
48 HACK_LIBS = $(HACK_PRE) $(HACK_POST2)
49 XPM_LIBS = $(HACK_PRE) @XPM_LIBS@ $(HACK_POST2)
50 GLE_LIBS = $(HACK_PRE) @GLE_LIBS@ @XPM_LIBS@ $(HACK_POST2)
52 HACK_SRC = $(srcdir)/..
54 UTILS_SRC = $(HACK_SRC)/../utils
55 UTILS_BIN = $(HACK_BIN)/../utils
57 INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I$(HACK_SRC) -I../.. @INCLUDES@
59 UTIL_SRCS = $(UTILS_SRC)/colors.c $(UTILS_SRC)/hsv.c \
60 $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \
61 $(UTILS_SRC)/visual.c $(UTILS_SRC)/visual-gl.c \
62 $(UTILS_SRC)/yarandom.c
63 UTIL_OBJS = $(UTILS_SRC)/colors.o $(UTILS_SRC)/hsv.o \
64 $(UTILS_SRC)/resources.o $(UTILS_SRC)/usleep.o \
65 $(UTILS_SRC)/visual.o $(UTILS_SRC)/visual-gl.o \
66 $(UTILS_SRC)/yarandom.o
68 SRCS = xscreensaver-gl-helper.c \
69 atlantis.c b_draw.c b_lockglue.c b_sphere.c bubble3d.c \
70 buildlwo.c cage.c dolphin.c gears.c lament.c moebius.c \
71 morph3d.c pipeobjs.c pipes.c rubik.c s1_1.c s1_2.c s1_3.c \
72 s1_4.c s1_5.c s1_6.c s1_b.c shark.c sproingies.c \
73 sproingiewrap.c stairs.c superquadrics.c swim.c whale.c \
74 xlock-gl.c fps.c xpm-ximage.c glplanet.c pulsar.c \
75 extrusion.c extrusion-helix2.c extrusion-helix3.c \
76 extrusion-helix4.c extrusion-joinoffset.c extrusion-screw.c \
77 extrusion-taper.c extrusion-twistoid.c sierpinski3d.c \
78 gflux.c stonerview.c stonerview-move.c stonerview-osc.c \
79 stonerview-view.c starwars.c glut_stroke.c glut_swidth.c \
80 gltext.c molecule.c dangerball.c sphere.c tube.c
82 OBJS = xscreensaver-gl-helper.o \
83 atlantis.o b_draw.o b_lockglue.o b_sphere.o bubble3d.o \
84 buildlwo.o cage.o dolphin.o gears.o lament.o moebius.o \
85 morph3d.o pipeobjs.o pipes.o rubik.o s1_1.o s1_2.o s1_3.o \
86 s1_4.o s1_5.o s1_6.o s1_b.o shark.o sproingies.o \
87 sproingiewrap.o stairs.o superquadrics.o swim.o whale.o \
88 xlock-gl.o fps.o xpm-ximage.o glplanet.o pulsar.o \
89 extrusion.o extrusion-helix2.o extrusion-helix3.o \
90 extrusion-helix4.o extrusion-joinoffset.o extrusion-screw.o \
91 extrusion-taper.o extrusion-twistoid.o sierpinski3d.o \
92 gflux.o stonerview.o stonerview-move.o stonerview-osc.o \
93 stonerview-view.o starwars.o glut_stroke.o glut_swidth.o \
94 gltext.o molecule.o dangerball.o sphere.o tube.o
96 GL_EXES_1 = cage gears moebius pipes sproingies stairs superquadrics \
97 morph3d rubik atlantis lament bubble3d glplanet pulsar \
98 sierpinski3d gflux stonerview starwars gltext molecule \
100 UTIL_EXES = xscreensaver-gl-helper
101 GL_EXES = $(UTIL_EXES) $(GL_EXES_1)
103 HACK_EXES = @GL_EXES@ @GLE_EXES@
106 HACK_OBJS = screenhack-gl.o xlock-gl.o fps.o $(HACK_BIN)/xlockmore.o \
107 $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
108 $(UTILS_BIN)/visual-gl.o $(UTILS_BIN)/usleep.o \
109 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/hsv.o \
110 $(UTILS_BIN)/colors.o
112 HDRS = atlantis.h bubble3d.h buildlwo.h e_textures.h xpm-ximage.h \
113 tube.h sphere.h stonerview-move.h stonerview-osc.h \
114 glutstroke.h glut_roman.h
115 GL_MEN = gflux.man lament.man starwars.man gltext.man \
116 molecule.man xscreensaver-gl-helper.man
118 EXTRAS = README Makefile.in
120 TARFILES = $(SRCS) $(HDRS) $(MEN) $(EXTRAS)
126 install: install-program install-man
127 uninstall: uninstall-program uninstall-man
130 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
132 # the hacks, in $HACKDIR
133 install-program:: $(HACK_EXES)
134 @if [ ! -d $(install_prefix)$(HACKDIR) ]; then \
135 $(INSTALL_DIRS) $(install_prefix)$(HACKDIR) ; \
137 exes="$(HACK_EXES)" ; \
138 for program in $$exes; do \
139 echo $(INSTALL_PROGRAM) $$program \
140 $(install_prefix)$(HACKDIR)/$$program ; \
141 $(INSTALL_PROGRAM) $$program \
142 $(install_prefix)$(HACKDIR)/$$program ; \
145 # the xscreensaver-gl-helper program, in $bindir
146 install-program:: $(HACK_EXES)
147 @if [ "$(HACK_EXES)" != "" ]; then \
148 if [ ! -d $(install_prefix)$(bindir) ]; then \
149 $(INSTALL_DIRS) $(install_prefix)$(bindir) ; \
151 exes="$(UTIL_EXES)" ; \
152 for program in $$exes; do \
153 echo $(INSTALL_PROGRAM) $$program \
154 $(install_prefix)$(bindir)/$$program ; \
155 $(INSTALL_PROGRAM) $$program \
156 $(install_prefix)$(bindir)/$$program ; \
162 if [ ! -d $(install_prefix)$(man1dir) ]; then \
163 $(INSTALL_DIRS) $(install_prefix)$(man1dir) ; \
165 for man in $$men; do \
166 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
167 echo $(INSTALL_DATA) $(srcdir)/$$man \
168 $(install_prefix)$(man1dir)/$$instname ; \
169 $(INSTALL_DATA) $(srcdir)/$$man \
170 $(install_prefix)$(man1dir)/$$instname ; \
173 # the hacks, in $HACKDIR
175 @exes="$(GL_EXES_1) $(GLE_EXES)" ; \
176 for program in $$exes; do \
177 echo rm -f $(install_prefix)$(HACKDIR)/$$program ; \
178 rm -f $(install_prefix)$(HACKDIR)/$$program ; \
181 # the xscreensaver-gl-helper program, in $bindir
183 @exes="$(UTIL_EXES)" ; \
184 for program in $$exes; do \
185 echo rm -f $(install_prefix)$(bindir)/$$program ; \
186 rm -f $(install_prefix)$(bindir)/$$program ; \
191 for man in $$men; do \
192 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
193 echo rm -f $(install_prefix)$(man1dir)/$$instname ; \
194 rm -f $(install_prefix)$(man1dir)/$$instname ; \
198 -rm -f *.o a.out core $(EXES) molecules.h
201 -rm -f Makefile TAGS *~ "#"*
203 # Adds all current dependencies to Makefile
205 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
207 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
210 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
211 # close. This excludes dependencies on files in /usr/include, etc. It tries
212 # to include only dependencies on files which are themselves a part of this
214 distdepend:: molecules.h
215 @echo updating dependencies in `pwd`/Makefile.in... ; \
216 $(DEPEND) -w 0 -f - \
217 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
218 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
221 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
222 sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
223 -e 's@\.\./\.\./utils@$$(UTILS_SRC)@g' \
224 -e 's@\.\./glx/@@g' \
225 -e 's@ \.\./@ $$(HACK_SRC)/@g' \
226 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
227 -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' \
228 -e 's@ $$(HACK_SRC)/\(.*config.h\)@ ../\1@g' \
229 -e 's@ $$(srcdir)/\(.*molecules.h\)@ \1@g' ; \
231 ) > /tmp/distdepend.$$$$ && \
232 mv Makefile.in Makefile.in.bak && \
233 mv /tmp/distdepend.$$$$ Makefile.in
237 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
243 # Rules for noticing when the objects from the utils directory are out of
244 # date with respect to their sources, and going and building them according
245 # to the rules in their own Makefile...
247 $(UTILS_BIN)/colors.o: $(UTILS_SRC)/colors.c
248 $(UTILS_BIN)/hsv.o: $(UTILS_SRC)/hsv.c
249 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
250 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
251 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
252 $(UTILS_BIN)/visual-gl.o: $(UTILS_SRC)/visual-gl.c
253 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
257 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
259 $(HACK_BIN)/xlockmore.o: $(HACK_SRC)/xlockmore.c
260 cd $(HACK_BIN) ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
263 # How we build object files in this directory.
265 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
268 # How to build the "xscreensaver-gl-helper" program, that lets the daemon
269 # know which visual is the right one for GL programs.
271 HELPER_OBJS = xscreensaver-gl-helper.o $(UTILS_BIN)/visual-gl.o \
272 $(UTILS_BIN)/visual.o $(UTILS_BIN)/resources.o
273 xscreensaver-gl-helper: $(HELPER_OBJS)
274 $(CC) $(LDFLAGS) -o $@ $(HELPER_OBJS) $(LIBS) $(X_LIBS) $(HACK_POST2)
277 # These hacks use a slightly-differently-compiled variant of screenhack.c.
278 # This is how to make the the other .o file from it.
280 screenhack-gl.o: $(HACK_SRC)/screenhack.c
281 $(CC) -o $@ -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) \
282 -DXLOCKMORE -DUSE_GL $(HACK_SRC)/screenhack.c
284 CC_HACK = $(CC) $(LDFLAGS)
286 ATLANTIS_OBJS = $(HACK_OBJS) dolphin.o shark.o swim.o whale.o xpm-ximage.o
287 atlantis: atlantis.o $(ATLANTIS_OBJS)
288 $(CC_HACK) -o $@ $@.o $(ATLANTIS_OBJS) $(HACK_LIBS) $(XPM_LIBS)
290 cage: cage.o $(HACK_OBJS)
291 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
293 gears: gears.o $(HACK_OBJS)
294 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
296 moebius: moebius.o $(HACK_OBJS)
297 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
299 pipes: pipes.o $(HACK_OBJS) pipeobjs.o buildlwo.o
300 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) pipeobjs.o buildlwo.o \
303 superquadrics: superquadrics.o $(HACK_OBJS)
304 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
306 morph3d: morph3d.o $(HACK_OBJS)
307 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
309 rubik: rubik.o $(HACK_OBJS)
310 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
312 stairs: stairs.o $(HACK_OBJS)
313 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
315 SPROINGIES = sproingiewrap.o buildlwo.o \
316 s1_1.o s1_2.o s1_3.o s1_4.o s1_5.o s1_6.o s1_b.o
317 sproingies: sproingies.o $(HACK_OBJS) $(SPROINGIES)
318 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(SPROINGIES) $(HACK_LIBS)
320 lament: lament.o $(HACK_OBJS) xpm-ximage.o
321 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) xpm-ximage.o $(XPM_LIBS)
323 B3D = b_sphere.o b_draw.o b_lockglue.o
324 bubble3d: bubble3d.o $(HACK_OBJS) $(B3D)
325 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(B3D) $(HACK_LIBS)
327 glplanet: glplanet.o sphere.o xpm-ximage.o $(HACK_OBJS)
328 $(CC_HACK) -o $@ $@.o sphere.o xpm-ximage.o $(HACK_OBJS) $(XPM_LIBS)
330 pulsar: pulsar.o $(HACK_OBJS)
331 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
333 EXTRUSION_OBJS=extrusion.o extrusion-helix2.o extrusion-helix3.o \
334 extrusion-helix4.o extrusion-joinoffset.o extrusion-screw.o \
335 extrusion-taper.o extrusion-twistoid.o
336 extrusion: $(EXTRUSION_OBJS) $(HACK_OBJS)
337 $(CC_HACK) -o $@ $(EXTRUSION_OBJS) $(HACK_OBJS) $(GLE_LIBS)
339 sierpinski3d: sierpinski3d.o $(HACK_OBJS)
340 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
342 gflux: gflux.o $(HACK_OBJS)
343 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
345 SW_OBJS=starwars.o glut_stroke.o glut_swidth.o
346 starwars: $(SW_OBJS) $(HACK_OBJS)
347 $(CC_HACK) -o $@ $(SW_OBJS) $(HACK_OBJS) $(HACK_LIBS)
349 GLT_OBJS=gltext.o glut_stroke.o glut_swidth.o tube.o
350 gltext: $(GLT_OBJS) $(HACK_OBJS)
351 $(CC_HACK) -o $@ $(GLT_OBJS) $(HACK_OBJS) $(HACK_LIBS)
353 dangerball: dangerball.o sphere.o tube.o $(HACK_OBJS)
354 $(CC_HACK) -o $@ $@.o sphere.o tube.o $(HACK_OBJS) $(HACK_LIBS)
356 # This one works differently (it's not xlock-like.)
358 STONER_OBJS=stonerview.o stonerview-move.o stonerview-osc.o stonerview-view.o \
359 $(UTILS_BIN)/yarandom.o
360 stonerview: $(STONER_OBJS)
361 $(CC_HACK) -o $@ $(STONER_OBJS) $(HACK_LIBS)
364 @tmp=molecules.h.$$$$ ; \
366 echo "building molecules.h from $(HACK_SRC)/images/molecules/*.pdb" ; \
367 for f in $(HACK_SRC)/images/molecules/*.pdb ; do \
368 $(SHELL) $(UTILS_SRC)/ad2c "$$f" | \
369 sed 's/",$$/\\n"/' >> $$tmp ; \
370 echo ',' >> $$tmp ; \
374 molecule: molecule.o sphere.o tube.o $(HACK_OBJS)
375 $(CC_HACK) -o $@ $@.o sphere.o tube.o $(HACK_OBJS) $(HACK_LIBS)
378 ##############################################################################
380 # DO NOT DELETE: updated by make distdepend
381 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
383 xscreensaver-gl-helper.o: ../../config.h
384 atlantis.o: ../../config.h
385 atlantis.o: $(srcdir)/atlantis.h
386 atlantis.o: $(srcdir)/xpm-ximage.h
387 atlantis.o: $(HACK_SRC)/images/sea-texture.xpm
388 b_draw.o: $(srcdir)/bubble3d.h
389 b_draw.o: ../../config.h
390 b_lockglue.o: $(srcdir)/bubble3d.h
391 b_lockglue.o: ../../config.h
392 b_sphere.o: $(srcdir)/bubble3d.h
393 b_sphere.o: ../../config.h
394 bubble3d.o: $(srcdir)/bubble3d.h
395 bubble3d.o: ../../config.h
396 buildlwo.o: $(srcdir)/buildlwo.h
397 cage.o: ../../config.h
398 cage.o: $(srcdir)/e_textures.h
399 dolphin.o: $(srcdir)/atlantis.h
400 gears.o: ../../config.h
401 lament.o: ../../config.h
402 lament.o: $(srcdir)/xpm-ximage.h
403 lament.o: $(HACK_SRC)/images/lament.xpm
404 moebius.o: ../../config.h
405 moebius.o: $(srcdir)/e_textures.h
406 morph3d.o: ../../config.h
407 pipeobjs.o: $(srcdir)/buildlwo.h
408 pipes.o: ../../config.h
409 pipes.o: $(srcdir)/buildlwo.h
410 rubik.o: ../../config.h
411 s1_1.o: $(srcdir)/buildlwo.h
412 s1_2.o: $(srcdir)/buildlwo.h
413 s1_3.o: $(srcdir)/buildlwo.h
414 s1_4.o: $(srcdir)/buildlwo.h
415 s1_5.o: $(srcdir)/buildlwo.h
416 s1_6.o: $(srcdir)/buildlwo.h
417 s1_b.o: $(srcdir)/buildlwo.h
418 shark.o: $(srcdir)/atlantis.h
419 sproingies.o: ../../config.h
420 sproingies.o: $(srcdir)/buildlwo.h
421 sproingiewrap.o: ../../config.h
422 stairs.o: ../../config.h
423 stairs.o: $(srcdir)/e_textures.h
424 superquadrics.o: ../../config.h
425 swim.o: ../../config.h
426 swim.o: $(srcdir)/atlantis.h
427 whale.o: $(srcdir)/atlantis.h
428 xlock-gl.o: ../../config.h
429 fps.o: ../../config.h
430 xpm-ximage.o: ../../config.h
431 glplanet.o: ../../config.h
432 glplanet.o: $(srcdir)/sphere.h
433 glplanet.o: $(HACK_SRC)/images/earth.xbm
434 glplanet.o: $(srcdir)/xpm-ximage.h
435 pulsar.o: ../../config.h
436 extrusion.o: ../../config.h
437 extrusion-helix2.o: ../../config.h
438 extrusion-helix3.o: ../../config.h
439 extrusion-helix4.o: ../../config.h
440 extrusion-joinoffset.o: ../../config.h
441 extrusion-screw.o: ../../config.h
442 extrusion-taper.o: ../../config.h
443 extrusion-twistoid.o: ../../config.h
444 sierpinski3d.o: ../../config.h
445 gflux.o: ../../config.h
446 stonerview.o: ../../config.h
447 stonerview.o: $(srcdir)/stonerview-move.h
448 stonerview-move.o: ../../config.h
449 stonerview-move.o: $(srcdir)/stonerview-osc.h
450 stonerview-move.o: $(srcdir)/stonerview-move.h
451 stonerview-osc.o: ../../config.h
452 stonerview-osc.o: $(srcdir)/stonerview-osc.h
453 stonerview-view.o: ../../config.h
454 stonerview-view.o: $(srcdir)/stonerview-osc.h
455 stonerview-view.o: $(srcdir)/stonerview-move.h
456 starwars.o: ../../config.h
457 starwars.o: $(srcdir)/glutstroke.h
458 starwars.o: $(srcdir)/glut_roman.h
459 glut_stroke.o: ../../config.h
460 glut_stroke.o: $(srcdir)/glutstroke.h
461 glut_swidth.o: ../../config.h
462 glut_swidth.o: $(srcdir)/glutstroke.h
463 gltext.o: ../../config.h
464 gltext.o: $(srcdir)/tube.h
465 gltext.o: $(srcdir)/glutstroke.h
466 gltext.o: $(srcdir)/glut_roman.h
467 molecule.o: ../../config.h
468 molecule.o: $(srcdir)/sphere.h
469 molecule.o: $(srcdir)/tube.h
470 molecule.o: molecules.h
471 dangerball.o: ../../config.h
472 dangerball.o: $(srcdir)/sphere.h
473 dangerball.o: $(srcdir)/tube.h
474 sphere.o: ../../config.h
475 sphere.o: $(srcdir)/tube.h
476 tube.o: ../../config.h
477 tube.o: $(srcdir)/tube.h