Make library/Makefile be more generic and use implicit recipe.