Root/package/devel/gdb/Makefile

1#
2# Copyright (C) 2006-2012 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=gdb
11PKG_VERSION:=6.8a
12PKG_RELEASE:=4
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@GNU/gdb
16PKG_MD5SUM:=da20d043e6729f74b909bd507bcae5c9
17PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-6.8
18
19PKG_BUILD_PARALLEL:=0
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/gdb/Default
24  SECTION:=utils
25  CATEGORY:=Utilities
26  DEPENDS:=@!(avr32||cris)
27  URL:=http://www.gnu.org/software/gdb/
28endef
29
30define Package/gdb
31$(call Package/gdb/Default)
32  TITLE:=GNU Debugger
33  DEPENDS+=+libreadline +libncurses
34endef
35
36define Package/gdb/description
37GDB, the GNU Project debugger, allows you to see what is going on `inside'
38another program while it executes -- or what another program was doing at the
39moment it crashed.
40endef
41
42define Package/gdbserver
43$(call Package/gdb/Default)
44  TITLE:=Remote server for GNU Debugger
45endef
46
47define Package/gdbserver/description
48GDBSERVER is a program that allows you to run GDB on a different machine than the
49one which is running the program being debugged.
50endef
51
52# XXX: add --disable-werror to prevent build failure with arm
53CONFIGURE_ARGS+= \
54    --with-system-readline \
55    --without-expat \
56    --disable-werror
57
58CONFIGURE_VARS+= \
59    ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
60
61define Build/Compile
62    +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
63        DESTDIR="$(PKG_INSTALL_DIR)" \
64        CPPFLAGS="$(TARGET_CPPFLAGS)" \
65        all
66    $(MAKE) -C $(PKG_BUILD_DIR) \
67        DESTDIR="$(PKG_INSTALL_DIR)" \
68        CPPFLAGS="$(TARGET_CPPFLAGS)" \
69        install-gdb
70endef
71
72define Package/gdb/install
73    $(INSTALL_DIR) $(1)/usr/bin
74    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
75endef
76
77define Package/gdbserver/install
78    $(INSTALL_DIR) $(1)/usr/bin
79    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
80ifneq ($(CONFIG_USE_EGLIBC),)
81    $(INSTALL_DIR) $(1)/usr/lib
82    $(CP) $(TOOLCHAIN_DIR)/lib/libthread_db* $(1)/usr/lib
83endif
84endef
85
86$(eval $(call BuildPackage,gdb))
87$(eval $(call BuildPackage,gdbserver))
88

Archive Download this file



interactive