Boost logo

Boost-Build :

Subject: Re: [Boost-build] Implementing a complex Makefile process in Jam/Boost.Build
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-04-01 02:42:50

On Saturday 28 March 2009 03:49:12 Scott Long wrote:
> I guess I should make my question more specific.
> I understand (in concept) how to use rules to produce some of these
> build steps. The problem is that there is more than one type of ".c"
> file -- a stub input module (real code), and an intermediate module
> (array of bytes of compiled code).
> I don't understand how to use rules to make these two phases
> different, because both of them end in ".c"

Yes, this might require some additional work. The last product that requires
special handling is stubN.bin.c -- once you get this, everything else
can be handled by:

        lib stub : ... : <link>static ;

stubN.bin.c is produced from some other target using a tool that you build
yourself. Such usage of custom-built tools is a popular question that is
not addressed in the manual. I've just added a code example for that, see:

In your case, you would have to explicitly define a 'make' metatarget named


Now, you also need to produce stubN.bin. I think it's easiest to just use another
'make' metatarget to run objcopy. To produce stubN, you probably need this:

   path-constant LDSCRIPT : ldscript ;
   exe stubN : stubN.c util.c : <linkflags>-Wl,-T$(LDSCRIPT) .... ;

.... should be probably replaced by some gcc options that tell it
not to link to standard libraries -- I guess -nostdlib should work.

Let me know if this helps.

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at