Auto detect src/deps for legacy