The process in which anatomical structures of the mammary gland are generated and organized. Morphogenesis refers to the creation of shape. The mammary gland is a large compound sebaceous gland that in female mammals is modified to secrete milk.