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