Boost logo

Boost-Build :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-09-11 10:01:27


Hi there,

attached is a modified version of vacpp-tools.jam.

It has the following modififactions:

- Compiler name is selected based on the value of the threading feature.
"xlC" without threading and "xlC_r" with threading.

- Different compiler names for C and C++.

- Changed values for the optimization feature to be a little more
conservative.

- Added support for the features rtti and exception-handling.

The automatic selection of compiler names was implemented by "abusing"
the flags rule. It seems to work but I'm not really sure if it's the
best way to implement this.

Markus
 --------------040700060901000100070503 Content-Type: text/plain;
name="vacpp-tools.jam"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="vacpp-tools.jam"

# (C) Copyright Toon Knapen 2001. Permission to copy, use,
# modify, sell and distribute this software is granted provided this
# copyright notice appears in all copies. This software is provided
# "as is" without express or implied warranty, and with no claim as
# to its suitability for any purpose.

#
# Jam tools information for :
# IBM VisualAge C++ compiler
# version 5.0
#
# These settings are created and tested with VisualAge running on
# IBM/Aix 3.4. They should also work for VisualAge
# on Windows NT, OS/2 and AS/400.

flags vacpp CC <threading>single : xlc ;
flags vacpp CC <threading>multi : xlc_r ;

flags vacpp CXX <threading>single : xlC ;
flags vacpp CXX <threading>multi : xlC_r ;

flags vacpp C++FLAGS : -qnotempinc ;

flags vacpp CFLAGS <optimization>off : -qNOOPTimize ;
flags vacpp CFLAGS <optimization>default : -O ;
flags vacpp CFLAGS <optimization>speed : -O3 -qstrict ;
flags vacpp CFLAGS <optimization>space : -O2 -qcompact ;

flags vacpp CFLAGS <inlining>off : -qnoinline ;
flags vacpp CFLAGS <inlining>on : -qinline ;
flags vacpp CFLAGS <inlining>full : -qinline ;

flags vacpp C++FLAGS <excpetion-handling>off : -qnoeh ;
flags vacpp C++FLAGS <exception-handling>on : -qeh ;

flags vacpp C++FLAGS <rtti>off : -qnortti ;
flags vacpp C++FLAGS <rtti>on : -qrtti ;

flags vacpp LINKFLAGS <runtime-link>static : -bstatic ;
flags vacpp CFLAGS <debug-symbols>on : -g ;
flags vacpp LINKFLAGS <debug-symbols>on : -g ;
flags vacpp LINKFLAGS <debug-symbols>off : -s ;

flags vacpp CFLAGS <profiling>on : -pg ;
flags vacpp LINKFLAGS <profiling>on : -pg ;

flags vacpp CFLAGS <cflags> ;
flags vacpp C++FLAGS <cxxflags> ;
flags vacpp DEFINES <define> ;
flags vacpp UNDEFS <undef> ;
flags vacpp HDRS <include> ;
flags vacpp STDHDRS <sysinclude> ;
flags vacpp LINKFLAGS <linkflags> ;
flags vacpp ARFLAGS <arflags> ;

if ! $(ARFLAGS)
{
flags xlc ARFLAGS : "" ;
}

#### Link ####

rule Link-action
{
xlc-Link-action $(<) : $(>) ;
}

# for xlc, we repeat all libraries so that dependencies are always resolved
actions xlc-Link-action bind NEEDLIBS
{
$(CXX) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS)
}

#### Cc #####

rule Cc-action
{
xlc-Cc-action $(<) : $(>) ;
}

actions xlc-Cc-action
{
$(CC) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### C++ ####
rule C++-action
{
xlc-C++-action $(<) : $(>) ;
}

actions xlc-C++-action
{
$(CXX) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### Archive ####

rule Archive-action
{
xlc-Archive-action $(<) : $(>) ;
}

actions updated together piecemeal xlc-Archive-action
{
ar ru$(ARFLAGS) "$(<)" "$(>)"
}
 --------------040700060901000100070503--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk