A general method for designing diffraction lenses is presented. It is adoptable to the diffraction lenses with large relative aperture and arbitrary conjugate distance while the effect of the substrate thickness is taken into consideration. A lens thus designed was fabricated by a laser writing system and the diffraction limit quality was obtained.