2006-09-28 19:38:06 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# mpfr
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-03-16 16:47:58 +01:00
|
|
|
MPFR_VERSION:=2.4.1
|
|
|
|
MPFR_PATCH:=patches
|
2007-03-22 14:21:05 +01:00
|
|
|
MPFR_PATCH_FILE:=mpfr-$(MPFR_VERSION).patch
|
2006-09-28 19:38:06 +02:00
|
|
|
MPFR_SOURCE:=mpfr-$(MPFR_VERSION).tar.bz2
|
2006-11-17 16:43:51 +01:00
|
|
|
MPFR_CAT:=$(BZCAT)
|
2008-05-22 23:40:50 +02:00
|
|
|
MPFR_SITE:=http://www.mpfr.org/mpfr-$(MPFR_VERSION)
|
2009-09-23 01:30:00 +02:00
|
|
|
MPFR_DIR:=$(TOOLCHAIN_DIR)/mpfr-$(MPFR_VERSION)
|
2007-01-16 20:48:46 +01:00
|
|
|
MPFR_TARGET_DIR:=$(BUILD_DIR)/mpfr-$(MPFR_VERSION)
|
2007-06-02 13:22:17 +02:00
|
|
|
MPFR_BINARY:=libmpfr$(LIBTGTEXT)
|
2009-02-10 17:38:53 +01:00
|
|
|
MPFR_HOST_BINARY:=libmpfr$(HOST_LIBEXT)
|
2009-02-13 09:34:01 +01:00
|
|
|
MPFR_LIBVERSION:=1.2.0
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-03-22 14:21:05 +01:00
|
|
|
# need patch
|
|
|
|
ifneq ($(MPFR_PATCH),)
|
2007-10-31 07:52:26 +01:00
|
|
|
MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
|
2007-03-22 14:21:05 +01:00
|
|
|
|
2007-10-31 07:52:26 +01:00
|
|
|
$(MPFR_PATCH_SOURCE):
|
2009-01-16 13:07:53 +01:00
|
|
|
$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
|
2009-01-16 13:34:44 +01:00
|
|
|
ifeq ($(SPIDER),) # this breaks source-check/external-deps
|
2009-01-16 13:07:53 +01:00
|
|
|
mv $(DL_DIR)/$(MPFR_PATCH) $@
|
2007-03-22 14:21:05 +01:00
|
|
|
endif
|
2009-01-16 13:34:44 +01:00
|
|
|
endif
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-10-31 07:52:26 +01:00
|
|
|
$(DL_DIR)/$(MPFR_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_SOURCE))
|
2007-10-31 07:52:26 +01:00
|
|
|
|
|
|
|
$(MPFR_DIR)/.unpacked: $(DL_DIR)/$(MPFR_SOURCE) $(MPFR_PATCH_SOURCE)
|
2009-09-23 01:30:00 +02:00
|
|
|
$(MPFR_CAT) $(DL_DIR)/$(MPFR_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
|
2006-09-28 19:38:06 +02:00
|
|
|
toolchain/patch-kernel.sh $(MPFR_DIR) package/mpfr/ \*.patch
|
2008-12-05 16:27:26 +01:00
|
|
|
$(CONFIG_UPDATE) $(@D)
|
2006-09-28 19:38:06 +02:00
|
|
|
ifneq ($(MPFR_PATCH),)
|
2009-09-24 17:14:31 +02:00
|
|
|
toolchain/patch-kernel.sh $(MPFR_DIR) $(DL_DIR)/ $(MPFR_PATCH_FILE)
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|
2007-01-22 20:17:23 +01:00
|
|
|
touch $@
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-06-20 13:26:36 +02:00
|
|
|
$(MPFR_TARGET_DIR)/.configured: $(MPFR_DIR)/.unpacked $(STAGING_DIR)/usr/lib/$(GMP_BINARY)
|
2007-01-16 22:00:54 +01:00
|
|
|
mkdir -p $(MPFR_TARGET_DIR)
|
2007-01-16 14:26:32 +01:00
|
|
|
(cd $(MPFR_TARGET_DIR); rm -rf config.cache; \
|
2006-09-28 19:38:06 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(MPFR_DIR)/configure $(QUIET) \
|
2007-01-14 04:52:21 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
2006-09-28 19:38:06 +02:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
2007-01-14 04:52:21 +01:00
|
|
|
--prefix=/usr \
|
2007-06-20 13:26:36 +02:00
|
|
|
$(PREFERRED_LIB_FLAGS) \
|
2007-09-17 15:44:03 +02:00
|
|
|
--with-gmp-build=$(GMP_TARGET_DIR) \
|
2006-09-28 19:38:06 +02:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2006-12-13 21:09:07 +01:00
|
|
|
touch $@
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-01-16 14:26:32 +01:00
|
|
|
$(MPFR_TARGET_DIR)/.libs/$(MPFR_BINARY): $(MPFR_TARGET_DIR)/.configured
|
2007-06-20 13:26:36 +02:00
|
|
|
#$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(MPFR_TARGET_DIR)
|
|
|
|
$(MAKE) -C $(MPFR_TARGET_DIR)
|
|
|
|
|
|
|
|
$(STAGING_DIR)/usr/lib/$(MPFR_BINARY): $(MPFR_TARGET_DIR)/.libs/$(MPFR_BINARY)
|
2007-08-21 21:20:18 +02:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(MPFR_TARGET_DIR) install
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(STAGING_DIR)/usr/lib/libmpfr$(LIBTGTEXT)*
|
2007-06-20 13:26:36 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/lib/libmpfr.so $(TARGET_DIR)/usr/lib/libmpfr.so.$(MPFR_LIBVERSION) $(TARGET_DIR)/usr/lib/libmpfr.a: $(STAGING_DIR)/usr/lib/$(MPFR_BINARY)
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libmpfr$(LIBTGTEXT)* $(TARGET_DIR)/usr/lib/
|
2006-11-28 17:54:30 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBMPFR_HEADERS),y)
|
2007-06-20 13:26:36 +02:00
|
|
|
cp -dpf $(STAGING_DIR)/usr/include/mpfr.h $(STAGING_DIR)/usr/include/mpf2mpfr.h \
|
2006-11-17 12:51:17 +01:00
|
|
|
$(TARGET_DIR)/usr/include/
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|
|
|
|
|
2007-10-31 07:52:26 +01:00
|
|
|
.PHONY: libmpfr-source
|
|
|
|
|
|
|
|
libmpfr-source: $(DL_DIR)/$(MPFR_SOURCE) $(MPFR_PATCH_SOURCE)
|
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
libmpfr: $(TARGET_DIR)/usr/lib/libmpfr$(LIBTGTEXT)
|
|
|
|
stage-libmpfr: $(STAGING_DIR)/usr/lib/$(MPFR_BINARY)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libmpfr-clean:
|
2007-06-20 13:26:36 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libmpfr.* \
|
2006-12-14 09:12:18 +01:00
|
|
|
$(TARGET_DIR)/usr/include/mpfr.h \
|
2007-06-20 13:26:36 +02:00
|
|
|
$(TARGET_DIR)/usr/include/mpf2mpfr.h \
|
|
|
|
$(STAGING_DIR)/usr/lib/libmpfr* $(STAGING_DIR)/usr/include/mpfr*
|
2007-01-16 14:26:32 +01:00
|
|
|
-$(MAKE) -C $(MPFR_TARGET_DIR) clean
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libmpfr-dirclean:
|
2007-01-16 14:26:32 +01:00
|
|
|
rm -rf $(MPFR_TARGET_DIR)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2009-09-23 01:30:00 +02:00
|
|
|
MPFR_DIR2:=$(TOOLCHAIN_DIR)/mpfr-$(MPFR_VERSION)-host
|
|
|
|
MPFR_HOST_DIR:=$(TOOLCHAIN_DIR)/mpfr
|
2007-06-02 13:22:17 +02:00
|
|
|
$(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_HOST_BINARY)
|
2007-01-16 14:26:32 +01:00
|
|
|
mkdir -p $(MPFR_DIR2)
|
2006-12-14 09:12:18 +01:00
|
|
|
(cd $(MPFR_DIR2); \
|
2007-06-20 13:26:36 +02:00
|
|
|
$(HOST_CONFIGURE_OPTS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(MPFR_DIR)/configure $(QUIET) \
|
2007-01-16 14:26:32 +01:00
|
|
|
--prefix="$(MPFR_HOST_DIR)" \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--host=$(GNU_HOST_NAME) \
|
2009-02-09 14:01:32 +01:00
|
|
|
--disable-shared \
|
2006-12-13 20:57:05 +01:00
|
|
|
--enable-static \
|
2007-01-16 14:26:32 +01:00
|
|
|
--with-gmp=$(GMP_HOST_DIR) \
|
2006-12-13 20:57:05 +01:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2006-12-13 21:09:07 +01:00
|
|
|
touch $@
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2009-02-10 16:19:31 +01:00
|
|
|
$(MPFR_HOST_DIR)/lib/libmpfr$(HOST_LIBEXT): $(MPFR_DIR2)/.configured
|
2007-01-16 14:26:32 +01:00
|
|
|
$(MAKE) -C $(MPFR_DIR2) install
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2007-06-02 13:22:17 +02:00
|
|
|
host-libmpfr: $(MPFR_HOST_DIR)/lib/$(MPFR_HOST_BINARY)
|
2007-01-16 14:26:32 +01:00
|
|
|
host-libmpfr-clean:
|
|
|
|
rm -rf $(MPFR_HOST_DIR)
|
|
|
|
-$(MAKE) -C $(MPFR_DIR2) clean
|
|
|
|
host-libmpfr-dirclean:
|
|
|
|
rm -rf $(MPFR_HOST_DIR) $(MPFR_DIR2)
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2006-09-28 19:38:06 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBMPFR),y)
|
2006-11-28 17:54:30 +01:00
|
|
|
TARGETS+=libmpfr
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|