The compiler defines several macros at startup:
__APPLE2__This macro is defined if the target is the Apple ][ (-t apple2).
__APPLE2ENH__This macro is defined if the target is the enhanced Apple //e (-t apple2enh).
__ATARI__This macro is defined if the target is one of the Atari computers (400/800/130XL/800XL).
__ATMOS__This macro is defined if the target is the Oric Atmos (-t atmos).
__C128__This macro is defined if the target is the c128 (-t c128).
__C16__This macro is defined if the target is the c16 (-t c16).
__C64__This macro is defined if the target is the c64 (-t c64).
__CBM__This macro is defined if the target system is one of the CBM targets.
__CBM510__This macro is defined if the target is the CBM 500 series of computers.
__CBM610__This macro is defined if the target is one of the CBM 600/700 family of computers (called B series in the US).
__CC65__This macro is always defined. Its value is the version number of the
compiler in hex. For example, version 2.10.1 of the compiler has this macro
defined as 0x02A1.
__CC65_STD__This macro is defined to one of the following depending on the
--standard command line option:
__CC65_STD_C89____CC65_STD_C99____CC65_STD_CC65____DATE__This macro expands to the date of translation of the preprocessing translation unit in the form "Mmm dd yyyy".
__FILE__This macro expands to a string containing the name of the C source file.
__GEOS__This macro is defined if you are compiling for the GEOS system (-t geos).
__LINE__This macro expands to the current line number.
__LUNIX__This macro is defined if you are compiling for the LUnix system (-t lunix).
__LYNX__This macro is defined if the target is the Atari Lynx (-t lynx).
__NES__This macro is defined if the target is the NES (-t nes).
__OPT__Is defined if the compiler was called with the -O command line option.
__OPT_i__Is defined if the compiler was called with the -Oi command line option.
__OPT_r__Is defined if the compiler was called with the -Or command line option.
__OPT_s__Is defined if the compiler was called with the -Os command line option.
__PET__This macro is defined if the target is the PET family of computers (-t pet).
__PLUS4__This macro is defined if the target is the plus/4 (-t plus4).
__STDC_HOSTED__This macro is expands to the integer constant 1.
__SUPERVISION__This macro is defined if the target is the supervision (-t supervision).
__TIME__This macro expands to the time of translation of the preprocessing translation unit in the form "hh:mm:ss".
__VIC20__This macro is defined if the target is the vic20 (-t vic20).