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

Revision 21069, 15.2 kB (checked in by patrick, 8 months ago)

MFT r21067: Handle Boost 1.35 where the new library Boost.System is a

dependency of Boost.Filesystem.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # ***************** <VPR heading BEGIN do not edit this line> *****************
2 #
3 # VR Juggler Portable Runtime
4 #
5 # Original Authors:
6 #   Allen Bierbaum, Patrick Hartling, Kevin Meinert, Carolina Cruz-Neira
7 #
8 # ****************** <VPR heading END do not edit this line> ******************
9
10 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
11 #
12 # VR Juggler is (C) Copyright 1998-2007 by Iowa State University
13 #
14 # Original Authors:
15 #   Allen Bierbaum, Christopher Just,
16 #   Patrick Hartling, Kevin Meinert,
17 #   Carolina Cruz-Neira, Albert Baker
18 #
19 # This library is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU Library General Public
21 # License as published by the Free Software Foundation; either
22 # version 2 of the License, or (at your option) any later version.
23 #
24 # This library is distributed in the hope that it will be useful,
25 # but WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27 # Library General Public License for more details.
28 #
29 # You should have received a copy of the GNU Library General Public
30 # License along with this library; if not, write to the
31 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32 # Boston, MA 02111-1307, USA.
33 #
34 # *************** <auto-copyright.pl END do not edit this line> ***************
35
36 # -----------------------------------------------------------------------------
37 # Specialized include file for the top-level makefile.  Targets and variables
38 # needed for building the whole source tree are provided here.  This file
39 # should only be included by the top-level makefile.  It is written in such a
40 # way that no assumptions are made by this file about what the including file
41 # provides except that it includes make.defs.mk.
42 #
43 # Generated for use on @PLATFORM@
44 # -----------------------------------------------------------------------------
45
46 # Variables whose values are specific to this file.
47 data_subdir=    @data_subdir@
48 includedir=     @includedir@/vpr
49 instlinks=      $(topdir)/instlinks
50 srcdir=         @srcdir@
51 top_srcdir=     @top_srcdir@
52
53 BOOST_VERSION=  @BOOST_VERSION_DOT@
54 NSPR_VERSION=   @NSPR_VER@
55
56 ifeq (@SUBSYSTEM@, NSPR)
57    USE_NSPR=    Y
58 else
59    USE_NSPR=    N
60 endif
61
62 # Extra compiler and linker options needed only by this file.
63 DBG_FLAGS=      -DJUGGLER_DEBUG @DBG_FLAGS@
64 OPT_FLAGS=      -DJUGGLER_OPT -DNDEBUG @OPT_FLAGS@
65
66 # =============================================================================
67 # Build and installation directory naming and ownership information.
68 # =============================================================================
69 DEFAULT_DIR=    $(OPT_DIR)
70
71 # If we have a name for the install group, define group-setting options for
72 # UNIX commands (chown(1), chgrp(1)) and for local Perl scripts
73 # (makefiles-gen.pl in particular).
74 ifdef GROUP_NAME
75    _GROUP_OPT_PL=       --gname="$(GROUP_NAME)"
76 endif
77
78 # --------------------------------------------
79 # Library build information.
80 # --------------------------------------------
81 LIBRARY_VERSION=        @LIBRARY_VERSION@
82
83 # We will name the static libraries differently than the dynamic libraries.
84 ifeq (@OS_TYPE@, Win32)
85 STATIC_SUFFIX=  _s
86 endif
87
88 ifeq (@HAVE_LD_SONAME@, Y)
89 CC_SONAME_FLAG= @CC_SONAME_FLAG@
90 LDOPTS+=        $(CC_SONAME_FLAG)$(notdir $@)
91 endif
92
93 # Add extra linking options on Darwin/OS X.
94 ifeq (@PLATFORM@, Darwin)
95 LDOPTS+=        -Wl,-dylib_compatibility_version,$(MAJOR_VERSION).$(MINOR_VERSION)
96 LDOPTS+=        -Wl,-dylib_current_version,$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
97 LDOPTS_DBG=     -g
98 LDOPTS_OPT=     -Wl,-x
99 endif
100
101 DYLIB_DEPS=             @DYLIB_DEPS@
102 DYLIB_DEP_FILES=        @DYLIB_DEP_FILES@
103 STATICLIB_EXT=          @STATICLIB_EXT@
104 DYNAMICLIB_EXT=         @DYNAMICLIB_EXT@
105
106 # These functions build up the name of the library using a comon form.
107 # Unfortunately, spaces have significance in GNU Make function calls, so there
108 # cannot be spaces after any commas.
109 make_libname=           $(1)$(2)$(LIBRARY_VERSION).$(3)
110 make_static=            $(call make_libname,$(1),$(STATIC_SUFFIX),$(STATICLIB_EXT))
111 make_dynamic=           $(call make_libname,$(1),,$(DYNAMICLIB_EXT))
112 make_static_prof=       $(call make_libname,$(1),$(PROFLIB_EXT)$(STATIC_SUFFIX),$(STATICLIB_EXT))
113 make_dynamic_prof=      $(call make_libname,$(1),$(PROFLIB_EXT),$(DYNAMICLIB_EXT))
114
115 # Full list of the libraries to build. These are for Doozer++.
116 LIBS=                   $(VPR_LIBRARY)
117 STATIC_LIBS=            $(call make_static,$${LIB})
118 DYNAMIC_LIBS=           $(call make_dynamic,$${LIB})
119 PROF_STATIC_LIBS=       $(call make_static_prof,$${LIB})
120 PROF_DYNAMIC_LIBS=      $(call make_dynamic_prof,$${LIB})
121
122 # The proper library names. These are used below in the targets that actually
123 # build the libraries.
124 VPR_LIB_STATIC=         $(call make_static,$(VPR_LIBRARY))
125 VPR_LIB_DYNAMIC=        $(call make_dynamic,$(VPR_LIBRARY))
126 VPR_PROF_LIB_STATIC=    $(call make_static_prof,$(VPR_LIBRARY))
127 VPR_PROF_LIB_DYNAMIC=   $(call make_dynamic_prof,$(VPR_LIBRARY))
128
129 # Version information.
130 PARAM_HEADER=   vpr/vprParam.h
131 BRANCH=         trunk
132 CANON_NAME=     Manwe
133 VER_ARGS=       -f $(VPRROOT_ABS)/VERSION -s @SUBSYSTEM@ -b $(BRANCH)   \
134                 -n "$(CANON_NAME)" -d "`date '+%b %e, %Y %H:%M:%S'`"
135
136 ifdef VERSION
137    VER_ARGS+=   -v $(VERSION)
138 endif
139
140 # =============================================================================
141 # Library targets.
142 # =============================================================================
143 OBJS=           $(OBJDIR)/*.$(OBJEXT)
144 BEFOREBUILD=    beforebuild
145 AFTERBUILD=     afterbuild
146
147 # Things to do before the object files and library are built.
148 beforebuild: $(PARAM_HEADER)
149
150 $(PARAM_HEADER): $(VPRROOT_ABS)/$(PARAM_HEADER).in $(VPRROOT_ABS)/VERSION
151         @$(MKINSTALLDIRS) $(instlinks)
152         @$(MAKE) clean-version-links
153         @$(SHELL) $(scriptdir)/make-ver.sh -o $@                        \
154           -i $(VPRROOT_ABS)/$@.in $(VER_ARGS)
155
156 # Things to do after the object files and library are built.
157 afterbuild:
158         @$(MAKE) links
159         @echo ""
160         @echo "---------------------------------------------------------------"
161         @echo 'You should now set $$VPR_BASE_DIR to:'
162         @cd $(instlinks) && echo "  `pwd`"
163         @echo "---------------------------------------------------------------"
164
165 # -----------------------------------------------
166 # Construct the static version of the libraries.
167 # -----------------------------------------------
168 $(LIBDIR)/$(VPR_LIB_STATIC) $(LIBDIR)/$(VPR_PROF_LIB_STATIC): $(OBJS)
169         @echo "------------------------------------------------"
170         @echo "Creating $@"
171         @echo "------------------------------------------------"
172         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
173         $(AR) $(AR_NAME_FLAG)$@ $(OBJS)
174         $(RANLIB) $@
175         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
176         @echo "------------------------------------------------"
177         @echo "$@ done"
178         @echo "------------------------------------------------"
179
180 # ------------------------------------------------
181 # Construct the dynamic version of the libraries.
182 # ------------------------------------------------
183 $(LIBDIR)/$(VPR_LIB_DYNAMIC) $(LIBDIR)/$(VPR_PROF_LIB_DYNAMIC): $(OBJS) $(DYLIB_DEP_FILES)
184         @echo "------------------------------------------------"
185         @echo "Creating $@"
186         @echo "------------------------------------------------"
187         @$(SHELL) $(MKINSTALLDIRS) $(LIBDIR)
188 ifeq (@PLATFORM@, Darwin)
189 ifeq ($(ISA), universal)
190         for a in $(UNIVERSAL_ARCH_LIST) ; do                            \
191             ld -arch $$a -dynamic -r -d -bind_at_load -o                \
192               $(subst .dylib,-$$a.lo,$@) $(OBJS) ;                      \
193          done
194         lipo -create $(foreach arch,$(UNIVERSAL_ARCH_LIST),$(subst .dylib,-$(arch).lo,$@)) -output $(subst .dylib,.lo,$@)
195 else
196         ld -dynamic -r -d -bind_at_load -o $(subst .dylib,.lo,$@) $(OBJS)
197 endif
198         $(CXX) $(EXTRA_LDOPTS) -Wl,-dynamic -nostartfiles -Wl,-dylib    \
199           -Wl,-ldylib1.o $(LDOPTS) -o $@ $(subst .dylib,.lo,$@)         \
200           $(DYLIB_DEPS)
201         rm -f $(@D)/*.lo
202 else
203         $(CXX_DLL) $(LDOPTS) $(DYLIB_NAME_FLAG) $(OBJS) $(DYLIB_DEPS)
204 endif
205 ifeq (@OS_TYPE@, Win32)
206         cd $(LIBDIR_BASE) && cp $(LIBDIR)/* .
207 else
208         cd $(LIBDIR_BASE) && $(RM_LN) $(@F) && $(LN_S) $@ ./
209 endif
210         @echo "------------------------------------------------"
211         @echo "$@ done"
212         @echo "------------------------------------------------"
213
214 # =============================================================================
215 # Make links for developer use that provide the needed functionality for
216 # the $VPR_BASE_DIR environment variable to be used when needed.
217 # $VPR_BASE_DIR should be set to $(instlinks).
218 # =============================================================================
219 links:
220         @echo "------------------------------------------------"
221         @echo "Setting up developer installation"
222         @echo "------------------------------------------------"
223         $(SHELL) $(MKINSTALLDIRS) $(instlinks)/share/flagpoll
224         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
225           $(EXTRA_INSTALL_ARGS) $(topdir)/vpr.fpc                       \
226           $(instlinks)/share/flagpoll/vpr.fpc
227         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
228           $(EXTRA_INSTALL_ARGS) $(topdir)/boost*.fpc                    \
229           $(instlinks)/share/flagpoll
230 ifeq ($(USE_NSPR), Y)
231         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
232           $(topdir)/nspr.fpc $(instlinks)/share/flagpoll
233 endif
234 ifdef BUILD_TYPE
235         $(MAKE) links-$(BUILD_TYPE)
236 else
237         $(MAKE) links-dbg
238 endif
239
240 clean-version-links:
241         @rm -rf $(LIBDIR_BASE)
242         @rm -rf $(instlinks)/include/vpr* $(instlinks)/$(data_subdir)/vpr*
243         @rm -f $(instlinks)/lib$(LIBBITSUF)/flagpoll/vpr*
244         @for l in $(LIBS) ; do                                          \
245             find $(instlinks) -name "$$l*" -exec rm {} ';' ;            \
246          done
247
248 links-all:
249         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" installworld
250
251 links-dbg:
252         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-debug
253
254 links-opt:
255         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-optim
256
257 links-prof:
258         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-profiled
259
260 links-prof-libs:
261         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-prof
262         @$(MAKE) EXTRA_INSTALL_ARGS=-l prefix="$(instlinks)" install-prof-dso
263
264 # Remove the links in $(instlinks).  We cannot do this in the global build,
265 # however, because it would blow away links set up by our dependencies.
266 clean-links:
267 ifndef GLOBAL_BUILD
268         @echo "------------------------------------------------"
269         @echo "Removing developer installation links"
270         @echo "------------------------------------------------"
271         rm -rf $(instlinks)
272 endif
273
274 # =============================================================================
275 # Installation targets.  The default (what is done by 'install') is to install
276 # the static debugging version of the libraries.  The steps taken for a full
277 # installation are:
278 #
279 #     1) Create the full installation directory hierarchy.
280 #     2) Install the libraries.
281 #     3) Install the header files.
282 #     4) Install the test programs.
283 #     5) Install the contents of the Data directory.
284 #     6) Install the Java-based config editor (if possible).
285 # =============================================================================
286
287 BEFOREINSTALL=  beforeinstall
288 AFTERINSTALL=   afterinstall
289
290 # Steps to take before beginning the installation process.  This target is
291 # independent of the current ABI.
292 beforeinstall:
293         @$(MAKE) hier
294
295 # Make the full directory hierarchy for the installation.
296 hier:
297         @echo "------------------------------------------------"
298         @echo "Making hierarchy"
299         @echo "------------------------------------------------"
300         $(SHELL) $(MKINSTALLDIRS) $(prefix)
301         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.install.dist -p $(prefix)
302         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
303         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.include.dist -p $(prefix)
304         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.lib.dist -p $(prefix)
305         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.test.dist -p $(projdatadir)
306
307 # Steps to take after the installation process is complete.  This target is
308 # independent of the current ABI.
309 afterinstall:
310         @echo "==============================================================="
311         @echo "VPR installation complete"
312         @echo "==============================================================="
313
314 PREINSTALL=     pre-install
315 POSTINSTALL=    post-install
316
317 pre-install:
318         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.lib.dist -p $(prefix)
319
320 # Do everything needed after installing the library binaries.
321 post-install:
322         @$(MAKE) install-test
323         @$(MAKE) install-m4
324         @$(MAKE) install-flagpoll
325
326 PREINSTALL_HEADERS=     pre-install-headers
327 POSTINSTALL_HEADERS=    post-install-headers
328
329 pre-install-headers:
330         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.include.dist -p $(prefix)
331
332 post-install-headers:
333         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
334           $(EXTRA_INSTALL_ARGS) $(topdir)/vpr/vprDefines.h $(includedir)
335         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
336           $(EXTRA_INSTALL_ARGS) $(topdir)/vpr/vprParam.h $(includedir)
337
338 # Install the test programs.
339 install-test:
340         @echo "------------------------------------------------"
341         @echo "Installing test programs"
342         @echo "------------------------------------------------"
343         $(SHELL) $(MKINSTALLDIRS) $(projdatadir)
344         $(MTREE_CMD) -Ude -f $(mtreedir)/VPR.test.dist -p $(projdatadir)
345         $(PERL) $(scriptdir)/install-src.pl -i $(top_srcdir)/test       \
346           -m $(FILE_PERMS) $(GROUP_OPT_UNIX) -o $(projdatadir)/test
347         $(PERL) $(scriptdir)/makefiles-gen.pl --mode="$(FILE_PERMS)"    \
348           --prefix="$(projdatadir)/test" --vars="$(topdir)/VARS.pl"     \
349           --startdir="$(top_srcdir)/test" $(_GROUP_OPT_PL) --srcdir="."
350
351 install-m4:
352         @echo "------------------------------------------------"
353         @echo "Installing Autoconf m4 macros"
354         @echo "------------------------------------------------"
355         $(SHELL) $(MKINSTALLDIRS) $(datadir)/aclocal
356         $(INSTALL) -m $(FILE_PERMS) $(EXTRA_INSTALL_ARGS)               \
357           $(GROUP_OPT_UNIX) $(JUGGLERROOT_ABS)/macros/vrj-helpers.m4    \
358           $(datadir)/aclocal
359         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
360           $(EXTRA_INSTALL_ARGS) $(JUGGLERROOT_ABS)/macros/vpr.m4        \
361           $(datadir)/aclocal
362
363 install-flagpoll:
364         @echo "------------------------------------------------"
365         @echo "Installing Flagpoll metadata file"
366         @echo "------------------------------------------------"
367         $(SHELL) $(MKINSTALLDIRS) $(libdir)$(LIBBITSUF)/flagpoll
368         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
369           $(topdir)/vpr.fpc                                             \
370           $(libdir)$(LIBBITSUF)/flagpoll/vpr-$(VERSION_DOT).$(PLATFORM).$(ISA).fpc
371         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
372           $(topdir)/boost.fpc                                           \
373           $(libdir)$(LIBBITSUF)/flagpoll/boost-$(BOOST_VERSION).$(ISA).fpc
374         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
375           $(topdir)/boost_system.fpc                                    \
376           $(libdir)$(LIBBITSUF)/flagpoll/boost_system-$(BOOST_VERSION).$(ISA).fpc
377         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
378           $(topdir)/boost_filesystem.fpc                                \
379           $(libdir)$(LIBBITSUF)/flagpoll/boost_filesystem-$(BOOST_VERSION).$(ISA).fpc
380         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
381           $(topdir)/boost_signals.fpc                                   \
382           $(libdir)$(LIBBITSUF)/flagpoll/boost_signals-$(BOOST_VERSION).$(ISA).fpc
383 ifeq ($(USE_NSPR), Y)
384         $(INSTALL) -m $(FILE_PERMS) $(GROUP_OPT_UNIX)                   \
385           $(topdir)/nspr.fpc                                            \
386           $(libdir)$(LIBBITSUF)/flagpoll/nspr-$(NSPR_VERSION).$(ISA).fpc
387 endif
388
389 # =============================================================================
390 # Clean-up targets.  '_clobber' removes the developer installation links.
391 # =============================================================================
392 _clobber:
393         @$(MAKE) cleandepend
394         @$(MAKE) clean-links
395
396 # Define $(_LOCAL_CLOBBER) to inform the shared 'clobber' target that there is
397 # a '_clobber' target to be run besides the standard targets.
398 _LOCAL_CLOBBER= 1
399
400 include $(MKPATH)/dpp.libs.mk
401 include $(MKPATH)/dpp.clean.mk
402
403 CLEAN_FILES+=   $(PARAM_HEADER)
404 CLEAN_DIRS+=    $(BUILDDIR_BASE) $(LIBDIR_NAME)
405 CLOBBER_DIRS+=  $(BUILDDIR_BASE) $(LIBDIR_NAME)
Note: See TracBrowser for help on using the browser.