Class: Binary
Overview
An executable binary file
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Buildable
#buildable, #cflags, #distributable, #enable, #id, #installable, #ldadd, #localdep, #output, #output_type, #project, #rpath, #sources, #sysdep, #topdir
Instance Method Summary collapse
- #DEADWOOD_build ⇒ Object
-
#initialize(options) ⇒ Binary
constructor
A new instance of Binary.
Methods inherited from Buildable
#binary?, #build, #expand_sources, #finalize, #library?, #library_type, #makedepends, #objects
Constructor Details
#initialize(options) ⇒ Binary
Returns a new instance of Binary.
4 5 6 7 8 9 |
# File 'lib/makeconf/binary.rb', line 4 def initialize() raise ArgumentError unless .kind_of?(Hash) super() @output = @id + Platform.executable_extension @output_type = 'binary' end |
Instance Method Details
#DEADWOOD_build ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/makeconf/binary.rb', line 11 def DEADWOOD_build binfile = @id + Platform.executable_extension cc = @compiler.clone cc.is_library = false cc.sources = @sources cc.output = binfile #XXX-BROKEN cc.add_targets(@makefile) @makefile.merge!(cc.to_make(binfile)) @makefile.clean(cc.objs) @makefile.install(binfile, '$(BINDIR)', { 'mode' => '755' }) \ if @installable @output.push binfile super() end |