
Targets and their corresponding build directories.

   SUFFIXES:
      o = Build contains code ONLY for that revision of the CPU.
          Otherwise, code contains support for that CPU and higher.

          Certain retro programming projects might wish to keep
          EXE size down by targeting only the old hardware they're
          written for, instead of increasing EXE size to accomodate
          newer hardware.

      x = Library functions are not compiled into the EXE, but call
          out to external TSRs that provide the functions. This
          allows the use of advanced and complex libraries without
          massively increasing the EXE size, and avoids startup
          delays by eliminating the need to auto-detect the
          environment every time the program is started.

      d = Debug information is enabled. Debug commands in the code are
          active and written to STDERR. Obviously debug statements eat
          up space in the EXE, so the builds are separate.

DOS, 16-bit real mode
---------------------

Form: dos16r/<N>86<M>[...]

   N = Minimum or specific CPU level.

      0 = 8086/8088
      2 = 286
      3 = 386
      4 = 486
      5 = Pentium (586)
      6 = Pentium Pro (686)

   M = Memory model           | Code | Data |
                              +------+------+
      c = Compact             | Near | Far  |
      s = Small               | Near | Near |
      m = Medium              | Far  | Near |
      l = Large               | Far  | Far  |
      h = Huge                | Far  | Huge |

   Additional suffixes related to build, see "SUFFIXES"

 dos16r/086c ..................... 8086/8088 or higher, Compact memory model
 dos16r/086s ..................... 8086/8088 or higher, Small memory model
 dos16r/086m ..................... 8086/8088 or higher, Medium memory model
 dos16r/086l ..................... 8086/8088 or higher, Large memory model
 dos16r/086h ..................... 8086/8088 or higher, Huge memory model
 dos16r/086cx .................... 8086/8088 or higher, Compact memory model lib. functions call into TSR
 dos16r/086co .................... 8086/8088 ONLY, Compact memory model
 dos16r/086cox ................... 8086/8088 ONLY, Compact memory model, functions call into TSR
 <and so on>

 #define TARGET_BITS         16
 #define TARGET_MSDOS        1
 #define TARGET_REALMODE     1

DOS, 32-bit protected mode
--------------------------

Form: dos32p/<EX><N>86<M>[...]

   N = Minimum or specific CPU level.

      3 = 386
      4 = 486
      5 = Pentium (586)
      6 = Pentium Pro (686)

   M = Memory model

      f = Flat

   EX = DOS extender

      4g = DOS 4G/W
      4n = DOS 4G/W non-zero base
      cw = Causeway
      ph = Phar Lap 386
      pm = PMODE/W

 dos32p/4g386f ...................... 386 or higher, flat memory model, DOS4G/W
 dos32p/4g386fo ..................... 386 only, flat memory model, DOS4G/W
 dos32p/4g386fx ..................... 386 or higher, flat memory model, library functions in TSR, DOS4G/W
 dos32p/4g386fxo .................... 386 only, flat memory model, library functions in TSR, DOS4G/W
 dos32p/4g486f ...................... 486 or higher, flat memory model, DOS4G/W
 <and so on>

 #define TARGET_BITS          32
 #define TARGET_MSDOS         1
 #define TARGET_PROTMODE      1

16-bit Windows (Windows 1.x-3.1/9x/ME and NTVDM.EXE under NT/2000/XP/Vista/7)
-----------------------------------------------------------------------------

Form: win16<W>/<V>_<N>86<M>[...]

   W = Windows mode

      r = Real mode only
      p = Protected mode only
      b = Real or protected mode

   V = Windows version

      10 = Windows 1.0 or higher
      20 = Windows 2.0 or higher
      30 = Windows 3.0 or higher
      31 = Windows 3.1 or higher
      95 = Windows 95 or higher
      98 = Windows 98 or higher
      me = Windows ME or higher
      nt = Windows NT only

   N = Minimum or specific CPU level.

      0 = 8088/8086
      2 = 80286
      3 = 386
      4 = 486
      5 = Pentium (586)
      6 = Pentium Pro (686)

   M = Memory model           | Code | Data |
                              +------+------+
      c = Compact             | Near | Far  |
      s = Small               | Near | Near |
      m = Medium              | Far  | Near |
      l = Large               | Far  | Far  |

      [*] Memory model only applies to code within the EXE itself.
          The external Windows environment demands the use of far pointers.

 win16r/30_086c ........................ Windows 3.0 real mode only, 8086/8088 or higher, compact memory model
 win16p/30_286c ........................ Windows 3.0 standard or enhanced mode only, 286 or higher, compact memory model
 win16b/30_386l ........................ Windows 3.0 real/standard/enhanced mode, 386 or higher, large memory model
 <and so on>

 #define TARGET_BITS           16
 #define TARGET_WINDOWS        1
 #define TARGET_WINDOWS_WIN16  1
 #define TARGET_PROTMODE       1         /* if protected mode only */
 #define TARGET_REALMODE       1         /* if real mode only */
 #define TARGET_AUTOMODE       1         /* if prot or real mode build aka 'b' */

