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
10import toolset ;
11import feature ;
12import toolset : flags ;
13import common ;
14import generators ;
15
16import unix ;
17import como ;
18
19feature.extend-subfeature toolset como : platform : linux ;
20
21toolset.inherit-generators como-linux
22     <toolset>como <toolset-como:platform>linux : unix ;
23generators.override como-linux.prebuilt : builtin.lib-generator ;
24generators.override como-linux.searched-lib-generator : searched-lib-generator ;
25toolset.inherit-flags como-linux : unix ;
26toolset.inherit-rules como-linux : gcc ;
27
28generators.register-c-compiler como-linux.compile.c++ : CPP : OBJ
29    : <toolset>como <toolset-como:platform>linux ;
30generators.register-c-compiler como-linux.compile.c : C : OBJ
31    : <toolset>como <toolset-como:platform>linux ;
32
33
34rule 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
46flags como-linux C++FLAGS <exception-handling>off : --no_exceptions ;
47flags como-linux C++FLAGS <exception-handling>on : --exceptions ;
48
49flags como-linux CFLAGS <inlining>off : --no_inlining ;
50flags como-linux CFLAGS <inlining>on <inlining>full : --inlining ;
51
52flags como-linux CFLAGS <optimization>off : -O0 ;
53flags como-linux CFLAGS <optimization>speed : -O3 ;
54flags como-linux CFLAGS <optimization>space : -Os ;
55
56flags como-linux CFLAGS <debug-symbols>on : -g ;
57flags como-linux LINKFLAGS <debug-symbols>on : -g ;
58
59flags como-linux FINDLIBS : m ;
60flags como-linux FINDLIBS : rt ;
61
62flags como-linux CFLAGS <cflags> ;
63flags como-linux C++FLAGS <cxxflags> ;
64flags como-linux DEFINES <define> ;
65flags como-linux UNDEFS <undef> ;
66flags como-linux HDRS <include> ;
67flags como-linux STDHDRS <sysinclude> ;
68flags como-linux LINKFLAGS <linkflags> ;
69flags como-linux ARFLAGS <arflags> ;
70
71flags como-linux.link LIBRARIES <library-file> ;
72flags como-linux.link LINKPATH <library-path> ;
73flags como-linux.link FINDLIBS-ST <find-static-library> ;
74flags como-linux.link FINDLIBS-SA <find-shared-library> ;
75
76flags como-linux.link RPATH <dll-path> ;
77flags como-linux.link RPATH_LINK <xdll-path> ;
78
79
80actions 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
85actions 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
90actions compile.c
91{
92    $(CONFIG_COMMAND) -c --c99 --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" 2>&1
93}
94
95actions 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
100actions archive
101{
102    ar rcu $(<) $(>)
103}
104