"$?" not picking up files
I am new to shell scripting and need help.
I have the following command in makefile;
$(CC) -DLOGFLAG=1 $(CFLAGS) -o $@ -c $?
when I run the make file, I get the output like
gcc -Wall -DLOGFLAG=1 -I../ -I/appl/oraclient/product/11g/precomp/public -w -I/opt/profile/OraAlert_test/code/pwutils -I/opt/profile/OraAlert_test/code/jslib/src -o oraGen.o -c /opt/profile/OraAlert_test/code/database/src
$@ is substituted by the name of .o file. I expect @? to pick up the name of C file. but it is picking up only the location of the C file and not the exact file. How can this be solved?