depend.h



This file defines the macro "OS" which represents the system we are compiling on.
  • If the macro LINUX is defined then OS is equal to UNIX_OS.
  • If the macro SUN is defined then OS is equal to UNIX_OS.
  • If the macro NT is defined that OS is equal to WINDOWS_OS.
  • If no target is specified, then the compilation aborts.



#ifndef DEPEND_HD

        #undef OS
        #define OS -1
        #define UNIX_OS 1
        #define WINDOWS_OS 2

        /***************************************************/
        /* Defines LINUX to compile for a Linux target */
        /* Defines SUN to compile for a SUN target */
        /* Defines NT to compile on a NT target */
        /***************************************************/

        #ifdef LINUX
                #if OS != -1
                        #error "You can specify only one OS"
                #endif
                #undef OS
                #define OS UNIX_OS
        #endif

        #ifdef SUN
                #if OS != -1
                        #error "You can specify only one OS"
                #endif
                #undef OS
                #define OS UNIX_OS
        #endif

        #ifdef NT
                #if OS != -1
                        #error "You can specify only one OS"
                #endif
                #undef OS
                #define OS WINDOWS_OS
        #endif

        #if OS == -1
                #error "You must specify one target (LINUX, SUN, NT)"
        #endif

        #define DEPEND_HD
#endif