2007-12-19 12:23:24 -05: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 11:15:46 -05:00
|
|
|
|
|
|
|
VPATH = <% %w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join(CONFIG["PATH_SEPARATOR"]) %>
|
|
|
|
|
2007-12-18 00:05:25 -05: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 11:15:46 -05:00
|
|
|
|
2007-12-17 03:19:29 -05:00
|
|
|
all: $(ENCSOS)
|
|
|
|
|
2007-12-17 11:15:46 -05:00
|
|
|
.c.$(OBJEXT):
|
|
|
|
<%COMPILE_C%>
|
2007-12-18 00:05:25 -05:00
|
|
|
! unless encs.empty?
|
2007-12-17 11:15:46 -05:00
|
|
|
|
2007-12-17 03:19:29 -05:00
|
|
|
$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
|
2007-12-17 11:15:46 -05:00
|
|
|
|
2007-12-18 00:05:25 -05:00
|
|
|
! end
|
2007-12-17 11:15:46 -05:00
|
|
|
! encs.each do |e|
|
|
|
|
$(ENCSODIR)/<%e%>.$(DLEXT): <%e%>.$(OBJEXT)
|
|
|
|
<%LINK_SO.gsub(/\n/, "\n\t")%>
|
|
|
|
|
2007-12-18 00:05:25 -05:00
|
|
|
! end
|
2007-12-17 11:15:46 -05:00
|
|
|
! encs.each do |e|
|
|
|
|
<%e%>.$(OBJEXT): <%e%>.c
|
|
|
|
! end
|
2007-12-19 12:23:24 -05:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(ENCSOS)
|
|
|
|
$(RM) $(ENCOBJS)
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(RM) enc.mk
|