Predefined CPP Macros when targetting platforms ----------------------------------------------- cc65 uses upper case: __CC65__ __ATMOS__ __APPLE2__ GNU C uses lower case, in addition to the nonstanded nonunderlined lables: __unix__ __vax__ __m68k__ Microsoft C uses *one* underline at the *start* only: _WIN32 _MSDOS _DLL Arrggh! I have chosen to use a single start file for each platform and have that define macros to specify the platform. Thus to compile software written by me to target the Windows 32-bit platform, compile win32.c and it will define macros and chain off to the rest of the source. Within my source I have used __(lowercase)__ to specify platform and __(lowercase)_h to specify an included file. For example: Macro Target __bbc__ Acorn BBC/Master series __apple2__ Apple II __riscos__ RISC OS (including Arthur) __unix__ Unix/Linux/etc __win32__ 32bit Windows __dos__ 80x86 DOS __cpm__ 8080/Z80 CP/M __6502__ 6502 series cpu __i86__ Intel 80x86 cpu __z80__ Zilog Z80 cpu __arm__ ARM RISC cpu __m86000__ Motorola 860x0 cpu __console_h console.h has been #included __ziplib_h ziplib.h has been #included So, for example, bbc.c may include: ----bbc.c---- */ bbc.c - Compile to target Acorn BBC/Master */ #ifndef __bbc__ #define __bbc__ #endif #ifndef __6502__ #define __6502__ #endif #include "src/prog.c" ------end----