  \noindent We address the issue of market making on electronic markets when
taking into account the clustering and long memory properties of market order
flows. We consider a market model with one market maker and order flows driven
by general Hawkes processes. We formulate the market maker's objective as a
stochastic control problem. We characterize an optimal control by proving
existence and uniqueness of a viscosity solution to the associated
Hamilton-Jacobi-Bellman equation. Finally we propose a fully consistent
numerical method allowing to implement this optimal strategy in practice.
