Theory of the static friction: temperature and corrugation effects