2012-06-30 21:44:05 +00:00
|
|
|
PATH_PREFIX=.
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2012-06-30 21:44:05 +00:00
|
|
|
include ./common.mk
|
2005-07-20 14:58:27 +00:00
|
|
|
|
2012-06-30 21:44:05 +00:00
|
|
|
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
|
|
|
|
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
|
2009-01-08 01:49:11 +00:00
|
|
|
|
2012-10-17 13:03:08 +00:00
|
|
|
HOST_BUILD_PARALLEL:=1
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/SetToolchainInfo
|
2009-01-08 01:49:11 +00: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 02:07:24 +00:00
|
|
|
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
2008-01-27 17:59:20 +00:00
|
|
|
endef
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Compile
|
|
|
|
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
|
2012-11-08 15:08:31 +00:00
|
|
|
$(UCLIBC_MAKE) PREFIX= all
|
2012-06-30 21:44:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(call Host/SetToolchainInfo)
|
2009-01-08 01:49:11 +00:00
|
|
|
$(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
|
2010-08-19 12:49:51 +00: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 00:18:16 +00: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 03:26:10 +00:00
|
|
|
rm -f \
|
|
|
|
$(TOOLCHAIN_DIR)/lib/libresolv*.so* \
|
|
|
|
$(TOOLCHAIN_DIR)/lib/libnsl*.so*
|
2006-06-21 06:19:43 +00:00
|
|
|
endef
|
2005-07-20 14:58:27 +00:00
|
|
|
|
2006-06-21 06:19:43 +00:00
|
|
|
$(eval $(call HostBuild))
|