generate to target directory