improve libfoamlib build
use common rules file for libfoam