You wouldn't want to actually end homelessness. Reduce it sure. But to eliminate it would be to house people who have decided they will do nothing (but drugs) regardless of their choices. Everyone will also stop buying homes if it is guaranteed that a roof will be over their head no matter what. No amount of money would actually eliminate homelessness nor would you want to do it.
I think you want to get it as close as possible. There's a lot of reasons people are homeless. You're right, in that we don't want to just give people homes. But, look how fucked this country has gotten, Compare America today to America of the early 5os. Nobody complains about career politicians sitting at the apex of society living essentially on corporate welfare. But, let's castigate the poor son-of-a-bitch in the streets. I am by no means a bleeding-heart liberal, but, let's fix society from the top down, and then, decide who needs, and who doesn't deserve.
No amount of money would actually eliminate homelessness nor would you want to do it.