The Third Punic War came close to the modern definition of "total war," and was effectively a genocide against the Carthaginians. There are several Biblical examples of total war as well.
Certain sieges were genocidal (metrocidal?) as well.
And the Biblical examples were also extraordinary and emphasized as such.
But the default assumption in the Ancient World - a world of great scarcity - is that a major motivation of any war would be the accumulation of wealth in the form of slave laborers.