summaryrefslogtreecommitdiff
path: root/ext/fiddle/depend
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-20 02:23:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-20 02:23:00 +0000
commit5856a951914785b4b48f81340621d0cdb2271118 (patch)
tree9fe6a5b1748191225f4fd6f1569970d8e4976bc6 /ext/fiddle/depend
parentf7e32f01825cfdb5ff72de9cc2222c48c0c048cb (diff)
fiddle: bundled libffi
* ext/fiddle/depend, ext/fiddle/extconf.rb: try to build bundled libffi if existing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle/depend')
-rw-r--r--ext/fiddle/depend22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/fiddle/depend b/ext/fiddle/depend
index e786dc71d2..8fcb06e481 100644
--- a/ext/fiddle/depend
+++ b/ext/fiddle/depend
@@ -1,4 +1,26 @@
+PWD =
+LOCAL_LIBS = $(LIBFFI_A)
+
+CONFIGURE_LIBFFI = \
+ cd $(LIBFFI_DIR) && \
+ $(LIBFFI_CONFIGURE) --disable-shared \
+ --host=$(LIBFFI_ARCH) --enable-builddir=$(arch) \
+ CC="$(CC)" CFLAGS="$(LIBFFI_CFLAGS)"
+
$(OBJS): $(HDRS) $(ruby_headers) \
$(hdrdir)/ruby/io.h \
$(hdrdir)/ruby/encoding.h \
$(hdrdir)/ruby/oniguruma.h
+
+$(STATIC_LIB) $(RUBYARCHDIR)/$(DLLIB) $(DLLIB): $(LIBFFI_A)
+
+$(OBJS): $(FFI_H)
+
+hdr: $(FFI_H)
+configure-libffi $(FFI_H):
+ $(Q) $(MAKEDIRS) $(LIBFFI_DIR)
+ $(Q) $(CONFIGURE_LIBFFI)
+
+lib: $(LIBFFI_A)
+$(LIBFFI_A):
+ $(Q) $(SUBMAKE_LIBFFI)