class MxxRu::Cpp::Toolsets::GccMingw
Toolset
implemetation for GCC compiler for Win32. This class is a base class for both MinGW and Cygwin
Public Class Methods
new( a_name = "gcc" )
click to toggle source
Calls superclass method
MxxRu::Cpp::Toolsets::GccFamily::new
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 40 def initialize( a_name = "gcc" ) super( a_name ) setup_tag( GCC_PORT_TAG, GCC_PORT_MINGW ) setup_tag( "host_os", "mswin" ) setup_tag( "target_os", "mswin" ) end
Public Instance Methods
make_mswin_res_command_lines( res_name, rc_file, rc_options, target )
click to toggle source
See description at MxxRu::Cpp::Toolset#make_mswin_res_command_lines
.
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 96 def make_mswin_res_command_lines( res_name, rc_file, rc_options, target ) return [ "#{rc_name} " + "#{rc_options.join(' ')} " + "-o #{res_name} #{rc_file}" ] end
mswin_res_file_name( source_name )
click to toggle source
See description at MxxRu::Cpp::Toolset#mswin_res_file_name.
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 91 def mswin_res_file_name( source_name ) return source_name + ".res.o" end
port_specific_dll_link_options( a_dll_name, a_dll_info, a_linker_lists, a_target )
click to toggle source
See description at MxxRu::Cpp::Toolsets::GccFamily#port_specific_dll_link_options
.
If mswin-res file exists than it added to linker options.
Calls superclass method
MxxRu::Cpp::Toolsets::GccMswinFamily#port_specific_dll_link_options
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 111 def port_specific_dll_link_options( a_dll_name, a_dll_info, a_linker_lists, a_target ) r = super( a_dll_name, a_dll_info, a_linker_lists, a_target ) if a_linker_lists.resources.size r = a_linker_lists.resources.join( " " ) + " " + r end return r end
port_specific_exe_link_options( a_exe_name, a_exe_info, a_linker_lists, a_target )
click to toggle source
See description at MxxRu::Cpp::Toolsets::GccFamily#port_specific_exe_link_options
.
If mswin-res file exists than it added to linker options.
Calls superclass method
MxxRu::Cpp::Toolsets::GccFamily#port_specific_exe_link_options
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 126 def port_specific_exe_link_options( a_exe_name, a_exe_info, a_linker_lists, a_target ) r = super( a_exe_name, a_exe_info, a_linker_lists, a_target ) if a_linker_lists.resources.size r = a_linker_lists.resources.join( " " ) + " " + r end return r end
rc_name()
click to toggle source
Returns resource compiler name.
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 49 def rc_name tag( RC_NAME_TAG, "windres" ) end
setup_mandatory_options( target )
click to toggle source
See description at MxxRu::Cpp::Toolset#setup_mandatory_options
.
Setups resource compiler parameters.
Required options are set up based on screen_mode.
Calls superclass method
MxxRu::Cpp::Toolsets::GccFamily#setup_mandatory_options
# File lib/mxx_ru/cpp/toolsets/gcc_mingw.rb, line 58 def setup_mandatory_options( target ) super( target ) if SCREEN_WINDOW == target.mxx_screen_mode target.linker_option( "-mwindows" ) else target.linker_option( "-mconsole" ) end if THREADING_MULTI == target.mxx_threading_mode target.compiler_option( "-mthreads" ) end # All defines and all include_path should be distributed to resource compiler. target.mxx_all_defines.each { |d| target.mswin_rc_option( "-D " + d ) } target.mxx_all_include_paths.each { |p| target.mswin_rc_option( "--include-dir=" + p ) } # Personal resource compiler options. target.mxx_all_mswin_rc_defines.each { |d| target.mswin_rc_option( "-D " + d ) } target.mxx_all_mswin_rc_include_paths.each { |p| target.mswin_rc_option( "--include-dir=" + p ) } end