1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/enc/Makefile.in
nobu b2d9f1e9d0 * common.mk (encs): new target to compile external encodings.
* enc/Makefile.in: became a serb template.

* enc/make_encmake.rb: creates enc.mk from enc/Makefile.in using serb.

* lib/mkmf.rb (relative_from): moved from ext/extmk.rb.

* lib/mkmf.rb ($extmk): true if under to top source directory, not
  only ext.

* lib/mkmf.rb (depend_rules): extracted from create_makefile.

* tool/serb.rb (serb): splitted from tool/compile_prelude.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 08:47:28 +00:00

42 lines
1.2 KiB
Makefile

srcdir = @srcdir@
top_srcdir = $(srcdir:/enc=)
arch = @arch@
EXTOUT = @EXTOUT@
hdrdir = $(top_srcdir)/include
arch_hdrdir = $(EXTOUT)/include/$(arch)
VPATH = <% %w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join("@PATH_SEPARATOR@") %>
ENCSODIR = $(EXTOUT)/$(arch)/enc
DLEXT = @DLEXT@
OBJEXT = @OBJEXT@
BUILTIN_ENCS = ascii.c \
euc_jp.c sjis.c \
unicode.c utf8.c
ENCOBJS = <%encs.map {|e|"#{e}.$(OBJEXT)"}.join(" \\\n\t ")+"\n"%>
ENCSOS = <%encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")+"\n"%>
empty =
CC = @CC@
OUTFLAG = @OUTFLAG@$(empty)
CFLAGS = @CFLAGS@ @ARCH_FLAG@
XCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir) @XCFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
LIBS = @LIBS@ $(EXTLIBS)
LDSHARED = @LDSHARED@
DLDFLAGS = @DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@
#!#! if File.exist?(depend = File.join($srcdir, "depend"))
#### depend ####
#!#<% depend_rules(depend).join%>
#!#! end
#!#! encs.each do |e|
#!#
#!#$(ENCSODIR)/<%e%>.$(DLEXT): <%e%>.$(OBJEXT)
#!# <%LINK_SO.gsub(/\n/, "\n\t")%>
#!#! end
#!#! encs.each do |e|
#!#
#!#<%e%>.$(OBJEXT): <% (RULE_SUBST || "%s") % "#{e}.c" %>
#!#! end