shake: dependency on shared library that is built internally in the project -


in project, want build shared library libfoo.so first, build test programs use shared library. test programs, if use need

need libfoo.so 

then rebuilt every time libfoo.so updated. instead, want build test programs after libfoo.so exists , header files change (or build test programs first).

the dependency on header files can done through gcc -mmd -mf , needmakefiledependencies.

how express dependency on existence of libfoo.so without forcing rebuild every time?

thanks!

if understand properly, build library libfoo.so produces header files in order build itself. want compile programs make use of header files, depending on libfoo.so causes programs rebuild if changes, excessive.

assuming that, answer orderonly ["libfoo.so"]. construct ensures libfoo.so built before continuing (and header file correct), not depend on it. main use of orderonly when want "a lot of stuff" built, , scan (e.g. gcc -mmd -mf) figure out pieces depend on.


Comments