Need explanation on how to flash HEX files on ATmega32u4 via AVR109 protocol
I have been using dfu-programmer successfully on Linux (using a "bare-bone" atmega32u2/atmega32u4) from the command line. So it's very easy to integrate it in a Makefile.

A quote from that web site:


  dfu-programmer-0.6.2.tar.gz contains the source tree for this project. Download this to build and install on a Linux/Unix/Mac system. 


So you should be able to build it on a Mac. Or you can have a look in the source code.