lib/teapot/build.rb in teapot-0.2.1 vs lib/teapot/build.rb in teapot-0.2.2

- old
+ new

@@ -23,12 +23,17 @@ require 'pathname' require 'rainbow' require 'shellwords' +require 'teapot/build/linker' + module Teapot module Build + class UnsupportedPlatform < StandardError + end + class Task def initialize(inputs, outputs) @inputs = inputs @outputs = outputs end @@ -127,16 +132,12 @@ "lib" end def link(environment, objects) library_file = build_prefix!(environment) + "lib#{@name}.a" - - Commands.run( - Commands.split(environment[:libtool] || "libtool"), - "-static", "-o", library_file, objects, - Commands.split(environment[:ldflags]) - ) - + + Linker.link_static(environment, library_file, objects) + return library_file end def build(environment) files = sources