root/juggler/tags/1.0.7/Makefile.in

Revision 10398, 59.7 kB (checked in by patrickh, 6 years ago)

We no longer have to use -O when building OpenGL Performer code on Linux.

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