summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-19 02:37:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-19 02:37:21 +0000
commit0e60b2c6a3c5152fc4ff06054a4ae79edadf9276 (patch)
tree13707acbdff45415868d4a18236aa0ae23190c66 /ext/extmk.rb
parent1a6b07d71669658dcdb72d0937482aa6b9510e15 (diff)
static-linked-ext: into libruby
* Makefile.in, common.mk (PROGRAM): no extension libraries. * common.mk (build-ext): pass macros for libruby.so. * ext/extmk.rb (command_output): link extension libraries and encoding libraries into libruby.so, not ruby executable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-xext/extmk.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 45fc9da..4345fdd 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -654,16 +654,22 @@ if $configure_only and $command_output
end
mf.puts
mf.puts "all: #{rubies.join(' ')}"
- mf.puts "static: ext/extinit.#{$OBJEXT} #{rubies.join(' ')}"
+ mf.puts "static: #{rubies.join(' ')}"
mf.puts "clean:\n\t-$(Q)$(RM) ext/extinit.#{$OBJEXT}"
mf.puts "distclean:\n\t-$(Q)$(RM) ext/extinit.c"
mf.puts
mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'})"
rubies.each do |tgt|
mf.print "#{tgt}:\n\t$(Q)$(MAKE) "
- mf.puts '$(MFLAGS) EXTOBJS="$(EXTOBJS)" EXTLIBS="$(EXTLIBS)" EXTLDFLAGS="$(EXTLDFLAGS)" $@'
+ mf.print "$(MFLAGS) "
+ if enable_config("shared", $enable_shared)
+ mf.print %[DLDOBJS="$(EXTOBJS)" SOLIBS="$(ENCOBJS) $(EXTLIBS)" ]
+ mf.print 'LIBRUBY_SO_UPDATE=$(LIBRUBY_EXTS) '
+ else
+ mf.print %[EXTOBJS="$(EXTOBJS)" EXTLIBS="$(EXTLIBS)" ]
+ end
+ mf.puts 'EXTLDFLAGS="$(EXTLDFLAGS)" $@'
end
- mf.puts "ext/extinit.#{$OBJEXT}:\n\t$(Q)$(MAKE) $(MFLAGS) V=$(V) $@"
mf.puts
exec = config_string("exec") {|str| str + " "}
targets.each do |tgt|