2007-12-19 20:23:24 +03:00
|
|
|
! encs = Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS
|
|
|
|
! encs.each {|e| e.chomp!(".c")}
|
|
|
|
! encs = encs.sort_by {|e| e.split(/(\d+)/).map {|n| Integer(n) rescue n}}
|
2007-12-17 19:15:46 +03:00
|
|
|
|
|
|
|
VPATH = <% %w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join(CONFIG["PATH_SEPARATOR"]) %>
|
|
|
|
|
2007-12-18 08:05:25 +03:00
|
|
|
ENCOBJS = <%encs.map {|e|"#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%"\n" if encs.size>1%>
|
|
|
|
ENCSOS = <%encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%>
|
2007-12-17 19:15:46 +03:00
|
|
|
|
2007-12-17 11:19:29 +03:00
|
|
|
all: $(ENCSOS)
|
|
|
|
|
2007-12-17 19:15:46 +03:00
|
|
|
.c.$(OBJEXT):
|
|
|
|
<%COMPILE_C%>
|
2007-12-18 08:05:25 +03:00
|
|
|
! unless encs.empty?
|
2007-12-17 19:15:46 +03:00
|
|
|
|
2007-12-17 11:19:29 +03:00
|
|
|
$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
|
2007-12-17 19:15:46 +03:00
|
|
|
|
2007-12-18 08:05:25 +03:00
|
|
|
! end
|
2007-12-17 19:15:46 +03:00
|
|
|
! encs.each do |e|
|
|
|
|
$(ENCSODIR)/<%e%>.$(DLEXT): <%e%>.$(OBJEXT)
|
|
|
|
<%LINK_SO.gsub(/\n/, "\n\t")%>
|
|
|
|
|
2007-12-18 08:05:25 +03:00
|
|
|
! end
|
2007-12-17 19:15:46 +03:00
|
|
|
! encs.each do |e|
|
|
|
|
<%e%>.$(OBJEXT): <%e%>.c
|
|
|
|
! end
|
2007-12-19 20:23:24 +03:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(ENCSOS)
|
|
|
|
$(RM) $(ENCOBJS)
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(RM) enc.mk
|