Skip to content

Commit

Permalink
moved ext directory and created mkrf_conf
Browse files Browse the repository at this point in the history
  • Loading branch information
fstrozzi committed Mar 22, 2011
1 parent 03527c8 commit 735ed82
Show file tree
Hide file tree
Showing 57 changed files with 49 additions and 55 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added ext/bwt_gen/libbwtgen.a
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions ext/mkrf_conf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# create Rakefile for shared library compilation

require File.join("..",File.dirname(__FILE__),"lib/bio/bwa/library")

path = File.expand_path(File.dirname(__FILE__))

ext = Bio::BWA::Library.lib_extension

flags = ""
case ext
when "so" then flags = "-shared -Wl,-soname,libbwa.so"
when "dylib" then flags = "-bundle -undefined dynamic_lookup -flat_namespace"
end


File.open(File.join(path,"Rakefile"),"w") do |rakefile|
rakefile.write <<-RAKE
require 'rake/clean'
source = %w(utils.c bwt.c bwtio.c bwtaln.c bwtgap.c is.c bntseq.c bwtmisc.c bwtindex.c stdaln.c simple_dp.c bwaseqio.c bwase.c bwape.c kstring.c cs2nt.c bwtsw2_core.c bwtsw2_main.c bwtsw2_aux.c bwt_lite.c bwtsw2_chain.c bamlite.c main.c)
CLEAN.include('*.o')
CLEAN.include('bwt_gen/*.o')
GEN = FileList['bwt_gen/*.c']
OBJ_GEN = GEN.ext('o')
SRC = FileList.new(source)
OBJ_SRC = SRC.ext('o')
rule '.o' => '.c' do |t|
sh "gcc -c -g -Wall -O2 -DHAVE_PTHREAD "+t.source+" -o "+t.name
end
task :compile_gen => OBJ_GEN do
sh "ar -cru bwt_gen/libbwtgen.a "+OBJ_GEN.join(" ")
end
task :compile_lib => OBJ_SRC do
sh "gcc #{flags} "+OBJ_SRC.join(" ")+" -o libbwa.#{ext} -lm -lz -lpthread -Lbwt_gen -lbwtgen"
end
task :default => [:compile_gen, :compile_lib, :clean]
RAKE

end



File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed lib/bio/bwa/ext/libbwa.dylib
Binary file not shown.
Binary file removed lib/bio/bwa/ext/libbwa.so
Binary file not shown.
55 changes: 0 additions & 55 deletions lib/bio/bwa/ext/src/bwa-0.5.9/Makefile

This file was deleted.

0 comments on commit 735ed82

Please sign in to comment.