SysEx bootloader -> Which file to upload?

Hi, I'm developping a MIDI device with an AVR processor (ATmega 644P), and I'd like to be able to update the firmware without de-soldering (ie: send it thru MIDI)

I use the Arduino IDE to build the code, then I would upload it via MIDI SysEx messages through a special bootloader.

There is a lot of files generated by building the sketch (located in the "applet" folder). I guess the most important for the upload must be .elf and .hex. Which one is sent thru the serial port to be written by the bootloader into the flash memory?

I'm following the advices of Ruin&Wesen's blog for the booloader part.