Considering that only a tiny TINY percentage of books ever get turned into movies--and those will be bestsellers with a huge built-in audience--it's best to focus on writing a bestseller and let your agent field option offers.
All the rest of the movies made seem to be original screenplays written for the starring actor or based on comic books.
One of my friends got an option on her bestseller and scored a $25K deal. However, she wrote into the contract that SHE got to write the screenplay, then spent the next 10 years not finishing multiple versions of the script. The movie could have been made by now with her getting a small royalty income from DVD sales/rental. But that didn't happen. Why they allowed her to do that, I do not know, but she had clout then. Not now, though.
In my case, the options were 100.00 (split with my publisher), so I got 50 bucks. Another time, my collaborator (with contacts in the film industry) optioned it for a dollar.
I know a movie based on one's book is the dream deal for all writers, but don't expect it.
Get to the library and find books on screenplay writing, as they'll give a more clear view of things.
One thing I DO know-- make sure you get a percentage of the gross, not the profit, when you sign a contract. The movie,
Forrest Gump, is infamous for how the bean counters made it look like it never had a profit.