I usually use the make tool for building things. It can be installed in PASE with yum and lets you build the whole project or only parts of it. You specify yourself what scope you want to build.

I keep every compile parameter out of the source code and put it into the build script. In case of open source projects not everybody uses the same compile options. People tend to use different values for f. e. debug views or optimize.