Imported Upstream version 1.57.0
[platform/upstream/boost.git] / tools / build / src / tools / como-linux.jam
1 # Copyright 2004, 2005, 2006 Vladimir Prus
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 # The following #// line will be used by the regression test table generation
6 # program as the column heading for HTML tables. Must not include a version
7 # number.
8 #//<a href="http://www.comeaucomputing.com/">Comeau<br>C++</a>
9
10 import toolset ;
11 import feature ;
12 import toolset : flags ;
13 import common ;
14 import generators ;
15
16 import unix ;
17 import como ;
18
19 feature.extend-subfeature toolset como : platform : linux ;
20
21 toolset.inherit-generators como-linux
22      <toolset>como <toolset-como:platform>linux : unix ;
23 generators.override como-linux.prebuilt : builtin.lib-generator ;
24 generators.override como-linux.searched-lib-generator : searched-lib-generator ;
25 toolset.inherit-flags como-linux : unix ;
26 toolset.inherit-rules como-linux : gcc ;
27
28 generators.register-c-compiler como-linux.compile.c++ : CPP : OBJ
29     : <toolset>como <toolset-como:platform>linux ;
30 generators.register-c-compiler como-linux.compile.c : C : OBJ
31     : <toolset>como <toolset-como:platform>linux ;
32
33
34 rule init ( version ? : command * : options * )
35 {
36     local condition = [ common.check-init-parameters como-linux
37         : version $(version) ] ;
38
39     command = [ common.get-invocation-command como-linux : como
40         : $(command) ] ;
41
42     common.handle-options como-linux : $(condition) : $(command) : $(options) ;
43 }
44
45
46 flags como-linux C++FLAGS <exception-handling>off : --no_exceptions ;
47 flags como-linux C++FLAGS <exception-handling>on : --exceptions ;
48
49 flags como-linux CFLAGS <inlining>off : --no_inlining ;
50 flags como-linux CFLAGS <inlining>on <inlining>full : --inlining ;
51
52 flags como-linux CFLAGS <optimization>off : -O0 ;
53 flags como-linux CFLAGS <optimization>speed : -O3 ;
54 flags como-linux CFLAGS <optimization>space : -Os ;
55
56 flags como-linux CFLAGS <debug-symbols>on : -g ;
57 flags como-linux LINKFLAGS <debug-symbols>on : -g ;
58
59 flags como-linux FINDLIBS : m ;
60 flags como-linux FINDLIBS : rt ;
61
62 flags como-linux CFLAGS <cflags> ;
63 flags como-linux C++FLAGS <cxxflags> ;
64 flags como-linux DEFINES <define> ;
65 flags como-linux UNDEFS <undef> ;
66 flags como-linux HDRS <include> ;
67 flags como-linux STDHDRS <sysinclude> ;
68 flags como-linux LINKFLAGS <linkflags> ;
69 flags como-linux ARFLAGS <arflags> ;
70
71 flags como-linux.link LIBRARIES <library-file> ;
72 flags como-linux.link LINKPATH <library-path> ;
73 flags como-linux.link FINDLIBS-ST <find-static-library> ;
74 flags como-linux.link FINDLIBS-SA <find-shared-library> ;
75
76 flags como-linux.link RPATH <dll-path> ;
77 flags como-linux.link RPATH_LINK <xdll-path> ;
78
79
80 actions link bind LIBRARIES
81 {
82     $(CONFIG_COMMAND) $(LINKFLAGS) -o "$(<[1])" "$(>)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)"  "$(LIBRARIES)"  "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) 2>&1
83 }
84
85 actions link.dll bind LIBRARIES
86 {
87     $(CONFIG_COMMAND) $(LINKFLAGS) -shared -o "$(<[1])" "$(>)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" "$(LIBRARIES)"  "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) 2>&1
88 }
89
90 actions compile.c
91 {
92     $(CONFIG_COMMAND) -c --c99 --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" 2>&1
93 }
94
95 actions compile.c++
96 {
97     $(CONFIG_COMMAND) -tused -c --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)"  -o "$(<)" "$(>)" 2>&1
98 }
99
100 actions archive
101 {
102     ar rcu $(<) $(>)
103 }