When you include a library in your project does the library compile first, and then your project? It seems this way because I tried using an #ifdef in a library, a #define of what the #ifdef wanted in my project, yet it appeared as if the code inside the if was not included.
It compiles in the order in the DME file. So by default, yes, the libraries compile first.