summaryrefslogtreecommitdiff
path: root/toolchain/uClibc/uclibc.mk
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-29 17:47:27 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-29 17:47:27 +0000
commiteda1d6d6f1fd8c5b28490471e011a80ac53ef751 (patch)
tree0578c57d3a94883bfdf2be2a770e88e69794f39d /toolchain/uClibc/uclibc.mk
parent063bc94f8b8d3b9fa3ecf906466b2645f6c023c1 (diff)
Add AVR32 support to uClibc
Diffstat (limited to 'toolchain/uClibc/uclibc.mk')
-rw-r--r--toolchain/uClibc/uclibc.mk33
1 files changed, 26 insertions, 7 deletions
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 54d788f7d..41c2475e8 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -31,10 +31,15 @@ endif
ifeq ($(BR2_UCLIBC_VERSION_0_9_28),y)
UCLIBC_VER:=0.9.28
endif
-
-UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER)
-UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER).tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads
+
+ifeq ($(BR2_avr32),y)
+VENDOR_SUFFIX:=-avr32
+UCLIBC_SITE:=$(BR2_ATMEL_MIRROR)/Source
+endif
+
+UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER)$(VENDOR_SUFFIX)
+UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER)$(VENDOR_SUFFIX).tar.bz2
endif
UCLIBC_CAT:=$(BZCAT)
@@ -92,7 +97,7 @@ $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) $(UCLIBC_LOCALE_DATA)
rm -rf $(UCLIBC_DIR)
$(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
ifneq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y)
- toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ uClibc-$(UCLIBC_VER)-\*.patch
+ toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ uClibc-$(UCLIBC_VER)$(VENDOR_SUFFIX)-\*.patch
else
toolchain/patch-kernel.sh $(UCLIBC_DIR) toolchain/uClibc/ uClibc.\*.patch
endif
@@ -147,6 +152,12 @@ ifeq ($(BR2_INET_IPV6),y)
else
$(SED) 's,^.*UCLIBC_HAS_IPV6.*,UCLIBC_HAS_IPV6=n,g' $(UCLIBC_DIR)/.config
endif
+ifeq ($(BR2_USE_WCHAR),y)
+ $(SED) 's,^.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.config
+else
+ $(SED) 's,^.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=n,g' $(UCLIBC_DIR)/.config
+endif
+
ifeq ($(BR2_INET_RPC),y)
$(SED) 's,^.*UCLIBC_HAS_RPC.*,UCLIBC_HAS_RPC=y,g' \
-e 's,^.*UCLIBC_HAS_FULL_RPC.*,UCLIBC_HAS_FULL_RPC=y,g' \
@@ -241,15 +252,19 @@ endif
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib
+
+ touch $@
+
+$(UCLIBC_DIR)/.oldconfig: $(UCLIBC_DIR)/.config
$(MAKE1) -C $(UCLIBC_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
HOSTCC="$(HOSTCC)" \
oldconfig
- touch -c $@
+ touch $@
-$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.config
+$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.oldconfig
set -x && $(MAKE1) -C $(UCLIBC_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
@@ -359,7 +374,11 @@ endif
UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0
endif
-uclibc-configured: kernel-headers $(UCLIBC_DIR)/.configured
+uclibc-configured: dependencies kernel-headers $(UCLIBC_DIR)/.configured
+
+uclibc-config: $(UCLIBC_DIR)/.config
+
+uclibc-oldconfig: $(UCLIBC_DIR)/.oldconfig
uclibc: $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/usr/lib/libc.a $(UCLIBC_TARGETS)