32-bit Windows, Watcom Win386 (Windows 3.0/3.1/9x/ME and NTVDM.EXE under NT/2000/XP/Vista/7)
--------------------------------------------------------------------------------------------

Form: winwa386/<V>_<N>86<M>[...]

   N = Minimum or specific CPU level.

      3 = 386
      4 = 486
      5 = Pentium (586)
      6 = Pentium Pro (686)

   V = Windows version

      30 = Windows 3.0 or higher
      31 = Windows 3.1 or higher
      95 = Windows 95 or higher
      98 = Windows 98 or higher
      me = Windows ME or higher
      nt = Windows NT only

   M = Memory model

      f = Flat

 NOTE: In this target scenario, the code and data are 32-bit flat memory,
       but it is made possible by Watcom's Win386 extender NOT by the OS.
       Furthermore, unlike 32-bit DOS the code and data segments do NOT
       originate at offset 0. You also have to code keeping in mind that
       the external OS and environment is running in 16-bit protected
       mode and that when far pointers are involved, Watcom's extender
       will NOT translate them for you especially WM_* messages.

 winwa386/30_386f ................... 386 or higher, Windows 3.0 or higher
 winwa386/31_386f ................... 386 or higher, Windows 3.1 or higher
 winwa386/31_486f ................... 486 or higher, Windows 3.1 or higher
 winwa386/31_386fo .................. 386 only, Windows 3.1 or higher
 <and so on>

 #define TARGET_BITS            32
 #define TARGET_WINDOWS         1
 #define TARGET_WINDOWS_WIN386  1
 #define TARGET_PROTMODE        1

32-bit Windows, Microsoft Win32s (Windows 3.1/9x/ME and NTVDM.EXE under NT/2000/XP/Vista/7)
-------------------------------------------------------------------------------------------

Form: win32s/<V>_<N>86<M>[...]

   N = Minimum or specific CPU level.

      3 = 386
      4 = 486
      5 = Pentium (586)
      6 = Pentium Pro (686)

   V = Windows version

      31 = Windows 3.1 or higher
      95 = Windows 95 or higher
      98 = Windows 98 or higher
      me = Windows ME or higher
      nt = Windows NT only

   M = Memory model

      f = Flat

 win32s/31_386f ................... 386 or higher, Windows 3.1 or higher
 <and so on>

 #define TARGET_BITS            32
 #define TARGET_WINDOWS         1
 #define TARGET_WINDOWS_WIN32s  1
 #define TARGET_PROTMODE        1

32-bit Windows (Windows 9x/ME and NTVDM.EXE under NT/2000/XP/Vista/7)
---------------------------------------------------------------------

Form: win32/<V>_<N>86<M>[...]

   N = Minimum or specific CPU level.

      3 = 386
      4 = 486
      5 = Pentium (586)
      6 = Pentium Pro (686)

   V = Windows version

      95 = Windows 95 or higher
      98 = Windows 98 or higher
      me = Windows ME or higher
      nt = Windows NT only

   M = Memory model

      f = Flat

 #define TARGET_BITS            32
 #define TARGET_WINDOWS         1
 #define TARGET_WINDOWS_WIN32   1
 #define TARGET_PROTMODE        1
 #define TARGET_WINDOWS_NT      1      if nt only build
 #define TARGET_WINDOWS_VERSION

32-bit Linux (the host this is compiled on)
-------------------------------------------

Form: linux/i686 (second half depends on your system's uname -m response)

 #define TARGET_BITS            32
 #define TARGET_LINUX           1
 #define TARGET_PROTMODE        1

64-bit Linux (the host this is compiled on)
-------------------------------------------

Form: linux/x86_64 (second half depends on your system's uname -m response)

 #define TARGET_BITS            64
 #define TARGET_LINUX           1
 #define TARGET_PROTMODE        1

32-bit EFI (Extensible Firmware Interface)
------------------------------------------

Form: efi/ia32

 #define TARGET_BITS            32
 #define TARGET_LINUX           1
 #define TARGET_PROTMODE        1

64-bit EFI (Extensible Firmware Interface)
------------------------------------------

Form: efi/x64

 #define TARGET_BITS            64
 #define TARGET_LINUX           1
 #define TARGET_PROTMODE        1

