⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jambase

📁 C++的一个好库。。。现在很流行
💻
📖 第 1 页 / 共 4 页
字号:
    EXIT On NT, set BCCROOT, MSVCNT, MINGW or MSVC to the root of the
        Borland or Microsoft directories. ;
    }

}
else if $(OS2)
{
    # the list of supported toolsets on Windows NT and Windows 95/98
    #
    local SUPPORTED_TOOLSETS = "EMX" "WATCOM" ;
  
    # this variable holds the current toolset
    #
    TOOLSET = "" ;
    
    # if the JAM_TOOLSET environment variable is defined, check that it is
    # one of our supported values
    #
    if $(JAM_TOOLSET)
    {
      local t ;
      
      for t in $(SUPPORTED_TOOLSETS)
      {
        $(t) = $($(t):J=" ") ; # reconstitute paths with spaces in them
        if $(t) = $(JAM_TOOLSET) { TOOLSET = $(t) ; }
      }

      if ! $(TOOLSET)
      {
        ECHO  "The JAM_TOOLSET environment variable is defined but its value" ;
        ECHO  "is invalid, please use one of the following:" ;
        ECHO  ;
        
        for t in $(SUPPORTED_TOOLSETS) { ECHO "  " $(t) ; }
        EXIT ;
      }
    }
    
    # if TOOLSET is empty, we'll try to detect the toolset from other
    # environment variables to remain backwards compatible with Jam 2.3
    #
    if ! $(TOOLSET)
    {
      if $(watcom)
      {
        WATCOM   = $(watcom:J=" ") ;
        TOOLSET  = WATCOM ;
      }
      else
      {
        ECHO  "Jam cannot be run because you didn't indicate which compilation toolset" ;
        ECHO  "to use. To do so, follow these simple instructions:" ;
        ECHO  ;
        ECHO  "  - define one of the following environment variable, with the" ;
        ECHO  "    appropriate value according to this list:" ;
        ECHO  ;
        ECHO  "   Variable    Toolset                      Description" ;
        ECHO  ;
        ECHO  "   WATCOM      Watcom C/C++                 Watcom install path" ;
        ECHO  "   EMX         EMX (gcc)                    EMX install path" ;
        ECHO  "   VISUALAGE   IBM Visual Age C/C++         VisualAge install path" ;
        ECHO  ;
        ECHO  "  - define the JAM_TOOLSET environment variable with the *name*" ;
        ECHO  "    of the toolset variable you want to use." ;
        ECHO  ;
        ECHO  "  e.g.:  set WATCOM=C:\WATCOM" ;
        ECHO  "         set JAM_TOOLSET=WATCOM" ;
        ECHO  ;
        EXIT  ;
      }
    }

    RM       = del /f ;
    CP       = copy ;
    MV      ?= move ;
    DOT     ?= . ;
    DOTDOT  ?= .. ;
    SUFLIB  ?= .lib ;
    SUFOBJ  ?= .obj ;
    SUFEXE  ?= .exe ;
  
    if $(TOOLSET) = WATCOM
    {
       AR           ?= wlib ;
       BINDIR       ?= \\os2\\apps ;
       CC           ?= wcc386 ;
       CCFLAGS      ?= /zq /DOS2 /I$(WATCOM)\\h ; # zq=quiet
       C++          ?= wpp386 ;
       C++FLAGS     ?= $(CCFLAGS) ;
       LINK         ?= wcl386 ;
       LINKFLAGS    ?= /zq ; # zq=quiet
       LINKLIBS     ?= ;
       NOARSCAN     ?= true ;
       OPTIM        ?= ;
       SLASH        ?= \\ ;
       STDHDRS      ?= $(WATCOM)\\h ;
       UNDEFFLAG    ?= "/u _" ;
    }
    else if $(TOOLSET) = EMX
    {
      ECHO "Compiler is GCC-EMX" ;
      AR            ?= ar -ru ;
      CC            ?= gcc ;
      CCFLAGS       ?= "" ;
      C++           ?= $(CC) ;
      C++FLAGS      ?= $(CCFLAGS) ;
      LINK          ?= $(CC) ;
      LINKFLAGS     ?= "" ;
      LINKLIBS      ?= "" ;
      OPTIM         ?= ;
      SUFOBJ         = .o ;
      SUFLIB         = .a ;
      UNDEFFLAG     ?= "-U" ;
      SLASH          = / ;
#     NOARSCAN      ?= true ;
    }
    else
    {
      # should never happen
      EXIT  "Sorry, but the $(JAM_TOOLSET) toolset isn't supported for now" ;
    }
}
else if $(VMS)
{
    C++         ?= cxx ;
    C++FLAGS    ?= ;
    CC          ?= cc ;
    CCFLAGS     ?= ;
    CHMOD       ?= set file/prot= ;
    CP          ?= copy/replace ;
    CRELIB      ?= true ;
    DOT         ?= [] ;
    DOTDOT      ?= [-] ;
    EXEMODE     ?= (w:e) ;
    FILEMODE    ?= (w:r) ;
    HDRS        ?= ;
    LINK        ?= link ;
    LINKFLAGS   ?= "" ;
    LINKLIBS    ?= ;
    MKDIR       ?= create/dir ;
    MV          ?= rename ;
    OPTIM       ?= "" ;
    RM          ?= delete ;
    RUNVMS      ?= mcr ;
    SHELLMODE   ?= (w:er) ;
    SLASH       ?= . ;
    STDHDRS     ?= decc$library_include ;
    SUFEXE      ?= .exe ;
    SUFLIB      ?= .olb ;
    SUFOBJ      ?= .obj ;

    switch $(OS) 
    {
    case OPENVMS : CCFLAGS  ?= /stand=vaxc ;
    case VMS     : LINKLIBS ?= sys$library:vaxcrtl.olb/lib ;
    }
}
else if $(MAC)
{
    local OPT ;
    
    CW  ?= "{CW}" ;

    MACHDRS ?=
        "$(UMACHDRS):Universal:Interfaces:CIncludes"
        "$(CW):MSL:MSL_C:MSL_Common:Include"
        "$(CW):MSL:MSL_C:MSL_MacOS:Include" ;

    MACLIBS ?=
        "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Interfacelib"
        "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Mathlib" ;

    MPWLIBS ?= 
        "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib"
        "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW.Lib" ;

    MPWNLLIBS ?= 
        "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib"
        "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW(NL).Lib" ;
        
    SIOUXHDRS ?= ;
    
    SIOUXLIBS ?= 
        "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.lib"
        "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL SIOUX.PPC.Lib" 
        "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC.Lib" ;

    C++         ?= mwcppc ;
    C++FLAGS    ?= -w off -nomapcr ;
    CC          ?= mwcppc ;
    CCFLAGS     ?= -w off -nomapcr ;
    CP          ?= duplicate -y ;
    DOT         ?= ":" ;
    DOTDOT      ?= "::" ;
    HDRS        ?= $(MACHDRS) $(MPWHDRS) ;
    LINK        ?= mwlinkppc ;
    LINKFLAGS   ?= -mpwtool -warn ;             
    LINKLIBS    ?= $(MACLIBS) $(MPWLIBS) ;              
    MKDIR       ?= newfolder ;
    MV          ?= rename -y ;
    NOARSCAN    ?= true ;
    OPTIM       ?= ;
    RM          ?= delete -y ;
    SLASH       ?= ":" ;
    STDHDRS     ?= ; 
    SUFLIB      ?= .lib ;
    SUFOBJ      ?= .o ;
}
else if $(OS) = BEOS && $(METROWERKS)
{
    AR          ?= mwld -xml -o ;
    BINDIR      ?= /boot/apps ;
    CC          ?= mwcc ;
    CCFLAGS     ?= -nosyspath ;
    C++         ?= $(CC) ;
    C++FLAGS    ?= -nosyspath ;
    FORTRAN     ?= "" ;
    LIBDIR      ?= /boot/develop/libraries ;
    LINK        ?= mwld ;
    LINKFLAGS   ?= "" ;
    MANDIR      ?= /boot/documentation/"Shell Tools"/HTML ;
    NOARSCAN    ?= true ;
    STDHDRS     ?= /boot/develop/headers/posix ;
}
else if $(OS) = BEOS 
{
    BINDIR      ?= /boot/apps ;
    CC          ?= gcc ;
    C++         ?= $(CC) ;
    FORTRAN     ?= "" ;
    LIBDIR      ?= /boot/develop/libraries ;
    LINK        ?= gcc ;
    LINKLIBS    ?= -lnet ;
    NOARSCAN    ?= true ;
    STDHDRS     ?= /boot/develop/headers/posix ;
}
else if $(UNIX)
{
    switch $(OS)
    {
    case AIX :
    LINKLIBS    ?= -lbsd ;

    case AMIGA :
    CC          ?= gcc ;
    YACC        ?= "bison -y" ;

    case CYGWIN :   
    CC          ?= gcc ;
    CCFLAGS     += -D__cygwin__ ;
    LEX         ?= flex ;
    RANLIB      ?= "" ;
    SUFEXE      ?= .exe ;
    YACC        ?= "bison -y" ;

    case DGUX :
    RANLIB      ?= "" ;
    RELOCATE    ?= true ;

    case HPUX :
    YACC        = ;
    CFLAGS      += -Ae ;
    CCFLAGS     += -Ae ;
    RANLIB      ?= "" ;

    case INTERIX :
    CC          ?= gcc ;
    RANLIB      ?= "" ;

    case IRIX :
    RANLIB      ?= "" ;

    case MPEIX :
    CC          ?= gcc ;
    C++         ?= gcc ;
    CCFLAGS     += -D_POSIX_SOURCE ;
    HDRS        += /usr/include ;
    RANLIB      ?= "" ; 
    NOARSCAN    ?= true ;
    NOARUPDATE  ?= true ;

    case MVS :
    RANLIB      ?= "" ; 

    case NEXT :
    AR          ?= libtool -o ;
    RANLIB      ?= "" ;

    case MACOSX :
    AR          ?= libtool -o ;
    C++         ?= c++ ;
    MANDIR      ?= /usr/local/share/man ;
    RANLIB      ?= "" ;

    case NCR :
    RANLIB      ?= "" ;

    case PTX :
    RANLIB      ?= "" ;

    case QNX :
    AR          ?= wlib ;
    CC          ?= cc ;
    CCFLAGS     ?= -Q ; # quiet
    C++         ?= $(CC) ;
    C++FLAGS    ?= -Q ; # quiet
    LINK        ?= $(CC) ;
    LINKFLAGS   ?= -Q ; # quiet
    NOARSCAN    ?= true ;
    RANLIB      ?= "" ;

    case SCO :
    RANLIB      ?= "" ;
    RELOCATE    ?= true ;

    case SINIX :
    RANLIB      ?= "" ;

    case SOLARIS :
    RANLIB      ?= "" ;
    AR          ?= "/usr/ccs/bin/ar ru" ;

    case UNICOS :
    NOARSCAN    ?= true ;
    OPTIM       ?= -O0 ;

    case UNIXWARE :
    RANLIB      ?= "" ;
    RELOCATE    ?= true ;
    }

    # UNIX defaults

    CCFLAGS     ?= ;
    C++FLAGS    ?= $(CCFLAGS) ;
    CHMOD       ?= chmod ;
    CHGRP       ?= chgrp ;
    CHOWN       ?= chown ;
    LEX         ?= lex ;
    LINKFLAGS   ?= $(CCFLAGS) ;
    LINKLIBS    ?= ;
    OPTIM       ?= -O ;
    RANLIB      ?= ranlib ;
    YACC        ?= yacc ;
    YACCFILES   ?= y.tab ;
    YACCFLAGS   ?= -d ;
}

