root/juggler/tags/1.0.5/Makefile.in

Revision 7539, 59.8 kB (checked in by anonymous, 7 years ago)

This commit was manufactured by cvs2svn to create tag
'RELENG_1_0_5_RELEASE'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
2 #
3 # VR Juggler is (C) Copyright 1998, 1999, 2000 by Iowa State University
4 #
5 # Original Authors:
6 #   Allen Bierbaum, Christopher Just,
7 #   Patrick Hartling, Kevin Meinert,
8 #   Carolina Cruz-Neira, Albert Baker
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public
12 # License as published by the Free Software Foundation; either
13 # version 2 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Library General Public License for more details.
19 #
20 # You should have received a copy of the GNU Library General Public
21 # License along with this library; if not, write to the
22 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
24 #
25 # -----------------------------------------------------------------
26 # File:          $RCSfile$
27 # Date modified: $Date$
28 # Version:       $Revision$
29 # -----------------------------------------------------------------
30 #
31 # *************** <auto-copyright.pl END do not edit this line> ***************
32
33 # -----------------------------------------------------------------------------
34 # Base Makefile.in for VR Juggler.  It requires GNU make.
35 #
36 # Generated for use on @PLATFORM@
37 # -----------------------------------------------------------------------------
38 # Targets are:
39 #
40 # world           - Build and install everything.
41 # world-all-abi   - Build and install everything using all supported ABIs.
42 # buildworld      - Build everything (same as 'all').
43 # installworld    - Install everything (same as 'install-all').  This requires
44 #                   that 'buildworld' be successfully completed beforehand.
45 # release         - Build and install a release version.
46 # release-all-abi - Build and install a release version using all supported
47 #                   ABIs.
48 #
49 # all             - Build everything.
50 # all-abi         - Build everything using all supported ABIs.
51 # debug           - Build the VR Juggler libraries (dynamic and static) with
52 #                   debugging symbols turned on.
53 # dbg             - Build the debugging, static copy of the libraries.
54 # ddso            - Build the debugging, dynamic shared object version of the
55 #                   libraries.
56 # optim           - Build the VR Juggler libraries (dynamic and static) with
57 #                   optimization flags enabled.
58 # opt             - Build the optimized, static version of the libraries.
59 # dso             - Build the dynamic shared object version of the libraries.
60 # obj             - Build the object files using the default value for
61 #                   ${OBJDIR}.
62 # gui             - Build the Java-based configuration GUI.
63 #
64 # links           - Define links (for developer use only) that provide
65 #                   functionality allowing the use of the $VJ_BASE_DIR
66 #                   environment variable.
67 # clean-links     - Remove the symlinks created by 'links'.
68 #
69 # static-libs     - Build the static version of the libraries.  This target
70 #                   depends on a correct value for ${LIBDIR} (that does not
71 #                   have a default value).
72 # shared-libs     - Build the dynamic shared version of the libraries.  This
73 #                   target depends on a correct value for ${LIBDIR} (that does
74 #                   not have a default value).
75 #
76 # hier            - Make the full directory hierarchy for the installation.
77 # install-all     - Install all versions of the libraries, all header files,
78 #                   the Data directory, the configuration GUI and the test
79 #                   code.
80 # install-all-abi - Install every ABI possible on the target platform.
81 # install         - Install the full debugging version of VR Juggler (with
82 #                   both static and dynamic libraries).
83 # install-debug   - Same as 'install'.
84 # install-dbg     - Install the debugging, static version of the libraries.
85 # install-ddso    - Install the debugging, dynamic shared object version of
86 #                   the libraries.
87 # install-optim   - Install the full optimized version of VR Juggler (with
88 #                   both static and dynamic libraries).
89 # install-opt     - Install the optimized, static version of the libraries.
90 # install-dso     - Install the dynamic shared object version of the libraries.
91 # install-headers - Install only the header files.
92 # install-samples - Install only the sample applications.
93 # install-test    - Install only the test code.
94 # install-tools   - Install only the user tools code.
95 # install-data    - Install only the Data directory.
96 # install-gui     - Install only the configuration GUI.
97 #
98 # docs            - Build the internal and the public documentation.
99 # doc-internal    - Build only the internal documentation.
100 # doc-public      - Build only the public documentation.
101 #
102 # clean           - Clean up everything (uses common 'clean' target).
103 # cleandepend     - Clean up the dependency files (uses common 'cleandepend'
104 #                   target).
105 # clobber         - Clean up everything and remove the directories containing
106 #                   the compiled libraries and its object files.
107 #
108 # info            - Print out information about the build process that may be
109 #                   useful to the user.
110 #
111 # The default target is 'debug'.  'install' will install the debugging, static
112 # version of the libraries.
113 # -----------------------------------------------------------------------------
114
115 default: debug
116
117 # Define ${_LOCAL_CLEAN} and ${_LOCAL_CLEANDEP} to inform the shared 'clean'
118 # and 'cleandepend' targets that there is a '_clean' target and a
119 # '_cleandepend' target to be run besides the standard targets.  This must
120 # be done before Makefile.base is inlcuded (which in turn includes vj.clean.mk)
121 # so that the variable will be defined when parsing reaches the test for it.
122 _LOCAL_CLEAN    = 1
123 _LOCAL_CLEANDEP = 1
124
125 # Include common definitions.
126 include @topdir@/Makefile.base
127
128 # Variables whose values are specific to this file.
129 includedir      = @includedir@
130 instlinks       = ${topdir}/instlinks
131 srcdir          = @srcdir@
132 top_srcdir      = @top_srcdir@
133 VJROOT          = ${top_srcdir}
134 VJ_SRCDIR       = @VJ_SRCDIR@
135 WORKDIR         = ${topdir}
136
137 BUILD_START     = $(shell date)
138
139 # Extra compiler and linker options needed only by this file.
140 DBG_FLAGS       = -D_DEBUG @DBG_FLAGS@
141 OPT_FLAGS       = -D_OPT @OPT_FLAGS@
142
143 # SGI-specific dynamic-shared-object information.
144 DSOREGFILE      = @DSOREGFILE@
145 DSOVERSION      = @DSOVERSION@
146 DSOVERSIONOPTS  = @DSOVERSIONOPTS@
147
148 # Append ${DSOVERSIONOPTS} to ${LDOPTS} so that those extra options (if any)
149 # will be used by ${LD}.
150 LDOPTS          := ${LDOPTS} ${DSOVERSIONOPTS}
151
152 # State whether or not to build the configuration editor GUI.
153 BUILD_GUI       = @BUILD_GUI@
154
155 # =============================================================================
156 # Build and installation directory naming and permission information.
157 # =============================================================================
158 _DEBUG_DIR      = debug
159 _OPT_DIR        = opt
160 _DEFAULT_DIR    = ${_OPT_DIR}
161
162 _UMASK          = 002
163
164 # If we have a name for the install group, define group-setting options for
165 # UNIX commands (chown(1), chgrp(1)) and for local Perl scripts
166 # (makefiles-gen.pl in particular).
167 ifdef GROUP_NAME
168     _GROUP_OPT_UNIX     = -g ${GROUP_NAME}
169     _GROUP_OPT_PL       = --gname="${GROUP_NAME}"
170 endif
171
172 # ------------------------------------------------
173 # Object file build and installation directories.
174 # ------------------------------------------------
175 _BUILDDIR_BASE  = ${topdir}/obj
176 _BUILDDIR       = ${_BUILDDIR_BASE}/${PLATFORM}/${ABI}/${ISA}
177 _DBG_BUILDDIR   = ${_BUILDDIR}/${_DEBUG_DIR}
178 _OPT_BUILDDIR   = ${_BUILDDIR}/${_OPT_DIR}
179
180 # --------------------------------------------
181 # Library build and installation directories.
182 # --------------------------------------------
183
184 # ${_install_libdir_abs} is the full path to the base directory (minus any
185 # debugging or optimized subdirectories) where the libraries will be
186 # installed.  ${_install_libdir_rel} is only the ${ISA} subdirectory of the
187 # full path.
188 _install_libdir_abs = ${libdir}${LIBBITSUF}/${ISA}
189 _install_libdir_rel = ./${ISA}
190
191 # ${_LIBDIR_NAME} is the name of the library directory including an ABI suffix
192 # if applicable.
193 _LIBDIR_NAME    = lib${LIBBITSUF}
194
195 # ${_LIBDIR_BASE} is the base directory where the libraries will be built.
196 _LIBDIR_BASE    = ${topdir}/${_LIBDIR_NAME}
197
198 # ${_LIBDIR} is the first-level subdirectory of ${_LIBDIR_BASE} that is
199 # named by the instruction set being used (${ISA}).
200 _LIBDIR         = ${_LIBDIR_BASE}/${ISA}
201
202 # ${_DBG_LIBDIR} and ${_OPT_LIBDIR} are the directories where the libraries
203 # are actually built.  The first is for a debugging copy of the libraries and
204 # the second is for an optimized version of the libraries.
205 _DBG_LIBDIR     = ${_LIBDIR}/${_DEBUG_DIR}
206 _OPT_LIBDIR     = ${_LIBDIR}/${_OPT_DIR}
207
208 SHLIB_MAJOR     = 1
209 SHLIB_MINOR     = 0
210
211 # Full names of the static and dynamic versions of the libraries.
212 VJ_LIB_STATIC   = ${VJ_LIBRARY}.@STATICLIB_EXT@
213 VJ_LIB_DYNAMIC  = ${VJ_LIBRARY}.@SHAREDLIB_EXT@
214
215 UTILS_LIB_STATIC        = ${UTILS_LIBRARY}.@STATICLIB_EXT@
216 UTILS_LIB_DYNAMIC       = ${UTILS_LIBRARY}.@SHAREDLIB_EXT@
217
218 GL_API          = @OPENGL_API@
219 GL_LIB_STATIC   = ${GL_LIBRARY}.@STATICLIB_EXT@
220 GL_LIB_DYNAMIC  = ${GL_LIBRARY}.@SHAREDLIB_EXT@
221
222 PF_API          = @PERFORMER_API@
223 PF_LIB_STATIC   = ${PF_LIBRARY}.@STATICLIB_EXT@
224 PF_LIB_DYNAMIC  = ${PF_LIBRARY}.@SHAREDLIB_EXT@
225
226 AUDIO_WORKS     = @AUDIO_WORKS@
227 AW_LIB_STATIC   = ${AW_LIBRARY}.@STATICLIB_EXT@
228 AW_LIB_DYNAMIC  = ${AW_LIBRARY}.@SHAREDLIB_EXT@
229
230 SL              = @SL@
231 SL_LIB_STATIC   = ${SL_LIBRARY}.@STATICLIB_EXT@
232 SL_LIB_DYNAMIC  = ${SL_LIBRARY}.@SHAREDLIB_EXT@
233
234 # On Linux, we have to compile the Performer library with -O for things to
235 # link properly.
236 ifeq (${PLATFORM}, Linux)
237     _PF_EXTRA_LDOPTS = -O
238 endif
239
240 # Version information.
241 BRANCH          = RELENG_1_0
242 VER_ARGS        = -f ${VJROOT_ABS}/VERSION -s @THREAD_SYS@ -b ${BRANCH} \
243                   -i ${VJROOT_ABS}/vjParam.h.in -o vjParam.h            \
244                   -d "`date '+%b %e, %Y %H:%M:%S'`"
245
246 ifdef VERSION
247     VER_ARGS    += -v ${VERSION}
248 endif
249
250 # =============================================================================
251 # Lists used for various types of recursion.
252 # =============================================================================
253
254 # Subdirectories used for recursion through the source tree.
255 SUBDIRS         = Config        \
256                   Environment   \
257                   Input         \
258                   Kernel        \
259                   Math          \
260                   Performance   \
261                   SharedMem     \
262                   Sound         \
263                   Sync          \
264                   Threads       \
265                   Utils
266
267 # The list of ABIs supported on this platform.
268 ABI_LIST        = @ABI_LIST@
269
270 # =============================================================================
271 # Library targets.  The default is 'debug' as defined above.  The steps for
272 # building the 'dbg', 'ddso', 'opt' and 'dso' are as follows:
273 #
274 #    1) Build dependencies (if necessary).
275 #    2) Compile all object files that are out of date.
276 #    3) Compile the actual libraries from the object files.
277 #    4) Build the Java-based config editor (if necessary).
278 #    5) Set up the developer installation links.
279 # =============================================================================
280
281 # Include recursive target code.
282 include ${MKPATH}/vj.rec.mk
283
284 # ------------------------------------------------
285 # Build and install everything (i.e., the world).
286 # ------------------------------------------------
287 world:
288         @echo "==============================================================="
289         @echo ">>> VR Juggler make world started $(BUILD_START)"
290         @echo "==============================================================="
291         @${MAKE} beforebuild
292 ifndef NO_CLEAN
293         @${MAKE} clobber
294 endif
295         @${MAKE} _libs gui
296         @echo "---------------------------------------------------------------"
297         @echo "Beginning VR Juggler installation process"
298         @echo "---------------------------------------------------------------"
299         @${MAKE} beforeinstall
300         @${MAKE} _install_libs
301         @${MAKE} _install_post_libs
302         @echo "==============================================================="
303         @echo ">>> VR Juggler make world started $(BUILD_START)"
304         @echo ">>> VR Juggler make world completed `LTIME=C date`"
305         @echo "==============================================================="
306
307 # ------------------------------------------------------------------------
308 # Build and install everything (i.e., the world) using all possible ABIs.
309 # ------------------------------------------------------------------------
310 world-all-abi:
311         @echo "==============================================================="
312         @echo ">>> VR Juggler make world started on `LTIME=C date`"
313         @echo "==============================================================="
314         @${MAKE} beforebuild
315 ifndef NO_CLEAN
316         @${MAKE} clobber
317 endif
318         @abi_list='${ABI_LIST}' ;                                       \
319           for abi in $$abi_list ; do                                    \
320               echo "------------------------------------------------" ; \
321               echo "Building libraries using $$abi" ;                   \
322               echo "------------------------------------------------" ; \
323               ${MAKE} vjABI=$$abi _libs ;                               \
324           done
325         @${MAKE} gui
326         @echo "---------------------------------------------------------------"
327         @echo "Beginning VR Juggler installation process"
328         @echo "---------------------------------------------------------------"
329         @${MAKE} beforeinstall
330         @abi_list='${ABI_LIST}' ;                                       \
331           for abi in $$abi_list ; do                                    \
332               echo "------------------------------------------------" ; \
333               echo "Installing $$abi version of libraries" ;            \
334               echo "------------------------------------------------" ; \
335               ${MAKE} vjABI=$$abi _install_libs ;                       \
336           done
337         @${MAKE} _install_post_libs
338         @echo "==============================================================="
339         @echo ">>> VR Juggler make world completed on `LTIME=C date`"
340         @echo "==============================================================="
341
342 # -------------------------------------------------------------
343 # Build and install everything (i.e., the world) for a release.
344 # -------------------------------------------------------------
345 .PHONY: release
346
347 release:
348         @echo "==============================================================="
349         @echo ">>> VR Juggler make release started on `LTIME=C date`"
350         @echo "==============================================================="
351         @${MAKE} beforebuild
352 ifndef NO_CLEAN
353         @${MAKE} clobber
354 endif
355         @${MAKE} _libs gui
356         @echo "---------------------------------------------------------------"
357         @echo "Beginning VR Juggler release installation process"
358         @echo "---------------------------------------------------------------"
359         @${MAKE} beforeinstall
360         @${MAKE} _install_libs
361         @${MAKE} _install_post_libs
362         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
363           ${VJROOT_ABS}/ChangeLog ${prefix}
364         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
365           ${VJROOT_ABS}/COPYING ${prefix}
366         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
367           ${VJROOT_ABS}/KNOWN_BUGS ${prefix}
368         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
369           ${VJROOT_ABS}/README ${prefix}
370         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
371           ${VJROOT_ABS}/RELEASE_NOTES ${prefix}
372         @echo "Build time: `LTIME=C date`" > ${prefix}/BUILD_TIME
373         @echo "==============================================================="
374         @echo ">>> VR Juggler make release completed on `LTIME=C date`"
375         @echo "==============================================================="
376
377 release-all-abi:
378         @echo "==============================================================="
379         @echo ">>> VR Juggler make release started on `LTIME=C date`"
380         @echo "==============================================================="
381         @${MAKE} beforebuild
382 ifndef NO_CLEAN
383         @${MAKE} clobber
384 endif
385         @abi_list='${ABI_LIST}' ;                                       \
386           for abi in $$abi_list ; do                                    \
387               echo "------------------------------------------------" ; \
388               echo "Building libraries using $$abi" ;                   \
389               echo "------------------------------------------------" ; \
390               ${MAKE} vjABI=$$abi _libs ;                               \
391           done
392         @${MAKE} gui
393         @echo "---------------------------------------------------------------"
394         @echo "Beginning VR Juggler release installation process"
395         @echo "---------------------------------------------------------------"
396         @${MAKE} beforeinstall
397         @abi_list='${ABI_LIST}' ;                                       \
398           for abi in $$abi_list ; do                                    \
399               echo "------------------------------------------------" ; \
400               echo "Installing $$abi version of libraries" ;            \
401               echo "------------------------------------------------" ; \
402               ${MAKE} vjABI=$$abi _install_libs ;                       \
403           done
404         @${MAKE} _install_post_libs
405         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
406           ${VJROOT_ABS}/ChangeLog ${prefix}
407         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
408           ${VJROOT_ABS}/COPYING ${prefix}
409         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
410           ${VJROOT_ABS}/README ${prefix}
411         ${INSTALL} -m ${FILE_PERMS} ${_GROUP_OPT_UNIX}                  \
412           ${VJROOT_ABS}/RELEASE_NOTES ${prefix}
413         @echo "Build time: `LTIME=C date`" > ${prefix}/BUILD_TIME
414         @echo "==============================================================="
415         @echo ">>> VR Juggler make release completed on `LTIME=C date`"
416         @echo "==============================================================="
417
418 # ------------------------------------------
419 # Build all four versions of the libraries.
420 # ------------------------------------------
421 all buildworld:
422         @echo "==============================================================="
423         @echo "Building everything"
424         @echo "==============================================================="
425         @${MAKE} beforebuild
426         @${MAKE} _libs gui
427         @${MAKE} afterbuild
428         @echo "==============================================================="
429         @echo "$@ complete"
430         @echo "==============================================================="
431
432 # -------------------------------
433 # Build all ABIs in ${ABI_LIST}.
434 # -------------------------------
435 all-abi:
436         @echo "==============================================================="
437         @echo "Building everything using all ABIs"
438         @echo "==============================================================="
439         @${MAKE} beforebuild
440         @abi_list='${ABI_LIST}' ;                                       \
441           for abi in $$abi_list ; do                                    \
442               echo "------------------------------------------------" ; \
443               echo "Building libraries using $$abi" ;                   \
444               echo "------------------------------------------------" ; \
445               ${MAKE} vjABI=$$abi _libs ;                               \
446           done
447         @${MAKE} gui
448         @${MAKE} afterbuild
449         @echo "==============================================================="
450         @echo "$@ complete"
451         @echo "==============================================================="
452
453 # Things to do before the object files and library are built.
454 beforebuild:
455         @${SHELL} ${scriptdir}/make-ver.sh ${VER_ARGS}
456         @${PERL} ${scriptdir}/incvt.pl -i ${topdir}/config.status       \
457             -t ${VJROOT_ABS}/juggler-config.in -o ${topdir}/juggler-config
458         @chmod +x ${topdir}/juggler-config
459
460 # Things to do after the object files and library are built.
461 afterbuild:
462         @${MAKE} links
463
464 # Build the optimized and debugging object files, static libraries and
465 # shared libraries.  Once this has been done, make the links in ${_LIBDIR}.
466 _libs:
467         @${MAKE} _build_opt_obj
468         @${MAKE} _build_opt_lib_static
469         @${MAKE} _build_opt_lib_shared
470         @${MAKE} _build_dbg_obj
471         @${MAKE} _build_dbg_lib_static
472         @${MAKE} _build_dbg_lib_shared
473         @${MAKE} _LIB_LINK_DIR="${_LIBDIR}" _lib_links
474
475 # Make symlinks in ${_LIB_LINK_DIR} pointing to the library binaries in
476 # ${_DEFAULT_DIR}.
477 _lib_links:
478         @echo "------------------------------------------------"
479         @echo "Creating symlinks in ${_LIB_LINK_DIR}"
480         @echo "------------------------------------------------"
481         cd ${_LIB_LINK_DIR} && rm -f ./${VJ_LIB_STATIC} &&      \
482           ${LN_S} ${_DEFAULT_DIR}/${VJ_LIB_STATIC} ./
483         -cd ${_LIB_LINK_DIR} && rm -f ./${VJ_LIB_DYNAMIC} &&    \
484           ${LN_S} ${_DEFAULT_DIR}/${VJ_LIB_DYNAMIC} ./
485         cd ${_LIB_LINK_DIR} && rm -f ./${UTILS_LIB_STATIC} &&   \
486           ${LN_S} ${_DEFAULT_DIR}/${UTILS_LIB_STATIC} ./
487         -cd ${_LIB_LINK_DIR} && rm -f ./${UTILS_LIB_DYNAMIC} && \
488           ${LN_S} ${_DEFAULT_DIR}/${UTILS_LIB_DYNAMIC} ./
489 ifeq (${GL_API}, Y)
490         cd ${_LIB_LINK_DIR} && rm -f ./${GL_LIB_STATIC} &&      \
491           ${LN_S} ${_DEFAULT_DIR}/${GL_LIB_STATIC} ./
492         -cd ${_LIB_LINK_DIR} && rm -f ./${GL_LIB_DYNAMIC} &&    \
493           ${LN_S} ${_DEFAULT_DIR}/${GL_LIB_DYNAMIC} ./
494 endif
495 ifeq (${PF_API}, Y)
496         cd ${_LIB_LINK_DIR} && rm -f ./${PF_LIB_STATIC} &&      \
497           ${LN_S} ${_DEFAULT_DIR}/${PF_LIB_STATIC} ./
498         -cd ${_LIB_LINK_DIR} && rm -f ./${PF_LIB_DYNAMIC} &&    \
499           ${LN_S} ${_DEFAULT_DIR}/${PF_LIB_DYNAMIC} ./
500 endif
501 ifeq (${AUDIO_WORKS}, Y)
502         cd ${_LIB_LINK_DIR} && rm -f ./${AW_LIB_STATIC} &&      \
503           ${LN_S} ${_DEFAULT_DIR}/${AW_LIB_STATIC} ./
504         -cd ${_LIB_LINK_DIR} && rm -f ./${AW_LIB_DYNAMIC} &&    \
505           ${LN_S} ${_DEFAULT_DIR}/${AW_LIB_DYNAMIC} ./
506 endif
507 ifeq (${SL}, Y)
508         cd ${_LIB_LINK_DIR} && rm -f ./${SL_LIB_STATIC} &&      \
509           ${LN_S} ${_DEFAULT_DIR}/${SL_LIB_STATIC} ./
510         -cd ${_LIB_LINK_DIR} && rm -f ./${SL_LIB_DYNAMIC} &&    \
511           ${LN_S} ${_DEFAULT_DIR}/${SL_LIB_DYNAMIC} ./
512 endif
513
514 # ----------------------------------------------------------------------------
515 # Make the debugging version of the libraries building both static and shared
516 # versions of the library binaries.
517 # ----------------------------------------------------------------------------
518 debug:
519         @echo "========================================================"
520         @echo "Making debugging version of VR Juggler"
521         @echo "========================================================"
522         @${MAKE} beforebuild
523         @${MAKE} _build_dbg_obj gui
524         @${MAKE} _build_dbg_lib_static
525         @${MAKE} _build_dbg_lib_shared
526         @${MAKE} afterbuild
527         @echo "========================================================"
528         @echo "$@ complete"
529         @echo "========================================================"
530
531 # ---------------------------------------------
532 # Make the debugging version of the libraries.
533 # ---------------------------------------------
534 dbg:
535         @echo "========================================================"
536         @echo "Making DBG version of VR Juggler"
537         @echo "========================================================"
538         @${MAKE} beforebuild
539         @${MAKE} _build_dbg_obj gui
540         @${MAKE} _build_dbg_lib_static
541         @${MAKE} afterbuild
542         @echo "========================================================"
543         @echo "$@ complete"
544         @echo "========================================================"
545
546 # ------------------------------------------------------------
547 # Make the debugging version of the libraries that uses DSOs.
548 # ------------------------------------------------------------
549 ddso:
550         @echo "========================================================"
551         @echo "Making DBG version of VR Juggler"
552         @echo "========================================================"
553         @${MAKE} beforebuild
554         @${MAKE} _build_dbg_obj gui
555         @${MAKE} _build_dbg_lib_shared
556         @${MAKE} afterbuild
557         @echo "========================================================"
558         @echo "$@ complete"
559         @echo "========================================================"
560
561 # ----------------------------------------------------------------------------
562 # Make the optimized version of the libraries building both static and shared
563 # versions of the library binaries.
564 # ----------------------------------------------------------------------------
565 optim:
566         @echo "========================================================"
567         @echo "Making optimized version of VR Juggler"
568         @echo "========================================================"
569         @${MAKE} beforebuild
570         @${MAKE} _build_opt_obj gui
571         @${MAKE} _build_opt_lib_static
572         @${MAKE} _build_opt_lib_shared
573         @${MAKE} afterbuild
574         @echo "========================================================"
575         @echo "$@ complete"
576         @echo "========================================================"
577
578 # ---------------------------------------------
579 # Make the optimized version of the libraries.
580 # ---------------------------------------------
581 opt:
582         @echo "========================================================"
583         @echo "Making OPT version of VR Juggler"
584         @echo "========================================================"
585         @${MAKE} beforebuild
586         @${MAKE} _build_opt_obj gui
587         @${MAKE} _build_opt_lib_static
588         @${MAKE} afterbuild
589         @echo "========================================================"
590         @echo "$@ complete"
591         @echo "========================================================"
592
593 # ------------------------------------------------------------
594 # Make the optimized version of the libraries that uses DSOs.
595 # ------------------------------------------------------------
596 dso:
597         @echo "========================================================"
598         @echo "Making OPT version of VR Juggler"
599         @echo "========================================================"
600         @${MAKE} beforebuild
601         @${MAKE} _build_opt_obj gui
602         @${MAKE} _build_opt_lib_shared
603         @${MAKE} afterbuild
604         @echo "========================================================"
605         @echo "$@ complete"
606         @echo "========================================================"
607
608 # Build the object files with the debugging flags enabled.
609 _build_dbg_obj:
610         @echo "------------------------------------------------"
611         @echo "Building object files with debugging symbols"
612         @echo "------------------------------------------------"
613         ${SHELL} ${scriptdir}/mkinstalldirs ${_DBG_BUILDDIR}
614         @${MAKE} RECTARGET="dbg" OPTIMIZER="${DBG_FLAGS}"               \
615           BASE_OBJDIR="${_DBG_BUILDDIR}" recursive
616
617 # Build the object files with the optimization flags enabled.
618 _build_opt_obj:
619         @echo "------------------------------------------------"
620         @echo "Building optimized object files"
621         @echo "------------------------------------------------"
622         ${SHELL} ${scriptdir}/mkinstalldirs ${_OPT_BUILDDIR}
623         @${MAKE} RECTARGET="opt" OPTIMIZER="${OPT_FLAGS}"               \
624           BASE_OBJDIR="${_OPT_BUILDDIR}" recursive
625
626 # Build the static libraries with the debugging flags enabled.
627 _build_dbg_lib_static:
628         @echo "================================================"
629         @echo "Building static debugging libraries"
630         @echo "================================================"
631         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}" LIBDIR="${_DBG_LIBDIR}" \
632           EXTRA_ARFLAGS="${LDOPTS_DBG}" ${_DBG_LIBDIR}/${VJ_LIB_STATIC}
633         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/Utils"                   \
634           EXTRA_ARFLAGS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"         \
635           ${_DBG_LIBDIR}/${UTILS_LIB_STATIC}
636 ifeq (${GL_API}, Y)
637         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/GL"                      \
638           EXTRA_ARFLAGS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"         \
639           ${_DBG_LIBDIR}/${GL_LIB_STATIC}
640 endif
641 ifeq (${PF_API}, Y)
642         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/Pf"                      \
643           EXTRA_ARFLAGS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"         \
644           ${_DBG_LIBDIR}/${PF_LIB_STATIC}
645 endif
646 ifeq (${AUDIO_WORKS}, Y)
647         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/aw"                      \
648           EXTRA_ARFLAGS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"         \
649           ${_DBG_LIBDIR}/${AW_LIB_STATIC}
650 endif
651 ifeq (${SL}, Y)
652         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/sl"                      \
653           EXTRA_ARFLAGS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"         \
654           ${_DBG_LIBDIR}/${SL_LIB_STATIC}
655 endif
656
657 # Build the shared libraries with the debugging flags enabled.
658 _build_dbg_lib_shared:
659 ifneq (@OS_TYPE@, Win32)
660         @echo "================================================"
661         @echo "Building shared debugging libraries"
662         @echo "================================================"
663         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}" LIBDIR="${_DBG_LIBDIR}" \
664           EXTRA_LDOPTS="${LDOPTS_DBG}" ${_DBG_LIBDIR}/${VJ_LIB_DYNAMIC}
665         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/Utils"                   \
666           EXTRA_LDOPTS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"          \
667           ${_DBG_LIBDIR}/${UTILS_LIB_DYNAMIC}
668 ifeq (${GL_API}, Y)
669         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/GL"                      \
670           EXTRA_LDOPTS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"          \
671           ${_DBG_LIBDIR}/${GL_LIB_DYNAMIC}
672 endif
673 ifeq (${PF_API}, Y)
674         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/Pf"                      \
675           EXTRA_LDOPTS="${LDOPTS_DBG} ${_PF_EXTRA_LDOPTS}"              \
676           LIBDIR="${_DBG_LIBDIR}" ${_DBG_LIBDIR}/${PF_LIB_DYNAMIC}
677 endif
678 ifeq (${AUDIO_WORKS}, Y)
679         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/aw"                      \
680           EXTRA_LDOPTS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"          \
681           ${_DBG_LIBDIR}/${AW_LIB_DYNAMIC}
682 endif
683 ifeq (${SL}, Y)
684         @${MAKE} BASE_OBJDIR="${_DBG_BUILDDIR}/sl"                      \
685           EXTRA_LDOPTS="${LDOPTS_DBG}" LIBDIR="${_DBG_LIBDIR}"          \
686           ${_DBG_LIBDIR}/${SL_LIB_DYNAMIC}
687 endif
688 else
689         @echo "================================================"
690         @echo "Cannot build shared libs on Win32 yet!"
691         @echo "================================================"
692 endif
693
694 # Build the static libraries with the optimization flags enabled.
695 _build_opt_lib_static:
696         @echo "================================================"
697         @echo "Building static optmized libraries"
698         @echo "================================================"
699         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}" LIBDIR=${_OPT_LIBDIR}   \
700           EXTRA_ARFLAGS="${LDOPTS_OPT}" ${_OPT_LIBDIR}/${VJ_LIB_STATIC}
701         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/Utils"                   \
702           EXTRA_ARFLAGS="${LDOPTS_OPT}" LIBDIR=${_OPT_LIBDIR}           \
703           ${_OPT_LIBDIR}/${UTILS_LIB_STATIC}
704 ifeq (${GL_API}, Y)
705         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/GL"                      \
706           EXTRA_ARFLAGS="${LDOPTS_OPT}" LIBDIR=${_OPT_LIBDIR}           \
707           ${_OPT_LIBDIR}/${GL_LIB_STATIC}
708 endif
709 ifeq (${PF_API}, Y)
710         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/Pf"                      \
711           EXTRA_ARFLAGS="${LDOPTS_OPT}" LIBDIR=${_OPT_LIBDIR}           \
712           ${_OPT_LIBDIR}/${PF_LIB_STATIC}
713 endif
714 ifeq (${AUDIO_WORKS}, Y)
715         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/aw"                      \
716           EXTRA_ARFLAGS="${LDOPTS_OPT}" LIBDIR=${_OPT_LIBDIR}           \
717           ${_OPT_LIBDIR}/${AW_LIB_STATIC}
718 endif
719 ifeq (${SL}, Y)
720         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/sl"                      \
721           EXTRA_ARFLAGS="${LDOPTS_OPT}" LIBDIR=${_OPT_LIBDIR}           \
722           ${_OPT_LIBDIR}/${SL_LIB_STATIC}
723 endif
724
725 # Build the shared libraries with the optimization flags enabled.
726 _build_opt_lib_shared:
727 ifneq (@OS_TYPE@, Win32)
728         @echo "================================================"
729         @echo "Building shared optmized libraries"
730         @echo "================================================"
731         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}" LIBDIR="${_OPT_LIBDIR}" \
732           EXTRA_LDOPTS="${LDOPTS_OPT}" ${_OPT_LIBDIR}/${VJ_LIB_DYNAMIC}
733         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/Utils"                   \
734           EXTRA_LDOPTS="${LDOPTS_OPT}" LIBDIR="${_OPT_LIBDIR}"          \
735           ${_OPT_LIBDIR}/${UTILS_LIB_DYNAMIC}
736 ifeq (${GL_API}, Y)
737         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/GL"                      \
738           EXTRA_LDOPTS="${LDOPTS_OPT}" LIBDIR="${_OPT_LIBDIR}"          \
739           ${_OPT_LIBDIR}/${GL_LIB_DYNAMIC}
740 endif
741 ifeq (${PF_API}, Y)
742         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/Pf"                      \
743           EXTRA_LDOPTS="${LDOPTS_OPT}" LIBDIR="${_OPT_LIBDIR}"          \
744           ${_OPT_LIBDIR}/${PF_LIB_DYNAMIC}
745 endif
746 ifeq (${AUDIO_WORKS}, Y)
747         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/aw"                      \
748           EXTRA_LDOPTS="${LDOPTS_OPT}" LIBDIR="${_OPT_LIBDIR}"          \
749           ${_OPT_LIBDIR}/${AW_LIB_DYNAMIC}
750 endif
751 ifeq (${SL}, Y)
752         @${MAKE} BASE_OBJDIR="${_OPT_BUILDDIR}/sl"                      \
753           EXTRA_LDOPTS="${LDOPTS_OPT}" LIBDIR="${_OPT_LIBDIR}"          \
754           ${_OPT_LIBDIR}/${SL_LIB_DYNAMIC}
755 endif
756 else
757         @echo "================================================"
758         @echo "Cannot build shared libs on Win32 yet!"
759         @echo "================================================"
760 endif
761
762
763 # --------------------------------------------------------------------
764 # Build only the object files using the default values for ${OBJDIR}.
765 # --------------------------------------------------------------------
766 obj:
767         @echo "------------------------------------------------"
768         @echo "Making library object files"
769         @echo "------------------------------------------------"
770         @${MAKE} RECTARGET="$@" recursive
771         @echo "------------------------------------------------"
772         @echo "Object files built"
773         @echo "------------------------------------------------"
774
775 # -----------------------------------------------
776 # Construct the static version of the libraries.
777 # -----------------------------------------------
778 static-libs: ${VJ_LIB_STATIC} ${UTILS_LIB_STATIC} ${GL_LIB_STATIC}      \
779              ${PF_LIB_STATIC} ${AW_LIB_STATIC} ${SL_LIB_STATIC}
780
781 ${LIBDIR}/${VJ_LIB_STATIC} ${LIBDIR}/${UTILS_LIB_STATIC}                \
782 ${LIBDIR}/${GL_LIB_STATIC} ${LIBDIR}/${PF_LIB_STATIC}                   \
783 ${LIBDIR}/${AW_LIB_STATIC} ${LIBDIR}/${SL_LIB_STATIC}: ${OBJDIR}/*.${OBJ_FILE_SUFFIX}
784         @echo "------------------------------------------------"
785         @echo "Creating $@"
786         @echo "------------------------------------------------"
787         @${SHELL} ${scriptdir}/mkinstalldirs ${LIBDIR}
788         ${AR} ${AR_NAME_FLAG}$@ ${OBJDIR}/*.${OBJ_FILE_SUFFIX}
789         ${RANLIB} $@
790         cd ${_LIBDIR_BASE} && rm -f ${notdir $@} && ${LN_S} $@ ./
791         @echo "------------------------------------------------"
792         @echo "$@ done"
793         @echo "------------------------------------------------"
794
795 # -------------------------------------------------------
796 # Construct the dynamic shared version of the libraries.
797 # -------------------------------------------------------
798 shared-libs: ${VJ_LIB_DYNAMIC} ${UTILS_LIB_DYNAMIC} ${GL_LIB_DYNAMIC}   \
799              ${PF_LIB_DYNAMIC} ${AW_LIB_DYNAMIC} ${SL_LIB_DYNAMIC}
800
801 ${LIBDIR}/${VJ_LIB_DYNAMIC} ${LIBDIR}/${UTILS_LIB_DYNAMIC}              \
802 ${LIBDIR}/${GL_LIB_DYNAMIC} ${LIBDIR}/${PF_LIB_DYNAMIC}                 \
803 ${LIBDIR}/${AW_LIB_DYNAMIC} ${LIBDIR}/${SL_LIB_DYNAMIC}: ${OBJDIR}/*.${OBJ_FILE_SUFFIX}
804         @echo "------------------------------------------------"
805         @echo "Creating $@"
806         @echo "------------------------------------------------"
807         @${SHELL} ${scriptdir}/mkinstalldirs ${LIBDIR}
808         ${LD} ${LDOPTS} -o $@ ${OBJDIR}/*.${OBJ_FILE_SUFFIX}
809         cd ${_LIBDIR_BASE} && rm -f ${notdir $@} && ${LN_S} $@ ./
810         @echo "------------------------------------------------"
811         @echo "$@ done"
812         @echo "------------------------------------------------"
813
814 # =============================================================================
815 # Java-based configuration editor targets.
816 # =============================================================================
817
818 # 'gui' must be a phony target so that platforms that do not have
819 # case-sensitive file names will not get it confused with the GUI directory.
820 .PHONY: gui
821
822 # Build the Java-based configuration GUI.
823 gui:
824 ifndef NO_JAVA_GUI
825 ifeq (${BUILD_GUI}, Y)
826         @echo "===> GUI"
827         @${MAKE} -C GUI all
828         @echo "<=== GUI"
829 else
830         @echo "------------------------------------------------"
831         @echo "GUI cannot be built without javac"
832         @echo "------------------------------------------------"
833 endif
834 endif   # ifndef NO_JAVA_GUI
835
836 # =============================================================================
837 # Make links for developer use that provide the needed functionality for
838 # the $VJ_BASE_DIR environment variable to be used when needed.  $VJ_BASE_DIR
839 # should be set to ${instlinks}.
840 # =============================================================================
841 links:
842 ifneq (@OS_TYPE@, Win32)
843         @echo "------------------------------------------------"
844         @echo "Setting up developer installation links"
845         @echo "------------------------------------------------"
846         ${SHELL} ${scriptdir}/mkinstalldirs ${instlinks}
847         ${SHELL} ${scriptdir}/mkinstalldirs ${instlinks}/include
848         ${SHELL} ${scriptdir}/mkinstalldirs ${instlinks}/${_LIBDIR_NAME}
849         cd ${instlinks}/include &&                                      \
850           dir_list='${SUBDIRS}' ;                                       \
851             for dir in $$dir_list ; do                                  \
852                 rm -f ./$$dir ;                                         \
853                 ln -s ${VJROOT_ABS}/$$dir ./$$dir ;                     \
854             done
855         cd ${instlinks}/${_LIBDIR_NAME} && rm -f ./* &&                 \
856           ln -s ${_LIBDIR_BASE}/* ./
857         cd ${instlinks} && rm -rf ./${VJ_SHARE_DIR} &&                  \
858           ${SHELL} ${scriptdir}/mkinstalldirs ./${VJ_SHARE_DIR}
859         cd ${instlinks}/${VJ_SHARE_DIR} && rm -f ./Data &&              \
860           ln -s ${VJROOT_ABS}/Data ./Data
861         cd ${instlinks}/${VJ_SHARE_DIR} && rm -f ./samples &&           \
862           ln -s ${VJROOT_ABS}/samples ./samples
863         cd ${instlinks}/include && rm -f ./vjConfig.h &&                \
864           ${LN_S} ${VJROOT_ABS}/vjConfig.h ./vjConfig.h
865         cd ${instlinks}/include && rm -f ./vjDefines.h &&               \
866           ${LN_S} ${topdir}/vjDefines.h ./vjDefines.h
867         cd ${instlinks}/include && rm -f ./vjParam.h &&                 \
868           ${LN_S} ${topdir}/vjParam.h ./vjParam.h
869         ${SHELL} ${scriptdir}/mkinstalldirs ${instlinks}/bin
870         cd ${instlinks}/bin && rm -f ./catadf.pl &&                     \
871           ${LN_S} ${VJROOT_ABS}/tools/catadf.pl ./catadf.pl
872 ifndef NO_JAVA_GUI
873         cd ${instlinks}/bin && rm -f ./VjControl.jar &&                 \
874           ${LN_S} ${topdir}/GUI/VjControl.jar ./
875         cd ${instlinks}/bin && rm -f ./vjcontrol &&                     \
876           sed -e 's,#VJ_SHARE_DIR#,${VJ_SHARE_DIR},g'                   \
877               ${VJROOT_ABS}/GUI/vjcontrol.sh > vjcontrol &&             \
878           chmod ${EXEC_PERMS} vjcontrol
879 endif
880         ${PERL} ${scriptdir}/incvt.pl -i ${topdir}/config.status        \
881             -t ${VJROOT_ABS}/juggler-config.in -p 'use_base_dir=yes'    \
882             -o ${instlinks}/bin/juggler-config -x
883         @echo "\n\n"
884         @echo "---------------------------------------------------------------"
885         @echo 'You should now set $$VJ_BASE_DIR to:'
886         @cd ${instlinks} && echo "  `pwd`"
887         @echo "---------------------------------------------------------------"
888 else
889         @echo "---------------------------------------------------------------"
890         @echo 'You must now install VR Juggler and set %VJ_BASE_DIR% to:'
891         @echo "  ${prefix}"
892         @echo "---------------------------------------------------------------"
893 endif
894
895 # Remove the links in ${instlinks}.
896 clean-links:
897         @echo "------------------------------------------------"
898         @echo "Removing developer installation links"
899         @echo "------------------------------------------------"
900         rm -rf ${instlinks}
901
902 # =============================================================================
903 # Installation targets.  The default (what is done by 'install') is to install
904 # the static debugging version of the libraries.  The steps taken for a full
905 # installation are:
906 #
907 #     1) Create the full installation directory hierarchy.
908 #     2) Install the libraries.
909 #     3) Install the header files.
910 #     4) Install the test programs.
911 #     5) Install the contents of the Data directory.
912 #     6) Install the Java-based config editor (if possible).
913 # =============================================================================
914
915 # Steps to take before beginning the installation process.  This target is
916 # independent of the current ABI.
917 beforeinstall:
918         @${MAKE} hier
919
920 # Make the full directory hierarchy for the installation.
921 hier:
922         @echo "------------------------------------------------"
923         @echo "Making hierarchy"
924         @echo "------------------------------------------------"
925         ${SHELL} ${scriptdir}/mkinstalldirs ${prefix}
926         ${MTREE_CMD} -Ude -f ${mtreedir}/VJ.install.dist -p ${prefix}