Adaptive Control of Nonsmooth Dynamic Systems