<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,40 @@
-task :build do
+require 'rubygems'
+require 'spec'
+require 'spec/rake/spectask'
+
+# Make tasks (originally from curb) -----------------------------------------------------
+MAKECMD = ENV['MAKE_CMD'] || 'make'
+MAKEOPTS = ENV['MAKE_OPTS'] || ''
+
+FFMPEG_SO = &quot;ext/FFMPEG_core.#{Config::MAKEFILE_CONFIG['DLEXT']}&quot;
+
+file 'ext/Makefile' =&gt; 'ext/extconf.rb' do
+  Dir.chdir('ext') do
+    ruby &quot;extconf.rb #{ENV['EXTCONF_OPTS']}&quot;
+  end
+end
+
+def make(target = '')
+  Dir.chdir('ext') do 
+    pid = system(&quot;#{MAKECMD} #{MAKEOPTS} #{target}&quot;)
+    $?.exitstatus
+  end    
+end
+# Let make handle dependencies between c/o/so - we'll just run it. 
+file FFMPEG_SO =&gt; (['ext/Makefile'] + Dir['ext/*.c'] + Dir['ext/*.h']) do
+  m = make
+  fail &quot;Make failed (status #{m})&quot; unless m == 0
+end
+
+desc &quot;Compile the shared object&quot;
+task :compile =&gt; [FFMPEG_SO]
+
+task :build =&gt; :compile do
   %x{cd 'ext' &amp;&amp; make clean all &amp;&amp; cd '..'}
   $?.success?
 end
 
-require 'rubygems'
-require 'spec'
-require 'spec/rake/spectask'
+task :default =&gt; :build
 
 desc &quot;see spec:spec&quot;
 task :spec =&gt; 'spec:spec'
@@ -21,4 +50,4 @@ namespace :spec do
   Spec::Rake::SpecTask.new(:spec) do |t|
     t.spec_files = FileList[&quot;spec/**/*_spec.rb&quot;]
   end
-end
\ No newline at end of file
+end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,10 @@ dir_config(&quot;libswscale&quot;)
 $CFLAGS &lt;&lt; &quot; -W -Wall&quot;
 #$LDFLAGS &lt;&lt; &quot; -rpath #{ffmpeg_lib}&quot;
 
-if have_library(&quot;avformat&quot;) and
-  have_library(&quot;avcodec&quot;) and
-  have_library(&quot;avutil&quot;) and
-  have_library(&quot;swscale&quot;) then
+if have_library(&quot;avformat&quot;) and have_header('libavformat/avformat.h') and
+  have_library(&quot;avcodec&quot;) and have_header('libavutil/avutil.h') and
+  have_library(&quot;avutil&quot;) and have_header('libavcodec/avcodec.h') and
+  have_library(&quot;swscale&quot;) and have_header('libswscale/swscale.h') then
 
 $objs = %w(ffmpeg.o ffmpeg_format.o ffmpeg_input_format.o ffmpeg_stream.o ffmpeg_utils.o ffmpeg_frame.o ffmpeg_codec.o)
 </diff>
      <filename>ext/extconf.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0054deff103454396870cb17b9d0ab7c4bdddf52</id>
    </parent>
  </parents>
  <author>
    <name>Todd A. Fisher</name>
    <email>taf2@web3.anerian.com</email>
  </author>
  <url>http://github.com/gwik/ffmpeg-ruby/commit/5685ebc5c3d43bb493be562c927ce6ac052986ea</url>
  <id>5685ebc5c3d43bb493be562c927ce6ac052986ea</id>
  <committed-date>2008-12-01T12:40:58-08:00</committed-date>
  <authored-date>2008-12-01T12:40:58-08:00</authored-date>
  <message>* adding compile tasks with dependencies
* check for dependent library header files</message>
  <tree>28a73e8a3f273fd8230aed30cf3e3f05e40695e2</tree>
  <committer>
    <name>Todd A. Fisher</name>
    <email>taf2@web3.anerian.com</email>
  </committer>
</commit>
