📄 sunpro-tools.jam
字号:
#~ Copyright 2002 Christopher Currie, Gennadiy Rozental.
#~ Copyright 2003 Christopher Currie.
#~ Use, modification and distribution is subject to the Boost Software
#~ License Version 1.0. (See accompanying file LICENSE_1_0.txt or
#~ http://www.boost.org/LICENSE_1_0.txt)
# The following #// line will be used by the regression test table
# generation program as the column heading for HTML tables. Must not
# include version number.
#//<a href="http://wwws.sun.com/software/sundev/suncc/index.html">Sun<br>C++</a>
# The sunpro toolset can be user-configured using the following
# variables:
#
# SUNPRO_ROOT_DIRECTORY
# The directory in which Sun C++ was installed. Defaults to
# unset. Usually, there is no need to set this variable at all.
# However, if CC is not in the path it is usually sufficient
# to configure this one variable. More fine-grained configuration
# is available by setting the following:
#
# SUNPRO_BIN_DIRECTORY
# The directory prefix used to find the CC and cc executables.
# Defaults to $(SUNPRO_ROOT_DIRECTORY)/bin/, or "" if
# SUNPRO_ROOT_DIRECTORY is not set.
#
# SUNPRO_CXX
# The name by which CC is invoked. Defaults to "CC". You can also
# use this in lieu of setting the <cxxflags> property to force
# options such as "-Qoption CC -xcomdat" into the CC command line:
# "-sSUNPRO_CXX=CC -Qoption CC -xcomdat".
#
# SUNPRO_CC
# Similar to SUNPRO_CXX, the name by which cc is invoked for "C"
# language targets.
# singleton variables...
set-as-singleton SUNPRO_ROOT_DIRECTORY SUNPRO_BIN_DIRECTORY ;
flags sunpro SUNPRO_BIN_DIRECTORY : $(SUNPRO_BIN_DIRECTORY) ;
SUNPRO_BIN_DIRECTORY ?= $(SUNPRO_ROOT_DIRECTORY)/bin/ ;
SUNPRO_BIN_DIRECTORY ?= "" ; # Don't clobber adjoining text if SUNPRO_ROOT_DIRECTORY isn't set
# Make sure this gets set "on" the target
flags sunpro SUNPRO_BIN_DIR : $(SUNPRO_BIN_DIRECTORY) ;
flags sunpro LINKFLAGS <runtime-link>static : -staticlib=Crun ;
flags sunpro LINKFLAGS <target-type>$(SHARED_TYPES) : -G ;
flags sunpro CFLAGS <debug-symbols>on : -g ;
flags sunpro LINKFLAGS <debug-symbols>on : -g ;
flags sunpro CFLAGS <optimization>speed : -fast -O4 ;
flags sunpro CFLAGS <optimization>space : -O2 -xspace ;
flags sunpro C++FLAGS <inlining>off : +d ;
flags sunpro CFLAGS <threading>multi : -mt ;
flags sunpro LINKFLAGS <threading>multi : -mt ;
flags sunpro C++FLAGS <rtti>on : -features=rtti ;
flags sunpro C++FLAGS <rtti>off : -features=no%rtti ;
flags sunpro C++FLAGS <exception-handling>on : -features=except ;
flags sunpro C++FLAGS <exception-handling>off : -features=no%except ;
flags sunpro DLLVERSION <dllversion> ;
flags sunpro .CXX : $(SUNPRO_CXX) ;
flags sunpro .CC : $(SUNPRO_CC) ;
# architecture/instruction-set options
.ARCH = <architecture>sparc <architecture>native ;
flags sunpro CFLAGS <architecture>native/<instruction-set>default : -xtarget=generic ;
flags sunpro CFLAGS $(.ARCH)/<instruction-set>v7 : -xarch=v7 ;
flags sunpro CFLAGS $(.ARCH)/<instruction-set>v8 : -xarch=v8 ;
flags sunpro CFLAGS $(.ARCH)/<instruction-set>v9 : -xarch=v9 ;
flags sunpro CFLAGS $(.ARCH)/<instruction-set>supersparc : -xarch=v8 -xchip=super ;
flags sunpro CFLAGS $(.ARCH)/<instruction-set>hypersparc : -xarch=v8 -xchip=hyper ;
flags sunpro CFLAGS $(.ARCH)/<instruction-set>ultrasparc : -xarch=v8plus -xchip=ultra ;
# The POSIX real-time library is always needed (nanosleep, clock_gettime etc.)
flags sunpro FINDLIBS : rt ;
flags sunpro CFLAGS <cflags> ;
flags sunpro C++FLAGS <cxxflags> ;
flags sunpro DEFINES <define> ;
flags sunpro UNDEFS <undef> ;
flags sunpro HDRS <include> ;
flags sunpro SYSHDRS <sysinclude> ;
flags sunpro LINKFLAGS <linkflags> ;
flags sunpro LINKFLAGS <debug-symbols>off : -s ;
flags sunpro ARFLAGS <arflags> ;
flags sunpro LIBPATH <library-path> ;
flags sunpro NEEDLIBS <library-file> ;
flags sunpro FINDLIBS <find-library> ;
flags sunpro TARGET_TYPE <target-type> ;
.CXX ?= CC ;
.CC ?= cc ;
#### Link ####
rule Link-action
{
_ on $(<) = " " ;
if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES)
{
SO_EXT on $(<) = ".$(DLLVERSION)" ;
SO_VER on $(<) = ".$(DLLVERSION)" ;
DO_LN on $(<) = "" ;
}
else
{
SO_EXT on $(<) = "" ;
SO_VER on $(<) = ;
DO_LN on $(<) = ;
}
sunpro-Link-action $(<) : $(>) ;
}
actions together sunpro-Link-action bind NEEDLIBS
{
$(.CXX[1]:R=$(SUNPRO_BIN_DIR)) $(.CXX[2-]) -xildoff -h,$(<[1]:D=)$(SO_VER) $(LINKFLAGS) -o "$(<[1]:T)$(SO_EXT)" -L"$(LIBPATH:T)" -L"$(STDLIBPATH)" "$(>)" "$(NEEDLIBS)" -l$(FINDLIBS)
$(DO_LN)$(LN)$(_)"$(<[1]:T)$(SO_EXT)"$(_)"$(<[1])"
}
#### Archive ####
rule Archive-action
{
sunpro-Archive-action $(<) : $(>) ;
}
actions together sunpro-Archive-action
{
$(.CXX[1]:R=$(SUNPRO_BIN_DIR)) $(.CXX[2]) -xar -o "$(<:T)" "$(>:T)"
}
#### Cc #####
rule Cc-action
{
sunpro-Cc-action $(<) : $(>) ;
}
actions sunpro-Cc-action
{
$(.CC[1]:R=$(SUNPRO_BIN_DIR)) $(.CC[2-]) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
}
#### C++ ####
rule C++-action
{
sunpro-C++-action $(<) : $(>) ;
}
actions sunpro-C++-action
{
$(.CXX[1]:R=$(SUNPRO_BIN_DIR)) $(.CXX[2-]) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -