endif
$(DL_DIR)/$(UCLIBC_SOURCE):
+ $(call MESSAGE,"Downloading uClibc")
$(call DOWNLOAD,$(UCLIBC_SITE)/$(UCLIBC_SOURCE))
uclibc-unpacked: $(UCLIBC_DIR)/.unpacked
$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
+ $(Q)$(call MESSAGE,"Extracting uClibc")
mkdir -p $(TOOLCHAIN_DIR)
rm -rf $(UCLIBC_DIR)
$(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
uclibc-patched: $(UCLIBC_DIR)/.patched
$(UCLIBC_DIR)/.patched: $(UCLIBC_DIR)/.unpacked
+ $(Q)$(call MESSAGE,"Patching uClibc")
ifneq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y)
support/scripts/apply-patches.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) \
uClibc-$(UCLIBC_VERSION)-\*.patch \
# Some targets may wish to provide their own UCLIBC_CONFIG_FILE...
$(UCLIBC_DIR)/.oldconfig: $(UCLIBC_DIR)/.patched $(UCLIBC_CONFIG_FILE)
+ $(Q)$(call MESSAGE,"Pre-configuring uClibc")
cp -f $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.oldconfig
$(SED) 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="$(TARGET_CROSS)",g' \
-e 's,# TARGET_$(UCLIBC_TARGET_ARCH) is not set,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \
endif
$(UCLIBC_DIR)/.config: $(UCLIBC_DIR)/.oldconfig
+ $(Q)$(call MESSAGE,"Configuring uClibc")
cp -f $(UCLIBC_DIR)/.oldconfig $(UCLIBC_DIR)/.config
mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/include
mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib
endif
$(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.config
+ $(Q)$(call MESSAGE,"Installing uClibc headers")
$(MAKE1) -C $(UCLIBC_DIR) \
ARCH="$(UCLIBC_TARGET_ARCH)" \
PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \
touch $@
$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(gcc_intermediate) $(LIBFLOAT_TARGET)
+ $(Q)$(call MESSAGE,"Building uClibc")
$(MAKE1) -C $(UCLIBC_DIR) \
ARCH="$(UCLIBC_TARGET_ARCH)" \
PREFIX= \
$(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
+ $(Q)$(call MESSAGE,"Installing uClibc to staging dir")
$(MAKE1) -C $(UCLIBC_DIR) \
ARCH="$(UCLIBC_TARGET_ARCH)" \
PREFIX=$(STAGING_DIR) \
ifneq ($(TARGET_DIR),)
$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/usr/lib/libc.a
+ $(Q)$(call MESSAGE,"Installing uClibc runtime to target dir")
$(MAKE1) -C $(UCLIBC_DIR) \
ARCH="$(UCLIBC_TARGET_ARCH)" \
PREFIX=$(TARGET_DIR) \
touch -c $@
$(TARGET_DIR)/usr/bin/ldd: $(cross_compiler)
+ $(Q)$(call MESSAGE,"Installing uClibc utils to target dir")
$(MAKE1) -C $(UCLIBC_DIR) CC=$(TARGET_CROSS)gcc \
CPP=$(TARGET_CROSS)cpp LD=$(TARGET_CROSS)ld \
ARCH="$(UCLIBC_TARGET_ARCH)" \
uclibc-target-utils-source: $(DL_DIR)/$(UCLIBC_SOURCE)
$(UCLIBC_DIR)/test/unistd/errno:
+ $(Q)$(call MESSAGE,"Building uClibc test suite")
$(MAKE) -C $(UCLIBC_DIR)/test \
ARCH_CFLAGS=-I$(STAGING_DIR)/usr/include \
UCLIBC_ONLY=1 TEST_INSTALLED_UCLIBC=1 compile
$(TARGET_DIR)/root/uClibc/test/unistd/errno: $(UCLIBC_DIR)/test/unistd/errno
+ $(Q)$(call MESSAGE,"Installing uClibc test suite to target dir")
mkdir -p $(TARGET_DIR)/root/uClibc
cp -rdpf $(UCLIBC_DIR)/test $(TARGET_DIR)/root/uClibc
$(INSTALL) $(UCLIBC_DIR)/Rules.mak $(TARGET_DIR)/root/uClibc
#############################################################
$(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/usr/lib/libc.a
+ $(Q)$(call MESSAGE,"Installing uClibc development files to target dir")
$(MAKE1) -C $(UCLIBC_DIR) \
ARCH="$(UCLIBC_TARGET_ARCH)" \
PREFIX=$(TARGET_DIR) \