问题
I'd like to adapt the combined automatic dependency approach to a non-flat directory situation where headers are located under ./include/ and implementation files under ./src/ (while Makefile is in the current directory .). I'd like to hold all intermediate and .d (dependency) files inside a separate directory (potentially separate ./build/ and ./.deps/) . To avoid potential clash for dependency files when more than one file with the same name in different subdirectories of ./include/ and ./src/ can exist, I guess building the same structure as in ./src/ in ./.deps could be a solution.
Apart from adding -I directive to the compile phase in the above linked Makefile, what else should I add?
来源:https://stackoverflow.com/questions/41045406/automatic-dependency-generation-and-compilation-in-non-flat-directory-src