update makefile to build external lib