Class: Autorake::CheckLibrary
Constant Summary
collapse
- TYPE =
"library"
Instance Method Summary
collapse
Methods inherited from Add
#initialize, #perform
Constructor Details
This class inherits a constructor from Autorake::Add
Instance Method Details
#build_source ⇒ Object
295
296
297
298
299
|
# File 'lib/autorake/definition.rb', line 295
def build_source
<<~SRC
int main( int argc, char *argv[]) { return 0; }
SRC
end
|
#check! ⇒ Object
306
307
308
|
# File 'lib/autorake/definition.rb', line 306
def check!
super or raise "Library missing: #@name."
end
|
#compile(t) ⇒ Object
300
301
302
303
304
305
|
# File 'lib/autorake/definition.rb', line 300
def compile t
c = Compiler.new @config.incdirs, @config.macros, "-w"
c.cc t.obj, t.src
l = Linker.new @config.libdirs, [ @name], "-w"
l.cc t.bin, t.obj
end
|
#set! ⇒ Object
309
310
311
|
# File 'lib/autorake/definition.rb', line 309
def set!
@config.libs.push @name
end
|