In this paper, we study the maximum number of limit cycles for the piecewise smooth system of differential equations \(\dot{x}=y, \ \dot{y}=-x-\varepsilon \cdot (f(x)\cdot y +\textrm{sgn}(y)\cdot g(x))\) . Using the averaging method, we were able to generalize a previous result for Liénard systems. In our generalization, we consider g as a polynomial of degree m. We conclude that for sufficiently small values of \(|{\varepsilon }|\) , the number \(h_{m,n}=\left[ \frac{n}{2}\right] +\left[ \frac{m}{2}\right] +1\) serves as a lower bound for the maximum number of limit cycles in this system, which bifurcates from the periodic orbits of the linear center \(\dot{x}=y\) , \(\dot{y}=-x\) . Furthermore, we demonstrate that it is indeed possible to obtain a system with \(h_{m,n}\) limit cycles.