makefile with dependency on a shared library sub project
问题 So I have a makefile. I'll just put a pseudo example for the moment just enough so that I can talk about the issue and keep it simple... Let's say I have in my makefile something like this: # Rule to build my test executable - with dependency on the library mytest build: libmytest.so g++ test.cpp -lmytest.so # Rule to build mytest library libmytest.so: g++ mytestlib.cpp -fPIC ... etc ... cc -fPIC -Wl,-soname,libmytest.so ... etc... So, if/when I change the file mytestlib.cpp , I see that