added compile directory option