Alright I'm writing my own makefile for the hell of it, problem stands how do I get it to compile a source file to an object file if and only if that source file has been edited...I'm sure theres some method of doing it, I've seen it before.
specify the source file as dependency. It will compare the file's timestamp with the target's timestamp and only execute the target, when the dependency is newer. That's how make work.