summaryrefslogtreecommitdiffstats
path: root/package/gmp
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-20 11:26:36 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-20 11:26:36 +0000
commit8027784c3589198d3ba4b9a24b26c361462f1946 (patch)
tree2a666abbe874c367997a2b4830a16225086324cc /package/gmp
parent2c649045197156221cc1d3d6328abb1c405db700 (diff)
downloadbuildroot-novena-8027784c3589198d3ba4b9a24b26c361462f1946.tar.gz
buildroot-novena-8027784c3589198d3ba4b9a24b26c361462f1946.zip
- add full sysroot support for non-ancient toolchains.
- start to separate usr/lib and lib to match normal system-layout
Diffstat (limited to 'package/gmp')
-rw-r--r--package/gmp/gmp.mk70
1 files changed, 21 insertions, 49 deletions
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
index a4e36e73a..d928abc26 100644
--- a/package/gmp/gmp.mk
+++ b/package/gmp/gmp.mk
@@ -22,9 +22,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 ($(HOST_EXEEXT),.exe)
-GMP_CPP_FLAGS:=-DDLL_EXPORT
-else
-GMP_CPP_FLAGS:=
+GMP_CPP_FLAGS:=CPPFLAGS=-DDLL_EXPORT
endif
$(DL_DIR)/$(GMP_SOURCE):
@@ -42,64 +40,39 @@ $(GMP_TARGET_DIR)/.configured: $(GMP_DIR)/.unpacked
mkdir -p $(GMP_TARGET_DIR)
(cd $(GMP_TARGET_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- CPPFLAGS="$(GMP_CPP_FLAGS)" \
+ $(GMP_CPP_FLAGS) \
ac_cv_c_bigendian=$(GMP_BE) \
$(GMP_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libdir=/lib \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --includedir=/include \
- --mandir=/usr/man \
- --infodir=/usr/info \
$(PREFERRED_LIB_FLAGS) \
$(DISABLE_NLS) \
);
touch $@
$(GMP_TARGET_DIR)/.libs/$(GMP_BINARY): $(GMP_TARGET_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(GMP_TARGET_DIR)
-
-$(STAGING_DIR)/lib/$(GMP_BINARY): $(GMP_TARGET_DIR)/.libs/$(GMP_BINARY)
- $(MAKE) prefix=$(STAGING_DIR) \
- exec_prefix=$(STAGING_DIR) \
- bindir=$(STAGING_DIR)/bin \
- sbindir=$(STAGING_DIR)/sbin \
- libexecdir=$(STAGING_DIR)/bin \
- 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_TARGET_DIR) install
- $(STRIP) --strip-unneeded $(STAGING_DIR)/lib/libgmp$(LIBTGTEXT)*
-
-$(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$(LIBTGTEXT)* $(TARGET_DIR)/lib/
+ #$(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
+ $(STRIP) --strip-unneeded $(STAGING_DIR)/usr/lib/libgmp$(LIBTGTEXT)*
+
+$(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/
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/
+ cp -dpf $(STAGING_DIR)/usr/include/gmp.h $(TARGET_DIR)/usr/include/
endif
-libgmp: uclibc $(TARGET_DIR)/lib/libgmp$(LIBTGTEXT)
-stage-libgmp: uclibc $(STAGING_DIR)/lib/$(GMP_BINARY)
+libgmp: uclibc $(TARGET_DIR)/usr/lib/libgmp$(LIBTGTEXT)
+stage-libgmp: uclibc $(STAGING_DIR)/usr/lib/$(GMP_BINARY)
libgmp-clean:
- rm -f $(TARGET_DIR)/lib/libgmp.* $(TARGET_DIR)/usr/include/gmp.h
+ rm -f $(TARGET_DIR)/usr/lib/libgmp.* $(TARGET_DIR)/usr/include/gmp.h \
+ $(STAGING_DIR)/usr/lib/libgmp* $(STAGING_DIR)/usr/include/gmp.h
-$(MAKE) -C $(GMP_TARGET_DIR) clean
libgmp-dirclean:
@@ -109,16 +82,15 @@ GMP_DIR2:=$(TOOL_BUILD_DIR)/gmp-$(GMP_VERSION)-host
GMP_HOST_DIR:=$(TOOL_BUILD_DIR)/gmp
$(GMP_DIR2)/.configured: $(GMP_DIR)/.unpacked
mkdir -p $(GMP_DIR2)
- (cd $(GMP_DIR2); \
- CC_FOR_BUILD="$(HOSTCC)" \
- CC="$(HOSTCC)" \
- CFLAGS="$(HOST_CFLAGS)" \
- CPPFLAGS="$(GMP_CPP_FLAGS)" \
+ (cd $(GMP_DIR2); rm -rf config.cache ; \
+ $(HOST_CONFIGURE_OPTS) \
+ $(GMP_CPP_FLAGS) \
$(GMP_DIR)/configure \
--prefix="$(GMP_HOST_DIR)" \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
- $(PREFERRED_LIB_FLAGS) \
+ --enable-shared \
+ --enable-static \
$(DISABLE_NLS) \
);
touch $@