1
0

Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 $(TOPDIR)/rules.mk
  4. include Makefile.inc
  5. include ../rules.mk
  6. include ${TOPDIR}/mk/buildhlp.mk
  7. ifeq ($(ADK_TOOLCHAIN_SSP),y)
  8. CONFOPTS+= --enable-libssp
  9. else
  10. CONFOPTS+= --disable-libssp
  11. endif
  12. ifeq ($(ADK_TOOLCHAIN_LTO),y)
  13. CONFOPTS+= --enable-lto
  14. else
  15. CONFOPTS+= --disable-lto
  16. endif
  17. ifeq ($(ADK_TOOLCHAIN_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. (cd $(WRKBUILD); \
  36. $(WRKBUILD)/configure \
  37. --prefix=$(TOOLCHAIN_DIR)/usr \
  38. --target=$(GNU_TARGET_NAME) \
  39. --with-sysroot=$(STAGING_TARGET_DIR) \
  40. --disable-dependency-tracking \
  41. --disable-libtool-lock \
  42. --disable-nls \
  43. --disable-werror \
  44. --disable-plugins \
  45. ${CONFOPTS} \
  46. );
  47. touch $@
  48. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  49. $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all
  50. touch $@
  51. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  52. $(MAKE) -C $(WRKBUILD) install
  53. touch $@
  54. include ${TOPDIR}/mk/toolchain.mk