Do you still want to use the Arduino core API / functions? If so, there's a Makefile that's probably close to working in the hardware/cores/arduino sub-directory of the Arduino application directory. Or you can set build.verbose and upload.verbose to true in your Arduino preferences file
and it will spit out the command lines it uses. You can also create additional tabs in the IDE: if you give them a .c or .cpp extension, the IDE won't make any changes to them before passing them to gcc. Use the menu that drops down if you click the right-pointing arrow in the upper right corner of the IDE.
If you don't want to use the Arduino core API or functions, then you should be able to treat the Arduino board as you would any other ATmega development board with an FTDI USB-to-serial chip on it.