KDE and others use CMake, so it might be worth a look, especially since it has some nice features that gmake doesn't.