Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 ${TOPDIR}/toolchain/binutils/Makefile.inc
  5. PKG_NAME:= binutils
  6. PKG_DESCR:= binary utilities (nm, objdump, as, ..)
  7. PKG_SECTION:= lang
  8. PKG_DEPENDS:= libbfd
  9. PKG_OPTS:= dev
  10. PKG_SUBPKGS:= BINUTILS LIBBFD
  11. PKGSD_LIBBFD:= Binary File Descriptor library
  12. PKGSC_LIBBFD:= libs
  13. PKG_HOST_DEPENDS:= !cygwin
  14. ifeq ($(ADK_STATIC),y)
  15. PKG_OPTS+= libmix
  16. endif
  17. include ${TOPDIR}/mk/package.mk
  18. $(eval $(call PKG_template,BINUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  19. $(eval $(call PKG_template,LIBBFD,libbfd,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBFD},${PKGSC_LIBBFD},${PKG_OPTS}))
  20. ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
  21. CONFIGURE_ARGS+= --enable-multilib
  22. else
  23. CONFIGURE_ARGS+= --disable-multilib
  24. endif
  25. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  26. TARGET_CFLAGS+= -fPIC
  27. ifeq ($(ADK_NATIVE),)
  28. CONFIGURE_ARGS+= --disable-werror \
  29. --host=$(GNU_TARGET_NAME) \
  30. --target=$(GNU_TARGET_NAME)
  31. else
  32. CONFIGURE_ARGS+= --disable-werror
  33. endif
  34. # disable honour cflags stuff
  35. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  36. post-build:
  37. $(CP) ${WRKBUILD}/libiberty/libiberty.a $(STAGING_TARGET_DIR)/usr/lib
  38. libbfd-install:
  39. ${INSTALL_DIR} ${IDIR_LIBBFD}/usr/lib
  40. $(CP) ${WRKINST}/usr/lib/*.so* ${IDIR_LIBBFD}/usr/lib
  41. binutils-install:
  42. ${INSTALL_DIR} ${IDIR_BINUTILS}/usr/bin
  43. ${INSTALL_BIN} ${WRKINST}/usr/bin/{ar,as,ld,strip,strings,size,nm} \
  44. ${IDIR_BINUTILS}/usr/bin/
  45. ${INSTALL_BIN} ${WRKINST}/usr/bin/{objcopy,ranlib,readelf,objdump} \
  46. ${IDIR_BINUTILS}/usr/bin/
  47. include ${TOPDIR}/mk/pkg-bottom.mk