Mel’nikov methods and homoclinic orbits in discontinuous systems