Have you considered using CMake? It's simple and powerful enough for the KDE folks, and it eliminates the need for qmake. It's probably better than you current dynamic Makefile.