modify makefile to build and use a lib file.