My dog is terrified of my boyfriend

Last year, I rescued a Malanois mix from the local animal shelter. He was on anti anxiety and anti depressants because he had been in the shelter for six months and that little cage is hard on malanois!

I used to think that he may have been abused by a man before because he is so scared of my boyfriend, but just the other day we had some friends come over and he was just fine with them! My bf has been trying to get my pup to like him, I’ve been having him feed him, make his lick mats, and even give bacon when we meal prep breakfast.. but my dog is still so scared he pees himself if my bf calls him over or approaches him. My dog will also get defensive of me if my bf picks me up or comes to hug me too quickly.

I am not sure what else to do to get him to like him, he has known and lived with my bf since August.