Class: Comet::Rules::ObjCopy
- Inherits:
-
Object
- Object
- Comet::Rules::ObjCopy
- Defined in:
- lib/comet/rules/objcopy.rb
Instance Method Summary collapse
- #commands ⇒ Object
- #contents ⇒ Object
-
#initialize(linker, elf, format, extension) ⇒ ObjCopy
constructor
A new instance of ObjCopy.
- #rules ⇒ Object
- #target ⇒ Object
Constructor Details
#initialize(linker, elf, format, extension) ⇒ ObjCopy
Returns a new instance of ObjCopy.
4 5 6 7 8 9 |
# File 'lib/comet/rules/objcopy.rb', line 4 def initialize(linker, elf, format, extension) @linker = linker @elf = elf @format = format @extension = extension end |
Instance Method Details
#commands ⇒ Object
30 31 32 |
# File 'lib/comet/rules/objcopy.rb', line 30 def commands { COMET_OBJCOPY: 'objcopy' } end |
#contents ⇒ Object
19 20 21 22 23 24 |
# File 'lib/comet/rules/objcopy.rb', line 19 def contents [ "#{target}: #{@elf.target} | #{Comet::TMPDIR}", "\t#{objcopy}" ] end |
#rules ⇒ Object
26 27 28 |
# File 'lib/comet/rules/objcopy.rb', line 26 def rules [@elf] end |
#target ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/comet/rules/objcopy.rb', line 11 def target @target ||= Comet::Makefile.fingerprint Hash[ triple: @linker.triple, format: @format, elf: @elf.target ], extension: @extension end |