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