I have the following sort of directory structure:part1    build    srcpart2    build    srcNow I have a header file that I would like to include in both parts of these projects, it will contain constants and some macro definitions as well as some utility functions, and I want these to be synchronized between the two parts. What would be the generally acceptable way to format my directory structure?Something like so?part1    build    srcpart2    build    srcshare    srcand set up my make files in the build directories to also look in ../../share/srcOr is there a more correct way of doing this?
Shared source file between two parts of project
c++;c;directory structure
That's how I've done it in many projects.Dare I say self-documenting? It makes it completely clear to anyone looking at this what's going on.  And that includes you.Imagine yourself going off to work on some other, completely unrelated project for three/ four years and then coming back to this one.  All those little snippets and assumptions and understandings that you work with day-in, day-out, today will all be long forgotten.  it'll be like coming to this code completely cold.  It's not nice finding hidden nasties in code, is it?  So; try not to leave any for yourself. 