Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. GDB_DIR:=$(TOOLCHAIN_BUILD_DIR)/gdb-$(PKG_VERSION)
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/gdbserver
  14. SECTION:=utils
  15. CATEGORY:=Utilities
  16. DEPENDS:=@GDB@
  17. TITLE:=Remote Server for the GNU Debugger
  18. DESCRIPTION:=GDBSERVER is a program that allows you to run GDB on a different machine\\\
  19. than the one which is running the program being debugged.
  20. endef
  21. define Build/Configure
  22. (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
  23. $(TARGET_CONFIGURE_OPTS) \
  24. CFLAGS="$(TARGET_CFLAGS)" \
  25. $(GDB_DIR)/gdb/gdbserver/configure \
  26. --target=$(GNU_TARGET_NAME) \
  27. --host=$(GNU_TARGET_NAME) \
  28. --build=$(GNU_HOST_NAME) \
  29. --program-prefix="" \
  30. --program-suffix="" \
  31. --prefix=/usr \
  32. --exec-prefix=/usr \
  33. --bindir=/usr/bin \
  34. --sbindir=/usr/sbin \
  35. --libexecdir=/usr/lib \
  36. --sysconfdir=/etc \
  37. --datadir=/usr/share \
  38. --localstatedir=/var \
  39. --mandir=/usr/man \
  40. --infodir=/usr/info \
  41. $(DISABLE_NLS) \
  42. $(DISABLE_LARGEFILE) \
  43. );
  44. endef
  45. define Build/Compile
  46. rm -rf $(PKG_INSTALL_DIR)
  47. mkdir -p $(PKG_INSTALL_DIR)
  48. $(MAKE) -C $(PKG_BUILD_DIR) \
  49. DESTDIR="$(PKG_INSTALL_DIR)" \
  50. install
  51. endef
  52. define Package/gdbserver/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  55. endef
  56. $(eval $(call BuildPackage,gdbserver))