Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. PATH_PREFIX=.
  2. include ./common.mk
  3. HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
  4. HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
  5. HOST_BUILD_PARALLEL:=1
  6. define Host/SetToolchainInfo
  7. $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
  8. $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk
  9. $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
  10. $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk
  11. endef
  12. define Host/Compile
  13. $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
  14. $(UCLIBC_MAKE) PREFIX= all
  15. endef
  16. define Host/Install
  17. $(call Host/SetToolchainInfo)
  18. $(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
  19. $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
  20. ( cd $(TOOLCHAIN_DIR) ; \
  21. for d in lib usr/lib ; do \
  22. for f in libc.so libgcc_s.so ; do \
  23. if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \
  24. $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \
  25. fi \
  26. done \
  27. done \
  28. )
  29. endef
  30. $(eval $(call HostBuild))