Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright (C) 2006 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. # $Id$
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gdbserver
  9. PKG_VERSION:=6.3
  10. PKG_RELEASE:=1
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  12. PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
  13. GDB_DIR:=$(TOOLCHAIN_BUILD_DIR)/gdb-$(PKG_VERSION)
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/gdbserver
  16. SECTION:=utils
  17. CATEGORY:=Utilities
  18. DEPENDS:=@GDB@
  19. TITLE:=Remote Server for the GNU Debugger
  20. DESCRIPTION:=GDBSERVER is a program that allows you to run GDB on a different machine\\\
  21. than the one which is running the program being debugged.
  22. endef
  23. define Build/Configure
  24. (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
  25. $(TARGET_CONFIGURE_OPTS) \
  26. CFLAGS="$(TARGET_CFLAGS)" \
  27. $(GDB_DIR)/gdb/gdbserver/configure \
  28. --target=$(GNU_TARGET_NAME) \
  29. --host=$(GNU_TARGET_NAME) \
  30. --build=$(GNU_HOST_NAME) \
  31. --program-prefix="" \
  32. --program-suffix="" \
  33. --prefix=/usr \
  34. --exec-prefix=/usr \
  35. --bindir=/usr/bin \
  36. --sbindir=/usr/sbin \
  37. --libexecdir=/usr/lib \
  38. --sysconfdir=/etc \
  39. --datadir=/usr/share \
  40. --localstatedir=/var \
  41. --mandir=/usr/man \
  42. --infodir=/usr/info \
  43. $(DISABLE_NLS) \
  44. $(DISABLE_LARGEFILE) \
  45. );
  46. endef
  47. define Build/Compile
  48. rm -rf $(PKG_INSTALL_DIR)
  49. mkdir -p $(PKG_INSTALL_DIR)
  50. $(MAKE) -C $(PKG_BUILD_DIR) \
  51. DESTDIR="$(PKG_INSTALL_DIR)" \
  52. install
  53. endef
  54. define Package/gdbserver/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  57. endef
  58. $(eval $(call BuildPackage,gdbserver))