The compiler defines several macros at startup:
__CC65__This macro is always defined. Its value is the version number of the compiler in hex. Version 2.0.1 of the compiler will have this macro defined as 0x0201.
__APPLE2__This macro is defined if the target is the Apple ][ (-t apple2).
__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).
__CBM__This macro is defined if the target system is one of the CBM targets.
__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).
__C128__This macro is defined if the target is the c128 (-t c128).
__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).
__GEOS__This macro is defined if you are compiling for the GEOS system (-t geos).
__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).
__VIC20__This macro is defined if the target is the vic20 (-t vic20).
__FILE__This macro expands to a string containing the name of the C source file.
__LINE__This macro expands to the current line number.
__STRICT_ANSI__This macro is defined to 1 if the -A compiler option was given, and
undefined otherwise.
__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.