Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v1/kylix-tools.jam @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 4.2 KB
Line 
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.
14set-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
19if $(KYLIX_PATH)
20{
21        KYLIX_EXEC_PREFIX = "source $(KYLIX_PATH)/bin/kylixpath > /dev/null && " ;
22}
23else
24{
25        KYLIX_EXEC_PREFIX = "" ;
26}
27
28# specify compilation and link flags
29flags kylix CFLAGS <debug-symbols>on : -v ;
30flags kylix LINKFLAGS <debug-symbols>on : -v ;
31flags kylix CFLAGS <optimization>off : -Od ;
32flags kylix CFLAGS <optimization>speed : -O2 ;
33flags kylix CFLAGS <optimization>space : -O1 ;
34flags kylix CFLAGS <inlining>off : -vi- ;
35flags kylix CFLAGS <inlining>on : -vi -w-inl ;
36flags 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   
64flags kylix CFLAGS <cflags> ;
65flags kylix C++FLAGS <cxxflags> ;
66flags kylix DEFINES <define> ;
67flags kylix UNDEFS <undef> ;
68flags kylix HDRS <include> ;
69flags kylix SYSHDRS <sysinclude> ;
70flags kylix LINKFLAGS <linkflags> ;
71flags kylix ARFLAGS <arflags> ;
72flags kylix FINDLIBS : pthread ;
73flags kylix FINDLIBS : rt ;
74flags kylix FINDLIBS : m ;
75flags kylix FINDLIBS : dl ;
76flags kylix CFLAGS <threading>single : -DBOOST_NO_THREADS ;
77
78flags kylix LIBPATH <library-path> ;
79flags kylix NEEDLIBS <library-file> ;
80flags kylix FINDLIBS <find-library> ;
81
82#### Link ####
83
84rule 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
94actions 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
101rule Cc-action
102{
103    kylix-Cc-action $(<) : $(>) ;
104}
105
106actions 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++ ####
112rule 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#
133actions 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 ####
139rule Archive-action
140{
141    kylix-Archive-action $(<) : $(>) ;
142}
143
144actions updated together piecemeal kylix-Archive-action
145{
146    ar -r $(<) $(>)
147}
148
149
150
151
152
153
154
155
Note: See TracBrowser for help on using the repository browser.