2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00
Files
build/v2/tools/dmc.jam
Vladimir Prus 0d816a85b8 Port Digital Marc toolset from V1
[SVN r32732]
2006-02-08 12:40:46 +00:00

119 lines
4.0 KiB
Plaintext

# Digital Mars C++
# (C) Copyright Christof Meerwald 2003.
# (C) Copyright Aleksey Gurtovoy 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.digitalmars.com/">Digital<br>Mars C++</a>
import feature generators common ;
import toolset : flags ;
feature.extend toolset : dmc ;
rule init ( version ? : command * : options * )
{
local condition = [ common.check-init-parameters dmc : version $(version) ] ;
local command = [ common.get-invocation-command dmc : dmc : $(command) ] ;
command ?= dmc ;
common.handle-options dmc : $(condition) : $(command) : $(options) ;
if $(command)
{
command = [ common.get-absolute-tool-path $(command[-1]) ] ;
}
root = $(command:D) ;
if $(root)
{
flags dmc .root $(condition) : $(root)/bin/ ;
}
else
{
flags dmc .root $(condition) : "" ;
}
}
# Declare generators
generators.register-linker dmc.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>dmc ;
generators.register-linker dmc.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : <toolset>dmc ;
generators.register-archiver dmc.archive : OBJ : STATIC_LIB : <toolset>dmc ;
generators.register-c-compiler dmc.compile.c++ : CPP : OBJ : <toolset>dmc ;
generators.register-c-compiler dmc.compile.c : C : OBJ : <toolset>dmc ;
# Declare flags
# FIXME: what's this 'debug-store'?
#flags dmc.compile OPTIONS <debug-symbols>on/<debug-store>object : -g ;
flags dmc.compile OPTIONS <debug-symbols>on : -g ;
flags dmc.link <debug-symbols>on : -co ;
flags dmc.compile OPTIONS <optimization>off : -S -o+none ;
flags dmc.compile OPTIONS <optimization>speed : -o+time ;
flags dmc.compile OPTIONS <optimization>space : -o+space ;
flags dmc.compile OPTIONS <exception-handling>on : -Ae ;
flags dmc.compile OPTIONS <rtti>on : -Ar ;
# Note that these two options actually imply multithreading support on DMC
# because there is no single-threaded dynamic runtime library. Specifying
# <threading>multi would be a bad idea, though, because no option would be
# matched when the build uses the default settings of <runtime-link>dynamic
# and <threading>single.
flags dmc.compile OPTIONS <runtime-debugging>off/<runtime-link>shared : -ND ;
flags dmc.compile OPTIONS <runtime-debugging>on/<runtime-link>shared : -ND ;
flags dmc.compile OPTIONS <runtime-debugging>off/<runtime-link>static/<threading>single : ;
flags dmc.compile OPTIONS <runtime-debugging>on/<runtime-link>static/<threading>single : ;
flags dmc.compile OPTIONS <runtime-debugging>off/<runtime-link>static/<threading>multi : -D_MT ;
flags dmc.compile OPTIONS <runtime-debugging>on/<runtime-link>static/<threading>multi : -D_MT ;
flags dmc.compile OPTIONS : <cflags> ;
flags dmc.compile.c++ OPTIONS : <cxxflags> ;
flags dmc.compile DEFINES : <define> ;
flags dmc.compile INCLUDES : <include> ;
flags dmc.link <linkflags> ;
flags dmc.archive OPTIONS <arflags> ;
flags dmc LIBPATH <library-path> ;
flags dmc LIBRARIES <library-file> ;
flags dmc FINDLIBS <find-library-sa> ;
flags dmc FINDLIBS <find-library-st> ;
# FIXME: what's this?
# flags msvc STDHDRS : $(DMC_ROOT)$(SLASH)include ;
# FIXME: how one action handles both linking of executables and
# shared libraries? Does it work for shared libraries at all?
actions together link bind LIBRARIES
{
"$(.root)"link $(OPTIONS) -delexecutable -noi -implib:"$(<[2])" "$(>)" $(LIBRARIES) , "$(<[1])" , NUL , user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
}
actions compile.c++
{
"$(.root)"dmc -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o"$(<)" "$(>)"
}
actions compile.c++
{
"$(.root)"dmc -cpp -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o"$(<)" "$(>)"
}
actions together piecemeal archive
{
"$(.root)"lib $(OPTIONS) -c -n -p128 "$(<)" "$(>)"
}