Hello and Welcome to LinuxQuestions,
First of all, what are you trying? Generate a RPM file from your source code and use that to install on your (or other) systems? Or are you looking for a way to compile your source code and install it on your system only? Have a look at these links, I'm sure they'll help you.
RPM Building crash course
Some info on working with source code packages
Looking forward to your participation in the forums. Have fun with Linux.