File: intel-linux-tools.jam

package info (click to toggle)
boost 1.27.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 19,908 kB
  • ctags: 26,546
  • sloc: cpp: 122,225; ansic: 10,956; python: 4,412; sh: 855; yacc: 803; makefile: 257; perl: 165; lex: 90; csh: 6
file content (130 lines) | stat: -rw-r--r-- 3,308 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# (C) Copyright David Abrahams 2001. 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.

# Adapted from gcc-tools.jam by Joerg Walter

# Intel root directory set?
if ! $(IA32ROOT)
{
    # Compiler version
    INTEL_LINUX_VERSION ?= "50" ;
}
# Root directory
INTEL_LINUX_ROOT = "/opt/intel/compiler"$(INTEL_LINUX_VERSION) ;
# Setup script
INTEL_LINUX_SETUP = ". "$(INTEL_LINUX_ROOT)"/ia32/bin/iccvars.sh" ;
# Additional DLL directory
INTEL_LINUX_RUN_LD_LIBRARY_PATH = $(INTEL_LINUX_ROOT)"/ia32/lib" ;

#### compiler and linker switches ####

# debugging
flags intel-linux CFLAGS <debug-symbols>on : -g ;
flags intel-linux LINKFLAGS <debug-symbols>on : -g ;

# optimizations
flags intel-linux CFLAGS <optimization>off : -O0 ;
flags intel-linux CFLAGS <optimization>space : -O2 ;
flags intel-linux CFLAGS <optimization>speed : -O3 ;

# inlining
# results using -ip are worse than without?
# flags intel-linux CFLAGS <inlining>full : -ip ;

# threading
flags intel-linux CFLAGS <threading>multi : -openmp ;
flags intel-linux LINKFLAGS <threading>multi : -openmp ;

# profiling
flags intel-linux CFLAGS <profiling>on : -p ;
flags intel-linux LINKFLAGS <profiling>on : -p ;

# position independent code
flags intel-linux CFLAGS <shared-linkable>true : -KPIC ;
flags intel-linux LINKFLAGS <shared-linkable>true : -KPIC ;

# dynamic link library
flags intel-linux LINKFLAGS <target-type>$(SHARED_TYPES) : -shared ;

# library linking
flags intel-linux LINKFLAGS <runtime-link>static : -static ;

#### standard settings ####

flags intel-linux UNDEFS <undef> ;
flags intel-linux DEFINES <define> ;
flags intel-linux CFLAGS <cflags> ;
flags intel-linux C++FLAGS <cxxflags> ;

flags intel-linux HDRS <include> ;
flags intel-linux LIBPATH <library-path> ;

flags intel-linux NEEDLIBS <library-file> ;
flags intel-linux FINDLIBS <find-library> ;

flags intel-linux STDHDRS <sysinclude> ;
flags intel-linux LINKFLAGS <linkflags> ;

flags intel-linux ARFLAGS <arflags> ;

if ! $(ARFLAGS)
{
    flags intel-linux ARFLAGS : "" ;
}

#### Cc ####

rule Cc-action
{
    intel-linux-Cc-action $(<) : $(>) ;
}

actions intel-linux-Cc-action
{
    $(INTEL_LINUX_SETUP)
    icc -c -w1 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### C++ ####

rule C++-action
{
    intel-linux-C++-action $(<) : $(>) ;
}

actions intel-linux-C++-action
{
    $(INTEL_LINUX_SETUP)
    icc -c -w1 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
}

#### Archive ####

rule Archive-action
{
    intel-linux-Archive-action $(<) : $(>) ;
}

actions updated together piecemeal intel-linux-Archive-action
{
    ar ru$(ARFLAGS) "$(<)" "$(>)"
}

#### Link ####

rule Link-action
{
    gRUN_LD_LIBRARY_PATH($(<)) += $(INTEL_LINUX_RUN_LD_LIBRARY_PATH) ;
    intel-linux-Link-action $(<) : $(>) ;
}

# for icc, we repeat all libraries so that dependencies are always resolved
actions intel-linux-Link-action bind NEEDLIBS
{
    $(INTEL_LINUX_SETUP)
    icc $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" -l$(FINDLIBS) "$(NEEDLIBS)" "$(NEEDLIBS)"
}