Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v1/sunpro-tools.jam @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 5.2 KB
Line 
1#~ Copyright 2002 Christopher Currie, Gennadiy Rozental.
2#~ Copyright 2003 Christopher Currie.
3
4#~ Use, modification and distribution is subject to the Boost Software
5#~ License Version 1.0. (See accompanying file LICENSE_1_0.txt or
6#~ http://www.boost.org/LICENSE_1_0.txt)
7
8# The following #// line will be used by the regression test table
9# generation program as the column heading for HTML tables. Must not
10# include version number.
11#//<a href="http://wwws.sun.com/software/sundev/suncc/index.html">Sun<br>C++</a>
12
13# The sunpro toolset can be user-configured using the following
14# variables:
15#
16# SUNPRO_ROOT_DIRECTORY
17#       The directory in which Sun C++ was installed. Defaults to
18#       unset. Usually, there is no need to set this variable at all.
19#       However, if CC is not in the path it is usually sufficient
20#       to configure this one variable. More fine-grained configuration
21#       is available by setting the following:
22#
23# SUNPRO_BIN_DIRECTORY
24#       The directory prefix used to find the CC and cc executables.
25#       Defaults to $(SUNPRO_ROOT_DIRECTORY)/bin/, or "" if
26#       SUNPRO_ROOT_DIRECTORY is not set.
27#
28# SUNPRO_CXX
29#       The name by which CC is invoked. Defaults to "CC". You can also
30#       use this in lieu of setting the <cxxflags> property to force
31#       options such as "-Qoption CC -xcomdat" into the CC command line:
32#       "-sSUNPRO_CXX=CC -Qoption CC -xcomdat".
33#
34# SUNPRO_CC
35#       Similar to SUNPRO_CXX, the name by which cc is invoked for "C"
36#       language targets.
37
38# singleton variables...
39set-as-singleton SUNPRO_ROOT_DIRECTORY SUNPRO_BIN_DIRECTORY ;
40
41flags sunpro SUNPRO_BIN_DIRECTORY : $(SUNPRO_BIN_DIRECTORY) ;
42
43SUNPRO_BIN_DIRECTORY ?= $(SUNPRO_ROOT_DIRECTORY)/bin/ ;
44SUNPRO_BIN_DIRECTORY ?= "" ; # Don't clobber adjoining text if SUNPRO_ROOT_DIRECTORY isn't set
45
46# Make sure this gets set "on" the target
47flags sunpro SUNPRO_BIN_DIR : $(SUNPRO_BIN_DIRECTORY) ;
48
49flags sunpro LINKFLAGS <runtime-link>static  : -staticlib=Crun ;
50flags sunpro LINKFLAGS <target-type>$(SHARED_TYPES) : -G ;
51flags sunpro CFLAGS <debug-symbols>on : -g ;
52flags sunpro LINKFLAGS <debug-symbols>on : -g ;
53flags sunpro CFLAGS <optimization>speed : -fast -O4 ;
54
55flags sunpro CFLAGS <optimization>space : -O2 -xspace ;
56flags sunpro C++FLAGS <inlining>off : +d ;
57flags sunpro CFLAGS <threading>multi : -mt ;
58flags sunpro LINKFLAGS <threading>multi : -mt ;
59flags sunpro C++FLAGS <rtti>on  : -features=rtti ;
60flags sunpro C++FLAGS <rtti>off : -features=no%rtti ;
61flags sunpro C++FLAGS <exception-handling>on : -features=except ;
62flags sunpro C++FLAGS <exception-handling>off : -features=no%except ;
63
64flags sunpro DLLVERSION <dllversion> ;
65
66flags sunpro .CXX : $(SUNPRO_CXX) ;
67flags sunpro .CC  : $(SUNPRO_CC) ;
68
69# architecture/instruction-set options
70.ARCH = <architecture>sparc <architecture>native ;
71flags sunpro CFLAGS <architecture>native/<instruction-set>default : -xtarget=generic ;
72flags sunpro CFLAGS $(.ARCH)/<instruction-set>v7 : -xarch=v7 ;
73flags sunpro CFLAGS $(.ARCH)/<instruction-set>v8 : -xarch=v8 ;
74flags sunpro CFLAGS $(.ARCH)/<instruction-set>v9 : -xarch=v9 ;
75flags sunpro CFLAGS $(.ARCH)/<instruction-set>supersparc : -xarch=v8 -xchip=super ;
76flags sunpro CFLAGS $(.ARCH)/<instruction-set>hypersparc : -xarch=v8 -xchip=hyper ;
77flags sunpro CFLAGS $(.ARCH)/<instruction-set>ultrasparc : -xarch=v8plus -xchip=ultra ;
78
79# The POSIX real-time library is always needed (nanosleep, clock_gettime etc.)
80flags sunpro FINDLIBS : rt ;
81
82flags sunpro CFLAGS <cflags> ;
83flags sunpro C++FLAGS <cxxflags> ;
84flags sunpro DEFINES <define> ;
85flags sunpro UNDEFS <undef> ;
86flags sunpro HDRS <include> ;
87flags sunpro SYSHDRS <sysinclude> ;
88flags sunpro LINKFLAGS <linkflags> ;
89flags sunpro LINKFLAGS <debug-symbols>off : -s ;
90flags sunpro ARFLAGS <arflags> ;
91flags sunpro LIBPATH <library-path> ;
92flags sunpro NEEDLIBS <library-file> ;
93flags sunpro FINDLIBS <find-library> ;
94
95flags sunpro TARGET_TYPE <target-type> ;
96
97.CXX ?= CC ;
98.CC  ?= cc ;
99
100#### Link ####
101
102rule Link-action
103{
104    _ on $(<) = " " ;
105
106    if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES)
107    {
108        SO_EXT on $(<) = ".$(DLLVERSION)" ;
109        SO_VER on $(<) = ".$(DLLVERSION)" ;
110        DO_LN  on $(<) = "" ;
111    }
112    else
113    {
114        SO_EXT on $(<) = "" ;
115        SO_VER on $(<) = ;
116        DO_LN  on $(<) = ;
117    }
118
119    sunpro-Link-action $(<) : $(>) ;
120}
121
122actions together sunpro-Link-action bind NEEDLIBS
123{
124    $(.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)
125    $(DO_LN)$(LN)$(_)"$(<[1]:T)$(SO_EXT)"$(_)"$(<[1])"
126}
127
128#### Archive ####
129
130rule Archive-action
131{
132    sunpro-Archive-action $(<) : $(>) ;
133}
134
135actions together sunpro-Archive-action
136{
137    $(.CXX[1]:R=$(SUNPRO_BIN_DIR)) $(.CXX[2]) -xar -o "$(<:T)" "$(>:T)"
138}
139
140#### Cc #####
141
142rule Cc-action
143{
144    sunpro-Cc-action $(<) : $(>) ;
145}
146
147actions sunpro-Cc-action
148{
149    $(.CC[1]:R=$(SUNPRO_BIN_DIR)) $(.CC[2-]) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
150}
151
152#### C++ ####
153rule C++-action
154{
155    sunpro-C++-action $(<) : $(>) ;
156}
157
158actions sunpro-C++-action
159{
160    $(.CXX[1]:R=$(SUNPRO_BIN_DIR)) $(.CXX[2-]) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
161}
162
Note: See TracBrowser for help on using the repository browser.