2014-12-20 05:23:00 +03:00
|
|
|
PWD =
|
|
|
|
|
|
|
|
CONFIGURE_LIBFFI = \
|
|
|
|
$(LIBFFI_CONFIGURE) --disable-shared \
|
|
|
|
--host=$(LIBFFI_ARCH) --enable-builddir=$(arch) \
|
2014-12-22 06:42:13 +03:00
|
|
|
CC="$(CC)" CFLAGS="$(LIBFFI_CFLAGS)" \
|
|
|
|
LD="$(LD)" LDFLAGS="$(LIBFFI_LDFLAGS)"
|
2014-12-20 05:23:00 +03:00
|
|
|
|
2013-04-15 17:22:20 +04:00
|
|
|
$(OBJS): $(HDRS) $(ruby_headers) \
|
|
|
|
$(hdrdir)/ruby/io.h \
|
|
|
|
$(hdrdir)/ruby/encoding.h \
|
2015-11-24 00:20:56 +03:00
|
|
|
$(hdrdir)/ruby/oniguruma.h \
|
|
|
|
$(hdrdir)/ruby/thread.h \
|
|
|
|
$(top_srcdir)/internal.h
|
2014-12-20 05:23:00 +03:00
|
|
|
|
|
|
|
$(STATIC_LIB) $(RUBYARCHDIR)/$(DLLIB) $(DLLIB): $(LIBFFI_A)
|
|
|
|
|
|
|
|
$(OBJS): $(FFI_H)
|
|
|
|
|
2014-12-24 09:58:34 +03:00
|
|
|
.PHONY: .FORCE hdr
|
|
|
|
|
|
|
|
.FORCE:
|
|
|
|
|
2014-12-20 05:23:00 +03:00
|
|
|
hdr: $(FFI_H)
|
2014-12-24 09:58:34 +03:00
|
|
|
|
|
|
|
configure-libffi build-libffi: .FORCE
|
|
|
|
configure-libffi \
|
|
|
|
$(LIBFFI_DIR)/include/ffi.h \
|
|
|
|
$(LIBFFI_DIR)/include/ffitarget.h \
|
|
|
|
$(LIBFFI_DIR)/fficonfig.h \
|
|
|
|
$(LIBFFI_DIR)/Makefile:
|
2014-12-20 05:23:00 +03:00
|
|
|
$(Q) $(MAKEDIRS) $(LIBFFI_DIR)
|
|
|
|
$(Q) $(CONFIGURE_LIBFFI)
|
|
|
|
|
2014-12-21 08:45:01 +03:00
|
|
|
build-libffi: $(LIBFFI_A)
|
|
|
|
build-libffi $(LIBFFI_A):
|
2014-12-20 05:23:00 +03:00
|
|
|
$(Q) $(SUBMAKE_LIBFFI)
|
2014-12-20 06:53:05 +03:00
|
|
|
|
2014-12-23 14:33:54 +03:00
|
|
|
clean-libffi:
|
|
|
|
$(Q) $(SUBMAKE_LIBFFI) clean
|
|
|
|
|
|
|
|
distclean-libffi:
|
|
|
|
$(Q) $(SUBMAKE_LIBFFI) distclean
|
|
|
|
$(Q) $(RM) $(LIBFFI_DIR)/local.exp
|
2015-07-27 06:46:07 +03:00
|
|
|
$(Q) $(RUBY) -rfileutils -e "FileUtils.rmdir(Dir.glob(ARGV[0]+'/**/{,.*/}'), :parents=>true)" $(LIBFFI_DIR)
|
2014-12-23 14:33:54 +03:00
|
|
|
|
|
|
|
realclean-libffi:
|
2014-12-23 14:57:11 +03:00
|
|
|
$(Q) $(RMALL) $(LIBFFI_DIR)
|
2014-12-23 14:33:54 +03:00
|
|
|
|
2015-04-12 03:10:52 +03:00
|
|
|
.PHONY: clean-libffi distclean-libffi realclean-libffi
|
|
|
|
.PHONY: clean-none distclean-none realclean-none
|
2014-12-23 14:33:54 +03:00
|
|
|
|
|
|
|
clean: clean-$(LIBFFI_CLEAN)
|
|
|
|
distclean: distclean-$(LIBFFI_CLEAN)
|
|
|
|
realclean: realclean-$(LIBFFI_CLEAN)
|
|
|
|
|
2015-04-12 03:10:52 +03:00
|
|
|
.PHONY: configure configure-libffi
|