mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
114 lines
3.4 KiB
Plaintext
114 lines
3.4 KiB
Plaintext
# (C) Copyright Christopher Currie, Gennadiy Rozental 2002.
|
|
# Permission to copy, use, modify, sell and distribute this software
|
|
# is granted provided this copyright notice appears in all copies.
|
|
# This software is provided "as is" without express or implied warranty,
|
|
# and with no claim as to its suitability for any purpose.
|
|
|
|
# Sun Workshop 6 C++ compiler
|
|
|
|
# singleton variables...
|
|
set-as-singleton SUNPRO_ROOT SUNPRO_BIN_PATH ;
|
|
|
|
# compute sunpro bin path
|
|
# You can either put the sunpro bin directory in your PATH, or you can set
|
|
# SUNPRO_ROOT to point at the sunpro installation directory, or you can set
|
|
# SUNPRO_BIN_PATH to point at sunpro bin directory
|
|
|
|
SUNPRO_BIN_PATH = $(SUNPRO_ROOT)$(SLASH)bin$(SLASH) ;
|
|
SUNPRO_BIN_PATH ?= "" ; # Don't clobber adjoining text if SUNPRO_ROOT isn't set
|
|
|
|
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 : -lrt ;
|
|
|
|
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 ;
|
|
|
|
# architecture/instruction-set options, a la gcc
|
|
.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 ;
|
|
|
|
flags sunpro CFLAGS <cflags> ;
|
|
flags sunpro C++FLAGS <cxxflags> ;
|
|
flags sunpro DEFINES <define> ;
|
|
flags sunpro UNDEFS <undef> ;
|
|
flags sunpro HDRS <include> ;
|
|
flags sunpro STDHDRS <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> ;
|
|
|
|
#### Link ####
|
|
|
|
rule Link-action
|
|
{
|
|
sunpro-Link-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions together sunpro-Link-action bind NEEDLIBS
|
|
{
|
|
$(SUNPRO_BIN_PATH)CC -o "$(<:T)" -xildoff -L$(LIBPATH) $(LINKFLAGS) "$(>:T)" "$(NEEDLIBS)" "-l$(FINDLIBS)"
|
|
}
|
|
|
|
#### Archive ####
|
|
|
|
rule Archive-action
|
|
{
|
|
sunpro-Archive-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions together sunpro-Archive-action
|
|
{
|
|
$(SUNPRO_BIN_PATH)CC -xar $(ARFLAGS) -o "$(<:T)" "$(>:T)"
|
|
}
|
|
|
|
#### Cc #####
|
|
|
|
rule Cc-action
|
|
{
|
|
SPACE on $(<) = " " ;
|
|
sunpro-Cc-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions sunpro-Cc-action
|
|
{
|
|
$(SUNPRO_BIN_PATH)CC -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
|
}
|
|
|
|
#### C++ ####
|
|
rule C++-action
|
|
{
|
|
SPACE on $(<) = " " ;
|
|
sunpro-C++-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions sunpro-C++-action
|
|
{
|
|
$(SUNPRO_BIN_PATH)CC -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
|
}
|
|
|