FireWire/IEEE1394 requires PCI support
[openwrt.git] / toolchain / uClibc / Makefile
index d6848dc..7cf06d8 100644 (file)
@@ -8,41 +8,53 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/target.mk
 
 PKG_NAME:=uClibc
-PKG_VERSION:=$(strip $(subst ",, $(CONFIG_UCLIBC_VERSION)))#"))
-PKG_EXTRAVERSION:=$(strip $(subst ",, $(CONFIG_UCLIBC_EXTRA_VERSION)))#"))
-PKG_VERSION_SNAPSHOT:=$(strip $(subst ",, $(CONFIG_UCLIBC_VERSION_SNAPSHOT)))#"))
+PKG_VERSION:=$(call qstrip,$(CONFIG_UCLIBC_VERSION))
+PKG_EXTRAVERSION:=$(call qstrip,$(CONFIG_UCLIBC_EXTRA_VERSION))
+PKG_VERSION_SNAPSHOT:=$(call qstrip,$(CONFIG_UCLIBC_VERSION_SNAPSHOT))
 ifeq ($(PKG_VERSION_SNAPSHOT),y)
-PKG_SOURCE_URL:=http://www.uclibc.org/downloads/snapshots
+  PKG_SOURCE_URL:=http://www.uclibc.org/downloads/snapshots
+  PKG_SOURCE:=uClibc-snapshot.tar.bz2
 else
-PKG_SOURCE_URL:=http://www.uclibc.org/downloads
+  PKG_SOURCE_URL:=http://www.uclibc.org/downloads
+  PKG_SOURCE:=uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION).tar.bz2
 endif
 PATCH_DIR:=./patches/$(PKG_VERSION)$(PKG_EXTRAVERSION)
 CONFIG_DIR:=./config/$(PKG_VERSION)$(PKG_EXTRAVERSION)
 
 ifeq ($(PKG_VERSION),0.9.28)
-ifeq ($(PKG_EXTRAVERSION),.2)
-PKG_MD5SUM:=959f25286e317f0d9e2103445c5a14c2
-endif
-ifeq ($(PKG_EXTRAVERSION),.3)
-PKG_MD5SUM:=428405a36b4662980d9343b32089b5a6
-endif
+  ifeq ($(PKG_EXTRAVERSION),.2)
+    PKG_MD5SUM:=959f25286e317f0d9e2103445c5a14c2
+  endif
+  ifeq ($(PKG_EXTRAVERSION),.3)
+    PKG_MD5SUM:=428405a36b4662980d9343b32089b5a6
+  endif
 endif
 
 ifeq ($(PKG_VERSION),0.9.29)
-ifeq ($(PKG_EXTRAVERSION),)
-# currently the default version, no special sub-directory needed
-PATCH_DIR:=./patches
-CONFIG_DIR:=./config
-PKG_MD5SUM:=61dc55f43b17a38a074f347e74095b20
+  ifeq ($(PKG_EXTRAVERSION),)
+    # currently the default version, no special sub-directory needed
+    PATCH_DIR:=./patches
+    CONFIG_DIR:=./config
+    PKG_MD5SUM:=61dc55f43b17a38a074f347e74095b20
+  endif
 endif
+
+ifeq ($(PKG_VERSION_SNAPSHOT),y)
+  PATCH_DIR:=
+  CONFIG_DIR:=./config
+  PKG_MD5SUM:=
 endif
 
-PKG_SOURCE:=uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION).tar.bz2
 PKG_CAT:=bzcat
 
 STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
 BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
-PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
+ifeq ($(PKG_VERSION_SNAPSHOT),y)
+  PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_EXTRAVERSION)
+else
+  PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
+endif
+override CONFIG_AUTOREBUILD=
 
 include $(INCLUDE_DIR)/host-build.mk
 
@@ -64,6 +76,13 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
                -e 's/cris.*/cris/' \
 )
 
+# Remove me when there are no 2.6.23 targets
+ifeq ($(findstring 86,$(ARCH)),86)
+  ifneq ($(LINUX_2_6_23),y)
+       UCLIBC_TARGET_ARCH:=x86
+  endif
+endif
+
 define Build/Prepare/Snapshot
        $(PKG_UNPACK)
        rm -Rf $(PKG_BUILD_DIR)
@@ -90,7 +109,7 @@ ifeq ($(PKG_VERSION_SNAPSHOT),y)
 else
        $(call Build/Prepare/Default)
 endif
-       $(CP) ./$(CONFIG_DIR)/$(ARCH)$(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),$(BOARD)) $(PKG_BUILD_DIR)/.config
+       $(CP) ./$(CONFIG_DIR)/$(ARCH)$(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD)) $(PKG_BUILD_DIR)/.config
 ifeq ($(PKG_VERSION),0.9.28)
        $(call Build/Prepare/V_0_9_28)
 endif
@@ -123,6 +142,7 @@ endif
                cp -pLR $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-generic $(PKG_BUILD_DIR)/include/ ; \
                cp -pLR $(BUILD_DIR_TOOLCHAIN)/linux/include/linux $(PKG_BUILD_DIR)/include/ ; \
        fi;
+       $(MAKE) -C $(PKG_BUILD_DIR)/extra/config conf KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS"
        PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
                PREFIX=$(BUILD_DIR_HOST)/uClibc_dev/ \
                DEVEL_PREFIX=/usr/ \
@@ -149,7 +169,7 @@ define Build/Compile
        $(SED) 's,UCLIBC_VERSION=.*,UCLIBC_VERSION=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
        $(SED) 's,UCLIBC_PATCHVER=.*,UCLIBC_PATCHVER=$(PKG_EXTRAVERSION),' $(TOOLCHAIN_DIR)/info.mk
        rm -rf $(TOOLCHAIN_DIR)/lib/libc.so
-       ln -s $(TOOLCHAIN_DIR)/lib/libc.so.0 $(TOOLCHAIN_DIR)/lib/libc.so
+       ln -s libc.so.0 $(TOOLCHAIN_DIR)/lib/libc.so
 endef
 
 define Build/Install
This page took 0.023791 seconds and 4 git commands to generate.