The invention describes a machine for making ice-cream which comprises a holding tank and a cooling and/or heating circuit for a liquid or semi-liquid foodstuff to be treated, a detection apparatus capable of detecting a characteristic parameter of this product, and a control unit capable of recognizing the product starting from this parameter, and for setting operating parameters for the machine on the basis of the product recognized.