Arduino building process and per-sketch compiler options.

Oh I see, I didn't read the OP carefully enough. He wants to override the LED value on a per-sketch basis for a LIBRARY. Using cflags for that seems especially convoluted. The way I'd consider 'normal' for this is to let the LED class take a constructor parameter for which pin it is. Then when he declares his LED in the sketch, pass it along.

LEDClass led(13);