Class: Teapot::Build::Targets::Executable

Inherits:
Library show all
Defined in:
lib/teapot/build/targets/executable.rb

Instance Attribute Summary

Attributes inherited from Library

#options

Attributes inherited from Teapot::Build::Target

#parent

Instance Method Summary collapse

Methods inherited from Library

#build, #initialize, #install, #install_file_list

Methods included from Installation

#install_prefix!

Methods included from Compiler

#build_prefix!, #compile, #link_prefix!

Methods inherited from Teapot::Build::Target

#configure, #execute, #initialize, #root, target

Constructor Details

This class inherits a constructor from Teapot::Build::Targets::Library

Instance Method Details



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/teapot/build/targets/executable.rb', line 31

def link(environment, objects)
	executable_file = link_prefix!(environment) + @name
			
	Commands.run(
		environment[:cxx],
		environment[:cxxflags],
		"-o", executable_file, objects,
		environment[:ldflags]
	)
			
	return executable_file
end

#subdirectoryObject



27
28
29
# File 'lib/teapot/build/targets/executable.rb', line 27

def subdirectory
	options[:subdirectory] || "bin"
end