Proton-induced X-ray emission analysis of thick and thin targets