2006-09-28 19:38:06 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# gmp
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-02-13 09:33:50 +01:00
|
|
|
GMP_VERSION:=4.2.4
|
2006-09-28 19:38:06 +02:00
|
|
|
GMP_SOURCE:=gmp-$(GMP_VERSION).tar.bz2
|
2009-02-13 09:33:57 +01:00
|
|
|
GMP_SITE:=$(BR2_GNU_MIRROR)/gmp
|
2006-11-17 16:43:51 +01:00
|
|
|
GMP_CAT:=$(BZCAT)
|
2009-09-23 01:30:00 +02:00
|
|
|
GMP_DIR:=$(TOOLCHAIN_DIR)/gmp-$(GMP_VERSION)
|
2007-01-16 14:26:32 +01:00
|
|
|
GMP_TARGET_DIR:=$(BUILD_DIR)/gmp-$(GMP_VERSION)
|
2007-06-02 13:22:17 +02:00
|
|
|
GMP_BINARY:=libgmp$(LIBTGTEXT)
|
2009-02-10 17:38:53 +01:00
|
|
|
GMP_HOST_BINARY:=libgmp$(HOST_LIBEXT)
|
2009-02-13 09:33:50 +01:00
|
|
|
GMP_LIBVERSION:=3.4.4
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-08-21 12:40:18 +02:00
|
|
|
# this is a workaround for a bug in GMP, please see
|
2007-06-02 00:16:28 +02:00
|
|
|
# http://gmplib.org/list-archives/gmp-devel/2006-April/000618.html
|
2007-06-02 13:22:17 +02:00
|
|
|
ifeq ($(HOST_EXEEXT),.exe)
|
2007-06-20 13:26:36 +02:00
|
|
|
GMP_CPP_FLAGS:=CPPFLAGS=-DDLL_EXPORT
|
2007-06-02 00:16:28 +02:00
|
|
|
endif
|
|
|
|
|
2006-09-28 19:38:06 +02:00
|
|
|
$(DL_DIR)/$(GMP_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(GMP_SITE),$(GMP_SOURCE))
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libgmp-source: $(DL_DIR)/$(GMP_SOURCE)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
|
|
|
$(GMP_DIR)/.unpacked: $(DL_DIR)/$(GMP_SOURCE)
|
2009-09-23 01:30:00 +02:00
|
|
|
$(GMP_CAT) $(DL_DIR)/$(GMP_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
|
2006-09-28 19:38:06 +02:00
|
|
|
toolchain/patch-kernel.sh $(GMP_DIR) package/gmp/ \*.patch
|
2008-12-05 16:27:26 +01:00
|
|
|
$(CONFIG_UPDATE) $(@D)
|
2007-01-22 20:17:23 +01:00
|
|
|
touch $@
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-01-16 14:26:32 +01:00
|
|
|
$(GMP_TARGET_DIR)/.configured: $(GMP_DIR)/.unpacked
|
|
|
|
mkdir -p $(GMP_TARGET_DIR)
|
|
|
|
(cd $(GMP_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) \
|
2007-06-20 13:26:36 +02:00
|
|
|
$(GMP_CPP_FLAGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(GMP_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-02 00:16:28 +02:00
|
|
|
$(PREFERRED_LIB_FLAGS) \
|
2006-09-28 19:38:06 +02:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-01-22 20:17:23 +01:00
|
|
|
touch $@
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2007-01-16 14:26:32 +01:00
|
|
|
$(GMP_TARGET_DIR)/.libs/$(GMP_BINARY): $(GMP_TARGET_DIR)/.configured
|
2007-06-20 13:26:36 +02:00
|
|
|
#$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(GMP_TARGET_DIR)
|
|
|
|
$(MAKE) -C $(GMP_TARGET_DIR)
|
|
|
|
|
|
|
|
$(STAGING_DIR)/usr/lib/$(GMP_BINARY): $(GMP_TARGET_DIR)/.libs/$(GMP_BINARY)
|
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(GMP_TARGET_DIR) install
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(STAGING_DIR)/usr/lib/libgmp$(LIBTGTEXT)*
|
2007-06-20 13:26:36 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/lib/libgmp.so $(TARGET_DIR)/usr/lib/libgmp.so.$(GMP_LIBVERSION) $(TARGET_DIR)/usr/lib/libgmp.a: $(STAGING_DIR)/usr/lib/$(GMP_BINARY)
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libgmp$(LIBTGTEXT)* $(TARGET_DIR)/usr/lib/
|
2006-11-28 17:54:30 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBGMP_HEADERS),y)
|
2006-11-17 12:51:17 +01:00
|
|
|
test -d $(TARGET_DIR)/usr/include || mkdir -p $(TARGET_DIR)/usr/include
|
2007-06-20 13:26:36 +02:00
|
|
|
cp -dpf $(STAGING_DIR)/usr/include/gmp.h $(TARGET_DIR)/usr/include/
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
libgmp: $(TARGET_DIR)/usr/lib/libgmp$(LIBTGTEXT)
|
|
|
|
stage-libgmp: $(STAGING_DIR)/usr/lib/$(GMP_BINARY)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libgmp-clean:
|
2007-06-20 13:26:36 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libgmp.* $(TARGET_DIR)/usr/include/gmp.h \
|
|
|
|
$(STAGING_DIR)/usr/lib/libgmp* $(STAGING_DIR)/usr/include/gmp.h
|
2007-01-16 14:26:32 +01:00
|
|
|
-$(MAKE) -C $(GMP_TARGET_DIR) clean
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2006-11-28 17:54:30 +01:00
|
|
|
libgmp-dirclean:
|
2007-01-16 14:26:32 +01:00
|
|
|
rm -rf $(GMP_TARGET_DIR) $(GMP_DIR)
|
2006-09-28 19:38:06 +02:00
|
|
|
|
2009-09-23 01:30:00 +02:00
|
|
|
GMP_DIR2:=$(TOOLCHAIN_DIR)/gmp-$(GMP_VERSION)-host
|
|
|
|
GMP_HOST_DIR:=$(TOOLCHAIN_DIR)/gmp
|
2006-12-14 09:12:18 +01:00
|
|
|
$(GMP_DIR2)/.configured: $(GMP_DIR)/.unpacked
|
2007-01-16 14:26:32 +01:00
|
|
|
mkdir -p $(GMP_DIR2)
|
2007-08-22 11:56:41 +02:00
|
|
|
(cd $(GMP_DIR2); rm -rf config.cache; \
|
2007-06-20 13:26:36 +02:00
|
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
|
|
$(GMP_CPP_FLAGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
$(GMP_DIR)/configure $(QUIET) \
|
2007-01-16 14:26:32 +01:00
|
|
|
--prefix="$(GMP_HOST_DIR)" \
|
2007-01-14 04:52:21 +01:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
2007-01-16 14:26:32 +01:00
|
|
|
--host=$(GNU_HOST_NAME) \
|
2009-02-09 14:01:32 +01:00
|
|
|
--disable-shared \
|
2007-06-20 13:26:36 +02:00
|
|
|
--enable-static \
|
2006-12-13 20:57:05 +01:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-01-22 20:17:23 +01:00
|
|
|
touch $@
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2009-02-10 16:19:31 +01:00
|
|
|
$(GMP_HOST_DIR)/lib/libgmp$(HOST_LIBEXT): $(GMP_DIR2)/.configured
|
2007-01-16 14:26:32 +01:00
|
|
|
$(MAKE) -C $(GMP_DIR2) install
|
2006-12-13 20:57:05 +01:00
|
|
|
|
2007-06-02 13:22:17 +02:00
|
|
|
host-libgmp: $(GMP_HOST_DIR)/lib/$(GMP_HOST_BINARY)
|
2007-01-16 14:26:32 +01:00
|
|
|
host-libgmp-clean:
|
|
|
|
rm -rf $(GMP_HOST_DIR)
|
|
|
|
-$(MAKE) -C $(GMP_DIR2) clean
|
|
|
|
host-libgmp-dirclean:
|
|
|
|
rm -rf $(GMP_HOST_DIR) $(GMP_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_LIBGMP),y)
|
2006-11-28 17:54:30 +01:00
|
|
|
TARGETS+=libgmp
|
2006-09-28 19:38:06 +02:00
|
|
|
endif
|