Optional library files grows up binary size

I found what the problem was :
I tried to use the trick like in ethernet library to create a single "extern" object declared in .h and a global variable actually declared in .cpp
I did that for each of my optional module.
What I got is as the variable is globally declared in cpp, this one got linked...

Before to find that, I tried compiling as a c++ .a library in eclipse. as you said the binary is even smaller, and then even if I keep my global thing it does not get linked.

Anyway the first solution is better to get the lib distributed

It would be nice in future arduino versions that we could choose to have the libs compiled as .a

thanks for your help.