The contribution of the IGM and minihaloes to the 21-cm signal of reionization