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