1
0

Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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=$(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. --disable-plugins \
  34. ${CONFOPTS} \
  35. );
  36. touch $@
  37. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  38. $(MAKE) ${BINUTILS_MAKEOPTS} -C $(WRKBUILD) all
  39. touch $@
  40. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  41. $(MAKE) -C $(WRKBUILD) install
  42. # needed on hosts without readelf, but strange things happen on Cygwin.
  43. ifeq (${OStype},Darwin)
  44. $(CP) $(WRKBUILD)/binutils/readelf $(STAGING_HOST_DIR)/bin
  45. endif
  46. touch $@
  47. include ${TOPDIR}/mk/toolchain.mk