diff options
Diffstat (limited to 'enc')
-rw-r--r-- | enc/Makefile.in | 1 | ||||
-rw-r--r-- | enc/depend | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/enc/Makefile.in b/enc/Makefile.in index b7762191c4..d9bb8fd68e 100644 --- a/enc/Makefile.in +++ b/enc/Makefile.in @@ -38,7 +38,6 @@ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir) DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ -DONIG_ENC_REGISTER=rb_enc_register LDFLAGS = @LDFLAGS@ -LIBS = @LIBRUBYARG@ @LIBS@ $(EXTLIBS) LDSHARED = @LDSHARED@ ldflags = $(LDFLAGS) dldflags = @DLDFLAGS@ diff --git a/enc/depend b/enc/depend index 77160482b1..938b15bb25 100644 --- a/enc/depend +++ b/enc/depend @@ -1,3 +1,4 @@ +% enable_shared = CONFIG['ENABLE_SHARED'] == 'yes' % deffile = (true if /\$\(DEFFILE\)/ =~ CONFIG["LINK_SO"]) % encs = Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS % encs.each {|e| e.chomp!(".c")} @@ -40,6 +41,12 @@ VPATH = <%=%w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(srcdir) $(encsrcdir)].join(CONFIG["PATH_SEPARATOR"])%> LIBPATH = <%=libpathflag($DEFLIBPATH)%> +LIBS = <%= +if enable_shared or RbConfig.expand(CONFIG["LIBRUBY"].dup) != RbConfig.expand(CONFIG["LIBRUBY_A"].dup) + CONFIG['LIBRUBYARG'] +else + '' +end %> <%=CONFIG['LIBS']%> $(EXTLIBS) ENCOBJS = <%=encs.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%="\n" if encs.size>1%> ENCSOS = <%=encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%><%="\n" if encs.size>1%> |