With libraries I'm the author of (NewPing, LCDBitmap, and others) I detect Teensy 2.0 hardware with the following (not complete code):
#if defined (__AVR_ATmega32U4__)
#if defined (CORE_TEENSY)
Is there a proper method of detecting the Teensy 3.0 and/or the Freescale microcontroller? My...