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