home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / soft / fppascal / api / platform.inc < prev    next >
Encoding:
Text File  |  1997-08-29  |  4.3 KB  |  148 lines

  1. {*****************************************************************************
  2.    Include file to sort out compilers/platforms/targets
  3.  
  4.    Copyright (c) 1997 Balazs Scheidler (bazsi@tas.vein.hu)
  5.  
  6.    This library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public
  8.    License as published by the Free Software Foundation; either
  9.    version 2 of the License, or (at your option) any later version.
  10.  
  11.  
  12.    This library is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.    Library General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU Library General Public
  18.    License along with this library; if not, write to the Free
  19.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.  
  22.  *****************************************************************************
  23.  
  24.    This include file defines some conditional defines to allow us to select
  25.    the compiler/platform/target in a consequent way.
  26.  
  27.     OS_XXXX         The operating system used (XXXX may be one of:
  28.                        DOS, OS2, Linux, Windows)
  29.     PPC_XXXX        The compiler used: BP, FPK, Virtual, Speed
  30.     BIT_XX          The number of bits of the target platform: 16 or 32
  31.     PROC_XXXX       The mode of the target processor (Real or Protected)
  32.                     This shouldn't be used, except for i386 specific parts.
  33.     ASM_XXXX        This is the assembler type: BP, ISO-ANSI, FPK
  34.  
  35.  *****************************************************************************
  36.  
  37.    Changelog:
  38.  
  39.      Date       Version        Who        Comments
  40.      02 Jul 97  0.1            Bazsi      Initial implementation
  41.      28 Aug 97  0.2            LdeB       Fixed OS2 platform sort out
  42.      29 Aug 97  0.3            LdeB       Added assembler type change
  43.      29 Aug 97  0.4            LdeB       OS_DOS removed from Windows
  44.  *****************************************************************************
  45.  
  46.     This is how the IFDEF and UNDEF statements below should translate.
  47.  
  48.  
  49.                                    POSSIBLE    POSSIBLE      POSSIBLE
  50.      PLATFORM     DEFINED          BIT SIZE    COMPILERS     ASSEMBLERS
  51.      --------     -------          --------    ---------     ----------
  52.  
  53.      DOS          OS_DOS           BIT_16      PPC_BP        ASM_BP
  54.                   PROC_Real        BIT_32      PPC_FPK       ASM_FPK
  55.  
  56.      DPMI         OS_DOS           BIT_16      PPC_BP        ASM_BP
  57.                   PROC_Protected
  58.  
  59.      LINUX        OS_LINUX         BIT_32      PPC_FPK       ASM_FPK
  60.                   PROC_Protected
  61.  
  62.      WINDOWS      OS_WINDOWS       BIT_16      PPC_BP        ASM_BP
  63.                   PROC_Protected
  64.  
  65.      WIN32        OS_WIN32         BIT_32      PPC_FPK       ASM_FPK
  66.                   PROC_Protected
  67.  
  68.      OS2          OS_OS2           BIT_16      PPC_BPOS2     ASM_BP
  69.                   PROC_Protected   BIT_32      PPC_FPK       ASM_FPK
  70.                                                PPC_Virtual
  71.                                                PPC_Speed
  72.  
  73.  *****************************************************************************}
  74.  
  75. {$DEFINE OS_DOS}
  76. {$DEFINE PROC_Real}
  77. {$DEFINE BIT_16}
  78. {$DEFINE PPC_BP}
  79. {$DEFINE ASM_BP}
  80.  
  81. {$IFDEF DPMI}
  82. {$UNDEF PROC_Real}
  83. {$DEFINE PROC_Protected}
  84. {$ENDIF}
  85.  
  86. {$IFDEF FPK}
  87. {$UNDEF PROC_Real}
  88. {$DEFINE PROC_Protected}
  89. {$UNDEF BIT_16}
  90. {$DEFINE BIT_32}
  91. {$UNDEF PPC_BP}
  92. {$DEFINE PPC_FPK}
  93. {$UNDEF ASM_BP}
  94. {$DEFINE ASM_FPK}
  95. {$ENDIF}
  96.  
  97. {$IFDEF LINUX}
  98. {$UNDEF OS_DOS}
  99. {$DEFINE OS_LINUX}
  100. {$ENDIF}
  101.  
  102. {$IFDEF WINDOWS}
  103. {$UNDEF OS_DOS}
  104. {$DEFINE OS_WINDOWS}
  105. {$UNDEF PROC_Real}
  106. {$DEFINE PROC_Protected}
  107. {$ENDIF}
  108.  
  109. {$IFDEF WIN32}
  110. {$UNDEF OS_DOS}
  111. {$DEFINE OS_WIN32}
  112. {$UNDEF PROC_Real}
  113. {$DEFINE PROC_Protected}
  114. {$UNDEF BIT_16}
  115. {$DEFINE BIT_32}
  116. {$ENDIF}
  117.  
  118. {$IFDEF OS2}
  119. {$UNDEF OS_DOS}
  120. {$DEFINE OS_OS2}
  121. {$UNDEF PROC_Real}
  122. {$DEFINE PROC_Protected}
  123. {$UNDEF PPC_BP}
  124. {$DEFINE PPC_BPOS2}
  125. {$ENDIF}
  126.  
  127. {$IFDEF VirtualPascal}
  128. {$UNDEF BIT_16}
  129. {$DEFINE BIT_32}
  130. {$UNDEF PPC_BPOS2}
  131. {$DEFINE PPC_Virtual}
  132. {$ENDIF}
  133.  
  134. {$IFDEF Speed}
  135. {$UNDEF BIT_16}
  136. {$DEFINE BIT_32}
  137. {$UNDEF PPC_BPOS2}
  138. {$DEFINE PPC_Speed}
  139. {$ENDIF}
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.