Are boards #defined when you select a board to compile to ?

In the IDE when you select a board to compile to under tools -> Board, is there a constant or #define set that identifies that board so we can conditionally compile our code ?

example:

ifdef UNOR3

int interuptPin = 2;

endif

ifdef MEGA

int interruptPin = 4;

endif

http://lmgtfy.com/?q=arduino+check+board+type+in+code

The board type is passed from the compile command:

 ... -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR ...

Which you can see if you turn on "verbose" compilation in the preferences screen. The various values come from the build.board variables defined in the appropriate boards.txt file (for the board type) (I'm not quite sure where "arduino_arch_xxx" comes from.)

yun.build.board=AVR_YUN
uno.build.board=AVR_UNO
diecimila.build.board=AVR_DUEMILANOVE
nano.build.board=AVR_NANO
mega.build.board=AVR_MEGA2560
mega.menu.cpu.atmega2560.build.board=AVR_MEGA2560
mega.menu.cpu.atmega1280.build.board=AVR_MEGA
megaADK.build.board=AVR_ADK
leonardo.build.board=AVR_LEONARDO
micro.build.board=AVR_MICRO
esplora.build.board=AVR_ESPLORA
mini.build.board=AVR_MINI
ethernet.build.board=AVR_ETHERNET
fio.build.board=AVR_FIO
bt.build.board=AVR_BT
LilyPadUSB.build.board=AVR_LILYPAD_USB
lilypad.build.board=AVR_LILYPAD
pro.build.board=AVR_PRO
atmegang.build.board=AVR_NG
robotControl.build.board=AVR_ROBOT_CONTROL
robotMotor.build.board=AVR_ROBOT_MOTOR
gemma.build.board=AVR_GEMMA