#
# General defaults; a lot like UNIX
#

    AR          ?= ar ru ;
    AS          ?= as ;
    ASFLAGS     ?= ;
    AWK         ?= awk ;
    BINDIR      ?= /usr/local/bin ;
    C++         ?= cc ;
    C++FLAGS    ?= ;
    CC          ?= cc ;
    CCFLAGS     ?= ;
    CP          ?= cp -f ;
    CRELIB      ?= ;
    DOT         ?= . ;
    DOTDOT      ?= .. ;
    EXEMODE     ?= 711 ;
    FILEMODE    ?= 644 ;
    FORTRAN     ?= f77 ;
    FORTRANFLAGS ?= ;
    HDRS        ?= ;
    INSTALLGRIST ?= installed ;
    JAMFILE     ?= Jamfile ;
    JAMRULES    ?= Jamrules ;
    LEX         ?= ;
    LIBDIR      ?= /usr/local/lib ;
    LINK        ?= $(CC) ;
    LINKFLAGS   ?= ;
    LINKLIBS    ?= ;
    LN          ?= ln ;
    MANDIR      ?= /usr/local/man ;
    MKDIR       ?= mkdir ;
    MV          ?= mv -f ;
    OPTIM       ?= ;
    RCP         ?= rcp ;
    RM          ?= rm -f ;
    RSH         ?= rsh ;
    SED         ?= sed ;
    SHELLHEADER ?= "#!/bin/sh" ;
    SHELLMODE   ?= 755 ;
    SLASH       ?= / ;
    STDHDRS     ?= /usr/include ;
    SUFEXE      ?= "" ;
    SUFLIB      ?= .a ;
    SUFOBJ      ?= .o ;
    UNDEFFLAG   ?= "-u _" ;
    YACC        ?= ;
    YACCFILES   ?= ;
    YACCFLAGS   ?= ;

    HDRPATTERN = 
            "^[     ]*#[    ]*include[  ]*[<\"]([^\">]*)[\">].*$" ;

    OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ;


