summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-04-06 14:21:00 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-04-06 14:21:00 +0000
commit2534b2ee7952919146f810802e675621b55062bb (patch)
tree647c019cbc281029561dfe2fd176d83b596a88d9 /package
parent1c1167cf7d30cb12048c59da2b6c1959cce515c5 (diff)
downloadbuildroot-novena-2534b2ee7952919146f810802e675621b55062bb.tar.gz
buildroot-novena-2534b2ee7952919146f810802e675621b55062bb.zip
- someone disabled shared lib support without fixing the libelf rule leading to
useless rebuilds. Add option to install the lib to the target and not only to the staging_dir.
Diffstat (limited to 'package')
-rw-r--r--package/libelf/Config.in8
-rw-r--r--package/libelf/libelf.mk16
2 files changed, 20 insertions, 4 deletions
diff --git a/package/libelf/Config.in b/package/libelf/Config.in
index 3fc933f00..3afde80d3 100644
--- a/package/libelf/Config.in
+++ b/package/libelf/Config.in
@@ -7,3 +7,11 @@ config BR2_PACKAGE_LIBELF
library.
http://www.stud.uni-hannover.de/~michael/software/
+
+config BR2_PACKAGE_LIBELF_HEADERS
+ bool "headers on the target"
+ default n
+ depends on BR2_PACKAGE_LIBELF
+ help
+ Whether to copy the lib and the headers to the
+ target system.
diff --git a/package/libelf/libelf.mk b/package/libelf/libelf.mk
index 4ff4d7a19..b7a776b20 100644
--- a/package/libelf/libelf.mk
+++ b/package/libelf/libelf.mk
@@ -28,6 +28,7 @@ $(LIBELF_DIR)/.configured: $(LIBELF_DIR)/.unpacked
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
libelf_cv_working_memmove=yes \
+ mr_cv_target_elf=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -35,25 +36,32 @@ $(LIBELF_DIR)/.configured: $(LIBELF_DIR)/.unpacked
--prefix=/usr \
--sysconfdir=/etc \
$(DISABLE_NLS) \
- --disable-shared \
+ --enable-shared \
);
touch $@
-$(LIBELF_DIR)/libelf.so.$(LIBELF_VER): $(LIBELF_DIR)/.configured
+$(LIBELF_DIR)/lib/libelf.so.$(LIBELF_VER): $(LIBELF_DIR)/.configured
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBELF_DIR)
-$(STAGING_DIR)/usr/lib/libelf.a: $(LIBELF_DIR)/libelf.so.$(LIBELF_VER)
+$(STAGING_DIR)/usr/lib/libelf.a: $(LIBELF_DIR)/lib/libelf.so.$(LIBELF_VER)
$(MAKE1) $(TARGET_CONFIGURE_OPTS) \
instroot=$(STAGING_DIR) -C $(LIBELF_DIR) install
+ifeq ($(BR2_PACKAGE_LIBELF_HEADERS),y)
$(TARGET_DIR)/usr/lib/libelf.so.$(LIBELF_VER): $(STAGING_DIR)/usr/lib/libelf.a
+ $(INSTALL) $(STAGING_DIR)/usr/lib/libelf* $(@D)
+ cp -dpR $(STAGING_DIR)/usr/include/{gelf.h,libelf*} $(TARGET_DIR)/usr/include/
+ $(STRIP) $@
libelf: uclibc $(TARGET_DIR)/usr/lib/libelf.so.$(LIBELF_VER)
-
+else
+libelf: uclibc $(STAGING_DIR)/usr/lib/libelf.so.$(LIBELF_VER)
+endif
libelf-source: $(DL_DIR)/$(LIBELF_SOURCE)
libelf-clean:
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBELF_DIR) uninstall
+ $(MAKE) instroot=$(STAGING_DIR) -C $(LIBELF_DIR) uninstall
-$(MAKE) -C $(LIBELF_DIR) clean
libelf-dirclean: