aboutsummaryrefslogtreecommitdiff
path: root/package/gmp
diff options
context:
space:
mode:
authorGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-09-28 17:38:06 +0000
committerGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-09-28 17:38:06 +0000
commit35eecb23198fa0b7d463ef04e0717bbc39c760aa (patch)
tree84301a27210b53cb74d5ed4f7453dacc62fa070e /package/gmp
parent2f85174dbf1a678437ce1daff211e74bcf188367 (diff)
downloadbuildroot-35eecb23198fa0b7d463ef04e0717bbc39c760aa.tar.gz
buildroot-35eecb23198fa0b7d463ef04e0717bbc39c760aa.tar.bz2
- add stubs for gmp and mpfr
not yet enabled
Diffstat (limited to 'package/gmp')
-rw-r--r--package/gmp/Config.in16
-rw-r--r--package/gmp/gmp.mk100
2 files changed, 116 insertions, 0 deletions
diff --git a/package/gmp/Config.in b/package/gmp/Config.in
new file mode 100644
index 0000000000..9e15ea37ab
--- /dev/null
+++ b/package/gmp/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_GMP
+ bool "gmp"
+ default n
+ help
+ GNU Multiple Precision Arithmetic Library.
+
+ http://www.swox.com/gmp/
+
+
+config BR2_PACKAGE_GMP_HEADERS
+ bool "gmp headers for target"
+ default n
+ depends on BR2_PACKAGE_GMP
+ help
+ Install the gmp.h for the target.
+
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
new file mode 100644
index 0000000000..c74fd6eeb0
--- /dev/null
+++ b/package/gmp/gmp.mk
@@ -0,0 +1,100 @@
+#############################################################
+#
+# gmp
+#
+#############################################################
+GMP_VERSION:=4.2.1
+GMP_SOURCE:=gmp-$(GMP_VERSION).tar.bz2
+GMP_SITE:=http://ftp.sunet.se/pub/gnu/gmp/
+GMP_CAT:=bzcat
+GMP_DIR:=$(BUILD_DIR)/gmp-$(GMP_VERSION)
+GMP_BINARY:=libgmp.a
+GMP_LIBVERSION:=3.4.1
+
+ifeq ($(BR2_ENDIAN),"BIG")
+GMP_BE:=yes
+else
+GMP_BE:=no
+endif
+
+$(DL_DIR)/$(GMP_SOURCE):
+ $(WGET) -P $(DL_DIR) $(GMP_SITE)/$(GMP_SOURCE)
+
+gmp-source: $(DL_DIR)/$(GMP_SOURCE)
+
+$(GMP_DIR)/.unpacked: $(DL_DIR)/$(GMP_SOURCE)
+ $(GMP_CAT) $(DL_DIR)/$(GMP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(GMP_DIR) package/gmp/ \*.patch
+ $(CONFIG_UPDATE) $(GMP_DIR)
+ touch $(GMP_DIR)/.unpacked
+
+$(GMP_DIR)/.configured: $(GMP_DIR)/.unpacked
+ (cd $(GMP_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ac_cv_c_bigendian=$(GMP_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 \
+ $(DISABLE_NLS) \
+ );
+ touch $(GMP_DIR)/.configured
+
+$(GMP_DIR)/.libs/$(GMP_BINARY): $(GMP_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(GMP_DIR)
+
+$(STAGING_DIR)/lib/$(GMP_BINARY): $(GMP_DIR)/.libs/$(GMP_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 $(GMP_DIR) install;
+
+$(TARGET_DIR)/lib/libgmp.so.$(GMP_LIBVERSION): $(STAGING_DIR)/lib/$(GMP_BINARY)
+ cp -a $(STAGING_DIR)/lib/libgmp.so* $(STAGING_DIR)/lib/libgmp.a \
+ $(TARGET_DIR)/lib/
+ifeq ($(BR2_PACKAGE_GMP_HEADERS),y)
+ cp -a $(STAGING_DIR)/include/gmp.h $(TARGET_DIR)/include/
+endif
+ $(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libgmp.so* \
+ $(TARGET_DIR)/lib/libgmp.a
+
+gmp: uclibc $(TARGET_DIR)/lib/libgmp.so.$(GMP_LIBVERSION)
+
+gmp-clean:
+ rm -f $(TARGET_DIR)/lib/$(GMP_BINARY)
+ -$(MAKE) -C $(GMP_DIR) clean
+
+gmp-dirclean:
+ rm -rf $(GMP_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_GMP)),y)
+TARGETS+=gmp
+endif