kumquat-buildroot/package/mpfr/mpfr.mk

122 lines
3.9 KiB
Makefile
Raw Normal View History

#############################################################
#
# mpfr
#
#############################################################
2007-08-31 16:30:22 +02:00
MPFR_VERSION:=2.3.0
2007-09-17 13:20:14 +02:00
MPFR_PATCH:=patches
MPFR_PATCH_FILE:=mpfr-$(MPFR_VERSION).patch
MPFR_SOURCE:=mpfr-$(MPFR_VERSION).tar.bz2
2006-11-17 16:43:51 +01:00
MPFR_CAT:=$(BZCAT)
MPFR_SITE:=http://www.mpfr.org/mpfr-$(MPFR_VERSION)/
2007-01-16 14:26:32 +01:00
MPFR_DIR:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
2007-01-16 20:48:46 +01:00
MPFR_TARGET_DIR:=$(BUILD_DIR)/mpfr-$(MPFR_VERSION)
MPFR_BINARY:=libmpfr$(LIBTGTEXT)
2007-06-06 21:45:46 +02:00
MPFR_HOST_BINARY:=libmpfr$(HOST_SHREXT)
2006-12-21 18:20:42 +01:00
MPFR_LIBVERSION:=1.0.1
#MPFR_SVN_CMD:=svn co svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3 mpfr-2.3
# need patch
ifneq ($(MPFR_PATCH),)
MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
$(MPFR_PATCH_SOURCE):
$(WGET) -O $@ $(MPFR_SITE)/$(MPFR_PATCH)
endif
$(DL_DIR)/$(MPFR_SOURCE):
$(WGET) -P $(DL_DIR) $(MPFR_SITE)/$(MPFR_SOURCE)
$(MPFR_DIR)/.unpacked: $(DL_DIR)/$(MPFR_SOURCE) $(MPFR_PATCH_SOURCE)
2007-01-16 14:26:32 +01:00
$(MPFR_CAT) $(DL_DIR)/$(MPFR_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(MPFR_DIR) package/mpfr/ \*.patch
$(CONFIG_UPDATE) $(MPFR_DIR)
ifneq ($(MPFR_PATCH),)
2008-03-11 18:52:40 +01:00
( cd $(MPFR_DIR); patch -p1 -N -Z < $(MPFR_PATCH_SOURCE); )
endif
touch $@
$(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; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
2007-01-16 20:48:46 +01:00
$(MPFR_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
$(PREFERRED_LIB_FLAGS) \
2007-09-17 15:44:03 +02:00
--with-gmp-build=$(GMP_TARGET_DIR) \
$(DISABLE_NLS) \
)
2006-12-13 21:09:07 +01:00
touch $@
2007-01-16 14:26:32 +01:00
$(MPFR_TARGET_DIR)/.libs/$(MPFR_BINARY): $(MPFR_TARGET_DIR)/.configured
#$(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)
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(MPFR_TARGET_DIR) install
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(STAGING_DIR)/usr/lib/libmpfr$(LIBTGTEXT)*
$(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)
cp -dpf $(STAGING_DIR)/usr/include/mpfr.h $(STAGING_DIR)/usr/include/mpf2mpfr.h \
$(TARGET_DIR)/usr/include/
endif
.PHONY: libmpfr-source
libmpfr-source: $(DL_DIR)/$(MPFR_SOURCE) $(MPFR_PATCH_SOURCE)
libmpfr: uclibc $(TARGET_DIR)/usr/lib/libmpfr$(LIBTGTEXT)
stage-libmpfr: uclibc $(STAGING_DIR)/usr/lib/$(MPFR_BINARY)
2006-11-28 17:54:30 +01:00
libmpfr-clean:
rm -f $(TARGET_DIR)/usr/lib/libmpfr.* \
$(TARGET_DIR)/usr/include/mpfr.h \
$(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-11-28 17:54:30 +01:00
libmpfr-dirclean:
2007-01-16 14:26:32 +01:00
rm -rf $(MPFR_TARGET_DIR)
MPFR_DIR2:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)-host
2007-01-16 14:26:32 +01:00
MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr
$(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)
(cd $(MPFR_DIR2); \
$(HOST_CONFIGURE_OPTS) \
$(MPFR_DIR)/configure \
2007-01-16 14:26:32 +01:00
--prefix="$(MPFR_HOST_DIR)" \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--enable-shared \
--enable-static \
2007-01-16 14:26:32 +01:00
--with-gmp=$(GMP_HOST_DIR) \
$(DISABLE_NLS) \
)
2006-12-13 21:09:07 +01:00
touch $@
2007-06-06 22:25:16 +02:00
$(MPFR_HOST_DIR)/lib/libmpfr$(HOST_LIBEXT) $(MPFR_HOST_DIR)/lib/libmpfr$(HOST_SHREXT) $(MPFR_HOST_DIR)/lib/libmpfr$(HOST_SHREXT).$(MPFR_LIBVERSION): $(MPFR_DIR2)/.configured
2007-01-16 14:26:32 +01:00
$(MAKE) -C $(MPFR_DIR2) install
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)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
2006-11-28 17:54:30 +01:00
ifeq ($(strip $(BR2_PACKAGE_LIBMPFR)),y)
TARGETS+=libmpfr
endif