When was the concept of genocide formalized? When did "murdering an entire tribe/race/etc" become a distinct goal?

by konijnenpootje

To clear up terminology, I think genocide is the large scale murder of those who belong to a certain group with the expressed intent of murdering them. E.g. Adolf Hitler expressed his intent to eradicate all Jews and murdered them on a large scale, so that's genocide. But: cities might be sacked in Medieval warfare and murder on a large scale would take place, but since the expressed goal wasn't to murder everyone, this doesn't count as genocide (in my book).

With that said: when did genocide become recognized as a distinct act? Is there concensus among historians on what constitutes the first genocide? The earliest genocide I can think of coincides with the advent of modern war, namely the Armenian genocide. Is this in fact the first genocide recognized as such, and if so, is it a coincidence it happened when it did, namely when modern warfare made killing people easier?

Vespertine

This should not discourage further discussion, but the history of the concept of genocide is explained in this post by u/Snapshot52: https://www.reddit.com/r/AskHistorians/comments/6mg3j3/monday_methods_american_indian_genocide_denial/