Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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_GCC_SSP),y)
  8. CONFOPTS+= --enable-libssp
  9. else
  10. CONFOPTS+= --disable-libssp
  11. endif
  12. ifneq ($(strip $(ADK_LINUX_64)$(ADK_64BIT_KERNEL)),)
  13. CONFOPTS+= --enable-64-bit-bfd
  14. endif
  15. ifeq (${ADK_MAKE_PARALLEL},y)
  16. BINUTILS_MAKEOPTS+= -j${ADK_MAKE_JOBS}
  17. endif
  18. $(WRKBUILD)/.headers:
  19. $(WRKBUILD)/.configured:
  20. (cd $(WRKBUILD); \
  21. $(WRKBUILD)/configure \
  22. --prefix=$(STAGING_HOST_DIR) \
  23. --target=$(REAL_GNU_TARGET_NAME) \
  24. --with-sysroot=$(STAGING_TARGET_DIR) \
  25. --disable-multilib \
  26. --disable-dependency-tracking \
  27. --disable-libtool-lock \
  28. --disable-nls \
  29. --disable-werror \
  30. ${CONFOPTS} \
  31. );
  32. touch $@
  33. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  34. $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all
  35. touch $@
  36. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  37. $(MAKE) -C $(WRKBUILD) install
  38. # needed on hosts without readelf, but strange things happen on Cygwin.
  39. ifeq (${OStype},Darwin)
  40. $(CP) $(WRKBUILD)/binutils/readelf $(STAGING_HOST_DIR)/bin
  41. endif
  42. touch $@
  43. include ${TOPDIR}/mk/toolchain.mk