Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_DESCR:= binary utilities (nm, objdump, as, ..)
  6. PKG_SECTION:= lang
  7. PKG_DEPENDS:= libbfd
  8. PKG_SUBPKGS:= BINUTILS LIBBFD
  9. PKGSD_LIBBFD:= Binary File Descriptor library
  10. PKGSC_LIBBFD:= libs
  11. PKG_HOST_DEPENDS:= !cygwin
  12. include ${TOPDIR}/mk/package.mk
  13. $(eval $(call PKG_template,BINUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  14. $(eval $(call PKG_template,LIBBFD,libbfd,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBFD},${PKGSC_LIBBFD}))
  15. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  16. TARGET_CFLAGS+= -fPIC
  17. ifeq ($(ADK_NATIVE),)
  18. CONFIGURE_ARGS+= --disable-werror \
  19. --host=$(REAL_GNU_TARGET_NAME) \
  20. --target=$(REAL_GNU_TARGET_NAME)
  21. else
  22. CONFIGURE_ARGS+= --disable-werror
  23. endif
  24. pre-build:
  25. @-rm $(STAGING_TARGET_DIR)/lib/libiberty.a $(STAGING_TARGET_DIR)/usr/lib/libiberty.a
  26. libbfd-install:
  27. ${INSTALL_DIR} ${IDIR_LIBBFD}/usr/lib
  28. $(CP) ${WRKINST}/usr/lib/*.so ${IDIR_LIBBFD}/usr/lib
  29. binutils-install:
  30. ${INSTALL_DIR} ${IDIR_BINUTILS}/usr/bin
  31. ${INSTALL_BIN} ${WRKINST}/usr/bin/{ar,as,ld,strip,strings,size,nm} \
  32. ${IDIR_BINUTILS}/usr/bin/
  33. ${INSTALL_BIN} ${WRKINST}/usr/bin/{objcopy,ranlib,readelf,objdump} \
  34. ${IDIR_BINUTILS}/usr/bin/
  35. include ${TOPDIR}/mk/pkg-bottom.mk