[jamming] Building Objects - Need to reference with grist when using them in another jam file?
bjoern.morgenthaler at comlet.de
Wed Dec 17 03:24:09 PST 2008
I'm new to jam (using bjam without boost.build on windows xp) and am facing archive'ing a library from objects that are built in another jam file.
Here's an (simplified) example:
SubDir COMPONENT_1_ROOT ;
LOCATE_TARGET = $(PRODUCT_LIB_DIR) ;
# lib archive
LibraryFromObjects component_1$(SUFLIB) :
# make $(MAIN) depend on component_1 and add component_1 to NEEDLIBS
LinkLibraries $(MAIN) : component_1 ;
SubInclude COMPONENT_1_ROOT framework_1 ;
SubInclude COMPONENT_1_ROOT framework_2 ;
SubInclude COMPONENT_1_ROOT framework_3 ;
SubDir COMPONENT_1_ROOT framework_1 ;
SubInclude COMPONENT_1_ROOT framework_1 src ;
SubDir COMPONENT_1_ROOT framework_1 src ;
LOCATE_TARGET = $(PRODUCT_OBJ_DIR)$(SLASH)component_1$(SLASH)framework_1$(SLASH)src ;
Objects object_1.c ;
(same for framework_2 building object_2 and framework_3 building object_3)
So this works fine but is there a better way to reference the objects when archive'ing the lib? For example without the added grist (just like I archive the lib within the jam file the object is built)? I understand that the rule Objects adds those grists to provide a unique object and I do not want to lose this feature.
Any suggestions how this can be made more jam like are very appreciated (without archiving a lib in each jam file an object is built).
More information about the jamming