1    /* 
     2     *  Copyright (c) 2008 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * */
    12    
    13    /*!
    14     *  ======== VC98.xdc ========
    15     *  Microsoft Windows 32-bit target using the Visual C/C++ 6.x compiler
    16     */
    17    
    18    metaonly module VC98 inherits microsoft.targets.ITarget {
    19    
    20        override readonly config string name                    = "VC98";   
    21        override readonly config string os                      = "Windows";
    22        override readonly config string suffix                  = "86";
    23        override readonly config string isa                     = "x86";    
    24        override readonly config xdc.bld.ITarget.Model model    = {
    25            endian: "little"
    26        };
    27    
    28        override readonly config string rts = "microsoft.targets.rts";
    29        override config string platform     = "host.platforms.PC";
    30        override config string execExt      = ".exe";
    31        
    32        /*!
    33         *  ======== path ========
    34         *  Path components added during execution of commands
    35         *
    36         *  The VC98 compiler DLLs are located in the vc98/bin subdirectory 
    37         *  the pdb DLL is located in $(rootDir)/msdev98/bin.
    38         */
    39        readonly config string path =
    40            "$(rootDir)/vc98/bin;$(rootDir)/common/msdev98/bin";
    41    
    42        /*!
    43         *  ======== ar ========
    44         *  The archiver command and all required options
    45         *  @p(dlist)
    46         *      -`-nologo`
    47         *          don't display archiver copyright
    48         */
    49        override readonly config xdc.bld.ITarget2.Command ar = {
    50            cmd: "$(rootDir)/vc98/bin/lib",
    51            opts: "-nologo"
    52        };
    53    
    54        /*!
    55         *  ======== cc ========
    56         *  The compile command and all required options
    57         *  @p(dlist)
    58         *      -`-W3`
    59         *          enable all warnings recommended for production purposes.
    60         *      -`-Zp1`
    61         *          Packs structure members on 1-byte boundry
    62         *      -`-c`
    63         *          don't link
    64         *      -`-nologo`
    65         *          don't display compiler copyright
    66         */
    67        override readonly config xdc.bld.ITarget2.Command cc = {
    68            cmd: "$(rootDir)/vc98/bin/cl.exe -nologo -c",
    69            opts: '-W3 -Zp1 -DWIN32 -D_DLL -D_AFXDLL -DEXPORT=""'
    70        };
    71    
    72        /*!
    73         *  ======== asm ========
    74         *  The assemble command and all required options
    75         *  @p(dlist)
    76         *      -`-c`
    77         *          don't link
    78         *      -`-nologo`
    79         *          don't display compiler copyright
    80         */
    81        override readonly config xdc.bld.ITarget2.Command asm = {
    82            cmd: "$(rootDir)/vc98/bin/cl.exe -nologo -c",
    83            opts: ""
    84        };
    85    
    86        /*!
    87         *  ======== lnk ========
    88         *  The linker command and all required options
    89         *  @p(dlist)
    90         *      -`-nologo`
    91         *          Don't display linker copyright
    92         */
    93        override readonly config xdc.bld.ITarget2.Command lnk = {
    94            cmd: "$(rootDir)/vc98/bin/link -nologo",
    95            opts: ""
    96        };
    97        
    98        /*!
    99         *  ======== ccOpts ========
   100         *  User modifiable default options.
   101         *  @p(dlist)
   102         *      -`-G5`
   103         *          Optimizes code to favor the Pentium processor
   104         *      -`-Ob1`
   105         *          Expand only functions marked as inline or, in a C++
   106         *          member function, defined within a class declaration
   107         *      -`-Gs`
   108         *          Probe stack to automatically grow stack as necessary
   109         *      -`-GX`
   110         *          Enables synchronous exception handling
   111         *      -`-WL`
   112         *          Write errors/warnings on a single output line
   113         */
   114        override config xdc.bld.ITarget2.Options ccOpts = {
   115            prefix: "-G5 -Ob1 -Gs -GX",
   116            suffix: "-Dfar= "
   117        };
   118    
   119        /*!
   120         *  ======== lnkOpts ========
   121         *  User modifiable linker options
   122         *  @p(dlist)
   123         *      -`-libpath`...
   124         *              directories to search for toolchain specific libraries
   125         *      -`-nodefaultlib`
   126         *              don't search for default libraries when linking; all
   127         *              libraries used must be explicitly named
   128         *      -`-incremental:no`
   129         *              link for execution (no subsequent link will occur)
   130         *      -`-machine:ix86`
   131         *              link for the Intel x86 architecture
   132         *      -`-map:$(XDCCFGDIR)/$@.map`
   133         *              output any link map information to the specified file
   134         *              ($(XDCCFGDIR) is usually package/cfg)
   135         *      -`-pdb:$(XDCCFGDIR)/$@.pdb`
   136         *              output any program debug information to the specified file
   137         *              ($(XDCCFGDIR) is usually package/cfg)
   138         */
   139        override config xdc.bld.ITarget2.Options lnkOpts = {
   140            prefix: "-libpath:$(rootDir)/vc98/lib -libpath:$(rootDir)/vc98/mfc/lib",
   141            suffix: "-map:$(XDCCFGDIR)/$@.map -pdb:$(XDCCFGDIR)/$@.pdb -machine:ix86 -nodefaultlib -incremental:no"
   142        };
   143            
   144        /*!
   145         *  ======== includeOpts ========
   146         *  User modifiable include paths
   147         *  @p(dlist)
   148         *      -`-I$(rootDir)/include`
   149         *          include compiler specific headers
   150         */
   151        override config string includeOpts = "-I$(rootDir)/vc98/include -I$(rootDir)/vc98/mfc/include -I$(rootDir)/vc98/atl/include";
   152    
   153    
   154        /*!
   155         *  ======== profiles ========
   156         *  User modifiable default profiles
   157         */
   158        override config xdc.bld.ITarget.OptionSet profiles[string] = [
   159            ["debug", {
   160                compileOpts: {
   161                    copts: "-Z7 -Odi -MTd",
   162                    defs:  "-D_DEBUG=1",
   163                },
   164                linkOpts: "-debug mfc42.lib mfcs42.lib msvcrt.lib msvcirt.lib setargv.obj oldnames.lib ole32.lib oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib",
   165            }],
   166    
   167            ["release", {
   168                compileOpts: {
   169                    copts: "-O2 -MT",
   170                    defs:  "",
   171                },
   172                linkOpts: "mfc42.lib mfcs42.lib msvcrt.lib msvcirt.lib setargv.obj oldnames.lib ole32.lib oleaut32.lib olepro32.lib uuid.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib",
   173            }],
   174        ];
   175    }
   176    /*
   177     *  @(#) microsoft.targets; 1, 0, 2, 0,581; 8-23-2012 20:55:33; /db/ztree/library/trees/xdctargets/xdctargets-f27x/src/ xlibrary
   178    
   179     */
   180