How to generate profiling code in xcode 3

Hi,
I'm trying to generate profiling code that I can look at in gprof using xcode 3 on an intel based macbook (running 10.5). I can't get a gmon.out file for the life of me. Even if i compile directly with gcc from the command line. Any ideas why this won't work? Any ideas how to utilize the traditional -pg option to get profiling code?