all guys are perfectly aware that if you give a compliment to a girl won't just take it innocently, so a guy would NEVER say it just because a girl "deserved" it. there would be a reason, but I used to be a flirty guy and I know that some guys will say it just to flirt and have fun, and to gage your reaction which feeds their ego
sum up, either they actually think that about you but they still had a hidden motive, or they are attracted to you. usually it'd be the second one.
but I'm only speaking from personal experience of course
Random feelings play somewhat into it, but if she does something of merit, I think it is worth making a verbal note of it. Also, girls have a TREMENDOUS need to be reaffirmed that they liked, smart, pretty and so forth. Overdoing the compliments to a girl early on is a bad idea, but once she knows you have feelings for her, you can't re-afrim a girl enough. Girls are unfathomably harsh on themselves and other women. A man that recognizes this fact and provides that verbal reinforcement that a girl so desperately seeks will make a girlfriend/wife very happy. Girls just want to be loved AND THEY WANT TO HEAR IT FROM YOUR LIPS, BUDDY.
I think there should be another option. I do it for either reason and it would depend on the girl. Some times I will offer up random compliments and others I will try to flatter the girl I like but all are genuine. I think it is wrong to give false compliments... Let's say you say I like your shirt to someone and they like you, odds are that they will wear the shirt again and other like it. If you lied and didn't like it then you just messed up their attempt to win you over for lack of better words.
I personally compliment all my friends who are girls because many have low self esteems and feel down because they think they are not "good" enough in today's society. It makes them feel better. And I mean what I say its not like I find someone truly disgusting say they are beautiful and not mean it..Everyone has a sense of beauty to them. Beautiful heart/mind/soul. Now if I like the girl then the compliments are more flirtatious but still sincere. A compliment is like a gift they lose their meaning if said to much.