A way to identify Leonardo or Teensy in a program?

Didn't realize there were all those limitations. Thanks.