I'm surprised nobody has brought this up yet:
UCPP by nikitakit is a decent way to build on Linux or Mac.
Last year I used a custom makefile to compile C++ code for the robot, but it was incompatible with this year's version of WPILib, so I switched to UCPP. Now I can program, compile, and deploy from emacs.