High-order-harmonic generation (HHG) results from the interaction of ultrashort laser pulses with matter. It configures an invaluable tool to produce attosecond pulses, moreover, to extract electron structural and dynamical information of the target, i.e., atoms, molecules, and solids. In this contribution, we introduce an analytical description of atomic and molecular HHG, that extends the well-established theoretical strong-field approximation (SFA). Our approach involves two innovative aspects: (i) First, the bound-continuum and rescattering matrix elements can be analytically computed for both atomic and multicenter molecular systems, using a nonlocal short range model, but separable, potential. When compared with the standard models, these analytical derivations make possible to directly examine how the HHG spectra depend on the driven media and laser-pulse features. Furthermore, we can turn on and off contributions having distinct physical origins or corresponding to different mechanisms. This allows us to quantify their importance in the various regions of the HHG spectra. (ii) Second, as reported recently [N. Suárez, Phys. Rev. A 94, 043423 (2016)1050-294710.1103/PhysRevA.94.043423], the multicenter matrix elements in our theory are free from nonphysical gauge- and coordinate-system-dependent terms; this is accomplished by adapting the coordinate system to the center from which the corresponding time-dependent wave function originates. Our SFA results are contrasted, when possible, with the direct numerical integration of the time-dependent Schrödinger equation in reduced and full dimensionality. Very good agreement is found for single and multielectronic atomic systems, modeled under the single active electron approximation, and for simple diatomic molecular systems. Interference features, ubiquitously present in every strong-field phenomenon involving a multicenter target, are also captured by our model.