2005-02-25 04:22:54 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libelf
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
LIBELF_VERSION=0.8.9
|
|
|
|
LIBELF_SOURCE=libelf-$(LIBELF_VERSION).tar.gz
|
2005-04-13 00:04:14 +02:00
|
|
|
LIBELF_SITE=http://www.mr511.de/software/
|
2007-07-11 16:06:06 +02:00
|
|
|
LIBELF_DIR=$(BUILD_DIR)/libelf-$(LIBELF_VERSION)
|
2005-02-25 04:22:54 +01:00
|
|
|
|
|
|
|
LIBELF_ARCH:=$(ARCH)
|
|
|
|
ifeq ("$(strip $(ARCH))","armeb")
|
|
|
|
LIBELF_ARCH:=arm
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBELF_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LIBELF_SITE)/$(LIBELF_SOURCE)
|
|
|
|
|
2007-04-06 14:51:42 +02:00
|
|
|
$(LIBELF_DIR)/.unpacked: $(DL_DIR)/$(LIBELF_SOURCE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(LIBELF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-04-13 00:04:14 +02:00
|
|
|
toolchain/patch-kernel.sh $(LIBELF_DIR) package/libelf libelf\*.patch
|
2007-04-06 14:51:42 +02:00
|
|
|
$(CONFIG_UPDATE) $(LIBELF_DIR)
|
|
|
|
touch $@
|
2005-02-25 04:22:54 +01:00
|
|
|
|
2007-04-06 14:51:42 +02:00
|
|
|
$(LIBELF_DIR)/.configured: $(LIBELF_DIR)/.unpacked
|
2005-02-25 04:22:54 +01:00
|
|
|
(cd $(LIBELF_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-04-06 14:51:42 +02:00
|
|
|
libelf_cv_working_memmove=yes \
|
2007-04-06 16:21:00 +02:00
|
|
|
mr_cv_target_elf=yes \
|
2005-02-25 04:22:54 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
2005-04-13 00:04:14 +02:00
|
|
|
$(DISABLE_NLS) \
|
2007-04-06 16:21:00 +02:00
|
|
|
--enable-shared \
|
2005-02-25 04:22:54 +01:00
|
|
|
);
|
2007-04-06 14:51:42 +02:00
|
|
|
touch $@
|
2005-02-25 04:22:54 +01:00
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
$(LIBELF_DIR)/lib/libelf.so.$(LIBELF_VERSION): $(LIBELF_DIR)/.configured
|
2005-04-13 00:04:14 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LIBELF_DIR)
|
2005-02-25 04:22:54 +01:00
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
$(STAGING_DIR)/usr/lib/libelf.a $(STAGING_DIR)/usr/lib/libelf.so.$(LIBELF_VERSION): $(LIBELF_DIR)/lib/libelf.so.$(LIBELF_VERSION)
|
2007-04-06 14:51:42 +02:00
|
|
|
$(MAKE1) $(TARGET_CONFIGURE_OPTS) \
|
2005-04-13 00:04:14 +02:00
|
|
|
instroot=$(STAGING_DIR) -C $(LIBELF_DIR) install
|
|
|
|
|
2007-04-06 16:21:00 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBELF_HEADERS),y)
|
2007-07-11 16:06:06 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/libelf.so.$(LIBELF_VERSION): $(STAGING_DIR)/usr/lib/libelf.a
|
2007-04-06 16:21:00 +02:00
|
|
|
$(INSTALL) $(STAGING_DIR)/usr/lib/libelf* $(@D)
|
|
|
|
cp -dpR $(STAGING_DIR)/usr/include/{gelf.h,libelf*} $(TARGET_DIR)/usr/include/
|
|
|
|
$(STRIP) $@
|
2005-02-25 04:22:54 +01:00
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
libelf: uclibc $(TARGET_DIR)/usr/lib/libelf.so.$(LIBELF_VERSION)
|
2007-04-06 16:21:00 +02:00
|
|
|
else
|
2007-07-11 16:06:06 +02:00
|
|
|
libelf: uclibc $(STAGING_DIR)/usr/lib/libelf.so.$(LIBELF_VERSION)
|
2007-04-06 16:21:00 +02:00
|
|
|
endif
|
2005-02-25 04:22:54 +01:00
|
|
|
libelf-source: $(DL_DIR)/$(LIBELF_SOURCE)
|
|
|
|
|
|
|
|
libelf-clean:
|
|
|
|
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBELF_DIR) uninstall
|
2007-04-06 16:21:00 +02:00
|
|
|
$(MAKE) instroot=$(STAGING_DIR) -C $(LIBELF_DIR) uninstall
|
2005-02-25 04:22:54 +01:00
|
|
|
-$(MAKE) -C $(LIBELF_DIR) clean
|
|
|
|
|
|
|
|
libelf-dirclean:
|
|
|
|
rm -rf $(LIBELF_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBELF)),y)
|
|
|
|
TARGETS+=libelf
|
|
|
|
endif
|