#
# Base dependencies - first for "bootstrap" kinds of rules
#

DEPENDS all : shell files lib exe obj ;
DEPENDS all shell files lib exe obj : first ;
NOTFILE all first shell files lib exe obj dirs clean uninstall ;
ALWAYS clean uninstall ;

#
# Rules
#

rule As
{
    DEPENDS $(<) : $(>) ;
    ASFLAGS on $(<) += $(ASFLAGS) $(SUBDIRASFLAGS) ;
}

rule Bulk
{
    local i ;

    for i in $(>)
    {
        File $(i:D=$(<)) : $(i) ;
    }
}

rule Cc
{
    local _h ;

    DEPENDS $(<) : $(>) ;

    # Just to clarify here: this sets the per-target CCFLAGS to
    # be the current value of (global) CCFLAGS and SUBDIRCCFLAGS.

    CCFLAGS on $(<) += $(CCFLAGS) $(SUBDIRCCFLAGS) ;

    # If the compiler's -o flag doesn't work, relocate the .o

    if $(RELOCATE)
    {
        CcMv $(<) : $(>) ;
    }

    _h = $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS) ;

    if $(VMS) && $(_h)
    {
        SLASHINC on $(<) = "/inc=(" $(_h[1]) ,$(_h[2-]) ")" ;
    }
    else if $(MAC) && $(_h)
    {
        local _i _j ;
        _j = $(_h[1]) ;
        for _i in $(_h[2-])
        {
            _j = $(_j),$(_i) ;
        }
        MACINC on $(<) = \"$(_j)\" ;
    }
}

