# 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. #//Digital
Mars C++
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 on/object : -g ; flags dmc LINKFLAGS on : -co ; flags dmc CFLAGS off : -S -o+none ; flags dmc CFLAGS speed : -o+time ; flags dmc CFLAGS space : -o+space ; flags dmc CFLAGS on : -Ae ; flags dmc CFLAGS on : -Ar ; # Note that these two options actually imply multithreading support on DMC # because there is no single-threaded dynamic runtime library. Specifying # multi would be a bad idea, though, because no option would be # matched when the build uses the default settings of dynamic # and single. flags dmc CFLAGS release/dynamic : -ND ; flags dmc CFLAGS debug/dynamic : -ND ; flags dmc CFLAGS release/static/single : ; flags dmc CFLAGS debug/static/single : ; flags dmc CFLAGS release/static/multi : -D_MT ; flags dmc CFLAGS debug/static/multi : -D_MT ; flags dmc CFLAGS ; flags dmc C++FLAGS ; flags dmc DEFINES ; flags dmc UNDEFS ; flags dmc HDRS ; flags dmc SYSHDRS ; flags dmc LINKFLAGS ; flags dmc ARFLAGS ; flags dmc LIBPATH ; flags dmc NEEDLIBS ; flags dmc FINDLIBS ; flags dmc LINKFLAGS $(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 "$(<)" "$(>)" }