summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile32
-rw-r--r--package/gmp/gmp.mk17
-rw-r--r--package/mpfr/mpfr.mk16
-rw-r--r--toolchain/binutils/binutils.mk8
4 files changed, 36 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index d80956319..dff5fbf8e 100644
--- a/Makefile
+++ b/Makefile
@@ -48,38 +48,38 @@ cc-option = $(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /d
#############################################################
#
-# Setup the proper filename extensions for the target
+# Setup the proper filename extensions for the host
#
##############################################################
ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
-EXEEXT:=
-LIBEXT:=.a
-SHREXT:=.so
+HOST_EXEEXT:=
+HOST_LIBEXT:=.a
+HOST_SHREXT:=.so
endif
ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
-EXEEXT:=
-LIBEXT:=.a
-SHREXT:=.dylib
+HOST_EXEEXT:=
+HOST_LIBEXT:=.a
+HOST_SHREXT:=.dylib
endif
ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
-EXEEXT:=.exe
-LIBEXT:=.lib
-SHREXT:=.dll
+HOST_EXEEXT:=.exe
+HOST_LIBEXT:=.lib
+HOST_SHREXT:=.dll
endif
ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
-EXEEXT:=.exe
-LIBEXT:=.lib
-SHREXT:=.dll
+HOST_EXEEXT:=.exe
+HOST_LIBEXT:=.lib
+HOST_SHREXT:=.dll
endif
+# The preferred type of libs we build for the target
ifeq ($(BR2_PREFER_STATIC_LIB),y)
-LIBTGTEXT=$(LIBEXT)
+LIBTGTEXT=.a
else
-LIBTGTEXT=$(SHREXT)
+LIBTGTEXT=.so
endif
-
#############################################################
#
# The list of stuff to build for the target toolchain
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
index b70fffa5f..18304cd7c 100644
--- a/package/gmp/gmp.mk
+++ b/package/gmp/gmp.mk
@@ -9,7 +9,8 @@ GMP_SITE:=http://ftp.sunet.se/pub/gnu/gmp/
GMP_CAT:=$(BZCAT)
GMP_DIR:=$(TOOL_BUILD_DIR)/gmp-$(GMP_VERSION)
GMP_TARGET_DIR:=$(BUILD_DIR)/gmp-$(GMP_VERSION)
-GMP_BINARY:=libgmp.so
+GMP_BINARY:=libgmp$(LIBTGTEXT)
+GMP_HOST_BINARY:=libgmp$(HOST_LIBEXT)
GMP_LIBVERSION:=3.4.1
ifeq ($(BR2_ENDIAN),"BIG")
@@ -20,7 +21,7 @@ endif
# this is a workaround for a bug in GMP, please see
# http://gmplib.org/list-archives/gmp-devel/2006-April/000618.html
-ifeq ($(EXEEXT),.exe)
+ifeq ($(HOST_EXEEXT),.exe)
GMP_CPP_FLAGS:=-DDLL_EXPORT
else
GMP_CPP_FLAGS:=
@@ -88,19 +89,17 @@ $(STAGING_DIR)/lib/$(GMP_BINARY): $(GMP_TARGET_DIR)/.libs/$(GMP_BINARY)
$(STRIP) --strip-unneeded $(STAGING_DIR)/lib/libgmp.{so*,a}
$(TARGET_DIR)/lib/libgmp.so $(TARGET_DIR)/lib/libgmp.so.$(GMP_LIBVERSION) $(TARGET_DIR)/lib/libgmp.a: $(STAGING_DIR)/lib/$(GMP_BINARY)
- cp -dpf $(STAGING_DIR)/lib/libgmp.so* $(STAGING_DIR)/lib/libgmp.a \
- $(TARGET_DIR)/lib/
+ cp -dpf $(STAGING_DIR)/lib/libgmp$(LIBTGTEXT) $(TARGET_DIR)/lib/
ifeq ($(BR2_PACKAGE_LIBGMP_HEADERS),y)
test -d $(TARGET_DIR)/usr/include || mkdir -p $(TARGET_DIR)/usr/include
cp -dpf $(STAGING_DIR)/include/gmp.h $(TARGET_DIR)/usr/include/
endif
-libgmp: uclibc $(TARGET_DIR)/lib/libgmp.so.$(GMP_LIBVERSION)
+libgmp: uclibc $(TARGET_DIR)/lib/libgmp$(LIBTGTEXT)
stage-libgmp: uclibc $(STAGING_DIR)/lib/$(GMP_BINARY)
libgmp-clean:
- rm -f $(TARGET_DIR)/lib/$(GMP_BINARY) $(TARGET_DIR)/lib/libgmp.so* \
- $(TARGET_DIR)/usr/include/gmp.h
+ rm -f $(TARGET_DIR)/lib/libgmp.* $(TARGET_DIR)/usr/include/gmp.h
-$(MAKE) -C $(GMP_TARGET_DIR) clean
libgmp-dirclean:
@@ -124,10 +123,10 @@ $(GMP_DIR2)/.configured: $(GMP_DIR)/.unpacked
);
touch $@
-$(GMP_HOST_DIR)/lib/$(GMP_BINARY): $(GMP_DIR2)/.configured
+$(GMP_HOST_DIR)/lib/$(GMP_HOST_BINARY): $(GMP_DIR2)/.configured
$(MAKE) -C $(GMP_DIR2) install
-host-libgmp: $(GMP_HOST_DIR)/lib/$(GMP_BINARY)
+host-libgmp: $(GMP_HOST_DIR)/lib/$(GMP_HOST_BINARY)
host-libgmp-clean:
rm -rf $(GMP_HOST_DIR)
-$(MAKE) -C $(GMP_DIR2) clean
diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk
index 01e78c7c9..76b45d3d7 100644
--- a/package/mpfr/mpfr.mk
+++ b/package/mpfr/mpfr.mk
@@ -11,7 +11,8 @@ MPFR_CAT:=$(BZCAT)
MPFR_SITE:=http://www.mpfr.org/mpfr-current/
MPFR_DIR:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
MPFR_TARGET_DIR:=$(BUILD_DIR)/mpfr-$(MPFR_VERSION)
-MPFR_BINARY:=libmpfr.so
+MPFR_BINARY:=libmpfr$(LIBTGTEXT)
+MPFR_HOST_BINARY:=libmpfr$(HOST_LIBEXT)
MPFR_LIBVERSION:=1.0.1
ifeq ($(BR2_ENDIAN),"BIG")
@@ -102,18 +103,17 @@ $(STAGING_DIR)/lib/$(MPFR_BINARY): $(MPFR_TARGET_DIR)/.libs/$(MPFR_BINARY)
$(STRIP) --strip-unneeded $(STAGING_DIR)/lib/libmpfr.{so*,a}
$(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION) $(TARGET_DIR)/lib/libmpfr.a: $(STAGING_DIR)/lib/$(MPFR_BINARY)
- cp -dpf $(STAGING_DIR)/lib/libmpfr.so* $(STAGING_DIR)/lib/libmpfr.a \
- $(TARGET_DIR)/lib/
+ cp -dpf $(STAGING_DIR)/lib/libmpfr$(LIBTGTEXT) $(TARGET_DIR)/lib/
ifeq ($(BR2_PACKAGE_LIBMPFR_HEADERS),y)
cp -dpf $(STAGING_DIR)/include/mpfr.h $(STAGING_DIR)/include/mpf2mpfr.h \
$(TARGET_DIR)/usr/include/
endif
-libmpfr: uclibc $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION)
+libmpfr: uclibc $(TARGET_DIR)/lib/libmpfr$(LIBTGTEXT)
stage-libmpfr: uclibc $(STAGING_DIR)/lib/$(MPFR_BINARY)
libmpfr-clean:
- rm -f $(TARGET_DIR)/lib/$(MPFR_BINARY) $(TARGET_DIR)/lib/libmpfr.so* \
+ rm -f $(TARGET_DIR)/lib/libmpfr.* \
$(TARGET_DIR)/usr/include/mpfr.h \
$(TARGET_DIR)/usr/include/mpf2mpfr.h
-$(MAKE) -C $(MPFR_TARGET_DIR) clean
@@ -123,7 +123,7 @@ libmpfr-dirclean:
MPFR_DIR2:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)-host
MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr
-$(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_BINARY)
+$(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_HOST_BINARY)
mkdir -p $(MPFR_DIR2)
(cd $(MPFR_DIR2); \
CC="$(HOSTCC)" CC_FOR_BUILD="$(HOSTCC)" \
@@ -140,10 +140,10 @@ $(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_BINARY
);
touch $@
-$(MPFR_HOST_DIR)/lib/$(MPFR_BINARY): $(MPFR_DIR2)/.configured
+$(MPFR_HOST_DIR)/lib/$(MPFR_HOST_BINARY): $(MPFR_DIR2)/.configured
$(MAKE) -C $(MPFR_DIR2) install
-host-libmpfr: $(MPFR_HOST_DIR)/lib/$(MPFR_BINARY)
+host-libmpfr: $(MPFR_HOST_DIR)/lib/$(MPFR_HOST_BINARY)
host-libmpfr-clean:
rm -rf $(MPFR_HOST_DIR)
-$(MAKE) -C $(MPFR_DIR2) clean
diff --git a/toolchain/binutils/binutils.mk b/toolchain/binutils/binutils.mk
index 73e70180d..71fa5c6a9 100644
--- a/toolchain/binutils/binutils.mk
+++ b/toolchain/binutils/binutils.mk
@@ -49,11 +49,11 @@ BINUTILS_NO_MPFR:=y
endif
ifndef BINUTILS_NO_MPFR
-BINUTILS_HOST_PREREQ:=$(TOOL_BUILD_DIR)/gmp/lib/libgmp.so \
- $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr.so
+BINUTILS_HOST_PREREQ:=$(TOOL_BUILD_DIR)/gmp/lib/libgmp$(HOST_LIBEXT) \
+ $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr$(HOST_LIBEXT)
-BINUTILS_TARGET_PREREQ:=$(TARGET_DIR)/lib/libgmp.so \
- $(TARGET_DIR)/lib/libmpfr.so
+BINUTILS_TARGET_PREREQ:=$(TARGET_DIR)/lib/libgmp$(LIBTGTEXT) \
+ $(TARGET_DIR)/lib/libmpfr$(LIBTGTEXT)
EXTRA_BINUTILS_CONFIG_OPTIONS+=--with-gmp="$(GMP_HOST_DIR)"
EXTRA_BINUTILS_CONFIG_OPTIONS+=--with-mpfr="$(MPFR_HOST_DIR)"