# Copyright (C) Michael Marcin 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) # # Boost.Build V2 toolset for the ARM RVCT 2.2 sp1 compiler. # based off borland.jam # import property ; import generators ; import os ; import toolset : flags ; import feature : get-values ; import type ; import common ; toolset.register rvct ; rule init ( version ? : command * : options * ) { local condition = [ common.check-init-parameters rvct : version $(version) ] ; local command = [ common.get-invocation-command rvct : armcc.exe : $(command) ] ; common.handle-options rvct : $(condition) : $(command) : $(options) ; if $(command) { command = [ common.get-absolute-tool-path $(command[-1]) ] ; } root = $(command:D) ; flags rvct.compile STDHDRS $(condition) : $(root)/include/ ; flags rvct.link STDLIBPATH $(condition) : $(root)/lib ; flags rvct.link RUN_PATH $(condition) : $(root)/bin ; flags rvct .root $(condition) : $(root)/bin/ ; } # Declare generators generators.register-linker rvct.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : rvct ; generators.register-linker rvct.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : rvct ; generators.register-archiver rvct.archive : OBJ : STATIC_LIB : rvct ; generators.register-c-compiler rvct.compile.c++ : CPP : OBJ : rvct ; generators.register-c-compiler rvct.compile.c : C : OBJ : rvct ; # Declare flags flags rvct.compile OPTIONS on : -g ; flags rvct.link OPTIONS on : --bestdebug ; flags rvct.compile OPTIONS off : -O0 ; flags rvct.compile OPTIONS speed : -O3 -Otime ; flags rvct.compile OPTIONS space : -O3 -Ospace ; flags rvct CFLAGS off : --no_inline ; flags rvct CFLAGS on : --inline ; flags rvct CFLAGS full : --forceinline ; flags rvct.compile OPTIONS off : -W ; flags rvct.compile OPTIONS all : --strict_warnings ; flags rvct.compile OPTIONS on : --strict ; # Deal with various runtime configs... #!## This should be not for DLL #!#flags borland OPTIONS console : -tWC ; #!## -tWR sets -tW as well, so we turn it off here and then turn it #!## on again later if we need it: #!#flags borland OPTIONS shared : -tWR -tWC ; #!#flags borland OPTIONS gui : -tW ; #!#flags borland OPTIONS LIB/shared : -tWD ; #!## Hmm.. not sure what's going on here. #!#flags borland OPTIONS : -WM- ; #!#flags borland OPTIONS multi : -tWM ; flags rvct.compile OPTIONS ; flags rvct.compile DEFINES ; flags rvct.compile INCLUDES ; #!#flags borland NEED_IMPLIB LIB/shared : "" ; #!# #!# for C++ compiles the following options are turned on by default: #!# #!# -j5 stops after 5 errors #!# -g255 allow an unlimited number of warnings #!# -q no banner #!# -c compile to object #!# -P C++ code regardless of file extention #!# -Ve zero sized empty base classes, this option is on in the IDE by default #!# and effects binary compatibility. #!# -Vx zero sized empty members, this option is on in the IDE by default #!# and effects binary compatibility. #!# -a8 8 byte alignment, this option is on in the IDE by default #!# and effects binary compatibility. #!# #!# -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)" actions compile.c++ { "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -J"$(INCLUDES)" -J"$(STDHDRS)" -o"$(<)" "$(>)" } actions compile.c { "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -J"$(INCLUDES)" -J"$(STDHDRS)" -o"$(<)" "$(>)" } # Declare flags and action for linking #!#toolset.flags borland.link OPTIONS on : -v ; #!#toolset.flags borland.link LIBRARY_PATH ; #!#toolset.flags borland.link FINDLIBS_ST ; #!#toolset.flags borland.link FINDLIBS_SA ; #!#toolset.flags borland.link LIBRARIES ; flags rvct.link OPTIONS ; #!#flags borland.link OPTIONS shared : -tWD ; flags rvct.link LIBRARY_PATH_OPTION rvct : --userlibpath : unchecked ; flags rvct.link LIBRARY_OPTION rvct : "" : unchecked ;