Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. ifeq ($(ADK_TOOLCHAIN_WITH_SSP),y)
  8. CONFOPTS+= --enable-libssp
  9. else
  10. CONFOPTS+= --disable-libssp
  11. endif
  12. ifeq ($(ADK_TOOLCHAIN_WITH_LTO),y)
  13. CONFOPTS+= --enable-lto
  14. else
  15. CONFOPTS+= --disable-lto
  16. endif
  17. ifeq ($(ADK_TOOLCHAIN_WITH_GOLD),y)
  18. CONFOPTS+= --enable-gold
  19. else
  20. CONFOPTS+= --disable-gold
  21. endif
  22. ifneq ($(ADK_LINUX_64)$(ADK_TARGET_KERNEL_64),)
  23. CONFOPTS+= --enable-64-bit-bfd
  24. endif
  25. ifeq ($(ADK_LINUX_SH)$(ADK_LINUX_X86_64),)
  26. CONFOPTS+= --disable-multilib
  27. else
  28. CONFOPTS+= --enable-multilib
  29. endif
  30. ifeq (${ADK_MAKE_PARALLEL},y)
  31. BINUTILS_MAKEOPTS+= -j${ADK_MAKE_JOBS}
  32. endif
  33. $(WRKBUILD)/.headers:
  34. $(WRKBUILD)/.configured:
  35. ifeq ($(ADK_LINUX_XTENSA),y)
  36. tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_dc232b.tar \
  37. --strip-components=1 -C $(WRKSRC) binutils
  38. endif
  39. (cd $(WRKBUILD); \
  40. $(WRKBUILD)/configure \
  41. --prefix=$(TOOLCHAIN_DIR)/usr \
  42. --target=$(GNU_TARGET_NAME) \
  43. --with-sysroot=$(STAGING_TARGET_DIR) \
  44. --disable-dependency-tracking \
  45. --disable-libtool-lock \
  46. --disable-nls \
  47. --disable-werror \
  48. --disable-install-libiberty \
  49. ${CONFOPTS} \
  50. );
  51. touch $@
  52. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  53. $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all
  54. touch $@
  55. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  56. $(MAKE) -C $(WRKBUILD) install
  57. touch $@
  58. include ${ADK_TOPDIR}/mk/toolchain.mk