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