Fuse settings in .hex or .elf? programming with avrisp mkii

Howdy,

So I'm sharing a project with another developer. I use the Arduino framework and load code from the Arduino IDE via an avrisp mkii. When I get a fresh chip, I generally just burn the bootloader on it to set the fuses correctly, then bypass it when I upload the code via avrisp mkii.

This fella isn't set up to use the Arduino IDE, and wants to upload the .hex file directly. I got him the file, but now I'm realizing that the fuses will not be set on his fresh atmega328p.

So, the general question is, how do I set fuses manually? I understand that I can do it via the command line with my avrisp, but a link to some resources to sort out those commands would be great.

And extended question: Can I combine fuse settings with either a .hex or .elf file so that one file can be uploaded via the command line and avrisp mkii?

I'm on a Macbook Pro running Mavericks 10.9.2. That means no avrstudio!

Thanks duuuuudes. And if I'm misunderstanding something here, please say so!

Avrdude is the magic under the GUI

http://forum.arduino.cc/index.php?topic=182849.0

The iOS version console commands/switches should be the same.

Ray