2012-07-01 05:44:05 +08:00
|
|
|
PATH_PREFIX=.
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2012-07-01 05:44:05 +08:00
|
|
|
include ./common.mk
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2012-07-01 05:44:05 +08:00
|
|
|
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
|
|
|
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
|
2009-01-08 09:49:11 +08:00
|
|
|
|
2012-10-17 21:03:08 +08:00
|
|
|
HOST_BUILD_PARALLEL:=1
|
|
|
|
|
2009-02-22 12:37:20 +08:00
|
|
|
define Host/SetToolchainInfo
|
2009-01-08 09:49:11 +08:00
|
|
|
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
|
|
|
|
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk
|
|
|
|
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
2009-04-24 10:07:24 +08:00
|
|
|
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
2008-01-28 01:59:20 +08:00
|
|
|
endef
|
|
|
|
|
2009-02-22 12:37:20 +08:00
|
|
|
define Host/Compile
|
|
|
|
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
|
2010-10-03 20:54:07 +08:00
|
|
|
$(UCLIBC_MAKE) $(TOOLCHAIN_JOBS) PREFIX= all
|
2012-07-01 05:44:05 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(call Host/SetToolchainInfo)
|
2009-01-08 09:49:11 +08:00
|
|
|
$(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
|
2010-08-19 20:49:51 +08:00
|
|
|
$(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
|
|
|
|
$(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/
|
2009-10-02 08:18:16 +08:00
|
|
|
( cd $(TOOLCHAIN_DIR) ; \
|
|
|
|
for d in lib usr/lib ; do \
|
|
|
|
for f in libc.so libpthread.so libgcc_s.so ; do \
|
|
|
|
if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \
|
|
|
|
$(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \
|
|
|
|
fi \
|
|
|
|
done \
|
|
|
|
done \
|
|
|
|
)
|
2011-02-13 11:26:10 +08:00
|
|
|
rm -f \
|
|
|
|
$(TOOLCHAIN_DIR)/lib/libresolv*.so* \
|
|
|
|
$(TOOLCHAIN_DIR)/lib/libnsl*.so*
|
2006-06-21 14:19:43 +08:00
|
|
|
endef
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
$(eval $(call HostBuild))
|