Making the #include square

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-03-31T16:32:47Z Indexed on 2010/03/31 16:43 UTC
Read the original article Hit count: 244

Filed under:

I'm trying to write a makefile using CC on Solaris 10. [Only the first bit of that really matters, I think]. I have the following rule for foo.o:

foo.o: foo.cc common_dependencies.h
    CC -c foo.cc -I../../common

Unfortunately, common_dependencies.h includes all sorts of idiosyncratic trash, in directories not named '.' or '../../common' . Is this just going to have to be a brute force makefile where I ferret out all of the dependency paths? All of the dependencies are somewhere under '../..', but sometimes 1-level down and sometimes 2-levels down.

© Stack Overflow or respective owner

Related posts about make