2
0

Makefile 666 B

12345678910111213141516171819202122232425262728293031
  1. PATH_PREFIX := .
  2. VARIANT:=final
  3. HOST_BUILD_PARALLEL:=1
  4. include ./common.mk
  5. define Host/Compile
  6. +$(MAKE) -C $(CUR_BUILD_DIR) \
  7. PARALLELMFLAGS="$(HOST_JOBS)" \
  8. BUILD_CFLAGS="$(HOST_CFLAGS)" \
  9. all
  10. endef
  11. define Host/Install
  12. $(call Host/SetToolchainInfo)
  13. $(MAKE) -C $(CUR_BUILD_DIR) \
  14. BUILD_CFLAGS="$(HOST_CFLAGS)" \
  15. install_root="$(TOOLCHAIN_DIR)" \
  16. install
  17. ( cd $(TOOLCHAIN_DIR) ; \
  18. for d in lib usr/lib ; do \
  19. for f in libc.so libpthread.so libgcc_s.so ; do \
  20. if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \
  21. $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \
  22. fi \
  23. done \
  24. done \
  25. )
  26. endef
  27. $(eval $(call HostBuild))