Updated Makefie to automatically compile library dependency.