diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-25 15:53:33 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-25 15:53:33 +0000 |
commit | 5f12cd3e24538d79581e6572badcca1a6d3ae95e (patch) | |
tree | 86c4a17731ddc7313b260dc9bc4d10eb712e67d6 /lib | |
parent | cb2f5a91c12e9cd4798c7ba395924b8fdd1523ee (diff) |
*ext/extmk.rb.in, lib/mkmf.rb: add OUTFLAG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index e6aa866450..d95fe85063 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -39,7 +39,12 @@ end $log = open('mkmf.log', 'w') -LINK = "#{CONFIG['CC']} -o conftest -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}" +if /mswin32/ =~ RUBY_PLATFORM + OUTFLAG = '-Fe' +else + OUTFLAG = '-o ' +end +LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}" CPP = "#{CONFIG['CPP']} -E %s -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s %s conftest.c" def rm_f(*files) @@ -573,7 +578,7 @@ EOMF mfile.print "\tenv LIB='$(subst /,\\\\,$(LIBPATH));$(LIB)' \\\n" end end - mfile.print "\t$(LDSHARED) $(DLDFLAGS) -o $(DLLIB) $(OBJS) $(LIBS) $(LOCAL_LIBS)\n" + mfile.print "\t$(LDSHARED) $(DLDFLAGS) #{OUTFLAG}$(DLLIB) $(OBJS) $(LIBS) $(LOCAL_LIBS)\n" elsif not File.exist?(target + ".c") and not File.exist?(target + ".cc") mfile.print "$(DLLIB): $(OBJS)\n" case RUBY_PLATFORM |