caculate the dir depth for multilib compile