It appears as you pursue him rather aggressively. He is pretty clear in his behavior and lack of response to you that he isn’t interested. Just because he smiled when he saw you doesn’t mean you should continue pursuing him, he is just being polite in public. Constantly texting him and then following him around and outside was probably the last straw for him.
I suggest you let him go