nested makefile? Any good pointers?
Hi!
Is there any way to make a module A that is not runnable and can be baked into another module B, without the Makefile of B knows the CFLAGS and LIBS?
I am a really lousy Makfile writer and also a very lazy guy.
I have a dream of a hiearchy of Makfiles that are responsible for compiling and linking its own code producing some kind of file that can be used by other modules. When a module, B, needs another module, A, it just uses that precompiled file and doesn't need to know which libraries used when it (A) was compiled or needs to know any other linking information other what is used in the module that it is responsible for (that is B source). I suppose that it can be made with some kind of static libraries, but it doesnt seem so nice.
This far I need to have all LIBS and CFLAGS ever used in all Makefiles... then when I tried to use Qt I realized that qmake produced so complicated Makfiles for my lazy mind to interpret. Too many LIBS and other stuff to use it with my other Makefiles.
What I hope is that there is someway to tell g++ not to completely link a program. Just link all libraries needed... and stop just before making a runnable program. You know what I'm saying? So when using this precompiled file I dont need to know the needed CLAGS and LIBS because it already is linked into that module.
If you hade the energy to read this far: Thanks, hope you have any tips.
/p
|