Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gdb-arc
  9. PKG_VERSION:=arc-2016.03-gdb
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=gdb-arc-2016.03-gdb.tar.gz
  12. PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_VERSION)
  13. PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/binutils-gdb-arc-2016.03-gdb
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_INSTALL:=1
  17. PKG_LICENSE:=GPL-3.0+
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/gdb-arc/Default
  20. SECTION:=devel
  21. CATEGORY:=Development
  22. DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @arc
  23. URL:=http://www.gnu.org/software/gdb/
  24. endef
  25. define Package/gdb-arc
  26. $(call Package/gdb-arc/Default)
  27. TITLE:=GNU Debugger for ARC
  28. DEPENDS+=+libreadline +libncurses +zlib
  29. endef
  30. define Package/gdb-arc/description
  31. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  32. another program while it executes -- or what another program was doing at the
  33. moment it crashed.
  34. endef
  35. define Package/gdbserver-arc
  36. $(call Package/gdb-arc/Default)
  37. TITLE:=Remote server for GNU Debugger
  38. endef
  39. define Package/gdbserver-arc/description
  40. GDBSERVER is a program that allows you to run GDB on a different machine than the
  41. one which is running the program being debugged.
  42. endef
  43. # XXX: add --disable-werror to prevent build failure with arm
  44. CONFIGURE_ARGS+= \
  45. --with-system-readline \
  46. --without-expat \
  47. --without-lzma \
  48. --disable-werror \
  49. --disable-binutils \
  50. --disable-ld \
  51. --disable-gas \
  52. --disable-sim
  53. CONFIGURE_VARS+= \
  54. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  55. define Build/Compile
  56. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  57. DESTDIR="$(PKG_INSTALL_DIR)" \
  58. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  59. all
  60. endef
  61. define Build/Install
  62. $(MAKE) -C $(PKG_BUILD_DIR) \
  63. DESTDIR="$(PKG_INSTALL_DIR)" \
  64. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  65. install-gdb
  66. endef
  67. define Package/gdb-arc/install
  68. $(INSTALL_DIR) $(1)/usr/bin
  69. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  70. endef
  71. define Package/gdbserver-arc/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  74. endef
  75. $(eval $(call BuildPackage,gdb-arc))
  76. $(eval $(call BuildPackage,gdbserver-arc))