Makefile 700 B

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