tools/build/v1/dmc-tools.jam
# 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>
set-as-singleton DMC_ROOT DMC_BIN_DIR ;
DMC_COMPILER = dmc ;
DMC_LINKER = link ;
DMC_ARCHIVE = lib ;
DMC_ROOT = $(DMC_ROOT:J=" ") ;
DMC_BIN_DIR ?= "$(DMC_ROOT)"$(SLASH)bin$(SLASH) ;
flags dmc CFLAGS <debug-symbols>on/<debug-store>object : -g ;
flags dmc LINKFLAGS <debug-symbols>on : -co ;
flags dmc CFLAGS <optimization>off : -S -o+none ;
flags dmc CFLAGS <optimization>speed : -o+time ;
flags dmc CFLAGS <optimization>space : -o+space ;
flags dmc CFLAGS <exception-handling>on : -Ae ;
flags dmc CFLAGS <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 CFLAGS <runtime-build>release/<runtime-link>dynamic : -ND ;
flags dmc CFLAGS <runtime-build>debug/<runtime-link>dynamic : -ND ;
flags dmc CFLAGS <runtime-build>release/<runtime-link>static/<threading>single : ;
flags dmc CFLAGS <runtime-build>debug/<runtime-link>static/<threading>single : ;
flags dmc CFLAGS <runtime-build>release/<runtime-link>static/<threading>multi : -D_MT ;
flags dmc CFLAGS <runtime-build>debug/<runtime-link>static/<threading>multi : -D_MT ;
flags dmc CFLAGS <cflags> ;
flags dmc C++FLAGS <cxxflags> ;
flags dmc DEFINES <define> ;
flags dmc UNDEFS <undef> ;
flags dmc HDRS <include> ;
flags dmc SYSHDRS <sysinclude> ;
flags dmc LINKFLAGS <linkflags> ;
flags dmc ARFLAGS <arflags> ;
flags dmc LIBPATH <library-path> ;
flags dmc NEEDLIBS <library-file> ;
flags dmc FINDLIBS <find-library> ;
flags dmc LINKFLAGS <target-type>$(SHARED_TYPES) : ;
flags msvc STDHDRS : $(DMC_ROOT)$(SLASH)include ;
#### Link ####
rule Link-action ( target implib ? : sources + : target-type ? )
{
dmc-Link-action $(<) : $(sources) $(NEEDLIBS) ;
}
actions together dmc-Link-action
{
"$(DMC_BIN_DIR)$(DMC_LINKER)" $(LINKFLAGS) -delexecutable -noi -implib:"$(<[2])" "$(>)" , "$(<[1])" , NUL , user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
}
#### Cc #####
rule Cc-action
{
dmc-Cc-action $(<) : $(>) ;
}
actions dmc-Cc-action
{
"$(DMC_BIN_DIR)$(DMC_COMPILER)" -c -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)"
}
#### C++ ####
rule C++-action
{
dmc-C++-action $(<) : $(>) ;
}
actions dmc-C++-action
{
"$(DMC_BIN_DIR)$(DMC_COMPILER)" -cpp -c -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)"
}
#### Archive ####
rule Archive-action
{
dmc-Archive-action $(<) : $(>) ;
}
actions together piecemeal dmc-Archive-action
{
"$(DMC_BIN_DIR)$(DMC_ARCHIVE)" $(ARFLAGS) -c -n -p128 "$(<)" "$(>)"
}