2005-02-25 04:22:54 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libelf
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
LIBELF_VER=0.8.5
|
|
|
|
LIBELF_SOURCE=libelf-$(LIBELF_VER).tar.gz
|
2005-04-13 00:04:14 +02:00
|
|
|
LIBELF_SITE=http://www.mr511.de/software/
|
2005-02-25 04:22:54 +01:00
|
|
|
LIBELF_DIR=$(BUILD_DIR)/libelf-$(LIBELF_VER)
|
|
|
|
|
|
|
|
LIBELF_ARCH:=$(ARCH)
|
|
|
|
ifeq ("$(strip $(ARCH))","armeb")
|
|
|
|
LIBELF_ARCH:=arm
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBELF_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(LIBELF_SITE)/$(LIBELF_SOURCE)
|
|
|
|
|
|
|
|
$(LIBELF_DIR)/.source: $(DL_DIR)/$(LIBELF_SOURCE)
|
|
|
|
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
|
2005-02-25 04:22:54 +01:00
|
|
|
touch $(LIBELF_DIR)/.source
|
|
|
|
|
|
|
|
$(LIBELF_DIR)/.configured: $(LIBELF_DIR)/.source
|
|
|
|
(cd $(LIBELF_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
./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) \
|
2006-01-23 14:55:55 +01:00
|
|
|
--disable-shared \
|
2005-02-25 04:22:54 +01:00
|
|
|
);
|
|
|
|
touch $(LIBELF_DIR)/.configured;
|
|
|
|
|
|
|
|
$(LIBELF_DIR)/libelf.so.$(LIBELF_VER): $(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
|
|
|
|
2005-04-13 00:04:14 +02:00
|
|
|
$(STAGING_DIR)/usr/lib/libelf.a: $(LIBELF_DIR)/libelf.so.$(LIBELF_VER)
|
|
|
|
$(MAKE1) $(TARGET_CONFIGURE_OPTS) ${INSTALL}="install -D" \
|
|
|
|
instroot=$(STAGING_DIR) -C $(LIBELF_DIR) install
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/lib/libelf.so.$(LIBELF_VER): $(STAGING_DIR)/usr/lib/libelf.a
|
2005-02-25 04:22:54 +01:00
|
|
|
|
|
|
|
libelf: uclibc $(TARGET_DIR)/usr/lib/libelf.so.$(LIBELF_VER)
|
|
|
|
|
|
|
|
libelf-source: $(DL_DIR)/$(LIBELF_SOURCE)
|
|
|
|
|
|
|
|
libelf-clean:
|
|
|
|
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBELF_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(LIBELF_DIR) clean
|
|
|
|
|
|
|
|
libelf-dirclean:
|
|
|
|
rm -rf $(LIBELF_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_LIBELF)),y)
|
|
|
|
TARGETS+=libelf
|
|
|
|
endif
|