1 | # modify, sell and distribute this software is granted provided this |
---|
2 | # copyright notice appears in all copies. This software is provided |
---|
3 | # "as is" without express or implied warranty, and with no claim as |
---|
4 | # to its suitability for any purpose. |
---|
5 | |
---|
6 | # The following #// line will be used by the regression test table generation |
---|
7 | # program as the column heading for HTML tables. Must not include version 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 builtin.lib-generator : como-linux.prebuilt ; |
---|
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 | rule init ( version ? : command * : options * ) |
---|
34 | { |
---|
35 | local condition = [ common.check-init-parameters como-linux |
---|
36 | : version $(version) ] ; |
---|
37 | |
---|
38 | command = [ common.get-invocation-command como-linux : como |
---|
39 | : $(command) ] ; |
---|
40 | |
---|
41 | common.handle-options como-linux : $(condition) : $(command) : $(options) ; |
---|
42 | } |
---|
43 | |
---|
44 | flags como-linux C++FLAGS <exception-handling>off : --no_exceptions ; |
---|
45 | flags como-linux C++FLAGS <exception-handling>on : --exceptions ; |
---|
46 | |
---|
47 | flags como-linux CFLAGS <inlining>off : --no_inlining ; |
---|
48 | flags como-linux CFLAGS <inlining>on <inlining>full : --inlining ; |
---|
49 | |
---|
50 | flags como-linux CFLAGS <optimization>off : -O0 ; |
---|
51 | flags como-linux CFLAGS <optimization>speed : -O3 ; |
---|
52 | flags como-linux CFLAGS <optimization>space : -Os ; |
---|
53 | |
---|
54 | flags como-linux CFLAGS <debug-symbols>on : -g ; |
---|
55 | flags como-linux LINKFLAGS <debug-symbols>on : -g ; |
---|
56 | |
---|
57 | flags como-linux FINDLIBS : m ; |
---|
58 | flags como-linux FINDLIBS : rt ; |
---|
59 | |
---|
60 | flags como-linux CFLAGS <cflags> ; |
---|
61 | flags como-linux C++FLAGS <cxxflags> ; |
---|
62 | flags como-linux DEFINES <define> ; |
---|
63 | flags como-linux UNDEFS <undef> ; |
---|
64 | flags como-linux HDRS <include> ; |
---|
65 | flags como-linux STDHDRS <sysinclude> ; |
---|
66 | flags como-linux LINKFLAGS <linkflags> ; |
---|
67 | flags como-linux ARFLAGS <arflags> ; |
---|
68 | |
---|
69 | flags como-linux.link LIBRARIES <library-file> ; |
---|
70 | flags como-linux.link LINKPATH <library-path> ; |
---|
71 | flags como-linux.link FINDLIBS-ST <find-static-library> ; |
---|
72 | flags como-linux.link FINDLIBS-SA <find-shared-library> ; |
---|
73 | |
---|
74 | flags como-linux.link RPATH <dll-path> ; |
---|
75 | flags como-linux.link RPATH_LINK <xdll-path> ; |
---|
76 | |
---|
77 | |
---|
78 | actions link bind LIBRARIES |
---|
79 | { |
---|
80 | $(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 |
---|
81 | } |
---|
82 | |
---|
83 | actions link.dll bind LIBRARIES |
---|
84 | { |
---|
85 | $(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 |
---|
86 | } |
---|
87 | |
---|
88 | actions compile.c |
---|
89 | { |
---|
90 | $(CONFIG_COMMAND) -c --c99 --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" 2>&1 |
---|
91 | } |
---|
92 | |
---|
93 | actions compile.c++ |
---|
94 | { |
---|
95 | $(CONFIG_COMMAND) -tused -c --long_long -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" 2>&1 |
---|
96 | } |
---|
97 | |
---|
98 | actions archive |
---|
99 | { |
---|
100 | ar rcu $(<) $(>) |
---|
101 | } |
---|
102 | |
---|