I'm working on a large software program where sources are in one directory and objects go into another. I cannot get: cc -c -o../dir/foo.o foo.c to put foo.o in ../dir. It insists on putting it in the same dir as foo.c.