I want to add dependency target to my Makefile, I knew it could be done through makedepend or g++ -MM option, and I am open for using any of them but I prefer -MM option as it allowed me to exclude standard libraries (I do not know if makedepend can do it or not).
The problem is that I use some external libraries headers in my application and I want these headers to be excluded from the dependencies generated so how can I exclude certain directories from these generated dependencies.
[Edit-start] I already tried using grep -v but the problem is that if the excluded line is the last wrapped line in a certain target, the next target would be joined to that target due to the escape '\' character at the end of the line before it leading to a corrupted dependency rule. In addition to that the time it takes to go through the library headers parsing them [Edit-end].
Another problem is that How can I edit the suffixes of the generated object-files targets, I am using a Makefile that compiles the source files provided through a variable by using through a target like that:
%.o: %.cpp
g++ $< -o$*.o ...
Makefile. Do you usepkg-configfor them? Can't you filter them out from generated dependencies usinggrep -v? Please give much more code from yourMakefile... - Basile Starynkevitchgrep -vbut the problem is that if the excluded line is the last wrapped line in a certain target, the next target would be joined to that target due to the '\' character at the line before it leading to a corrupted dependency rule. In addition to that the time it takes to go through the library headers parsing them. - Devos