X-Ray sources, detectors and optical components are now used in a wide range of applications. What is crucial is the absolute calibration of such devices to permit a quantitative assessment of the system under study. A new X-ray laboratory has been built in Frascati (ENEA) to develop diagnostics for nuclear fusion experiments and study applications of these X-ray techniques in other domains, like new material science, non destructive tests and so on. An in-house developed selfconsistent calibration procedure is described that permits the absolute calibration of sources (X-ray emitted fluxes) and detectors (detection efficiencies) as function of the X-ray photon energy, in the range 2 - 120 keV. The calibration procedure involves the use of an in-house developed code that also predicts the spectral response of any detector in any experimental condition that can be setup in the laboratory. The procedure has been then applied for the calibration and characterisation of gas and solid state imaging detectors, such as Medipix-2, GEM gas detector, CCD camera, Cd-Te C-MOS imager, demonstrating the versatility of the method developed here.