An active X-ray spectrometer (AXS) is now being developed as a payload candidate for the rover on SELENE-2, the next Japanese lunar exploration mission. The AXS will determine the chemical compositions of lunar rocks and regolith around the landing site. The surface of lunar rock samples will be ground using a rock abrasion tool. Thus, fundamental studies on the X-ray fluorescence analysis for lunar rocks and regolith are required to design and develop the AXS. In this study, we have investigated the X-ray fluorescence analysis in order to evaluate the effects of surface roughness of samples and the angle of incident and emergent X-rays. It was found that the fluorescent X-ray yield for low energy X-rays, i.e. the light elements, decreases at rough surface samples. This effect of surface roughness becomes small for smooth surface samples. It was also found that the fluorescent X-ray yield depends on the incident angle, which is attributed to the fact that the X-ray fluorescence occurs closer to the sample surface at larger incident angles. Since the emergent X-rays are affected by the detection geometry and surface roughness, the incident angle effect also depends on the above conditions.