reconstruct the structure of directories of sources and headers