Help while linking the library in AIX

Hi,
I have one library(libfoo.a) that is folder /home/xyz and my c program is in /home/xyz/cprog. Whenever I issue cc command
cc -o test test.c -lfoo , i get the error /usr/bin/ld: cannot find -lfoo.
echo $PATH has already listing of /home/xyz variable, even LIBPATH also has same entry /home/xyz.
Can some one tell me why compiler not able to locate the library.

whenever i issue the command

cc -o test test.c -L lfoo, it works and gives me the executable.

Please tell me , how does compiler able to locate the library file with -L option , I have not given any path of library.