1
0

Makefile 1.7 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 ${ADK_TOPDIR}/rules.mk
  4. include ${ADK_TOPDIR}/toolchain/binutils/Makefile.inc
  5. PKG_NAME:= binutils
  6. PKG_DESCR:= binary utilities (nm, objdump, as, ..)
  7. PKG_SECTION:= dev/tools
  8. PKG_DEPENDS:= libbfd
  9. PKG_LIBNAME:= libbfd
  10. PKG_OPTS:= dev
  11. PKG_SUBPKGS:= BINUTILS LIBBFD
  12. PKGSD_LIBBFD:= binary file descriptor library
  13. PKGSC_LIBBFD:= libs/misc
  14. PKG_HOST_DEPENDS:= !cygwin
  15. include ${ADK_TOPDIR}/mk/package.mk
  16. $(eval $(call PKG_template,BINUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  17. $(eval $(call PKG_template,LIBBFD,libbfd,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBBFD},${PKGSD_LIBBFD},${PKGSC_LIBBFD},${PKG_OPTS}))
  18. TARGET_CFLAGS+= -fPIC
  19. CONFIGURE_ENV+= ac_cv_prog_MAKEINFO=missing
  20. ifeq ($(ADK_TARGET_ARCH_SH)$(ADK_TARGET_ARCH_X86_64),)
  21. CONFIGURE_ARGS+= --disable-multilib
  22. else
  23. CONFIGURE_ARGS+= --enable-multilib
  24. endif
  25. CONFIGURE_ARGS+= --disable-werror \
  26. --disable-install-libiberty \
  27. --host=$(GNU_TARGET_NAME) \
  28. --target=$(GNU_TARGET_NAME)
  29. # disable honour cflags stuff
  30. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  31. libbfd-install:
  32. ${INSTALL_DIR} ${IDIR_LIBBFD}/usr/lib
  33. $(CP) ${WRKINST}/usr/lib/*.so* ${IDIR_LIBBFD}/usr/lib
  34. # for oprofile
  35. ${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/lib/binutils
  36. $(CP) ${WRKBUILD}/libiberty/libiberty.a \
  37. ${STAGING_TARGET_DIR}/usr/lib/binutils
  38. binutils-install:
  39. ${INSTALL_DIR} ${IDIR_BINUTILS}/usr/bin
  40. ${INSTALL_BIN} ${WRKINST}/usr/bin/{ar,as,ld,strip,strings,size,nm} \
  41. ${IDIR_BINUTILS}/usr/bin/
  42. ${INSTALL_BIN} ${WRKINST}/usr/bin/{objcopy,ranlib,readelf,objdump} \
  43. ${IDIR_BINUTILS}/usr/bin/
  44. include ${ADK_TOPDIR}/mk/pkg-bottom.mk