Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] managed make

Since managed make seems to be a hot topic for discussion, I thought I'd add my $0.02.

When working on a very large project (~ 1,000,000 lines of code), we have found it very helpful to split the code into "modules". In our case, our modules have a 1:1 correspondence with the sub-directories in the top level src directory. They are combined into a single shared library and are typically compiled with optimization turned on. If we need to debug, we will re-build a module with optimization turned off, and debug turned on, leaving the rest of the code optimized. This can save us in compile, link, and execution time while debugging.

Another build technique we use is to create a module.all.C file that will #include each .C file in a module, then compile the module.all.C file into a single module.all.o file. We have found this to greatly reduce link time, and the size of the shared library built (yes, it has drawbacks, but we live with that).

Just some food for thought.

Bryan



Back to the top