#~ Copyright 2002 Christopher Currie, Gennadiy Rozental. #~ Copyright 2003 Christopher Currie. #~ Distributed under the Boost Software License, Version 1.0. #~ (See accompanying file LICENSE_1_0.txt or copy at #~ 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. #//Sun
C++
# 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 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 static : -staticlib=Crun ; flags sunpro LINKFLAGS $(SHARED_TYPES) : -G ; flags sunpro CFLAGS on : -g ; flags sunpro LINKFLAGS on : -g ; flags sunpro CFLAGS speed : -fast -O4 ; flags sunpro CFLAGS space : -O2 -xspace ; flags sunpro C++FLAGS off : +d ; flags sunpro CFLAGS multi : -mt ; flags sunpro LINKFLAGS multi : -mt ; flags sunpro C++FLAGS on : -features=rtti ; flags sunpro C++FLAGS off : -features=no%rtti ; flags sunpro C++FLAGS on : -features=except ; flags sunpro C++FLAGS off : -features=no%except ; flags sunpro DLLVERSION ; flags sunpro .CXX : $(SUNPRO_CXX) ; flags sunpro .CC : $(SUNPRO_CC) ; # architecture/instruction-set options .ARCH = sparc native ; flags sunpro CFLAGS native/default : -xtarget=generic ; flags sunpro CFLAGS $(.ARCH)/v7 : -xarch=v7 ; flags sunpro CFLAGS $(.ARCH)/v8 : -xarch=v8 ; flags sunpro CFLAGS $(.ARCH)/v9 : -xarch=v9 ; flags sunpro CFLAGS $(.ARCH)/supersparc : -xarch=v8 -xchip=super ; flags sunpro CFLAGS $(.ARCH)/hypersparc : -xarch=v8 -xchip=hyper ; flags sunpro CFLAGS $(.ARCH)/ultrasparc : -xarch=v8plus -xchip=ultra ; # The POSIX real-time library is always needed (nanosleep, clock_gettime etc.) flags sunpro FINDLIBS : rt ; flags sunpro CFLAGS ; flags sunpro C++FLAGS ; flags sunpro DEFINES ; flags sunpro UNDEFS ; flags sunpro HDRS ; flags sunpro SYSHDRS ; flags sunpro LINKFLAGS ; flags sunpro LINKFLAGS off : -s ; flags sunpro ARFLAGS ; flags sunpro LIBPATH ; flags sunpro NEEDLIBS ; flags sunpro FINDLIBS ; flags sunpro 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 "$(<)" "$(>)" }