# (C) Copyright Toon Knapen 2001, Markus Schoepflin 2002, 2003.
#
# 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
# version 6.0
#
# These settings are created and tested with VisualAge running on
# IBM/Aix 4.3.3.0. They should also work for VisualAge on Windows NT,
# OS/2 and AS/400.
# The following #// line will be used by the regression test table generation
# program as the column heading for HTML tables. Must not include version number.
#//IBM
VisualAge
C++
# The default tool path is declared as empty. This looks for the tools in
# the current path. You can overide this in derived toolsets.
set-as-singleton VA_TOOL_PATH ;
flags vacpp VA_TOOL_PATH ;
VA_TOOL_PATH = "" ;
# Select the compiler name according to the threading model.
flags vacpp VA_C_COMPILER single : xlc ;
flags vacpp VA_C_COMPILER multi : xlc_r ;
flags vacpp VA_CXX_COMPILER single : xlC ;
flags vacpp VA_CXX_COMPILER multi : xlC_r ;
# This disables the automatic generation of separate include files for
# template functions and class declarations.
flags vacpp C++FLAGS : -qnotempinc ;
# The following is needed to get rid of most of the annoying linker warnings
# about duplicated symbols when you use templates.
flags vacpp C++FLAGS : -qfuncsect ;
# This tells the linker not to link unneeded object files from static
# libraries. Please note that this means that a static constructor
# contained in such an object file won't be invoked.
flags vacpp LINKFLAGS : -qtwolink ;
flags vacpp CFLAGS off : -qNOOPTimize ;
flags vacpp CFLAGS default : -O ;
flags vacpp CFLAGS speed : -O3 -qstrict ;
flags vacpp CFLAGS space : -O2 -qcompact ;
flags vacpp CFLAGS off : -qnoinline ;
flags vacpp CFLAGS on : -qinline ;
flags vacpp CFLAGS full : -qinline ;
flags vacpp C++FLAGS off : -qnoeh ;
flags vacpp C++FLAGS on : -qeh ;
flags vacpp C++FLAGS off : -qnortti ;
flags vacpp C++FLAGS on : -qrtti ;
flags vacpp LINKFLAGS static : -bstatic ;
# We want the full path to the sources in the debug symbols because otherwise
# the debugger won't find the sources when we use boost.build.
flags vacpp CFLAGS on : -g -qfullpath ;
flags vacpp LINKFLAGS on : -g ;
flags vacpp LINKFLAGS off : -s ;
flags vacpp CFLAGS on : -pg ;
flags vacpp LINKFLAGS on : -pg ;
flags vacpp CFLAGS ;
flags vacpp C++FLAGS ;
flags vacpp DEFINES ;
flags vacpp UNDEFS ;
flags vacpp HDRS ;
flags vacpp SYSHDRS ;
flags vacpp LINKFLAGS ;
flags vacpp ARFLAGS ;
flags vacpp LIBPATH ;
flags vacpp NEEDLIBS ;
flags vacpp FINDLIBS ;
if ! $(ARFLAGS)
{
flags xlc ARFLAGS : "" ;
}
# Clear the STDHDRS variable which contains /usr/include. Vacpp does not like
# that this sys directory is included (vacpp related headers are in
# /usr/vacpp/include)
STDHDRS = ;
#### Link ####
rule Link-action
{
if $(gTARGET_TYPE($(<))) = EXE
{
LINKFLAGS on $(<) += -brtl ;
}
if $(gTARGET_TYPE($(<))) in $(SHARED_TYPES)
{
LINKFLAGS on $(<) += -G ;
}
xlc-Link-action $(<) : $(>) ;
}
# for xlc, we repeat all libraries so that dependencies are always resolved
actions xlc-Link-action bind NEEDLIBS
{
$(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH)$(gAPPEND_LD_LIBRARY_PATH)
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
$(VA_CXX_COMPILER:R=$(VA_TOOL_PATH)) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -bdynamic -l$(FINDLIBS)
}
#### Cc #####
rule Cc-action
{
xlc-Cc-action $(<) : $(>) ;
}
# Always allow C++ comments in C source files!
actions xlc-Cc-action
{
$(VA_C_COMPILER:R=$(VA_TOOL_PATH)) -qcpluscmt -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
}
#### C++ ####
rule C++-action
{
xlc-C++-action $(<) : $(>) ;
}
actions xlc-C++-action
{
$(VA_CXX_COMPILER:R=$(VA_TOOL_PATH)) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
}
#### Archive ####
rule Archive-action
{
xlc-Archive-action $(<) : $(>) ;
}
actions updated together piecemeal xlc-Archive-action
{
ar ru$(ARFLAGS) "$(<)" "$(>)"
}