The software-defined mobile networks (SDMNs) have been proposed to manage the complexity in communication networks with centralized controllers. In this paper, we investigate a joint offloading and radio resource allocation strategy for ad hoc mobile cloud computing in the SDMNs. Considering the communication and computation cost, a multi-stage buyer-seller game is formulated to maximize the individual utility of mobile user or base station. Then, by taking advantage of the centralized management conducted by the SDN controller, the proposed game can be efficiently operated to reach the Stackelberg equilibrium (SE). Moreover, two typical scenarios, i.e., quasi-static scenario and dynamic scenario, are discussed under the uniform pricing and non-uniform pricing, respectively. Specifically, a pricing-based joint offloading and resource allocation (PJORA) algorithm with guaranteed convergence is proposed for the non-uniform pricing case, which can be readily extended to the other cases. Furthermore, OpenFlow-based scheduling is also developed to realize offloading and resource allocation. Finally, the numerical results are analyzed to verify the proposed algorithm, which is effective in joint offloading and resource allocation. INDEX TERMS Software defined mobile networks (SDMNs), a multi-stage buyer-seller game, pricing-based joint offloading and resource allocation (PJORA), Stackelberg equilibrium (SE).