rule C++
{
    local _h ;

    DEPENDS $(<) : $(>) ;
    C++FLAGS on $(<) += $(C++FLAGS) $(SUBDIRC++FLAGS) ;

    if $(RELOCATE)
    {
        CcMv $(<) : $(>) ;
    }

    _h = $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS) ;

    if $(VMS) && $(_h)
    {
        SLASHINC on $(<) = "/inc=(" $(_h[1]) ,$(_h[2-]) ")" ;
    }
    else if $(MAC) && $(_h)
    {
        local _i _j ;
        _j = $(_h[1]) ;
        for _i in $(_h[2-])
        {
            _j = $(_j),$(_i) ;
        }
        MACINC on $(<) = \"$(_j)\" ;
    }
}

rule Chmod
{
    if $(CHMOD) { Chmod1 $(<) ; }
}

rule File
{
    DEPENDS files : $(<) ;
    DEPENDS $(<) : $(>) ;
    SEARCH on $(>) = $(SEARCH_SOURCE) ;
    MODE on $(<) = $(FILEMODE) ;
    Chmod $(<) ;
}

rule Fortran
{
    DEPENDS $(<) : $(>) ;
}

rule GenFile 
{
    local _t = [ FGristSourceFiles $(<) ] ;
    local _s = [ FAppendSuffix $(>[1]) : $(SUFEXE) ] ;
    Depends $(_t) : $(_s) $(>[2-]) ;
    GenFile1 $(_t) : $(_s) $(>[2-]) ;
    Clean clean : $(_t) ;
}

