summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/gmphost.mk23
-rw-r--r--mk/mpfrhost.mk17
2 files changed, 33 insertions, 7 deletions
diff --git a/mk/gmphost.mk b/mk/gmphost.mk
index 444e6c7..8ba04d0 100644
--- a/mk/gmphost.mk
+++ b/mk/gmphost.mk
@@ -26,15 +26,28 @@ GMP_HOST_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GMP_HOST_VERSION_STRING)))
GMP_HOST_SITE := ftp://ftp.gmplib.org/pub/
GMP_HOST_PACKAGE := gmp-$(GMP_HOST_VERSION).tar.bz2
GMP_HOST_BUILD_DIR := $(TOOLS_BUILD)/gmp
+GMP_HOST_DIR := $(TOOLS_BUILD)/gmp-host
-$(GMP_HOST_BUILD_DIR)/.built: download_gmp_host $(GMP_HOST_BUILD_DIR)/.decompressed
+export GMP_HOST_DIR
+
+gmphost_install: $(GMP_HOST_BUILD_DIR)/.built
+
+$(GMP_HOST_BUILD_DIR)/.built: download_gmp_host $(GMP_HOST_BUILD_DIR)/.decompressed \
+ $(GMP_HOST_BUILD_DIR)/.configured
+ @cd $(GMP_HOST_BUILD_DIR); make; make install
@touch $@
+download_gmp_host:
+ @test -e $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE) || \
+ wget -P $(DOWNLOAD_DIR) $(GMP_HOST_SITE)/$(GMP_HOST_PACKAGE)
+
$(GMP_HOST_BUILD_DIR)/.decompressed:
@tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE)
@mkdir -p $(GMP_HOST_BUILD_DIR)
- touch $@
+ @touch $@
-download_gmp_host:
- @test -e $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE) || \
- wget -P $(DOWNLOAD_DIR) $(GMP_HOST_SITE)/$(GMP_HOST_PACKAGE)
+$(GMP_HOST_BUILD_DIR)/.configured:
+ @mkdir -p $(GMP_HOST_DIR)
+ @cd $(GMP_HOST_BUILD_DIR); $(TOOLS_BUILD)/gmp-$(GMP_HOST_VERSION)/configure \
+ --prefix=$(GMP_HOST_DIR) --disable-shared --enable-static
+ @touch $@
diff --git a/mk/mpfrhost.mk b/mk/mpfrhost.mk
index 5418e6a..63211c5 100644
--- a/mk/mpfrhost.mk
+++ b/mk/mpfrhost.mk
@@ -26,15 +26,28 @@ MPFR_HOST_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_MPFR_HOST_VERSION_STRING)
MPFR_HOST_SITE := http://www.mpfr.org/mpfr-$(MPFR_HOST_VERSION)
MPFR_HOST_PACKAGE := mpfr-$(MPFR_HOST_VERSION).tar.bz2
MPFR_HOST_BUILD_DIR := $(TOOLS_BUILD)/mpfr
+MPFR_HOST_DIR := $(TOOLS_BUILD)/mpfr-host
-$(MPFR_HOST_BUILD_DIR)/.built: download_mpfr_host $(MPFR_HOST_BUILD_DIR)/.decompressed
+export MPFR_HOST_DIR
+
+mpfrhost_install: $(MPFR_HOST_BUILD_DIR)/.built
+
+$(MPFR_HOST_BUILD_DIR)/.built: download_mpfr_host $(MPFR_HOST_BUILD_DIR)/.decompressed \
+ $(MPFR_HOST_BUILD_DIR)/.configured
+ @cd $(MPFR_HOST_BUILD_DIR); make; make install
@touch $@
$(MPFR_HOST_BUILD_DIR)/.decompressed:
@tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE)
@mkdir -p $(MPFR_HOST_BUILD_DIR)
- touch $@
+ @touch $@
download_mpfr_host:
@test -e $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE) || \
wget -P $(DOWNLOAD_DIR) $(MPFR_HOST_SITE)/$(MPFR_HOST_PACKAGE)
+
+$(MPFR_HOST_BUILD_DIR)/.configured:
+ @mkdir -p $(MPFR_HOST_DIR)
+ @cd $(MPFR_HOST_BUILD_DIR); $(TOOLS_BUILD)/mpfr-$(MPFR_HOST_VERSION)/configure \
+ --prefix=$(MPFR_HOST_DIR) --disable-shared --enable-static --with-gmp=$(GMP_HOST_DIR)
+ @touch $@