According to "A History of Mechanics" by Dugas, the first recorded textbook devoted to mechanics (simple machines) orginates with Aristotle (384-322 BC), "or, more accurately, with the author of the probably acrocryphal treatise called 'Problems of Mechanics'. Aristotle wrote other texts as well, including 'Physics' and 'Treatise on the Heavens'.
Archimedes (287-212 BC) made statics an autonomous theoretical science with his treatise on the lever.