Skip to content

Commit

Permalink
updated mkrf_conf to include Linux compile options
Browse files Browse the repository at this point in the history
  • Loading branch information
fstrozzi committed Mar 22, 2011
1 parent ac7e8dc commit 25344fb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ext/mkrf_conf.rb
Expand Up @@ -7,9 +7,12 @@
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"
compile = ""
if ext == "so" then
flags = "-shared -Wl,-soname,libbwa.so"
compile = " -fPIC"
elsif ext == "dylib" then
flags = "-bundle -undefined dynamic_lookup -flat_namespace"
end


Expand All @@ -28,7 +31,7 @@
OBJ_SRC = SRC.ext('o')
rule '.o' => '.c' do |t|
sh "gcc -c -g -Wall -O2 -DHAVE_PTHREAD "+t.source+" -o "+t.name
sh "gcc#{compile} -c -g -Wall -O2 -DHAVE_PTHREAD "+t.source+" -o "+t.name
end
task :compile_gen => OBJ_GEN do
Expand Down

0 comments on commit 25344fb

Please sign in to comment.