Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

added boost

File size: 4.9 KB
Line 
1# (C) Copyright David Abrahams 2001.
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4
5# Adapted from gcc-tools.jam by Joerg Walter
6
7# The following #// line will be used by the regression test table generation
8# program as the column heading for HTML tables. Must not include version
9# number.
10#//<a href="http://www.intel.com/software/products/compilers/">Intel<br>C++</a>
11
12set-as-singleton INTEL_PATH ;
13
14INTEL_VERSION ?= $(INTEL_LINUX_VERSION) ;  # For backwards compatibility
15INTEL_CC ?= icc ;
16INTEL_CXX ?= icpc ;
17
18# Attempt to look in the PATH if no variables have been set up.
19if ! $(INTEL_VERSION) && ! $(INTEL_PATH)
20{
21    local paths = [ MATCH ^(.*/(compiler[567]0/ia32|intel_cc_[0-9]+))/ : [ GLOB $(PATH) : iccvars.sh ] ] ;
22    INTEL_PATH ?= $(paths[0]) ;
23}
24
25INTEL_VERSION ?= 80 ;
26
27# In case the path is unspecified, try to deduce it from the version
28if $(INTEL_VERSION) in 50 60 70
29{
30    INTEL_PATH ?= /opt/intel/compiler$(INTEL_VERSION)/ia32 ;
31}
32else
33{
34    INTEL_PATH ?= /opt/intel_cc_$(INTEL_VERSION) ;
35}
36
37# Root directory
38flags intel-linux INTEL_LINUX_ROOT : $(INTEL_PATH) ;
39# Setup script
40flags intel-linux INTEL_LINUX_SETUP : ". "$(INTEL_LINUX_ROOT)"/bin/iccvars.sh" ;
41# Additional DLL directory
42flags intel-linux INTEL_LINUX_RUN_LD_LIBRARY_PATH : $(INTEL_LINUX_ROOT)"/lib" ;
43
44
45#### compiler and linker switches ####
46
47# debugging
48flags intel-linux CFLAGS <debug-symbols>on : -g ;
49flags intel-linux LINKFLAGS <debug-symbols>on : -g ;
50flags intel-linux LINKFLAGS <debug-symbols>off : -Xlinker -s ;
51
52# optimizations
53flags intel-linux CFLAGS <optimization>off : -O0 ;
54flags intel-linux CFLAGS <optimization>space : -O2 ;
55flags intel-linux CFLAGS <optimization>speed : -O3 ;
56
57# standard library
58flags intel-linux CFLAGS <stdlib>gcc : -cxxlib-gcc ;
59flags intel-linux LINKFLAGS <stdlib>gcc : -cxxlib-gcc ;
60
61# inlining
62# results using -ip are worse than without?
63# flags intel-linux CFLAGS <inlining>full : -ip ;
64
65# threading
66flags intel-linux CFLAGS <threading>multi : -openmp ;
67flags intel-linux LINKFLAGS <threading>multi : -openmp ;
68
69# profiling
70flags intel-linux CFLAGS <profiling>on : -p ;
71flags intel-linux LINKFLAGS <profiling>on : -p ;
72
73# position independent code
74flags intel-linux CFLAGS <shared-linkable>true : -KPIC ;
75flags intel-linux LINKFLAGS <shared-linkable>true : -KPIC ;
76
77# dynamic link library
78flags intel-linux LINKFLAGS <target-type>$(SHARED_TYPES) : -shared ;
79
80# library linking
81flags intel-linux LINKFLAGS <runtime-link>static : -static ;
82
83# required libraries
84flags intel-linux FINDLIBS : rt ;
85flags intel-linux FINDLIBS <runtime-link>static : pthread ;
86
87
88#### standard settings ####
89
90flags intel-linux UNDEFS <undef> ;
91flags intel-linux DEFINES <define> ;
92flags intel-linux CFLAGS <cflags> ;
93flags intel-linux C++FLAGS <cxxflags> ;
94
95flags intel-linux HDRS <include> ;
96flags intel-linux LIBPATH <library-path> ;
97
98flags intel-linux NEEDLIBS <library-file> ;
99flags intel-linux FINDLIBS <find-library> ;
100
101flags intel-linux STDHDRS <sysinclude> ;
102flags intel-linux LINKFLAGS <linkflags> ;
103
104flags intel-linux ARFLAGS <arflags> ;
105
106if ! $(ARFLAGS)
107{
108    flags intel-linux ARFLAGS : "" ;
109}
110
111flags intel-linux DLLVERSION <dllversion> ;
112DLLVERSION = $(DLLVERSION[1]) ;
113DLLVERSION ?= $(BOOST_VERSION) ;
114
115flags intel-linux TARGET_TYPE <target-type> ;
116
117#### Cc ####
118
119rule Cc-action
120{
121    intel-linux-Cc-action $(<) : $(>) ;
122}
123
124actions intel-linux-Cc-action
125{
126    $(INTEL_LINUX_SETUP)
127    $(INTEL_CC) -c -w1 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
128}
129
130#### C++ ####
131
132rule C++-action
133{
134    intel-linux-C++-action $(<) : $(>) ;
135}
136
137actions intel-linux-C++-action
138{
139    $(INTEL_LINUX_SETUP)
140    $(INTEL_CXX) -c -w1 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
141}
142
143#### Archive ####
144
145rule Archive-action
146{
147    intel-linux-Archive-action $(<) : $(>) ;
148}
149
150actions updated together piecemeal intel-linux-Archive-action
151{
152    ar ru$(ARFLAGS) "$(<)" "$(>)"
153}
154
155#### Link ####
156
157rule Link-action
158{
159    local result ;
160    gRUN_LD_LIBRARY_PATH($(<)) += $(INTEL_LINUX_RUN_LD_LIBRARY_PATH) ;
161    SPACE on $(<) = " " ;
162    if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES)
163    {
164        OUTTAG on $(<) = ".$(DLLVERSION)" ;
165        SOTAG on $(<) = ".$(DLLVERSION)" ;
166        ACTION_1 on $(<) = "" ;
167        result += "$(<[1]:D=).$(DLLVERSION)" ;
168    }
169    else
170    {
171        OUTTAG on $(<) = "" ;
172        SOTAG on $(<) = ;
173        ACTION_1 on $(<) = ;
174    }
175    intel-linux-Link-action $(<) : $(>) ;
176    return $(result) ;
177}
178
179# for icc, we repeat all libraries so that dependencies are always resolved
180actions intel-linux-Link-action bind NEEDLIBS NEEDIMPS
181{
182    $(INTEL_LINUX_SETUP)
183    $(INTEL_CXX) $(LINKFLAGS) -o "$(<[1])$(OUTTAG)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" $(NEEDLIBS) $(NEEDLIBS) -l$(FINDLIBS) "$(IMPLIB_FLAGS)$(NEEDIMPS)" "-Qoption,link,-soname,$(<[1]:D=)$(SOTAG)"
184    $(ACTION_1)$(LN)$(SPACE)-fs$(SPACE)"$(<[1]:D=)$(OUTTAG)"$(SPACE)"$(<[1])"
185}
186
187
188
Note: See TracBrowser for help on using the repository browser.