Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

# -*- mode: perl; indent-width: 4; -*-
###############################################################################
# Copyright (c) ERG Transit Systems. 1996-2004
#
# File:         PLATFORM/eosp386
#
# Contents:     Generic EOS support
#
# Note:         Currently defaults to WATCOMC/EP toolset
#
# Revision History:
#   19/08/99  APY   Created
#   19/02/02  APY   Paradigm support
###############################################################################
#

Eosp386Init();

###############################################################################
#.  EOS P386 (Protected Mode 386) platform runtime configuration
#
#   Arguments:
#       --Watcom[=version]      WATCOMC compiler (default WC=100)
#       --Paradigm              Paradigm C++ compiler
#
###############################################################################
sub Eosp386Init
{
    my( @args ) = @ScmPlatformArgs;             # Platform arguments
    my( $wc, $paradigm );

#.. Parse arguments
#
    Debug( "eosp386(@args)\n" );

    $wc = 0; $paradigm = 0;
    foreach $_ ( @args ) {
        if (/^--Watcom$/) {                     # WatcomC compiler
            $wc = -1;

        } elsif (/^--Watcom=(.*)/) {            # WatcomC specific version
            $wc = "$1";

        } elsif (/^--Paradigm$/) {              # Paradigm compiler
            $paradigm = -1;

        } else {
            Message( "eosp386: unknown option $_ -- ignored\n" );
        }
    }

#... Toolset
#
    if ($paradigm)
    {                                           # Paradigm compiler
        PlatformDefine( "#################################################" );
        PlatformDefine( "# AMX/ET Paradigm toolset" );
        PlatformDefine( "#" );
        PlatformDefine( "amx_target     = amx722" );
        PlatformDefine( "amx_filesystem = afs728" );
        PlatformDefine( "amx_toolset    = TOOLPD" );
        PlatformDefine( "amx_name       = CJ722" );
        PlatformDefine( "amx_fsname     = FJ728" );
        PlatformDefine( "amx_calling    =" );
        PlatformDefine( "" );

        Toolset( '*', "pd386" );                # Paradigm 32bit toolset
    }
    else
    {                                           # WATCOMC (default)
        PlatformDefine( "#################################################" );
        PlatformDefine( "# AMX/EP WatcomC toolset" );
        PlatformDefine( "#" );
        PlatformDefine( "amx_target     = amx386" );
        PlatformDefine( "amx_toolset    = TOOLWC" );
        PlatformDefine( "amx_name       = CJ814" );
        PlatformDefine( "amx_calling    = r" );
        PlatformDefine( "" );

        if ($wc > 1) {                          # Watcom 32bit toolset
            Toolset( '*', "wc386", "--Version=$wc" );
        } else {
            Toolset( '*', "wc386" );
        }
    }

#... Generic EOS platform
#
    PlatformDefines( "eosp386.def" );
    PlatformRequire( "eos" );
}