diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-06-09 09:21:37 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-06-09 09:21:37 +0000 |
commit | c1241cd2ed230573bb81b52173d6cd2bd91176f2 (patch) | |
tree | caa3babd9a35b930814fffa9c8ebb3366d46dae8 /ext/extmk.rb.in | |
parent | 17ae11ca25d210da8c7deeeee0f03fd1a09ee0b2 (diff) |
thread bugs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r-- | ext/extmk.rb.in | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index c564b59b70..8090c2ab19 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -324,6 +324,19 @@ def create_makefile(target) $DLDFLAGS = $DLDFLAGS + " -L" + $topdir end + defflag = '' + if PLATFORM =~ /cygwin/ and not $static + if File.exist? target + ".def" + defflag = "--def=" + target + ".def" + end + if $libs + $libs = $libs + " @LIBRUBYARG@" + else + $libs = "@LIBRUBYARG@" + end + $DLDFLAGS = $DLDFLAGS + " -L" + $topdir + end + $srcdir = $top_srcdir + "/ext/" + $mdir mfile = open("Makefile", "w") mfile.printf "\ @@ -342,7 +355,7 @@ CC = @CC@ prefix = @prefix@ CFLAGS = %s -I#{$topdir} -I#{$top_srcdir} -I@includedir@ #{CFLAGS} #$CFLAGS %s DLDFLAGS = #$DLDFLAGS #$LDFLAGS -LDSHARED = @LDSHARED@ +LDSHARED = @LDSHARED@ #{defflag} ", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ") mfile.printf "\ @@ -367,7 +380,7 @@ archdir = $(pkglibdir)/@arch@ $objs = [] for f in Dir["#{$top_srcdir}/ext/#{$mdir}/*.{#{SRC_EXT.join(%q{,})}}"] f = File.basename(f) - f.sub!(/\.(c|cc)$/, ".o") + f.sub!(/(#{SRC_EXT.join(%q{|})})$/, "o") $objs.push f end end @@ -418,23 +431,21 @@ $(DLLIB): $(OBJS) $(DLLIB): $(OBJS) $(LDSHARED) $(DLDFLAGS) -o $(DLLIB) $(OBJS) $(LIBS) $(LOCAL_LIBS) " - elsif not SRC_EXT.detect{|ext| File.exist?(target + ext)} - if PLATFORM == "m68k-human" - mfile.printf "\ + elsif PLATFORM == "m68k-human" + mfile.printf "\ $(DLLIB): $(OBJS) ar cru $(DLLIB) $(OBJS) " - elsif PLATFORM =~ "-nextstep" || PLATFORM =~ "-openstep" || PLATFORM =~ "-rhapsody" - mfile.printf "\ + elsif PLATFORM =~ "-nextstep" || PLATFORM =~ "-openstep" || PLATFORM =~ "-rhapsody" + mfile.printf "\ $(DLLIB): $(OBJS) cc -r $(CFLAGS) -o $(DLLIB) $(OBJS) " - else - mfile.printf "\ + else + mfile.printf "\ $(DLLIB): $(OBJS) ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS) " - end end if File.exist?("depend") |