I have been working on a C++ project that links to a .so(dynamic library) file.
Let\'s assume that I have a target PROG which needs to link to a.so, and a.so is also built b
If you're willing to rely on non-portable aspects of GNU make, you can use order-only prerequisites order-only prerequisites for this. That's the only way to do it other than the stamp file method you've already discovered.