1 | # (C) Copyright John Maddock 2002. |
---|
2 | # (C) Copyright David Abrahams 2001. |
---|
3 | # Distributed under the Boost Software License, Version 1.0. |
---|
4 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
---|
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.borland.com/kylix">Kylix</a> |
---|
9 | |
---|
10 | # Borland tool definitions for Kylix. |
---|
11 | |
---|
12 | # KYLIX_PATH is the install location of the kylix tools. |
---|
13 | # This will be either /usr/local/kylix3 or ~/kylix3 depending upon install options. |
---|
14 | set-as-singleton KYLIX_PATH ; |
---|
15 | |
---|
16 | # compute kylix execution prefix |
---|
17 | # You can either source the "kylixpath" shell script provided by Borland |
---|
18 | # or set KYLIX_PATH to point to your Kylix install directory |
---|
19 | if $(KYLIX_PATH) |
---|
20 | { |
---|
21 | KYLIX_EXEC_PREFIX = "source $(KYLIX_PATH)/bin/kylixpath > /dev/null && " ; |
---|
22 | } |
---|
23 | else |
---|
24 | { |
---|
25 | KYLIX_EXEC_PREFIX = "" ; |
---|
26 | } |
---|
27 | |
---|
28 | # specify compilation and link flags |
---|
29 | flags kylix CFLAGS <debug-symbols>on : -v ; |
---|
30 | flags kylix LINKFLAGS <debug-symbols>on : -v ; |
---|
31 | flags kylix CFLAGS <optimization>off : -Od ; |
---|
32 | flags kylix CFLAGS <optimization>speed : -O2 ; |
---|
33 | flags kylix CFLAGS <optimization>space : -O1 ; |
---|
34 | flags kylix CFLAGS <inlining>off : -vi- ; |
---|
35 | flags kylix CFLAGS <inlining>on : -vi -w-inl ; |
---|
36 | flags kylix CFLAGS <inlining>full : -vi -w-inl ; |
---|
37 | |
---|
38 | # build the options common to the link and C/C++ command-lines |
---|
39 | { |
---|
40 | local bcc-common-flags ; |
---|
41 | |
---|
42 | # this section sets up the target type (threading, |
---|
43 | # RTL, and console/GUI options). |
---|
44 | |
---|
45 | |
---|
46 | local target-type = [ get-values <target-type> : $(gBUILD_PROPERTIES) ] ; |
---|
47 | if ! $(target-type) || ! ( $(target-type) in $(SHARED_TYPES) ) |
---|
48 | { |
---|
49 | flags kylix bcc-common-flags <user-interface>console : -tC ; |
---|
50 | flags kylix bcc-common-flags <user-interface>gui : -t ; |
---|
51 | } |
---|
52 | else |
---|
53 | { |
---|
54 | flags kylix bcc-common-flags <runtime-link>dynamic : -tD ; |
---|
55 | } |
---|
56 | |
---|
57 | flags kylix bcc-common-flags <target-type>$(SHARED_TYPES) : -tD ; |
---|
58 | |
---|
59 | flags kylix LINKFLAGS : $(bcc-common-flags) ; |
---|
60 | flags kylix CFLAGS : $(bcc-common-flags) ; |
---|
61 | } |
---|
62 | |
---|
63 | |
---|
64 | flags kylix CFLAGS <cflags> ; |
---|
65 | flags kylix C++FLAGS <cxxflags> ; |
---|
66 | flags kylix DEFINES <define> ; |
---|
67 | flags kylix UNDEFS <undef> ; |
---|
68 | flags kylix HDRS <include> ; |
---|
69 | flags kylix SYSHDRS <sysinclude> ; |
---|
70 | flags kylix LINKFLAGS <linkflags> ; |
---|
71 | flags kylix ARFLAGS <arflags> ; |
---|
72 | flags kylix FINDLIBS : pthread ; |
---|
73 | flags kylix FINDLIBS : rt ; |
---|
74 | flags kylix FINDLIBS : m ; |
---|
75 | flags kylix FINDLIBS : dl ; |
---|
76 | flags kylix CFLAGS <threading>single : -DBOOST_NO_THREADS ; |
---|
77 | |
---|
78 | flags kylix LIBPATH <library-path> ; |
---|
79 | flags kylix NEEDLIBS <library-file> ; |
---|
80 | flags kylix FINDLIBS <find-library> ; |
---|
81 | |
---|
82 | #### Link #### |
---|
83 | |
---|
84 | rule Link-action |
---|
85 | { |
---|
86 | # Make sure that the kylix runtime dlls are in the runtime path |
---|
87 | gRUN_PATH($(<)) += $(BCC_TOOL_PATH) ; |
---|
88 | |
---|
89 | kylix-Link-action $(<) : $(>) $(NEEDLIBS) ; |
---|
90 | |
---|
91 | } |
---|
92 | |
---|
93 | |
---|
94 | actions kylix-Link-action |
---|
95 | { |
---|
96 | $(KYLIX_EXEC_PREFIX)bc++ -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -o"$(<[1])" "$(>)" lib$(FINDLIBS).so |
---|
97 | } |
---|
98 | |
---|
99 | #### Cc ##### |
---|
100 | |
---|
101 | rule Cc-action |
---|
102 | { |
---|
103 | kylix-Cc-action $(<) : $(>) ; |
---|
104 | } |
---|
105 | |
---|
106 | actions kylix-Cc-action |
---|
107 | { |
---|
108 | $(KYLIX_EXEC_PREFIX)bc++ -P- -g255 -j5 -q -c -w -a8 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" |
---|
109 | } |
---|
110 | |
---|
111 | #### C++ #### |
---|
112 | rule C++-action |
---|
113 | { |
---|
114 | kylix-C++-action $(<) : $(>) ; |
---|
115 | } |
---|
116 | |
---|
117 | # |
---|
118 | # for C++ compiles the following options are turned on by default: |
---|
119 | # |
---|
120 | # -j5 stops after 5 errors |
---|
121 | # -g255 allow an infinite number of warnings |
---|
122 | # -q no banner |
---|
123 | # -c compile to object |
---|
124 | # -P C++ code regardless of file extention |
---|
125 | # -w turns on all warnings |
---|
126 | # -Ve zero sized empty base classes, this option is on in the IDE by default |
---|
127 | # and effects binary compatibility. |
---|
128 | # -Vx zero sized empty members, this option is on in the IDE by default |
---|
129 | # and effects binary compatibility. |
---|
130 | # -a8 8 byte alignment, this option is on in the IDE by default |
---|
131 | # and effects binary compatibility. |
---|
132 | # |
---|
133 | actions kylix-C++-action |
---|
134 | { |
---|
135 | $(KYLIX_EXEC_PREFIX)bc++ -j5 -g255 -q -c -w -Ve -Vx -a8 -x -xd -RT -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" |
---|
136 | } |
---|
137 | |
---|
138 | #### Archive #### |
---|
139 | rule Archive-action |
---|
140 | { |
---|
141 | kylix-Archive-action $(<) : $(>) ; |
---|
142 | } |
---|
143 | |
---|
144 | actions updated together piecemeal kylix-Archive-action |
---|
145 | { |
---|
146 | ar -r $(<) $(>) |
---|
147 | } |
---|
148 | |
---|
149 | |
---|
150 | |
---|
151 | |
---|
152 | |
---|
153 | |
---|
154 | |
---|
155 | |
---|