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