[cosmetic] [package] gdb: have both gdb & gdbserver share defaults
[openwrt/svn-archive/archive.git] / package / gdb / Makefile
1 # Copyright (C) 2006-2009 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=gdb
10 PKG_VERSION:=6.8
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_SOURCE_URL:=@GNU/gdb
15 PKG_MD5SUM:=c9da266b884fb8fa54df786dfaadbc7a
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/gdb/Default
20 SECTION:=utils
21 CATEGORY:=Utilities
22 endef
23
24 define Package/gdb
25 $(call Package/gdb/Default)
26 TITLE:=GNU Debugger
27 DEPENDS+= +libreadline +libncurses
28 endef
29
30 define Package/gdb/description
31 GNU debugger
32 endef
33
34 define Package/gdbserver
35 $(call Package/gdb/Default)
36 TITLE:=Remote server for GNU Debugger
37 endef
38
39 define Package/gdbserver/description
40 GDBSERVER is a program that allows you to run GDB on a different machine
41 than the one which is running the program being debugged.
42 endef
43
44 CONFIGURE_ARGS+= \
45 --with-system-readline
46
47 CONFIGURE_VARS+= \
48 ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
53 CPPFLAGS="$(TARGET_CPPFLAGS)" \
54 all install-gdb
55 endef
56
57 define Package/gdb/install
58 $(INSTALL_DIR) $(1)/usr/bin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
60 endef
61
62 define Package/gdbserver/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
65 endef
66
67 $(eval $(call BuildPackage,gdb))
68 $(eval $(call BuildPackage,gdbserver))
69