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
280
281
282
283
284
|
# File 'lib/autorake/definition.rb', line 280
def build_source
"int main( int argc, char *argv[]) { return 0; }\n SRC\nend\n"
|
#check! ⇒ Object
291
292
293
|
# File 'lib/autorake/definition.rb', line 291
def check!
super or raise "Library missing: #@name."
end
|
#compile(t) ⇒ Object
285
286
287
288
289
290
|
# File 'lib/autorake/definition.rb', line 285
def compile t
c = CompilerC.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
294
295
296
|
# File 'lib/autorake/definition.rb', line 294
def set!
@config.libs.push @name
end
|