rule GenFile1
{
    MakeLocate $(<) : $(LOCATE_SOURCE) ;
    SEARCH on $(>) = $(SEARCH_SOURCE) ;
}

rule HardLink
{
    DEPENDS files : $(<) ;
    DEPENDS $(<) : $(>) ;
    SEARCH on $(>) = $(SEARCH_SOURCE) ;
}

rule HdrMacroFile
{
  # HdrMacroFile file ;
  #
  # this rule is used to indicate that a given file contains definitions
  # for filename macros (e.g. "#define  MYFILE_H <myfile.h>") that can
  # later be used in #include statements in the rest of the source
  #
  # theses files must be parsed before any make is tried..
  #
  HDRMACRO $(<) ;
}

rule HdrRule
{
    # HdrRule source : headers ;

    # N.B.  This rule is called during binding, potentially after
    # the fate of many targets has been determined, and must be
    # used with caution: don't add dependencies to unrelated
    # targets, and don't set variables on $(<).

    # Tell Jam that anything depending on $(<) also depends on $(>),
    # set SEARCH so Jam can find the headers, but then say we don't
    # care if we can't actually find the headers (they may have been
    # within ifdefs),

    local s ;

    if $(HDRGRIST) 
    { 
        s = $(>:G=$(HDRGRIST)) ;
    } else { 
        s = $(>) ; 
    }

    INCLUDES $(<) : $(s) ;
    SEARCH on $(s) = $(HDRSEARCH) ;
    NOCARE $(s) ;

    # Propagate on $(<) to $(>)

    HDRSEARCH on $(s) = $(HDRSEARCH) ;
    HDRSCAN on $(s) = $(HDRSCAN) ;
    HDRRULE on $(s) = $(HDRRULE) ;
    HDRGRIST on $(s) = $(HDRGRIST) ;
}

rule InstallInto
{
    # InstallInto dir : sources ;

    local i t ;

    t = $(>:G=$(INSTALLGRIST)) ;

    # Arrange for jam install
    # Arrange for jam uninstall
    # sources are in SEARCH_SOURCE
    # targets are in dir

    Depends install : $(t) ;
    Clean uninstall : $(t) ;
    SEARCH on $(>) = $(SEARCH_SOURCE) ;
    MakeLocate $(t) : $(<) ;

    # For each source, make gristed target name
    # and Install, Chmod, Chown, and Chgrp

    for i in $(>)
    {
        local tt = $(i:G=$(INSTALLGRIST)) ;

        Depends $(tt) : $(i) ;
        Install $(tt) : $(i) ;
        Chmod $(tt) ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -