Which directive should I use (in the command line) to change the output path for the object files.
I want to move the objects files to a different directory (folder) so that my project directory contains only source files.
"It seems like one can't specify the folder for the object files generated by the compiler from the command line."
You can specify it - just not independently of the object file name.
It wouldn't be hard to do that in either a makefile or a .bat file...
"I guess I will have to accept the fact that there is object files between my source files."
Or you could just add a step immediately after your compiles to move them...
"I wish I could use the Keil IDE but then I won't be able to use my debugger"
How does the IDE prevent using your debugger?? Sure, it wouldn't be "integrated" - but I can't see any reason why you couldn't use uVision to do the builds (and editing, if you like), and a separate debugger for your debugging.
You could probably even arrange for your debugger to be launched via the uVision 'Tools' menu...