1
0

Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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/gdb/Makefile.inc
  5. PKG_NAME:= gdb
  6. PKG_DESCR:= GNU debugger
  7. PKG_SECTION:= debug
  8. PKG_DEPENDS:= libthread-db libncurses libexpat libgcc zlib
  9. PKG_BUILDDEP:= ncurses readline libiconv-tiny expat zlib
  10. PKG_NOPARALLEL:= 1
  11. PKG_ARCH_DEPENDS:= !m68k
  12. include ${TOPDIR}/mk/package.mk
  13. $(eval $(call PKG_template,GDB,gdb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  14. ifeq ($(ADK_STATIC),y)
  15. TARGET_CFLAGS+= -static
  16. CONFIGURE_ARGS+= --enable-static
  17. endif
  18. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  19. TARGET_CFLAGS+= ${TARGET_CPPFLAGS} -fPIC
  20. CONFIGURE_ARGS+= --without-uiout --enable-gdbmi \
  21. --disable-tui --disable-gdbtk --without-x \
  22. --without-included-gettext --disable-sim \
  23. --with-curses --disable-werror \
  24. --without-auto-load-safe-path \
  25. --disable-gdbserver \
  26. --without-python
  27. XAKE_FLAGS+= LDFLAGS='${TARGET_LDFLAGS}'
  28. # disable honour cflags stuff
  29. XAKE_FLAGS+= GCC_HONOUR_COPTS:=s
  30. post-extract:
  31. -mv $(STAGING_DIR)/usr/lib/libiberty.a $(STAGING_DIR)/usr/lib/libiberty.a.bak
  32. gdb-install:
  33. ${INSTALL_DIR} ${IDIR_GDB}/usr/bin
  34. ${INSTALL_BIN} ${WRKINST}/usr/bin/gdb ${IDIR_GDB}/usr/bin/
  35. # shipped libbfd conflicts with system wide one
  36. rm -f ${WRKINST}/usr/lib/libbfd*
  37. -mv $(STAGING_DIR)/usr/lib/libiberty.a.bak $(STAGING_DIR)/usr/lib/libiberty.a
  38. include ${TOPDIR}/mk/pkg-bottom.mk