Module: HostPlatform

Defined in:
lib/mundler/platforms/host.rb

Class Method Summary collapse

Class Method Details

.config(options, build_config) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/mundler/platforms/host.rb', line 2

def self.config(options, build_config)
  build = ""

  if options[:cc]
    build += "  conf.cc do |cc|\n"
    build += "    cc.command = #{options[:cc][:command].inspect}\n" if options[:cc][:command]
    build += "    cc.flags << #{options[:cc][:flags].inspect}\n" if options[:cc][:flags]
    build += "  end\n\n"
  end

  if options[:linker]
    build += "  conf.linker do |linker|\n"
    build += "    linker.command = #{options[:linker][:command].inspect}\n" if options[:linker][:command]
    build += "    linker.flags << #{options[:linker][:flags].inspect}\n" if options[:linker][:flags]
    build += "  end\n\n"
  end

  build
end