1
0

Makefile 751 B

12345678910111213141516171819202122232425262728
  1. PATH_PREFIX:=..
  2. VARIANT:=headers
  3. include ../common.mk
  4. define Host/Compile
  5. endef
  6. define Host/Install
  7. $(call Host/SetToolchainInfo)
  8. mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib}
  9. $(MAKE) -C $(CUR_BUILD_DIR) \
  10. BUILD_CFLAGS="$(HOST_CFLAGS)" \
  11. install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
  12. install-bootstrap-headers=yes \
  13. install-headers
  14. $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/
  15. $(MAKE) -C $(CUR_BUILD_DIR) \
  16. csu/subdir_lib
  17. ( cd $(CUR_BUILD_DIR); \
  18. $(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/ \
  19. )
  20. $(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \
  21. -o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/libc.so
  22. endef
  23. $(eval $(call HostBuild))