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 = cage gears moebius pipes sproingies stairs superquadrics \
97 morph3d rubik atlantis lament bubble3d glplanet pulsar \
98 sierpinski3d gflux stonerview starwars gltext molecule \
101 GL_UTIL_EXES = xscreensaver-gl-helper
102 HACK_EXES = @GL_EXES@ @GLE_EXES@
103 EXES = @GL_UTIL_EXES@ $(HACK_EXES)
105 HACK_OBJS = screenhack-gl.o xlock-gl.o fps.o $(HACK_BIN)/xlockmore.o \
106 $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
107 $(UTILS_BIN)/visual-gl.o $(UTILS_BIN)/usleep.o \
108 $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/hsv.o \
109 $(UTILS_BIN)/colors.o
111 HDRS = atlantis.h bubble3d.h buildlwo.h e_textures.h xpm-ximage.h \
112 tube.h sphere.h stonerview-move.h stonerview-osc.h \
113 glutstroke.h glut_roman.h
114 GL_MEN = gflux.man lament.man starwars.man gltext.man \
115 molecule.man xscreensaver-gl-helper.man
117 EXTRAS = README Makefile.in
119 TARFILES = $(SRCS) $(HDRS) $(MEN) $(EXTRAS)
125 install: install-program install-man
126 uninstall: uninstall-program uninstall-man
129 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
131 # the hacks, in $HACKDIR
132 install-program:: $(EXES)
133 @exes="$(HACK_EXES)" ; \
134 idir="$(install_prefix)$(HACKDIR)" ; \
135 if [ "$$exes" != "" ]; then \
136 if [ ! -d $$idir ]; then \
137 $(INSTALL_DIRS) $$idir ; \
139 for program in $$exes; do \
140 echo $(INSTALL_PROGRAM) $$program $$idir/$$program ; \
141 $(INSTALL_PROGRAM) $$program $$idir/$$program ; \
145 # the xscreensaver-gl-helper program, in $bindir
146 install-program:: $(EXES)
147 @exes="$(GL_UTIL_EXES)" ; \
148 idir="$(install_prefix)$(bindir)" ; \
149 if [ "$$exes" != "" ]; then \
150 if [ ! -d $$idir ]; then \
151 $(INSTALL_DIRS) $$idir ; \
153 for program in $$exes; do \
154 echo $(INSTALL_PROGRAM) $$program $$idir/$$program ; \
155 $(INSTALL_PROGRAM) $$program $$idir/$$program ; \
161 idir="$(install_prefix)$(man1dir)" ; \
162 if [ ! -d $$idir ]; then \
163 $(INSTALL_DIRS) $$idir ; \
165 for man in $$men; do \
166 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
167 echo $(INSTALL_DATA) $(srcdir)/$$man $$idir/$$instname ; \
168 $(INSTALL_DATA) $(srcdir)/$$man $$idir/$$instname ; \
171 # the hacks, in $HACKDIR
173 @exes="$(HACK_EXES)" ; \
174 idir="$(install_prefix)$(HACKDIR)" ; \
175 for program in $$exes; do \
176 echo rm -f $$idir/$$program ; \
177 rm -f $$idir/$$program ; \
180 # the xscreensaver-gl-helper program, in $bindir
182 @exes="$(GL_UTIL_EXES)" ; \
183 idir="$(install_prefix)$(bindir)" ; \
184 for program in $$exes; do \
185 echo rm -f $$idir/$$program ; \
186 rm -f $$idir/$$program ; \
191 idir="$(install_prefix)$(man1dir)" ; \
192 for man in $$men; do \
193 instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
194 echo rm -f $$idir/$$instname ; \
195 rm -f $$idir/$$instname ; \
199 -rm -f *.o a.out core $(EXES) molecules.h
202 -rm -f Makefile TAGS *~ "#"*
204 # Adds all current dependencies to Makefile
206 $(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
208 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
211 # Adds some dependencies to Makefile.in -- not totally accurate, but pretty
212 # close. This excludes dependencies on files in /usr/include, etc. It tries
213 # to include only dependencies on files which are themselves a part of this
215 distdepend:: molecules.h
216 @echo updating dependencies in `pwd`/Makefile.in... ; \
217 $(DEPEND) -w 0 -f - \
218 -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
219 $(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
222 awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
223 sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
224 -e 's@\.\./\.\./utils@$$(UTILS_SRC)@g' \
225 -e 's@\.\./glx/@@g' \
226 -e 's@ \.\./@ $$(HACK_SRC)/@g' \
227 -e 's@ \([^$$]\)@ $$(srcdir)/\1@g' \
228 -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' \
229 -e 's@ $$(HACK_SRC)/\(.*config.h\)@ ../\1@g' \
230 -e 's@ $$(srcdir)/\(.*molecules.h\)@ \1@g' ; \
232 ) > /tmp/distdepend.$$$$ && \
233 mv Makefile.in Makefile.in.bak && \
234 mv /tmp/distdepend.$$$$ Makefile.in
238 find $(srcdir) -name '*.[chly]' -print | xargs etags -a
244 # Rules for noticing when the objects from the utils directory are out of
245 # date with respect to their sources, and going and building them according
246 # to the rules in their own Makefile...
248 $(UTILS_BIN)/colors.o: $(UTILS_SRC)/colors.c
249 $(UTILS_BIN)/hsv.o: $(UTILS_SRC)/hsv.c
250 $(UTILS_BIN)/resources.o: $(UTILS_SRC)/resources.c
251 $(UTILS_BIN)/usleep.o: $(UTILS_SRC)/usleep.c
252 $(UTILS_BIN)/visual.o: $(UTILS_SRC)/visual.c
253 $(UTILS_BIN)/visual-gl.o: $(UTILS_SRC)/visual-gl.c
254 $(UTILS_BIN)/yarandom.o: $(UTILS_SRC)/yarandom.c
258 $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
260 $(HACK_BIN)/xlockmore.o: $(HACK_SRC)/xlockmore.c
261 cd $(HACK_BIN) ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
264 # How we build object files in this directory.
266 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $<
269 # How to build the "xscreensaver-gl-helper" program, that lets the daemon
270 # know which visual is the right one for GL programs.
272 HELPER_OBJS = xscreensaver-gl-helper.o $(UTILS_BIN)/visual-gl.o \
273 $(UTILS_BIN)/visual.o $(UTILS_BIN)/resources.o
274 xscreensaver-gl-helper: $(HELPER_OBJS)
275 $(CC) $(LDFLAGS) -o $@ $(HELPER_OBJS) $(LIBS) $(X_LIBS) $(HACK_POST2)
278 # These hacks use a slightly-differently-compiled variant of screenhack.c.
279 # This is how to make the the other .o file from it.
281 screenhack-gl.o: $(HACK_SRC)/screenhack.c
282 $(CC) -o $@ -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) \
283 -DXLOCKMORE -DUSE_GL $(HACK_SRC)/screenhack.c
285 CC_HACK = $(CC) $(LDFLAGS)
287 ATLANTIS_OBJS = $(HACK_OBJS) dolphin.o shark.o swim.o whale.o xpm-ximage.o
288 atlantis: atlantis.o $(ATLANTIS_OBJS)
289 $(CC_HACK) -o $@ $@.o $(ATLANTIS_OBJS) $(HACK_LIBS) $(XPM_LIBS)
291 cage: cage.o $(HACK_OBJS)
292 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
294 gears: gears.o $(HACK_OBJS)
295 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
297 moebius: moebius.o $(HACK_OBJS)
298 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
300 pipes: pipes.o $(HACK_OBJS) pipeobjs.o buildlwo.o
301 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) pipeobjs.o buildlwo.o \
304 superquadrics: superquadrics.o $(HACK_OBJS)
305 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
307 morph3d: morph3d.o $(HACK_OBJS)
308 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
310 rubik: rubik.o $(HACK_OBJS)
311 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
313 stairs: stairs.o $(HACK_OBJS)
314 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
316 SPROINGIES = sproingiewrap.o buildlwo.o \
317 s1_1.o s1_2.o s1_3.o s1_4.o s1_5.o s1_6.o s1_b.o
318 sproingies: sproingies.o $(HACK_OBJS) $(SPROINGIES)
319 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(SPROINGIES) $(HACK_LIBS)
321 lament: lament.o $(HACK_OBJS) xpm-ximage.o
322 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) xpm-ximage.o $(XPM_LIBS)
324 B3D = b_sphere.o b_draw.o b_lockglue.o
325 bubble3d: bubble3d.o $(HACK_OBJS) $(B3D)
326 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(B3D) $(HACK_LIBS)
328 glplanet: glplanet.o sphere.o xpm-ximage.o $(HACK_OBJS)
329 $(CC_HACK) -o $@ $@.o sphere.o xpm-ximage.o $(HACK_OBJS) $(XPM_LIBS)
331 pulsar: pulsar.o $(HACK_OBJS)
332 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
334 EXTRUSION_OBJS=extrusion.o extrusion-helix2.o extrusion-helix3.o \
335 extrusion-helix4.o extrusion-joinoffset.o extrusion-screw.o \
336 extrusion-taper.o extrusion-twistoid.o
337 extrusion: $(EXTRUSION_OBJS) $(HACK_OBJS)
338 $(CC_HACK) -o $@ $(EXTRUSION_OBJS) $(HACK_OBJS) $(GLE_LIBS)
340 sierpinski3d: sierpinski3d.o $(HACK_OBJS)
341 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
343 gflux: gflux.o $(HACK_OBJS)
344 $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS)
346 SW_OBJS=starwars.o glut_stroke.o glut_swidth.o
347 starwars: $(SW_OBJS) $(HACK_OBJS)
348 $(CC_HACK) -o $@ $(SW_OBJS) $(HACK_OBJS) $(HACK_LIBS)
350 GLT_OBJS=gltext.o glut_stroke.o glut_swidth.o tube.o
351 gltext: $(GLT_OBJS) $(HACK_OBJS)
352 $(CC_HACK) -o $@ $(GLT_OBJS) $(HACK_OBJS) $(HACK_LIBS)
354 dangerball: dangerball.o sphere.o tube.o $(HACK_OBJS)
355 $(CC_HACK) -o $@ $@.o sphere.o tube.o $(HACK_OBJS) $(HACK_LIBS)
357 # This one works differently (it's not xlock-like.)
359 STONER_OBJS=stonerview.o stonerview-move.o stonerview-osc.o stonerview-view.o \
360 $(UTILS_BIN)/yarandom.o
361 stonerview: $(STONER_OBJS)
362 $(CC_HACK) -o $@ $(STONER_OBJS) $(HACK_LIBS)
365 @tmp=molecules.h.$$$$ ; \
367 echo "building molecules.h from $(HACK_SRC)/images/molecules/*.pdb" ; \
368 for f in $(HACK_SRC)/images/molecules/*.pdb ; do \
369 $(SHELL) $(UTILS_SRC)/ad2c "$$f" | \
370 sed 's/",$$/\\n"/' >> $$tmp ; \
371 echo ',' >> $$tmp ; \
375 molecule: molecule.o sphere.o tube.o $(HACK_OBJS)
376 $(CC_HACK) -o $@ $@.o sphere.o tube.o $(HACK_OBJS) $(HACK_LIBS)
379 ##############################################################################
381 # DO NOT DELETE: updated by make distdepend
382 # $(srcdir)/DO $(srcdir)/NOT $(srcdir)/DELETE: $(srcdir)/updated $(srcdir)/by $(srcdir)/make $(srcdir)/distdepend
384 xscreensaver-gl-helper.o: ../../config.h
385 atlantis.o: ../../config.h
386 atlantis.o: $(srcdir)/atlantis.h
387 atlantis.o: $(srcdir)/xpm-ximage.h
388 atlantis.o: $(HACK_SRC)/images/sea-texture.xpm
389 b_draw.o: $(srcdir)/bubble3d.h
390 b_draw.o: ../../config.h
391 b_lockglue.o: $(srcdir)/bubble3d.h
392 b_lockglue.o: ../../config.h
393 b_sphere.o: $(srcdir)/bubble3d.h
394 b_sphere.o: ../../config.h
395 bubble3d.o: $(srcdir)/bubble3d.h
396 bubble3d.o: ../../config.h
397 buildlwo.o: $(srcdir)/buildlwo.h
398 cage.o: ../../config.h
399 cage.o: $(srcdir)/e_textures.h
400 dolphin.o: $(srcdir)/atlantis.h
401 gears.o: ../../config.h
402 lament.o: ../../config.h
403 lament.o: $(srcdir)/xpm-ximage.h
404 lament.o: $(HACK_SRC)/images/lament.xpm
405 moebius.o: ../../config.h
406 moebius.o: $(srcdir)/e_textures.h
407 morph3d.o: ../../config.h
408 pipeobjs.o: $(srcdir)/buildlwo.h
409 pipes.o: ../../config.h
410 pipes.o: $(srcdir)/buildlwo.h
411 rubik.o: ../../config.h
412 s1_1.o: $(srcdir)/buildlwo.h
413 s1_2.o: $(srcdir)/buildlwo.h
414 s1_3.o: $(srcdir)/buildlwo.h
415 s1_4.o: $(srcdir)/buildlwo.h
416 s1_5.o: $(srcdir)/buildlwo.h
417 s1_6.o: $(srcdir)/buildlwo.h
418 s1_b.o: $(srcdir)/buildlwo.h
419 shark.o: $(srcdir)/atlantis.h
420 sproingies.o: ../../config.h
421 sproingies.o: $(srcdir)/buildlwo.h
422 sproingiewrap.o: ../../config.h
423 stairs.o: ../../config.h
424 stairs.o: $(srcdir)/e_textures.h
425 superquadrics.o: ../../config.h
426 swim.o: ../../config.h
427 swim.o: $(srcdir)/atlantis.h
428 whale.o: $(srcdir)/atlantis.h
429 xlock-gl.o: ../../config.h
430 fps.o: ../../config.h
431 xpm-ximage.o: ../../config.h
432 glplanet.o: ../../config.h
433 glplanet.o: $(srcdir)/sphere.h
434 glplanet.o: $(HACK_SRC)/images/earth.xbm
435 glplanet.o: $(srcdir)/xpm-ximage.h
436 pulsar.o: ../../config.h
437 extrusion.o: ../../config.h
438 extrusion-helix2.o: ../../config.h
439 extrusion-helix3.o: ../../config.h
440 extrusion-helix4.o: ../../config.h
441 extrusion-joinoffset.o: ../../config.h
442 extrusion-screw.o: ../../config.h
443 extrusion-taper.o: ../../config.h
444 extrusion-twistoid.o: ../../config.h
445 sierpinski3d.o: ../../config.h
446 gflux.o: ../../config.h
447 stonerview.o: ../../config.h
448 stonerview.o: $(srcdir)/stonerview-move.h
449 stonerview-move.o: ../../config.h
450 stonerview-move.o: $(srcdir)/stonerview-osc.h
451 stonerview-move.o: $(srcdir)/stonerview-move.h
452 stonerview-osc.o: ../../config.h
453 stonerview-osc.o: $(srcdir)/stonerview-osc.h
454 stonerview-view.o: ../../config.h
455 stonerview-view.o: $(srcdir)/stonerview-osc.h
456 stonerview-view.o: $(srcdir)/stonerview-move.h
457 starwars.o: ../../config.h
458 starwars.o: $(srcdir)/glutstroke.h
459 starwars.o: $(srcdir)/glut_roman.h
460 glut_stroke.o: ../../config.h
461 glut_stroke.o: $(srcdir)/glutstroke.h
462 glut_swidth.o: ../../config.h
463 glut_swidth.o: $(srcdir)/glutstroke.h
464 gltext.o: ../../config.h
465 gltext.o: $(srcdir)/tube.h
466 gltext.o: $(srcdir)/glutstroke.h
467 gltext.o: $(srcdir)/glut_roman.h
468 molecule.o: ../../config.h
469 molecule.o: $(srcdir)/sphere.h
470 molecule.o: $(srcdir)/tube.h
471 molecule.o: molecules.h
472 dangerball.o: ../../config.h
473 dangerball.o: $(srcdir)/sphere.h
474 dangerball.o: $(srcdir)/tube.h
475 sphere.o: ../../config.h
476 sphere.o: $(srcdir)/tube.h
477 tube.o: ../../config.h
478 tube.o: $(srcdir)/tube.h