1 include $(TOPDIR
)/rules.mk
6 PKG_SOURCE
:=uClibc-
$(PKG_VERSION
).
tar.bz2
7 PKG_SOURCE_URL
:=http
://www.uclibc.org
/downloads
8 PKG_MD5SUM
:=1ada58d919a82561061e4741fb6abd29
11 PKG_BUILD_DIR
:=$(TOOL_BUILD_DIR
)/uClibc-
$(PKG_VERSION
)
13 include $(INCLUDE_DIR
)/host-build.mk
15 UCLIBC_TARGET_ARCH
:=$(shell echo
$(ARCH
) | sed
-e s
'/-.*//' \
17 -e
's/sparc.*/sparc/' \
20 -e
's/ppc/powerpc/g' \
21 -e
's/v850.*/v850/g' \
23 -e
's/sh[234].*/sh/' \
25 -e
's/mipsel.*/mips/' \
30 $(call Build
/Prepare
/Default
)
31 $(SED
) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR
)/Rules.mak
32 $(CP
) .
/files
/config.
$(ARCH
) $(PKG_BUILD_DIR
)/.config
33 $(SED
) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \
34 $(PKG_BUILD_DIR
)/.config
35 ifeq ($(CONFIG_LARGEFILE
),y
)
36 $(SED
) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(PKG_BUILD_DIR
)/.config
38 $(SED
) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(PKG_BUILD_DIR
)/.config
40 $(SED
) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(PKG_BUILD_DIR
)/.config
41 ifeq ($(CONFIG_SOFT_FLOAT
),y
)
42 $(SED
) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(PKG_BUILD_DIR
)/.config
44 mkdir
-p
$(TOOL_BUILD_DIR
)/uClibc_dev
/usr
/include
45 mkdir
-p
$(TOOL_BUILD_DIR
)/uClibc_dev
/usr
/lib
46 mkdir
-p
$(TOOL_BUILD_DIR
)/uClibc_dev
/lib
47 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
48 PREFIX
=$(TOOL_BUILD_DIR
)/uClibc_dev
/ \
50 RUNTIME_PREFIX
=$(TOOL_BUILD_DIR
)/uClibc_dev
/ \
52 CPU_CFLAGS
="$(TARGET_CFLAGS)" \
56 define Build
/Configure
60 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 CPU_CFLAGS
="$(TARGET_CFLAGS)" \
70 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
71 PREFIX
=$(STAGING_DIR
)/ \
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 PREFIX
=$(STAGING_DIR
)/ \
80 echo
$(PKG_VERSION
) > $(STAGING_DIR
)/uclibc_version
84 rm -rf
$(PKG_BUILD_DIR
) $(TOOL_BUILD_DIR
)/uClibc_dev
87 $(eval
$(call HostBuild
))