Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

added boost

File size: 5.6 KB
Line 
1# (C) Copyright David Abrahams 2001.
2# (C) Copyright MetaCommunications, Inc. 2004.
3
4# Distributed under the Boost Software License, Version 1.0. (See
5# accompanying file LICENSE_1_0.txt or copy at
6# http://www.boost.org/LICENSE_1_0.txt)
7
8# The following #// line will be used by the regression test table generation
9# program as the column heading for HTML tables. Must not include version number.
10#//<a href="http://www.comeaucomputing.com/">Comeau<br>C++</a>
11
12# Feature to allow specifying files that will compile with warnings disabled.
13# This is usefull for files that use windows headers.
14free-feature no-warn ;
15
16# variables used to configure como-tools.jam
17#
18# COMO_PATH - path to installation
19# COMO_BIN_PATH - path to como executable, defaults to $(COMO_PATH)/bin/
20# COMO_INCLUDE_PATH - path to libcomo headers, defaults to $(COMO_PATH)/libcomo
21# COMO_STDLIB_PATH - path to built libcomo object, defaults to $(COMO_PATH)/libcomo
22# COMO_BACKEND - backend abbreviation, e.g. "vc71", "bcc", "dig", etc. Defaults to "vc7"
23# COMO_BACKEND_PATH - path to backend compiler root directory, defaults to $(VC7_ROOT)
24
25# Keep using COMO_BASE for backward compatibility
26set-as-singleton COMO_BASE COMO_PATH COMO_BIN_PATH COMO_INCLUDE_PATH COMO_STDLIB_PATH COMO_BACKEND COMO_BACKEND_PATH ;
27COMO_BASE ?= $(COMO_PATH) ;
28
29# compute directories for invoking como
30if ! $(COMO_PATH_SETUP) # do this once
31{
32    # Keep using COMO_BIN_DIRECTORY for backward compatibility.
33    COMO_BIN_DIRECTORY ?= $(COMO_BIN_PATH) ;
34    COMO_BIN_DIRECTORY ?= $(COMO_BASE)$(SLASH)bin$(SLASH) ;
35    COMO_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if COMO_ROOT_DIRECTORY not
36                               # set
37
38    COMO_INCLUDE_PATH ?= $(COMO_BASE)$(SLASH)libcomo ;
39    COMO_INCLUDE_PATH += $(COMO_INCLUDE_PATH)$(SLASH)cnames ;
40
41    COMO_STDLIB_PATH ?= $(COMO_BASE)$(SLASH)libcomo ;
42
43    COMO_BACKEND_SETUP = $(COMO_BACKEND_SETUP) ;
44    newline = "
45" ;
46    COMO_BACKEND ?= "vc7" ;
47    COMO_BACKEND_PATH ?= $(VC7_ROOT) ;
48    COMO_BACKEND_INCLUDE_SETUP ?= "set \"COMO_MS_INCLUDE="$(COMO_BACKEND_PATH)"/include\"" ;
49    COMO_BACKEND_LIB_SETUP ?= "set \"LIB="$(COMO_STDLIB_PATH)";%LIB%\"" ;
50    COMO_PATH_SETUP ?= "set \"PATH="$(COMO_BIN_DIRECTORY)";%PATH%\"" ;
51    COMO_BACKEND_SETUP ?= "call "\"$(COMO_BACKEND_PATH)\\..\\Common7\\Tools\\vsvars32"\" >nul" ;
52    COMO_BASE_SETUP ?= "set \"COMO_BASE=$(COMO_BASE)\"" ;
53    COMO_PATH_SETUP ?= "" ;
54    COMO_CMD = \"$(COMO_BIN_DIRECTORY)como\" --$(COMO_BACKEND) ;
55}
56
57
58flags como-win32 C++FLAGS <exception-handling>off : --no_exceptions ;
59flags como-win32 C++FLAGS <exception-handling>on : --exceptions ;
60
61flags como-win32 CFLAGS <inlining>off : --no_inlining ;
62flags como-win32 CFLAGS <inlining>on <inlining>full : --inlining ;
63
64flags como-win32 CFLAGS <debug-symbols>on : /Zi ;
65flags como-win32 CFLAGS <optimization>off : /Od ;
66
67flags como-win32 CFLAGS <cflags> ;
68flags como-win32 CFLAGS : -D_WIN32 ; # make sure that we get the Boost Win32 platform config header.
69flags como-win32 CFLAGS <threading>single : -DBOOST_SP_DISABLE_THREADS ;
70flags como-win32 CFLAGS <threading>multi : -D_MT ; # make sure that our config knows that threading is on.
71flags como-win32 C++FLAGS <cxxflags> ;
72flags como-win32 DEFINES <define> ;
73flags como-win32 UNDEFS <undef> ;
74flags como-win32 HDRS <include> ;
75flags como-win32 SYSHDRS <sysinclude> ;
76flags como-win32 LINKFLAGS <linkflags> ;
77flags como-win32 ARFLAGS <arflags> ;
78flags como-win32 NO_WARN <no-warn> ;
79
80flags como-win32 STDHDRS : $(COMO_INCLUDE_PATH) ;
81flags como-win32 STDLIB_PATH : $(COMO_STDLIB_PATH)$(SLASH) ;
82
83flags como-win32 LIBPATH <library-path> ;
84flags como-win32 NEEDLIBS <library-file> ;
85flags como-win32 FINDLIBS <find-library> ;
86
87#### Link ####
88
89rule Link-action
90{
91    with-command-file como-Link-action $(<) : $(>) ;
92}
93
94# for como, we repeat all libraries so that dependencies are always resolved
95actions como-Link-action bind NEEDLIBS
96{
97    $(COMO_BACKEND_SETUP)
98    $(COMO_BACKEND_INCLUDE_SETUP)
99    $(COMO_BACKEND_LIB_SETUP)
100    $(COMO_PATH_SETUP)
101    $(COMO_BASE_SETUP)
102    $(COMO_CMD) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(>)" "$(NEEDLIBS)" "$(FINDLIBS:S=.lib)"
103}
104
105
106#### Cc #####
107
108rule Cc-action
109{
110    if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; }
111    else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; }
112    como-Cc-action $(<) : $(>) ;
113}
114
115actions como-Cc-action
116{
117    $(COMO_BACKEND_SETUP)
118    $(COMO_BACKEND_INCLUDE_SETUP)
119    $(COMO_BACKEND_LIB_SETUP)
120    $(COMO_PATH_SETUP)
121    $(COMO_BASE_SETUP)
122    $(COMO_CMD) -c --c99 -e5 --no_version --display_error_number --diag_suppress=9,21,161,748,940,962 -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<:D=)" "$(>)"
123}
124
125#### C++ ####
126rule C++-action
127{
128    if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; }
129    else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; }
130    como-C++-action $(<) : $(>) ;
131}
132
133actions como-C++-action
134{
135    $(COMO_BACKEND_SETUP)
136    $(COMO_BACKEND_INCLUDE_SETUP)
137    $(COMO_BACKEND_LIB_SETUP)
138    $(COMO_PATH_SETUP)
139    $(COMO_BASE_SETUP)
140    $(COMO_CMD) -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 -D__STL_LONG_LONG -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
141}
142
143#### Archive ####
144
145rule Archive-action
146{
147    with-command-file como-Archive-action $(<) : $(>) ;
148}
149
150actions updated together piecemeal como-Archive-action
151{
152    $(COMO_BACKEND_SETUP)
153    $(COMO_BACKEND_INCLUDE_SETUP)
154    $(COMO_BACKEND_LIB_SETUP)
155    $(COMO_PATH_SETUP)
156    $(COMO_BASE_SETUP)
157    $(COMO_CMD) --no_version --no_prelink_verbose --prelink_object @"$(>)"
158    lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(>)"
159}
160
Note: See TracBrowser for help on using the repository browser.