# (C) Copyright David Abrahams 2001. Permission to copy, use, # modify, sell and distribute this software is granted provided this # copyright notice appears in all copies. This software is provided # "as is" without express or implied warranty, and with no claim as # to its suitability for any purpose. # 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. #//Borland # Borland tool definitions. # # Please note that wide-character support is currently disabled for Borland in # features.jam, pending someone taking the time to figure out how to get the # appropriate libraries into the link command line. # BCCROOT is the install location of the borland tools. set-as-singleton BCCROOT ; # compute Borland tool path # You can either put the borland bin directory in your PATH, or you can set # BCCROOT to point at the borland installation directory BCC_TOOL_PATH = $(BCCROOT)$(SLASH)bin$(SLASH) ; BCC_TOOL_PATH ?= "" ; # Don't clobber adjoining text if BCCROOT isn't set # specify compilation and link flags flags borland CFLAGS on : -v ; flags borland LINKFLAGS on : -v ; flags borland CFLAGS off : -Od ; flags borland CFLAGS speed : -O2 ; flags borland CFLAGS space : -O1 ; flags borland CFLAGS off : -vi- ; flags borland CFLAGS on : -vi -w-inl ; flags borland CFLAGS full : -vi -w-inl ; # build the options common to the link and C/C++ command-lines { local bcc-common-flags ; flags borland bcc-common-flags dynamic : -tWR ; local target-type = [ get-values : $(gBUILD_PROPERTIES) ] ; if ! $(target-type) || ! ( $(target-type) in $(SHARED_TYPES) ) { flags borland bcc-common-flags console : -tWC ; } flags borland bcc-common-flags $(SHARED_TYPES) : -tWD ; flags borland bcc-common-flags : -WM- ; flags borland bcc-common-flags multi : -tWM ; flags borland LINKFLAGS : $(bcc-common-flags) ; flags borland CFLAGS : $(bcc-common-flags) ; } flags borland LINKFLAGS on : -WU ; flags borland CFLAGS on : -WU ; flags borland CFLAGS ; flags borland C++FLAGS ; flags borland DEFINES ; flags borland UNDEFS ; flags borland HDRS ; flags borland STDHDRS ; flags borland LINKFLAGS ; flags borland ARFLAGS ; flags borland STDHDRS : $(BCCROOT)$(SLASH)include ; flags borland STDLIBPATH : $(BCCROOT)$(SLASH)lib ; flags borland LIBPATH ; flags borland NEEDLIBS ; flags borland FINDLIBS ; # For detailed information about borland tools and their command-line switches, # see http://www.objectcentral.com/vide/help/videdoc/bcc32.html #### Link #### rule Link-action { # Make sure that the borland runtime dlls are in the runtime path gRUN_PATH($(<)) += $(BCC_TOOL_PATH) ; with-command-file borland-Link-action $(<) : $(>) $(NEEDLIBS) ; if $(3) in $(SHARED_TYPES) { borland-IMPLIB-action $(<) : $(>) ; } } # bcc32 needs to have ilink32 in the path in order to invoke it, so explicitly # specifying $(BCC_TOOL_PATH)bcc32 doesn't help. You need to add # $(BCC_TOOL_PATH) to the path if $(NT) { actions borland-Link-action { set PATH=$(BCC_TOOL_PATH);%PATH% "$(BCC_TOOL_PATH)bcc32" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -e"$(<[1])" @"$(>)" $(FINDLIBS:S=.lib) } } else { actions borland-Link-action { export PATH=$(BCC_TOOL_PATH):$PATH "$(BCC_TOOL_PATH)bcc32" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -e"$(<[1])" @"$(>)" $(FINDLIBS:S=.lib) } } actions borland-IMPLIB-action bind IMPLIB { $(BCC_TOOL_PATH)implib $(<[2]) $(<[1]) } #### Cc ##### rule Cc-action { borland-Cc-action $(<) : $(>) ; } actions borland-Cc-action { "$(BCC_TOOL_PATH)bcc32" -q -c -w -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)" } #### C++ #### rule C++-action { borland-C++-action $(<) : $(>) ; } actions borland-C++-action { "$(BCC_TOOL_PATH)bcc32" -q -c -P -w -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)" } #### Archive #### rule Archive-action { borland-Archive-action $(<) : $(>) ; } actions updated together piecemeal borland-Archive-action { "$(BCC_TOOL_PATH)tlib" /P64 /u /a /C /$(ARFLAGS) "$(<)" +-"$(>)" }