aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index f6f5224652..84c378fcc7 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -103,6 +103,8 @@ def extmake(target)
else
if $static
m = File.read(makefile)
+ $target = m[/^TARGET[ \s]*=[ \s]*(\S*)/, 1] or $static = nil
+ /^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
$DLDFLAGS += " " + (m[/^DLDFLAGS[ \t]*=[ \t]*(.*)/, 1] || "")
if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1]