Class: Teapot::Build::Targets::Executable
- Inherits:
-
Library
- Object
- Teapot::Build::Target
- Library
- Teapot::Build::Targets::Executable
- Defined in:
- lib/teapot/build/targets/executable.rb
Instance Attribute Summary
Attributes inherited from Library
Attributes inherited from Teapot::Build::Target
Instance Method Summary collapse
Methods inherited from Library
#build, #compile_and_link, #dependent_libraries, #initialize, #install_file_list
Methods included from Installation
Methods included from Compiler
#build_prefix!, #compile, #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
#link(environment, objects) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/teapot/build/targets/executable.rb', line 31 def link(environment, objects) executable_file = link_prefix!(environment) + @name graph = Build::dependency_graph(environment) if graph.regenerate?(executable_file, objects + dependent_libraries(environment)) Commands.run( environment[:cxx], environment[:cxxflags], "-o", executable_file, objects, environment[:ldflags] ) end return executable_file end |
#subdirectory ⇒ Object
27 28 29 |
# File 'lib/teapot/build/targets/executable.rb', line 27 def subdirectory [:subdirectory] || "bin" end |