
target_mode = "0" // 0=Debug, 1=Distribution

if target_mode == "0"
{
   // Options to use for debugging and development.
   option target_mode_options = opt(level, 0),
                                opt(inline, no),
                                opt(autoinline, no),
                                // gen(initAuto, 0x00),
                                // gen(profile, yes),
                                gen(debug, "yes"), // Include debug info also for C-code (not C++)
                                link(map, yes),
                                link(debug, yes), // Enable debugging with VAC++ 3.6.5
                                link(linkwithsharedlib, no)
}
else
if target_mode == "1"
{
   // Optimize production code for Speed.
   option target_mode_options = opt(level, 0), // 2
                                opt(size, no),
                                opt(inline, yes),
                                opt(autoinline, no), // yes
                                // define("GLOG_DISABLED", "1"),
                                link(map, yes),
                                link(linenum, yes),
                                link(linkwithsharedlib, no)
}
else
{
   error "Unknown target mode. Must be 0 or 1."
}

option other_options = // gen(enumsize, 4),
                       gen(rtti, all),
                       opt(tune, 486),
                       info(pro, "no"), // Disable warning "missing function prototype" in C-code.
                       link(pmtype, pm),
                       link(ignorecase, yes),
                       link(linkwithmultithreadlib, yes),
                       link(stack, 256000),
                       // lang(ansiforstatementscopes, no),
                       incl(searchpath, "..\\..\\src;..\\..\\src\\zlib"),
                       define("__IBMCPP4__", 1),
                       define("NO_vsnprintf", 1), // Needed to successfully compile ZLib by VAC++ 4, because this compiler doesn't provide the buffer secure vsnprintf().
                       // report(disable, CPPC0070), // Disable warning: The friend declaration must be an elaborated class name.
                       report(disable, CPPC1104), // Disable warning: The condition evaluates to a constant value.
                       report(disable, CPPC0419), // Disable warning: An exception-specification must be specified as "throw(...)" to match the implicit declaration.
                       report(disable, CPPC0306), // Disable warning: The "private" copy constructor "X(const X&)" cannot be accessed.
                       report(disable, CPPC1225), // Disable warning: Name lookup did not find "x" in the context of the template definition.
                       report(level, I) // I=Infos, W=Warnings, E=Errors

option other_options, target_mode_options
{
   target "lcmd.exe"
   {
      // ZipLib
      source "..\\..\\src\\zlib\\adler32.c"
      source "..\\..\\src\\zlib\\compress.c"
      source "..\\..\\src\\zlib\\crc32.c"
      source "..\\..\\src\\zlib\\deflate.c"
      source "..\\..\\src\\zlib\\gzio.c"
      source "..\\..\\src\\zlib\\infback.c"
      source "..\\..\\src\\zlib\\inffast.c"
      source "..\\..\\src\\zlib\\inflate.c"
      source "..\\..\\src\\zlib\\inftrees.c"
      source "..\\..\\src\\zlib\\trees.c"
      source "..\\..\\src\\zlib\\uncompr.c"
      source "..\\..\\src\\zlib\\zutil.c"

      // GLib + LCmd
      source ".\\lcmd.cpp"

      option res_rc_options("-i ..\\..\\src\\lcmd -d __OS2__")
      {
         source "..\\..\\src\\lcmd\\LCmd_os2.rc"
      }
   }
}

