Many techniques have been proposed for the clustering and selection of clusterheads in mobile ad hoc networks. However, most existing techniques use only a single quality measure to distinguish between the capabilities of the nodes in the selection of clusterheads. This bounds the efficiency of the selection process and degrades network performance. In this paper, we present a scalable clustering framework that can generate flexible clustering techniques that use as many quality measures as desired. The proposed framework allows customization of the clustering techniques in order to seek specific network merits such as stability and fairness. Simulation results show significant improvements on overall network performance when using a clustering technique, developed using proposed framework, over existing Lowest ID technique.