📄 como-win32-tools.jam
字号:
# (C) Copyright David Abrahams 2001.
# (C) Copyright MetaCommunications, Inc. 2004.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# The following #// line will be used by the regression test table generation
# program as the column heading for HTML tables. Must not include version number.
#//<a href="http://www.comeaucomputing.com/">Comeau<br>C++</a>
# Feature to allow specifying files that will compile with warnings disabled.
# This is usefull for files that use windows headers.
free-feature no-warn ;
# variables used to configure como-tools.jam
#
# COMO_PATH - path to installation
# COMO_BIN_PATH - path to como executable, defaults to $(COMO_PATH)/bin/
# COMO_INCLUDE_PATH - path to libcomo headers, defaults to $(COMO_PATH)/libcomo
# COMO_STDLIB_PATH - path to built libcomo object, defaults to $(COMO_PATH)/libcomo
# COMO_BACKEND - backend abbreviation, e.g. "vc71", "bcc", "dig", etc. Defaults to "vc7"
# COMO_BACKEND_PATH - path to backend compiler root directory, defaults to $(VC7_ROOT)
# Keep using COMO_BASE for backward compatibility
set-as-singleton COMO_BASE COMO_PATH COMO_BIN_PATH COMO_INCLUDE_PATH COMO_STDLIB_PATH COMO_BACKEND COMO_BACKEND_PATH ;
COMO_BASE ?= $(COMO_PATH) ;
# compute directories for invoking como
if ! $(COMO_PATH_SETUP) # do this once
{
# Keep using COMO_BIN_DIRECTORY for backward compatibility.
COMO_BIN_DIRECTORY ?= $(COMO_BIN_PATH) ;
COMO_BIN_DIRECTORY ?= $(COMO_BASE)$(SLASH)bin$(SLASH) ;
COMO_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if COMO_ROOT_DIRECTORY not
# set
COMO_INCLUDE_PATH ?= $(COMO_BASE)$(SLASH)libcomo ;
COMO_INCLUDE_PATH += $(COMO_INCLUDE_PATH)$(SLASH)cnames ;
COMO_STDLIB_PATH ?= $(COMO_BASE)$(SLASH)libcomo ;
COMO_BACKEND_SETUP = $(COMO_BACKEND_SETUP) ;
newline = "
" ;
COMO_BACKEND ?= "vc7" ;
COMO_BACKEND_PATH ?= $(VC7_ROOT) ;
COMO_BACKEND_INCLUDE_SETUP ?= "set \"COMO_MS_INCLUDE="$(COMO_BACKEND_PATH)"/include\"" ;
COMO_BACKEND_LIB_SETUP ?= "set \"LIB="$(COMO_STDLIB_PATH)";%LIB%\"" ;
COMO_PATH_SETUP ?= "set \"PATH="$(COMO_BIN_DIRECTORY)";%PATH%\"" ;
COMO_BACKEND_SETUP ?= "call "\"$(COMO_BACKEND_PATH)\\..\\Common7\\Tools\\vsvars32"\" >nul" ;
COMO_BASE_SETUP ?= "set \"COMO_BASE=$(COMO_BASE)\"" ;
COMO_PATH_SETUP ?= "" ;
COMO_CMD = \"$(COMO_BIN_DIRECTORY)como\" --$(COMO_BACKEND) ;
}
flags como-win32 C++FLAGS <exception-handling>off : --no_exceptions ;
flags como-win32 C++FLAGS <exception-handling>on : --exceptions ;
flags como-win32 CFLAGS <inlining>off : --no_inlining ;
flags como-win32 CFLAGS <inlining>on <inlining>full : --inlining ;
flags como-win32 CFLAGS <debug-symbols>on : /Zi ;
flags como-win32 CFLAGS <optimization>off : /Od ;
flags como-win32 CFLAGS <cflags> ;
flags como-win32 CFLAGS : -D_WIN32 ; # make sure that we get the Boost Win32 platform config header.
flags como-win32 CFLAGS <threading>single : -DBOOST_SP_DISABLE_THREADS ;
flags como-win32 CFLAGS <threading>multi : -D_MT ; # make sure that our config knows that threading is on.
flags como-win32 C++FLAGS <cxxflags> ;
flags como-win32 DEFINES <define> ;
flags como-win32 UNDEFS <undef> ;
flags como-win32 HDRS <include> ;
flags como-win32 SYSHDRS <sysinclude> ;
flags como-win32 LINKFLAGS <linkflags> ;
flags como-win32 ARFLAGS <arflags> ;
flags como-win32 NO_WARN <no-warn> ;
flags como-win32 STDHDRS : $(COMO_INCLUDE_PATH) ;
flags como-win32 STDLIB_PATH : $(COMO_STDLIB_PATH)$(SLASH) ;
flags como-win32 LIBPATH <library-path> ;
flags como-win32 NEEDLIBS <library-file> ;
flags como-win32 FINDLIBS <find-library> ;
#### Link ####
rule Link-action
{
with-command-file como-Link-action $(<) : $(>) ;
}
# for como, we repeat all libraries so that dependencies are always resolved
actions como-Link-action bind NEEDLIBS
{
$(COMO_BACKEND_SETUP)
$(COMO_BACKEND_INCLUDE_SETUP)
$(COMO_BACKEND_LIB_SETUP)
$(COMO_PATH_SETUP)
$(COMO_BASE_SETUP)
$(COMO_CMD) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(>)" "$(NEEDLIBS)" "$(FINDLIBS:S=.lib)"
}
#### Cc #####
rule Cc-action
{
if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; }
else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; }
como-Cc-action $(<) : $(>) ;
}
actions como-Cc-action
{
$(COMO_BACKEND_SETUP)
$(COMO_BACKEND_INCLUDE_SETUP)
$(COMO_BACKEND_LIB_SETUP)
$(COMO_PATH_SETUP)
$(COMO_BASE_SETUP)
$(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=)" "$(>)"
}
#### C++ ####
rule C++-action
{
if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; }
else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; }
como-C++-action $(<) : $(>) ;
}
actions como-C++-action
{
$(COMO_BACKEND_SETUP)
$(COMO_BACKEND_INCLUDE_SETUP)
$(COMO_BACKEND_LIB_SETUP)
$(COMO_PATH_SETUP)
$(COMO_BASE_SETUP)
$(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 "$(<)" "$(>)"
}
#### Archive ####
rule Archive-action
{
with-command-file como-Archive-action $(<) : $(>) ;
}
actions updated together piecemeal como-Archive-action
{
$(COMO_BACKEND_SETUP)
$(COMO_BACKEND_INCLUDE_SETUP)
$(COMO_BACKEND_LIB_SETUP)
$(COMO_PATH_SETUP)
$(COMO_BASE_SETUP)
$(COMO_CMD) --no_version --no_prelink_verbose --prelink_object @"$(>)"
lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(>)"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -