Boost logo

Boost :

From: Dan Gohman (gohmandj_at_[hidden])
Date: 2001-12-13 18:08:02


Martin,

I have a mipspro-tools.jam file that I have been using. I haven't
submitted it yet because I'm still figuring out the library-building
stuff, but it largely has what's needed to compile Boost code.

The MIPSPRO_CFLAGS, MIPSPRO_C++FLAGS, and MIPSPRO_LINKFLAGS
variables are flags that I used for things that need to be
specified no matter what variants are in effect, but I wasn't
able to get CFLAGS and the others to work for this. There's
probably some obvious way to do this that I'm missing. Can anyone
help with this?

Dan

Here's my current mipspr-tools.jam:

# A lot of this came from gcc-tools.jam

# compute directories for invoking MIPSPRO
MIPSPRO_BIN_DIRECTORY ?= $(MIPSPRO_ROOT_DIRECTORY)$(SLASH)bin$(SLASH) ;
MIPSPRO_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if MIPSPRO_ROOT_DIRECTORY not set
MIPSPRO_INCLUDE_DIRECTORY ?= $(MIPSPRO_ROOT_DIRECTORY)$(SLASH)include ;
MIPSPRO_STDLIB_DIRECTORY ?= $(MIPSPRO_ROOT_DIRECTORY)$(SLASH)lib ;

# CFLAGS is used for C++ as well as C
MIPSPRO_CFLAGS = -LANG:std -OPT:Olimit=0 -OPT:IEEE_NaN_inf=ON ;
MIPSPRO_C++FLAGS = -I"boost/compatibility/cpp_c_headers" ;
MIPSPRO_LINKFLAGS = -LANG:std ;

flags mipspro LINKFLAGS <runtime-link>static : -non_shared ;
flags mipspro CFLAGS <debug-symbols>on : -g ;
flags mipspro LINKFLAGS <debug-symbols>on : -g ;
flags mipspro CFLAGS <optimization>off : -O0 ;
flags mipspro CFLAGS <optimization>speed : -O3 ;

flags mipspro CFLAGS <optimization>space : -O2 ;
flags mipspro CFLAGS <inlining>off : -INLINE:none ;
flags mipspro CFLAGS <inlining>full : -INLINE:all ;

flags mipspro STDHDRS : $(MIPSPRO_INCLUDE_DIRECTORY) ;
flags mipspro STDLIBPATH : $(MIPSPRO_STDLIB_DIRECTORY) ;

flags mipspro LINKFLAGS <target-type>DLL : -shared ;

flags mipspro HDRS <include> ;
flags mipspro UNDEFS <undef> ;
flags mipspro DEFINES <define> ;
flags mipspro CFLAGS <cflags> ;
flags mipspro C++FLAGS <cxxflags> ;
flags mipspro LIBPATH <library-path> ;
flags mipspro NEEDLIBS <library-file> ;
flags mipspro FINDLIBS <find-library> ;

#### Link ####

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

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

#### Cc #####

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

actions mipspro-Cc-action
{
    $(MIPSPRO_BIN_DIRECTORY)cc -c -U$(UNDEFS) -D$(DEFINES) $(MIPSPRO_CFLAGS) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

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

actions mipspro-C++-action
{
    $(MIPSPRO_BIN_DIRECTORY)CC -c -U$(UNDEFS) -D$(DEFINES) $(MIPSPRO_CFLAGS) $(MIPSPRO_C++FLAGS) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### Archive ####

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

actions updated together piecemeal mipspro-Archive-action
{
    ar ru "$(<:T)" "$(>:T)"
}

-- 
Dan Gohman
gohmandj_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk