1 include $(TOPDIR
)/rules.mk
2 include $(INCLUDE_DIR
)/target.mk
7 PKG_SOURCE
:=uClibc-
$(PKG_VERSION
).
tar.bz2
8 PKG_SOURCE_URL
:=http
://www.uclibc.org
/downloads
9 PKG_MD5SUM
:=1ada58d919a82561061e4741fb6abd29
12 PKG_BUILD_DIR
:=$(TOOL_BUILD_DIR
)/uClibc-
$(PKG_VERSION
)
14 include $(INCLUDE_DIR
)/host-build.mk
16 UCLIBC_TARGET_ARCH
:=$(shell echo
$(ARCH
) | sed
-e s
'/-.*//' \
18 -e
's/sparc.*/sparc/' \
21 -e
's/ppc/powerpc/g' \
22 -e
's/v850.*/v850/g' \
24 -e
's/sh[234].*/sh/' \
26 -e
's/mipsel.*/mips/' \
31 $(call Build
/Prepare
/Default
)
32 $(SED
) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR
)/Rules.mak
33 if
[ -e config
/$(ARCH
).
$(BOARD
) ]; then \
34 $(CP
) config
/$(ARCH
).
$(BOARD
) $(PKG_BUILD_DIR
)/.config
; \
36 $(CP
) config
/$(ARCH
) $(PKG_BUILD_DIR
)/.config
; \
38 $(SED
) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \
39 $(PKG_BUILD_DIR
)/.config
40 ifeq ($(CONFIG_LARGEFILE
),y
)
41 $(SED
) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(PKG_BUILD_DIR
)/.config
43 $(SED
) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(PKG_BUILD_DIR
)/.config
45 $(SED
) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(PKG_BUILD_DIR
)/.config
46 ifeq ($(CONFIG_SOFT_FLOAT
),y
)
47 $(SED
) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(PKG_BUILD_DIR
)/.config
49 mkdir
-p
$(TOOL_BUILD_DIR
)/uClibc_dev
/usr
/include
50 mkdir
-p
$(TOOL_BUILD_DIR
)/uClibc_dev
/usr
/lib
51 mkdir
-p
$(TOOL_BUILD_DIR
)/uClibc_dev
/lib
52 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
53 PREFIX
=$(TOOL_BUILD_DIR
)/uClibc_dev
/ \
55 RUNTIME_PREFIX
=$(TOOL_BUILD_DIR
)/uClibc_dev
/ \
57 CPU_CFLAGS
="$(TARGET_CFLAGS)" \
61 define Build
/Configure
65 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
70 CPU_CFLAGS
="$(TARGET_CFLAGS)" \
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 PREFIX
=$(STAGING_DIR
)/ \
80 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
81 PREFIX
=$(STAGING_DIR
)/ \
85 echo
$(PKG_VERSION
) > $(STAGING_DIR
)/uclibc_version
89 rm -rf
$(PKG_BUILD_DIR
) $(TOOL_BUILD_DIR
)/uClibc_dev
92 $(eval
$(call HostBuild
))