Class: GccWin32Compiler

Inherits:
GccCompiler show all
Defined in:
lib/rakepp/gccwin32compiler.rb

Instance Attribute Summary

Attributes inherited from Compiler

#compileflags, #targetDir

Instance Method Summary collapse

Methods inherited from GccCompiler

#add_binary_lib_tasks, #add_exe_tasks, #add_framework_tasks, #add_lib_prefix, #add_lib_suffix, #add_object_tasks, #add_shared_lib_tasks, #add_source_lib_tasks, #add_transitive_library_prerequisites, #apply_task, #calc_dependencies, #compiler, #defines, #dep_missing?, #do_additional_work_for_exe, #end_of_libs, #includes, #recreate_task, #start_of_libs, #start_of_source_lib_command

Methods inherited from Compiler

#add_tasks

Constructor Details

#initialize(defines) ⇒ GccWin32Compiler

Returns a new instance of GccWin32Compiler.



2
3
4
# File 'lib/rakepp/gccwin32compiler.rb', line 2

def initialize(defines)
  super('w32', defines)
end

Instance Method Details

#add_lib(task, lib) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rakepp/gccwin32compiler.rb', line 14

def add_lib(task, lib)
  if (lib.instance_of?(BinaryLib)) then
    return " -l#{lib.name}"
  elsif (lib.instance_of?(SourceLib)) then
    return " -L#{targetDir}/libs -l#{lib.name}"
  elsif (lib.instance_of?(SharedLib)) then
    return " #{targetDir}/libs/#{lib.name}.#{shared_extension()}.a"
  else
    raise "#{lib} not supported"
  end
end

#shared_extensionObject



10
11
12
# File 'lib/rakepp/gccwin32compiler.rb', line 10

def shared_extension()
  return 'dll'
end

#start_of_shared_lib_command(libName) ⇒ Object



6
7
8
# File 'lib/rakepp/gccwin32compiler.rb', line 6

def start_of_shared_lib_command(libName)
  return "g++ -shared -Wl,--out-implib=#{libName}.a"
end