Makefile 1.3 KB

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