update makefiles to add ibverbs, pthread libs