You'll need to compile the sketch from the command line. If you set build.verbose to true in your Arduino preferences file, and then start the IDE and press Verify / Run, it will print the command lines it uses to build your sketch, which should help get you started. Alternatively, there's a Makefile in the hardware/cores/arduino directory which is another option (though it might be a bit out of date).