Ignore:
Timestamp:
May 1, 2002, 5:58:37 AM (23 years ago)
Author:
bird
Message:

Support for other watcom target OSes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/kFileDef.cpp

    r8003 r8360  
    1 /* $Id: kFileDef.cpp,v 1.8 2002-02-24 02:47:25 bird Exp $
     1/* $Id: kFileDef.cpp,v 1.9 2002-05-01 03:58:36 bird Exp $
    22 *
    33 * kFileDef - Definition files.
     
    644644 * @param   pFile   File which we're to write to (append).
    645645 *                  Appends at current posistion.
     646 * @param   enmOS   The target OS of the link operation.
    646647 * @sketch
    647648 * @status
     
    649650 * @remark
    650651 */
    651 KBOOL kFileDef::makeWatcomLinkFileAddtion(kFile *pOut)
     652KBOOL kFileDef::makeWatcomLinkFileAddtion(kFile *pOut, int enmOS)
    652653{
    653654    PDEFSEGMENT pSeg;
     
    662663
    663664    /* Format - Module type */
    664     pOut->printf("FORMAT OS2 LX %s %s %s\n",
    665                   fLibrary                               ? "DLL" :
    666                     (fProgram ? (chAppType == pm         ? "PM"
    667                               : (chAppType == fullscreen ? "FULLSCREEN"
    668                                                          : "PMCOMPATIBLE"))
    669                     : (fVirtualDevice                    ? "VIRTDEVICE"
    670                                                          : "PHYSDEVICE" )),
    671                   fLibrary ? (fInitGlobal ? "INITGLOBAL" : "INITINSTANCE") : "",
    672                   fLibrary ? (fTermGlobal ? "TERMGLOBAL" : "TERMINSTANCE") : "");
     665    switch (enmOS)
     666    {
     667        case kFileDef::os2:
     668            pOut->printf("FORMAT OS2 LX %s %s %s\n",
     669                          fLibrary                               ? "DLL" :
     670                            (fProgram ? (chAppType == pm         ? "PM"
     671                                      : (chAppType == fullscreen ? "FULLSCREEN"
     672                                                                 : "PMCOMPATIBLE"))
     673                            : (fVirtualDevice                    ? "VIRTDEVICE"
     674                                                                 : "PHYSDEVICE" )),
     675                          fLibrary ? (fInitGlobal ? "INITGLOBAL" : "INITINSTANCE") : "",
     676                          fLibrary ? (fTermGlobal ? "TERMGLOBAL" : "TERMINSTANCE") : "");
     677            break;
     678
     679        case kFileDef::win32:
     680            if (fLibrary)
     681                pOut->printf("FORMAT Window NT DLL %s %s\n"
     682                             "Runtime Windows\n",
     683                             fLibrary ? (fInitGlobal ? "INITGLOBAL" : "INITINSTANCE") : "",
     684                             fLibrary ? (fTermGlobal ? "TERMGLOBAL" : "TERMINSTANCE") : "");
     685            else
     686                pOut->printf("FORMAT Window NT\n"
     687                             "Runtime %s\n",
     688                             fProgram ? chAppType == pm  ? "Windows" : "Console" : "Native");
     689            break;
     690        default:
     691            return FALSE;
     692    }
    673693
    674694
     
    694714
    695715    /* Protected mode */
    696     if (pszProtmode)
     716    if (pszProtmode && (enmOS == kFileDef::os2))
    697717        pOut->printf("OPTION PROTMODE\n", pszProtmode);
    698718
     
    743763        if (pExp->pszIntName)
    744764            pOut->printf("='%s'", pExp->pszIntName);
    745         if (pExp->fResident)
     765        if (pExp->fResident && (enmOS == kFileDef::os2 || enmOS == kFileDef::win16))
    746766            pOut->printf(" RESIDENT");
    747767        if (pExp->cParam != ~0UL)
Note: See TracChangeset for help on using the changeset viewer.