2006-09-28 19:38:06 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# mpfr
|
|
|
|
#
|
|
|
|
#############################################################
|
2006-12-02 19:14:38 +01:00
|
|
|
MPFR_VERSION:=2.2.1
|
|
|
|
#MPFR_PATCH:=patches
|
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)
|
2006-09-28 19:38:06 +02:00
|
|
|
MPFR_SITE:=http://www.mpfr.org/mpfr-current/
|
|
|
|
MPFR_DIR:=$(BUILD_DIR)/mpfr-$(MPFR_VERSION)
|
|
|
|
MPFR_BINARY:=libmpfr.a
|
2006-12-21 18:20:42 +01:00
|
|
|
MPFR_LIBVERSION:=1.0.1
|
2006-09-28 19:38:06 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_ENDIAN),"BIG")
|
|
|
|
MPFR_BE:=yes
|
|
|
|
else
|
|
|
|
MPFR_BE:=no
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(MPFR_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(MPFR_SITE)/$(MPFR_SOURCE)
|
|
|
|
|
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libmpfr-source: $(DL_DIR)/$(MPFR_SOURCE)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
|
|
|
$(MPFR_DIR)/.unpacked: $(DL_DIR)/$(MPFR_SOURCE)
|
|
|
|
$(MPFR_CAT) $(DL_DIR)/$(MPFR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(MPFR_DIR) package/mpfr/ \*.patch
|
|
|
|
$(CONFIG_UPDATE) $(MPFR_DIR)
|
|
|
|
ifneq ($(MPFR_PATCH),)
|
|
|
|
$(WGET) -P $(MPFR_DIR) $(MPFR_SITE)/$(MPFR_PATCH)
|
|
|
|
( cd $(MPFR_DIR) ; patch -p1 < $(MPFR_PATCH) ; )
|
|
|
|
endif
|
|
|
|
touch $(MPFR_DIR)/.unpacked
|
|
|
|
|
2006-12-13 20:57:05 +01:00
|
|
|
$(MPFR_DIR)/.configured: $(MPFR_DIR)/.unpacked $(STAGING_DIR)/lib/$(GMP_BINARY)
|
2006-09-28 19:38:06 +02:00
|
|
|
(cd $(MPFR_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2006-12-02 19:14:38 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2006-09-28 19:38:06 +02:00
|
|
|
ac_cv_c_bigendian=$(MPFR_BE) \
|
|
|
|
./configure \
|
|
|
|
--host=$(REAL_GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=$(STAGING_DIR) \
|
|
|
|
--exec_prefix=$(STAGING_DIR) \
|
|
|
|
--libdir=$(STAGING_DIR)/lib \
|
|
|
|
--includedir=$(STAGING_DIR)/include \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
--enable-shared \
|
2006-12-13 20:57:05 +01:00
|
|
|
--with-gmp=$(STAGING_DIR) \
|
2006-09-28 19:38:06 +02:00
|
|
|
$(DISABLE_NLS) \
|
|
|
|
);
|
2006-12-13 21:09:07 +01:00
|
|
|
touch $@
|
2006-09-28 19:38:06 +02:00
|
|
|
|
|
|
|
$(MPFR_DIR)/.libs/$(MPFR_BINARY): $(MPFR_DIR)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(MPFR_DIR)
|
|
|
|
|
|
|
|
$(STAGING_DIR)/lib/$(MPFR_BINARY): $(MPFR_DIR)/.libs/$(MPFR_BINARY)
|
|
|
|
$(MAKE) prefix=$(STAGING_DIR) \
|
|
|
|
exec_prefix=$(STAGING_DIR) \
|
|
|
|
bindir=$(STAGING_DIR)/bin \
|
|
|
|
sbindir=$(STAGING_DIR)/sbin \
|
|
|
|
libexecdir=$(STAGING_DIR)/libexec \
|
|
|
|
datadir=$(STAGING_DIR)/share \
|
|
|
|
sysconfdir=$(STAGING_DIR)/etc \
|
|
|
|
sharedstatedir=$(STAGING_DIR)/com \
|
|
|
|
localstatedir=$(STAGING_DIR)/var \
|
|
|
|
libdir=$(STAGING_DIR)/lib \
|
|
|
|
includedir=$(STAGING_DIR)/include \
|
|
|
|
oldincludedir=$(STAGING_DIR)/include \
|
|
|
|
infodir=$(STAGING_DIR)/info \
|
|
|
|
mandir=$(STAGING_DIR)/man \
|
|
|
|
-C $(MPFR_DIR) install;
|
|
|
|
|
2006-12-22 11:20:56 +01:00
|
|
|
$(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION): $(STAGING_DIR)/lib/$(MPFR_BINARY)
|
2006-09-28 19:38:06 +02:00
|
|
|
cp -a $(STAGING_DIR)/lib/libmpfr.so* $(STAGING_DIR)/lib/libmpfr.a \
|
|
|
|
$(TARGET_DIR)/lib/
|
2006-11-28 17:54:30 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBMPFR_HEADERS),y)
|
2006-09-28 19:38:06 +02:00
|
|
|
cp -a $(STAGING_DIR)/include/mpfr.h $(STAGING_DIR)/include/mpf2mpfr.h \
|
2006-11-17 12:51:17 +01:00
|
|
|
$(TARGET_DIR)/usr/include/
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|
|
|
|
$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libmpfr.so* \
|
|
|
|
$(TARGET_DIR)/lib/libmpfr.a
|
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libmpfr: uclibc libgmp $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION)
|
2006-12-13 20:57:05 +01:00
|
|
|
libmpfr-stage: uclibc $(STAGING_DIR)/lib/$(MPFR_BINARY)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libmpfr-clean:
|
2006-12-14 09:12:18 +01:00
|
|
|
rm -f $(TARGET_DIR)/lib/$(MPFR_BINARY) $(TARGET_DIR)/lib/libmpfr.so* \
|
|
|
|
$(TARGET_DIR)/usr/include/mpfr.h \
|
|
|
|
$(TARGET_DIR)/usr/include/mpf2mpfr.h
|
2006-09-28 19:38:06 +02:00
|
|
|
-$(MAKE) -C $(MPFR_DIR) clean
|
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libmpfr-dirclean:
|
2006-09-28 19:38:06 +02:00
|
|
|
rm -rf $(MPFR_DIR)
|
|
|
|
|
2006-12-14 09:12:18 +01:00
|
|
|
MPFR_DIR2:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
|
|
|
|
$(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_BINARY)
|
|
|
|
[ -d $(MPFR_DIR2) ] || mkdir $(MPFR_DIR2)
|
|
|
|
(cd $(MPFR_DIR2); \
|
2006-12-13 20:57:05 +01:00
|
|
|
CC="$(HOSTCC)" \
|
|
|
|
CXX="$(HOSTCXX)" \
|
|
|
|
$(MPFR_DIR)/configure \
|
|
|
|
--prefix=$(STAGING_DIR) \
|
|
|
|
--exec_prefix=$(STAGING_DIR) \
|
|
|
|
--libdir=$(STAGING_DIR)/lib \
|
|
|
|
--includedir=$(STAGING_DIR)/include \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
2006-12-14 09:12:18 +01:00
|
|
|
--with-gmp-build=$(GMP_DIR2) \
|
2006-12-13 20:57:05 +01:00
|
|
|
$(DISABLE_NLS) \
|
2006-12-14 09:12:18 +01:00
|
|
|
);
|
2006-12-13 21:09:07 +01:00
|
|
|
touch $@
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2006-12-14 09:12:18 +01:00
|
|
|
$(MPFR_DIR2)/.libs/$(MPFR_BINARY): $(MPFR_DIR2)/.configured
|
|
|
|
$(MAKE) -C $(MPFR_DIR2)
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2006-12-14 09:12:18 +01:00
|
|
|
MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr
|
|
|
|
$(MPFR_HOST_DIR)/lib/libmpfr.a: $(MPFR_DIR2)/.libs/$(MPFR_BINARY)
|
|
|
|
mkdir -p $(MPFR_HOST_DIR)/lib $(MPFR_HOST_DIR)/include
|
|
|
|
cp -a $(MPFR_DIR2)/.libs/libmpfr.* $(MPFR_HOST_DIR)/lib
|
|
|
|
cp -a $(MPFR_DIR)/mpfr.h $(MPFR_DIR)/mpf2mpfr.h $(MPFR_HOST_DIR)/include
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2006-09-28 19:38:06 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2006-11-28 17:54:30 +01:00
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBMPFR)),y)
|
|
|
|
TARGETS+=libmpfr
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|