Constrained stabilization via smooth Lyapunov functions