Generate multiple libaries

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate multiple libaries

726 Views
davidsherman
Senior Contributor I

I have a need to have a static library subproject generate two libs.  The source doesn't change, only a couple of #defines change.  I could make an additional configuration and pass in the different definitions from the builder, but when building the complete project it would be necessary to select the right target for that library.  Is there a nice way of either a) building both configurations (giving the targets different names), or b) have the one configuration build two target libraries with different output names?  Renaming could be done in the post build steps to rename the library to something else for that alternate configuration, but is there a way to have it build both configurations?

0 Kudos
2 Replies

641 Views
BlackNight
NXP Employee
NXP Employee

Hi David,

yes, there is an option for this, see that last dialog in Build Configurations in Eclipse | MCU on Eclipse 

I hope this helps,

Erich

641 Views
davidsherman
Senior Contributor I

Thanks Erich, that's sort of what I had in mind, but it looks like that setting to build all configurations applies to all the project configurations in the project scope.   The top level project has many configurations, but one of its configurations needs this lib compiled with a different option.  I think I have a workaround; the different lib build generates a different name for the lib, so the project that needs that specific lib configuration looks only for that name.  If the whole project is built and that lib doesn't exist, it will fail and you'll just have to switch the lib to the alternate configuration.

0 Kudos