Energy efficiency is a key factor in the design of ad hoc networks. In this paper, we adopt the network utility maximization framework for joint power and rate optimization at both transport and physical layer. Then, we propose a novel energy-aware resource allocation algorithm by integrating the power cost into the objective function. The proposed algorithm has been implemented in a distributed manner. Simulation results show that the proposed algorithm not only has good convergence, but also improve the energy efficiency of the network significantly.