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