Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. include Makefile.inc
  5. include ../rules.mk
  6. include ${ADK_TOPDIR}/mk/buildhlp.mk
  7. BINUTILS_VERSION:= 2.24
  8. $(WRKBUILD)/.headers:
  9. $(WRKBUILD)/.configured:
  10. (cd $(WRKBUILD); ./configure --prefix=$(STAGING_HOST_DIR)/usr \
  11. --target=$(GNU_TARGET_NAME) \
  12. --with-bfd-include-dir=$(TOOLCHAIN_BUILD_DIR)/w-binutils-${BINUTILS_VERSION}-1/binutils-${BINUTILS_VERSION}/bfd \
  13. --with-binutils-include-dir=$(TOOLCHAIN_BUILD_DIR)/w-binutils-${BINUTILS_VERSION}-1/binutils-${BINUTILS_VERSION}/include \
  14. --with-libbfd=$(TOOLCHAIN_BUILD_DIR)/w-binutils-${BINUTILS_VERSION}-1/binutils-${BINUTILS_VERSION}/bfd/libbfd.a \
  15. --with-libiberty=$(TOOLCHAIN_BUILD_DIR)/w-binutils-${BINUTILS_VERSION}-1/binutils-${BINUTILS_VERSION}/libiberty/libiberty.a )
  16. touch $@
  17. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  18. $(MAKE) -C $(WRKBUILD) all
  19. touch $@
  20. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  21. ${INSTALL_BIN} ${WRKBUILD}/elf2flt ${TOOLCHAIN_DIR}/usr/$(GNU_TARGET_NAME)/bin
  22. ${INSTALL_BIN} ${WRKBUILD}/flthdr ${TOOLCHAIN_DIR}/usr/$(GNU_TARGET_NAME)/bin
  23. ${INSTALL_BIN} ${WRKBUILD}/ld-elf2flt ${TOOLCHAIN_DIR}/usr/$(GNU_TARGET_NAME)/bin
  24. ${INSTALL_DATA} ${WRKBUILD}/elf2flt.ld ${TOOLCHAIN_DIR}/usr/$(GNU_TARGET_NAME)/lib
  25. rm $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-ld
  26. (cd ${TOOLCHAIN_DIR}/usr/$(GNU_TARGET_NAME)/bin && \
  27. ln -sf ld.bfd ld.real )
  28. (cd $(TOOLCHAIN_DIR)/usr/bin && \
  29. ln -sf ../$(GNU_TARGET_NAME)/bin/elf2flt $(GNU_TARGET_NAME)-elf2flt && \
  30. ln -sf ../$(GNU_TARGET_NAME)/bin/flthdr $(GNU_TARGET_NAME)-flthdr && \
  31. ln -sf ../$(GNU_TARGET_NAME)/bin/ld-elf2flt $(GNU_TARGET_NAME)-ld-elf2flt && \
  32. ln -sf ../$(GNU_TARGET_NAME)/bin/ld-elf2flt $(GNU_TARGET_NAME)-ld )
  33. (cd $(TOOLCHAIN_DIR)/usr/bin/ && ln -sf $(GNU_TARGET_NAME)-ld.bfd $(GNU_TARGET_NAME)-ld.real )
  34. touch $@
  35. include ${ADK_TOPDIR}/mk/toolchain.mk