build: generator: Add dependency and file writing

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>