diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-04-26 09:42:44 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-04-26 09:42:44 +0000 |
commit | e67e5adf4e33b79c3bc2f2c8a8b4a790a88adcf2 (patch) | |
tree | 6ef7eae93ed8a768a02dee1baa8ba80a4425b5e0 /ext/extmk.rb.in | |
parent | f6e04e38cd1f121111d388865e8b201ea3402452 (diff) |
aix shlib link
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r-- | ext/extmk.rb.in | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 3d77dd3b03..3e6c602d1e 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -1,7 +1,6 @@ #! /usr/local/bin/ruby $".push 'mkmf.rb' #" -load '@top_srcdir@/lib/find.rb' if ARGV[0] == 'static' $force_static = TRUE @@ -31,6 +30,9 @@ if $topdir !~ "^/" # get absolute path $topdir = File.expand_path($topdir) end +$ruby_inc = "@top_srcdir@" + +load '@top_srcdir@/lib/find.rb' ## drive letter if PLATFORM == "i386-os2_emx" then @@ -302,6 +304,7 @@ libdir = @libdir@ #pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME)/@MAJOR@.@MINOR@ pkglibdir = $(libdir)/ruby/@MAJOR@.@MINOR@ archdir = $(pkglibdir)/@arch@ +ruby_inc = #{$ruby_inc} @SET_MAKE@ #### End of system configuration section. #### @@ -322,14 +325,15 @@ archdir = $(pkglibdir)/@arch@ mfile.printf "\n" mfile.printf <<EOS -TARGET = #{target}.#{$static ? "a" : "@DLEXT@"} +TARGET = #{target} +DLLIB = $(TARGET).#{$static ? "a" : "@DLEXT@"} INSTALL = #{$dots}@INSTALL@ INSTALL_DATA = @INSTALL_DATA@ binsuffix = @binsuffix@ -all: $(TARGET) +all: $(DLLIB) clean:; @rm -f *.o *.a *.so *.sl @rm -f Makefile extconf.h conftest.* @@ -347,7 +351,7 @@ install: EOS if !$static mfile.printf "\ - $(INSTALL) $(TARGET) $(DESTDIR)$(archdir)/$(TARGET) + $(INSTALL) $(DLLIB) $(DESTDIR)$(archdir)/$(DLLIB) " end install_rb(mfile) @@ -355,30 +359,30 @@ EOS if $static mfile.printf "\ -$(TARGET): $(OBJS) - @AR@ cru $(TARGET) $(OBJS) - @-@RANLIB@ $(TARGET) 2> /dev/null || true +$(DLLIB): $(OBJS) + @AR@ cru $(DLLIB) $(OBJS) + @-@RANLIB@ $(DLLIB) 2> /dev/null || true " elsif "@DLEXT@" != "o" mfile.printf "\ -$(TARGET): $(OBJS) - $(LDSHARED) $(DLDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(LOCAL_LIBS) +$(DLLIB): $(OBJS) + $(LDSHARED) $(DLDFLAGS) -o $(DLLIB) $(OBJS) $(LIBS) $(LOCAL_LIBS) " elsif not File.exist?(target + ".c") and not File.exist?(target + ".cc") if PLATFORM == "m68k-human" mfile.printf "\ -$(TARGET): $(OBJS) - ar cru $(TARGET) $(OBJS) +$(DLLIB): $(OBJS) + ar cru $(DLLIB) $(OBJS) " elsif PLATFORM =~ "-nextstep" || PLATFORM =~ "-openstep" || PLATFORM =~ "-rhapsody" mfile.printf "\ -$(TARGET): $(OBJS) - cc -r $(CFLAGS) -o $(TARGET) $(OBJS) +$(DLLIB): $(OBJS) + cc -r $(CFLAGS) -o $(DLLIB) $(OBJS) " else mfile.printf "\ -$(TARGET): $(OBJS) - ld $(DLDFLAGS) -r -o $(TARGET) $(OBJS) +$(DLLIB): $(OBJS) + ld $(DLDFLAGS) -r -o $(DLLIB) $(OBJS) " end end @@ -493,6 +497,9 @@ for d in Dir["#{$top_srcdir}/ext/*"] print "cleaning ", d, "\n" else print "compiling ", d, "\n" + if PLATFORM =~ /ibm-aix/ + load './aix_mksym.rb' + end end extmake(d) end |