Root/package/gdb/Makefile

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

Archive Download this file



interactive