Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_LINUX_64),y)
  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. --build=$(GNU_HOST_NAME) \
  24. --host=$(GNU_HOST_NAME) \
  25. --target=$(REAL_GNU_TARGET_NAME) \
  26. --with-sysroot=$(STAGING_TARGET_DIR) \
  27. --disable-multilib \
  28. --disable-dependency-tracking \
  29. --disable-libtool-lock \
  30. --disable-nls \
  31. --disable-werror \
  32. ${CONFOPTS} \
  33. );
  34. touch $@
  35. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  36. $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all
  37. touch $@
  38. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  39. $(MAKE) -C $(WRKBUILD) install
  40. # needed on hosts without readelf, but strange things happen on Cygwin.
  41. ifeq (${OStype},Darwin)
  42. $(CP) $(WRKBUILD)/binutils/readelf $(STAGING_HOST_DIR)/bin
  43. endif
  44. touch $@
  45. include ${TOPDIR}/mk/toolchain.mk