Makefile 589 B

123456789101112131415161718192021222324252627
  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) all PARALLELMFLAGS="$(HOST_JOBS)"
  7. endef
  8. define Host/Install
  9. $(call Host/SetToolchainInfo)
  10. $(MAKE) -C $(CUR_BUILD_DIR) \
  11. install_root="$(TOOLCHAIN_DIR)" \
  12. install
  13. ( cd $(TOOLCHAIN_DIR) ; \
  14. for d in lib usr/lib ; do \
  15. for f in libc.so libpthread.so libgcc_s.so ; do \
  16. if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \
  17. $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \
  18. fi \
  19. done \
  20. done \
  21. )
  22. endef
  23. $(eval $(call HostBuild))