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

Archive Download this file



interactive