root/juggler/branches/2.2/modules/vrjuggler/Makefile.inc.in

Revision 20957, 23.1 kB (checked in by patrick, 1 year ago)

MFT r20954: Removed the -m option used with ld(1) on Mac OS X. The Juggler

libraries do not have multiply defined symbols to ignore, and that
option is obsolete in Mac OS X 10.5.

  • 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-2007 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 # *************** <auto-copyright.pl END do not edit this line> ***************
26
27 # -----------------------------------------------------------------------------
28 # Specialized include file for the top-level makefile.  Targets and variables
29 # needed for building the whole source tree are provided here.  This file
30 # should only be included by the top-level makefile.  It is written in such a
31 # way that no assumptions are made by this file about what the including file
32 # provides except that it includes make.defs.mk.
33 #
34 # Generated for use on @PLATFORM@
35 # -----------------------------------------------------------------------------
36
37 # Variables whose values are specific to this file.
38 data_subdir=    @data_subdir@
39 includedir=     @includedir@
40 instlinks=      $(topdir)/instlinks
41 srcdir=         @srcdir@
42 top_srcdir=     @top_srcdir@
43
44 # Extra compiler and linker options needed only by this file.
45 DBG_FLAGS=      -DJUGGLER_DEBUG @DBG_FLAGS@
46 OPT_FLAGS=      -DJUGGLER_OPT -DNDEBUG @OPT_FLAGS@
47
48 # =============================================================================
49 # Build and installation directory naming and ownership information.
50 # =============================================================================
51 DEFAULT_DIR=    $(OPT_DIR)
52
53 # If we have a name for the install group, define group-setting options for
54 # UNIX commands (chown(1), chgrp(1)) and for local Perl scripts
55 # (makefiles-gen.pl in particular).
56 ifdef GROUP_NAME
57    _GROUP_OPT_PL=       --gname="$(GROUP_NAME)"
58 endif
59
60 # --------------------------------------------
61 # Library build information.
62 # --------------------------------------------
63 LIBRARY_VERSION=        @LIBRARY_VERSION@
64
65 # We will name static libs different dynamic libraries on Win32.
66 ifeq (@OS_TYPE@, Win32)
67 STATIC_SUFFIX=  _s
68 endif
69
70 ifeq (@HAVE_LD_SONAME@, Y)
71 CC_SONAME_FLAG= @CC_SONAME_FLAG@
72 LDOPTS+=        $(CC_SONAME_FLAG)$(notdir $@)
73 endif
74
75
76 # Add extra linking options on Darwin/OS X.
77 ifeq (@PLATFORM@, Darwin)
78 LDOPTS+=        -Wl,-dylib_compatibility_version,$(MAJOR_VERSION).$(MINOR_VERSION)
79 LDOPTS+=        -Wl,-dylib_current_version,$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
80 LDOPTS_DBG=     -g
81 LDOPTS_OPT=     -Wl,-x
82 endif
83
84 # Dependencies for each of the various dynamic libraries we build.
85 DYLIB_DEPS=             @DYLIB_DEPS@
86 DYLIB_PROF_DEPS=        @DYLIB_PROF_DEPS@
87 STATICLIB_EXT=          @STATICLIB_EXT@
88 DYNAMICLIB_EXT=         @DYNAMICLIB_EXT@
89
90 # These functions build up the name of the library using a comon form.
91 # Unfortunately, spaces have significance in GNU Make function calls, so there
92 # cannot be spaces after any commas.
93 make_libname=           $(1)$(2)$(LIBRARY_VERSION).$(3)
94 make_static=            $(call make_libname,$(1),$(STATIC_SUFFIX),$(STATICLIB_EXT))
95 make_dynamic=           $(call make_libname,$(1),,$(DYNAMICLIB_EXT))
96 make_static_prof=       $(call make_libname,$(1),$(PROFLIB_EXT)$(STATIC_SUFFIX),$(STATICLIB_EXT))
97 make_dynamic_prof=      $(call make_libname,$(1),$(PROFLIB_EXT),$(DYNAMICLIB_EXT))
98
99
100 # Full list of the libraries to build.
101 LIBS=           $(VJ_LIBRARY)
102
103 ifeq ($(GL_API), Y)
104    LIBS+=       $(GL_LIBRARY)
105 endif
106
107 ifeq ($(PF_API), Y)
108    LIBS+=       $(PF_LIBRARY)
109 endif
110
111 # Full list of the libraries to build. These are for Doozer++.
112 STATIC_LIBS=            $(call make_static,$${LIB})
113 DYNAMIC_LIBS=           $(call make_dynamic,$${LIB})
114 PROF_STATIC_LIBS=       $(call make_static_prof,$${LIB})
115 PROF_DYNAMIC_LIBS=      $(call make_dynamic_prof,$${LIB})
116
117 # Dependencies for each of the various dynamic libraries we build.
118 DYLIB_DEPS_VJ=                  @DYLIB_DEPS_VJ@
119 DYLIB_DEPS_GL=                  @DYLIB_DEPS_GL@
120 DYLIB_DEPS_PF=                  @DYLIB_DEPS_PF@
121 DYLIB_DEP_FILES_VJ=             @DYLIB_DEP_FILES_VJ@
122 DYLIB_DEP_FILES_GL=             @DYLIB_DEP_FILES_GL@
123 DYLIB_DEP_FILES_PF=             @DYLIB_DEP_FILES_PF@
124 DYLIB_PROF_DEPS_VJ=             @DYLIB_PROF_DEPS_VJ@
125 DYLIB_PROF_DEPS_GL=             @DYLIB_PROF_DEPS_GL@
126 DYLIB_PROF_DEPS_PF=             @DYLIB_PROF_DEPS_PF@
127 DYLIB_PROF_DEP_FILES_VJ=        @DYLIB_PROF_DEP_FILES_VJ@
128 DYLIB_PROF_DEP_FILES_GL=        @DYLIB_PROF_DEP_FILES_GL@
129 DYLIB_PROF_DEP_FILES_PF=        @DYLIB_PROF_DEP_FILES_PF@
130
131 VJ_LIB_STATIC=          $(call make_static,$(VJ_LIBRARY))
132 VJ_LIB_DYNAMIC=         $(call make_dynamic,$(VJ_LIBRARY))
133 VJ_PROF_LIB_STATIC=     $(call make_static_prof,$(VJ_LIBRARY))
134 VJ_PROF_LIB_DYNAMIC=    $(call make_dynamic_prof,$(VJ_LIBRARY))
135 GL_LIB_STATIC=          $(call make_static,$(GL_LIBRARY))
136 GL_LIB_DYNAMIC=         $(call make_dynamic,$(GL_LIBRARY))
137 GL_PROF_LIB_STATIC=     $(call make_static_prof,$(GL_LIBRARY))
138 GL_PROF_LIB_DYNAMIC=    $(call make_dynamic_prof,$(GL_LIBRARY))
139 PF_LIB_STATIC=          $(call make_static,$(PF_LIBRARY))
140 PF_LIB_DYNAMIC=         $(call make_dynamic,$(PF_LIBRARY))
141 PF_PROF_LIB_STATIC=     $(call make_static_prof,$(PF_LIBRARY))
142 PF_PROF_LIB_DYNAMIC=    $(call make_dynamic_prof,$(PF_LIBRARY))
143
144 # Version information.
145 PARAM_HEADER=   vrj/vrjParam.h
146 BRANCH=         trunk
147 CANON_NAME=     Illuvatar
148 VER_ARGS=       -f $(VJROOT_ABS)/VERSION -s @VPR_SUBSYSTEM@             \
149                 -b $(BRANCH) -n "$(CANON_NAME)"                         \
150                 -d "`date '+%b %e, %Y %H:%M:%S'`"
151
152 ifdef VERSION
153    VER_ARGS+=   -v $(VERSION)
154 endif
155
156 # =============================================================================
157 # Library targets.
158 # =============================================================================
159
160 BEFOREBUILD=    beforebuild
161 AFTERBUILD=     afterbuild
162
163 # Things to do before the object files and library are built.
164 beforebuild: $(PARAM_HEADER)
165
166 $(PARAM_HEADER): $(VJROOT_ABS)/$(PARAM_HEADER).in $(VJROOT_ABS)/VERSION
167         @$(MAKE) clean-version-links
168         @$(SHELL) $(scriptdir)/make-ver.sh -o $@                \
169           -i $(VJROOT_ABS)/$@.in $(VER_ARGS)
170
171 # Things to do after the object files and library are built.
172 afterbuild:
173         @$(MAKE) links
174         @echo ""
175         @echo "---------------------------------------------------------------"
176         @echo 'You must now set $$VJ_BASE_DIR to:'
177         @cd $(instlinks) && echo "  `pwd`"
178         @echo ""
179         @echo 'and extend your path to include $$VJ_BASE_DIR/bin'
180         @echo "---------------------------------------------------------------"
181
182 # -----------------------------------------------
183 # Construct the static version of the libraries.
184 # -----------------------------------------------
185 $(LIBDIR)/$(VJ_LIB_STATIC) $(LIBDIR)/$(VJ_PROF_LIB_STATIC)              \
186 $(LIBDIR)/$(GL_LIB_STATIC) $(LIBDIR)/$(GL_PROF_LIB_STATIC)              \
187 $(LIBDIR)/$(PF_LIB_STATIC) $(LIBDIR)/$(PF_PROF_LIB_STATIC): $(OBJDIR)/*.$(OBJEXT)
188         @echo "------------------------------------------------"
189         @echo "Creating $@"
190         @echo "------------------------------------------------"
191         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
192         $(AR) $(AR_NAME_FLAG)$@ $(OBJDIR)/*.$(OBJEXT)
193         $(RANLIB) $@
194         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
195         @echo "------------------------------------------------"
196         @echo "$@ done"
197         @echo "------------------------------------------------"
198
199 # ------------------------------------------------
200 # Construct the dynamic version of the libraries.
201 # ------------------------------------------------
202 $(LIBDIR)/$(VJ_LIB_DYNAMIC): $(OBJDIR)/*.$(OBJEXT) $(DYLIB_DEP_FILES_VJ)
203         @echo "------------------------------------------------"
204         @echo "Creating $@"
205         @echo "------------------------------------------------"
206         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
207 ifeq (@PLATFORM@, Darwin)
208 ifeq ($(ISA), universal)
209         for a in $(UNIVERSAL_ARCH_LIST) ; do                            \
210             ld -arch $$a -dynamic -r -d -bind_at_load -o                \
211               $(subst .dylib,-$$a.lo,$@) $(OBJDIR)/*.$(OBJEXT) ;        \
212          done
213         lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@)
214 else
215         ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@)       \
216           $(OBJDIR)/*.$(OBJEXT)
217 endif
218         $(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib    \
219           -Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@)         \
220           $(DYLIB_DEPS_VJ)
221         rm -f $(@D)/*.lo
222 else
223         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJDIR)/*.$(OBJEXT)   \
224           $(DYLIB_DEPS_VJ)
225 endif
226 ifeq (@OS_TYPE@, Win32)
227         cd $(LIBDIR_BASE) && cp $(LIBDIR)/$(VJ_LIBRARY).* .
228 else
229         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
230 endif
231 ifneq ($(VJ_LIB_DYNAMIC), $(VJ_LIBRARY).$(DYNAMICLIB_EXT))
232         @for d in $(LIBDIR) $(LIBDIR_BASE) ; do                         \
233             curdir=`pwd` ;                                              \
234             cd $$d && $(RM_LN) $(VJ_LIBRARY).$(DYNAMICLIB_EXT) &&       \
235               $(LN_S) $@ ./$(VJ_LIBRARY).$(DYNAMICLIB_EXT) ;            \
236             cd $$curdir ;                                               \
237           done
238 endif
239         @echo "------------------------------------------------"
240         @echo "$@ done"
241         @echo "------------------------------------------------"
242
243 $(LIBDIR)/$(VJ_PROF_LIB_DYNAMIC): $(OBJDIR)/*.$(OBJEXT) $(DYLIB_PROF_DEP_FILES_VJ)
244         @echo "------------------------------------------------"
245         @echo "Creating $@"
246         @echo "------------------------------------------------"
247         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
248 ifeq (@PLATFORM@, Darwin)
249 ifeq ($(ISA), universal)
250         for a in $(UNIVERSAL_ARCH_LIST) ; do                            \
251             ld -arch $$a -dynamic -r -d -bind_at_load -o                \
252               $(subst .dylib,-$$a.lo,$@) $(OBJDIR)/*.$(OBJEXT) ;        \
253          done
254         lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@)
255 else
256         ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@)       \
257           $(OBJDIR)/*.$(OBJEXT)
258 endif
259         $(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib    \
260           -Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@)         \
261           $(DYLIB_PROF_DEPS_VJ)
262         rm -f $(@D)/*.lo
263 else
264         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJDIR)/*.$(OBJEXT)   \
265           $(DYLIB_PROF_DEPS_VJ)
266 endif
267 ifeq (@OS_TYPE@, Win32)
268         cd $(LIBDIR_BASE) && cp $(LIBDIR)/$(VJ_LIBRARY)$(PROFLIB_EXT).* .
269 else
270         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
271 endif
272         @echo "------------------------------------------------"
273         @echo "$@ done"
274         @echo "------------------------------------------------"
275
276 $(LIBDIR)/$(GL_LIB_DYNAMIC): $(OBJDIR)/*.$(OBJEXT) $(DYLIB_DEP_FILES_GL)
277         @echo "------------------------------------------------"
278         @echo "Creating $@"
279         @echo "------------------------------------------------"
280         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
281 ifeq (@PLATFORM@, Darwin)
282 ifeq ($(ISA), universal)
283         for a in $(UNIVERSAL_ARCH_LIST) ; do                            \
284             ld -arch $$a -dynamic -r -d -bind_at_load -o                \
285               $(subst .dylib,-$$a.lo,$@) $(OBJDIR)/*.$(OBJEXT) ;        \
286          done
287         lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@)
288 else
289         ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@)       \
290           $(OBJDIR)/*.$(OBJEXT)
291 endif
292         $(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib    \
293           -Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@)         \
294           $(DYLIB_DEPS_GL)
295         rm -f $(@D)/*.lo
296 else
297         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJDIR)/*.$(OBJEXT)   \
298           $(DYLIB_DEPS_GL)
299 endif
300 ifeq (@OS_TYPE@, Win32)
301         cd $(LIBDIR_BASE) && cp $(LIBDIR)/$(GL_LIBRARY).* .
302 else
303         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
304 endif
305         @echo "------------------------------------------------"
306         @echo "$@ done"
307         @echo "------------------------------------------------"
308
309 $(LIBDIR)/$(GL_PROF_LIB_DYNAMIC): $(OBJDIR)/*.$(OBJEXT) $(DYLIB_PROF_DEP_FILES_GL)
310         @echo "------------------------------------------------"
311         @echo "Creating $@"
312         @echo "------------------------------------------------"
313         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
314 ifeq (@PLATFORM@, Darwin)
315 ifeq ($(ISA), universal)
316         for a in $(UNIVERSAL_ARCH_LIST) ; do                            \
317             ld -arch $$a -dynamic -r -d -bind_at_load -o                \
318               $(subst .dylib,-$$a.lo,$@) $(OBJDIR)/*.$(OBJEXT) ;        \
319          done
320         lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@)
321 else
322         ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@)       \
323           $(OBJDIR)/*.$(OBJEXT)
324 endif
325         $(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib    \
326           -Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@)         \
327           $(DYLIB_PROF_DEPS_GL)
328         rm -f $(@D)/*.lo
329 else
330         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJDIR)/*.$(OBJEXT)   \
331           $(DYLIB_PROF_DEPS_GL)
332 endif
333 ifeq (@OS_TYPE@, Win32)
334         cd $(LIBDIR_BASE) && cp $(LIBDIR)/$(GL_LIBRARY)$(PROFLIB_EXT).* .
335 else
336         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
337 endif
338         @echo "------------------------------------------------"
339         @echo "$@ done"
340         @echo "------------------------------------------------"
341
342 $(LIBDIR)/$(PF_LIB_DYNAMIC): $(OBJDIR)/*.$(OBJEXT) $(DYLIB_DEP_FILES_PF)
343         @echo "------------------------------------------------"
344         @echo "Creating $@"
345         @echo "------------------------------------------------"
346         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
347         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJDIR)/*.$(OBJEXT)   \
348             $(DYLIB_DEPS_PF)
349 ifeq (@OS_TYPE@, Win32)
350         cd $(LIBDIR_BASE) && cp $(LIBDIR)/$(PF_LIBRARY).* .
351 else
352         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
353 endif
354         @echo "------------------------------------------------"
355         @echo "$@ done"
356         @echo "------------------------------------------------"
357
358 $(LIBDIR)/$(PF_PROF_LIB_DYNAMIC): $(OBJDIR)/*.$(OBJEXT) $(DYLIB_PROF_DEP_FILES_PF)
359         @echo "------------------------------------------------"
360         @echo "Creating $@"
361         @echo "------------------------------------------------"
362         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
363         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJDIR)/*.$(OBJEXT)   \
364             $(DYLIB_PROF_DEPS_PF)
365 ifeq (@OS_TYPE@, Win32)
366         cd $(LIBDIR_BASE) && cp $(LIBDIR)/$(PF_LIBRARY)$(PROFLIB_EXT).* .
367 else
368         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
369 endif
370         @echo "------------------------------------------------"
371         @echo "$@ done"
372         @echo "------------------------------------------------"
373
374 # =============================================================================
375 # Make links for developer use that provide the needed functionality for
376 # the $VJ_BASE_DIR environment variable to be used when needed.  $VJ_BASE_DIR
377 # should be set to $(instlinks).
378 # =============================================================================
379 links:
380         @echo "------------------------------------------------"
381         @echo "Setting up developer installation"
382         @echo "------------------------------------------------"
383         $(SHELL) $(MKINSTALLDIRS) $(instlinks)/share/flagpoll
384         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
385           $(EXTRA_INSTALL_ARGS) $(topdir)/vrjuggler.fpc                 \
386           $(instlinks)/share/flagpoll/vrjuggler.fpc
387 ifeq ($(GL_API), Y)
388         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
389           $(EXTRA_INSTALL_ARGS) $(topdir)/vrjuggler-opengl.fpc          \
390           $(instlinks)/share/flagpoll/vrjuggler-opengl.fpc
391 endif
392 ifeq ($(PF_API), Y)
393         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
394           $(EXTRA_INSTALL_ARGS) $(topdir)/vrjuggler-performer.fpc       \
395           $(instlinks)/share/flagpoll/vrjuggler-performer.fpc
396 endif
397 ifdef BUILD_TYPE
398         $(MAKE) links-$(BUILD_TYPE)
399 else
400         $(MAKE) links-dbg
401 endif
402
403 clean-version-links:
404         @rm -rf $(LIBDIR_BASE)
405         @rm -rf $(instlinks)/include/vrjuggler*                         \
406            $(instlinks)/lib*/vrjuggler*                                 \
407            $(instlinks)/$(data_subdir)/vrjuggler*
408         @rm -f $(instlinks)/lib$(LIBBITSUF)/flagpoll/vrjuggler*
409         @for l in $(LIBS) ; do                                          \
410             find $(instlinks) -name "$$l*" -exec rm {} ';' ;            \
411          done
412
413 links-all:
414         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" installworld
415
416 links-dbg:
417         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-debug
418
419 links-opt:
420         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-optim
421
422 links-prof:
423         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-profiled
424
425 links-prof-libs:
426         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-prof
427         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-prof-dso
428
429 # Remove the links in $(instlinks).
430 clean-links:
431 ifndef GLOBAL_BUILD
432         @echo "------------------------------------------------"
433         @echo "Removing developer installation links"
434         @echo "------------------------------------------------"
435         rm -rf $(instlinks)
436 endif
437
438 # =============================================================================
439 # Installation targets.  The default (what is done by 'install') is to install
440 # the static debugging version of the libraries.  The steps taken for a full
441 # installation are:
442 #
443 #     1) Create the full installation directory hierarchy.
444 #     2) Install the libraries.
445 #     3) Install the header files.
446 #     4) Install the test programs.
447 #     5) Install the contents of the data directory.
448 # =============================================================================
449
450 BEFOREINSTALL=  beforeinstall
451 AFTERINSTALL=   afterinstall
452
453 # Steps to take before beginning the installation process.  This target is
454 # independent of the current ABI.
455 beforeinstall:
456         @$(MAKE) hier
457
458 # Make the full directory hierarchy for the installation.
459 hier:
460         @echo "------------------------------------------------"
461         @echo "Making hierarchy"
462         @echo "------------------------------------------------"
463         $(SHELL) $(MKINSTALLDIRS) $(prefix)
464         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.install.dist -p $(prefix)
465         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
466         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.data.dist -p $(projdatadir)
467         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.include.dist -p $(prefix)
468         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.lib.dist -p $(prefix)
469         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.java.dist -p $(projdatadir)
470         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.samples.dist -p $(projdatadir)
471         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.test.dist -p $(projdatadir)
472         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.tools.dist -p $(projdatadir)
473
474 # Steps to take after the installation process is complete.  This target is
475 # independent of the current ABI.
476 afterinstall:
477         @echo "==============================================================="
478         @echo "VR Juggler installation complete"
479         @echo "==============================================================="
480
481 PREINSTALL=     pre-install
482 POSTINSTALL=    post-install
483
484 pre-install:
485         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.lib.dist -p $(prefix)
486
487 # Do everything needed after installing the library binaries.
488 post-install:
489         @$(MAKE) install-samples
490         @$(MAKE) install-test
491         @$(MAKE) install-tools
492         @$(MAKE) install-data
493         @$(MAKE) install-m4
494         @$(MAKE) install-flagpoll
495
496 PREINSTALL_HEADERS=     pre-install-headers
497
498 pre-install-headers:
499         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.include.dist -p $(prefix)
500
501 # Install the sample applications.
502 install-samples:
503         @echo "------------------------------------------------"
504         @echo "Installing sample applications"
505         @echo "------------------------------------------------"
506         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
507         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.samples.dist -p $(projdatadir)
508         $(PERL) $(scriptdir)/install-src.pl -i $(top_srcdir)/samples    \
509           -m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/samples  \
510           $(EXTRA_INSTALL_ARGS)
511         $(PERL) $(scriptdir)/makefiles-gen.pl                           \
512           --vars="$(topdir)/VARS.pl" --startdir="$(top_srcdir)/samples" \
513           --mode="$(FILE_PERMS)" $(_GROUP_OPT_PL) --srcdir="."          \
514           --prefix="$(projdatadir)/samples"
515
516 # Install the test programs.
517 install-test:
518         @echo "------------------------------------------------"
519         @echo "Installing test programs"
520         @echo "------------------------------------------------"
521         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
522         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.test.dist -p $(projdatadir)
523         $(PERL) $(scriptdir)/install-src.pl -i $(top_srcdir)/test       \
524           -m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/test     \
525           $(EXTRA_INSTALL_ARGS)
526         $(PERL) $(scriptdir)/makefiles-gen.pl --mode="$(FILE_PERMS)"    \
527           --prefix="$(projdatadir)/test" --vars="$(topdir)/VARS.pl"     \
528           --startdir="$(top_srcdir)/test" $(_GROUP_OPT_PL) --srcdir="."
529
530 # Install the user tools code.
531 install-tools:
532         @echo "------------------------------------------------"
533         @echo "Installing user tools"
534         @echo "------------------------------------------------"
535         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
536         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.tools.dist -p $(projdatadir)
537         $(PERL) $(scriptdir)/install-src.pl -i $(top_srcdir)/tools      \
538           -m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/tools    \
539           $(EXTRA_INSTALL_ARGS)
540         $(PERL) $(scriptdir)/makefiles-gen.pl                           \
541           --prefix="$(projdatadir)/tools" --vars="$(topdir)/VARS.pl"    \
542           --startdir="$(top_srcdir)/tools" --mode="$(FILE_PERMS)"       \
543           $(_GROUP_OPT_PL) --srcdir="."
544
545 # Install the standard data files.
546 install-data:
547         @echo "------------------------------------------------"
548         @echo "Installing standard data files"
549         @echo "------------------------------------------------"
550         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
551         $(MTREE_CMD) -Ude -f $(mtreedir)/VJ.data.dist -p $(projdatadir)
552         $(PERL) $(scriptdir)/install-dir.pl -i $(top_srcdir)/data       \
553           -m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/data     \
554           -v "$(topdir)/VARS.pl" $(EXTRA_INSTALL_ARGS)
555         $(PERL) $(scriptdir)/makefiles-gen.pl --mode="$(FILE_PERMS)"    \
556           --prefix="$(projdatadir)" --vars="$(topdir)/VARS.pl"          \
557           --files="$(top_srcdir)/vrj.appdefs.mk.in" $(_GROUP_OPT_PL)    \
558           --srcdir="."
559
560 install-m4:
561         @echo "------------------------------------------------"
562         @echo "Installing Autoconf m4 macros"
563         @echo "------------------------------------------------"
564         $(SHELL) $(MKINSTALLDIRS) $(datadir)/aclocal
565         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
566           $(EXTRA_INSTALL_ARGS) $(JUGGLERROOT_ABS)/macros/vrj.m4        \
567           $(datadir)/aclocal
568
569 install-flagpoll:
570         @echo "------------------------------------------------"
571         @echo "Installing Flagpoll metadata files"
572         @echo "------------------------------------------------"
573         $(SHELL) $(MKINSTALLDIRS) $(libdir)$(LIBBITSUF)/flagpoll
574         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
575           $(topdir)/vrjuggler.fpc                                       \
576           $(libdir)$(LIBBITSUF)/flagpoll/vrjuggler-$(VERSION_DOT).$(PLATFORM).$(ISA).fpc
577 ifeq ($(GL_API), Y)
578         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
579           $(topdir)/vrjuggler-opengl.fpc                                \
580           $(libdir)$(LIBBITSUF)/flagpoll/vrjuggler-opengl-$(VERSION_DOT).$(PLATFORM).$(ISA).fpc
581 endif
582 ifeq ($(PF_API), Y)
583         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
584           $(topdir)/vrjuggler-performer.fpc                             \
585           $(libdir)$(LIBBITSUF)/flagpoll/vrjuggler-performer-$(VERSION_DOT).$(PLATFORM).$(ISA).fpc
586 endif
587
588 # =============================================================================
589 # Clean-up targets.  '_clean' removes all the files in the build directories. 
590 # '_clobber' removes the $(BUILDDIR_BASE) and $(LIBDIR_NAME) directories.
591 # =============================================================================
592 _clobber:
593         @$(MAKE) cleandepend
594         @$(MAKE) clean-links
595
596 # Define $(_LOCAL_CLOBBER) to inform the shared 'clobber' target that there is
597 # a '_clobber' target to be run besides the standard target.
598 _LOCAL_CLOBBER= 1
599
600 include $(MKPATH)/dpp.libs.mk
601 include $(MKPATH)/dpp.clean.mk
602
603 CLEAN_FILES+=   $(PARAM_HEADER)
604 CLEAN_DIRS+=    $(BUILDDIR_BASE) $(LIBDIR_NAME)
605 CLOBBER_DIRS+=  $(BUILDDIR_BASE) $(LIBDIR_NAME)
Note: See TracBrowser for help on using the browser.