  In this paper, we first give the existence and uniqueness theorems for
generalized mean-filed delay stochastic differential equations (GMFDSDEs) and
mean-field anticipated backward stochastic differential equations (MFABSDEs).
Then we study the stochastic maximum principle for generalized mean-filed delay
control problem. Since the state is distribution-depending, we define the
adjoint equation as a MFABSDE, in which, all the derivatives of coefficients
are in Fr\'echet sense. We deduce the stochastic maximum principle, and also
obtain, under some additional assumptions, a sufficient condition for the
optimality of the control.
