Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / utils / openocd / Makefile
1 #
2 # Copyright (C) 2015 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:=openocd
11 PKG_VERSION:=v0.10.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=git://git.code.sf.net/p/openocd/code
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
19 PKG_MIRROR_HASH:=ef8a71daa581a3a2296fd3dafff21de2ca7b86319ec3a5c24ed6a216d1fdff45
20 PKG_LICENSE:=GPL-2.0
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
24
25 PKG_BUILD_PARALLEL:=1
26 PKG_INSTALL:=1
27 PKG_FIXUP:=autoreconf
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31
32 define Package/openocd
33 SECTION:=utils
34 CATEGORY:=Utilities
35 TITLE:=OpenOCD Utility
36 URL:=http://openocd.sf.net/
37 DEPENDS:=+libusb-1.0 +libusb-compat +libftdi1 +hidapi
38 endef
39
40 define Package/openocd/description
41 OpenOCD provides on-chip programming and debugging support with a
42 layered architecture of JTAG interface and TAP support including:
43
44 - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
45 programming;
46 - debug target support (e.g. ARM, MIPS): single-stepping,
47 breakpoints/watchpoints, gprof profiling, etc;
48 - flash chip drivers (e.g. CFI, NAND, internal flash);
49 - embedded TCL interpreter for easy scripting.
50
51 Several network interfaces are available for interacting with OpenOCD:
52 telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
53 "remote target" for source-level debugging of embedded systems using
54 the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
55 Pro).
56 endef
57
58 CONFIGURE_ARGS += \
59 --prefix="/usr" \
60 --disable-werror \
61 MAKEINFO=true \
62 --enable-dummy \
63 --enable-sysfsgpio
64
65 define Build/Compile
66 +$(MAKE_VARS) \
67 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
68 endef
69
70 define Package/openocd/install
71 $(INSTALL_DIR) $(1)/usr/bin
72 $(INSTALL_DIR) $(1)/usr/share/openocd
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openocd $(1)/usr/bin/
74 $(CP) $(PKG_INSTALL_DIR)/usr/share/openocd/scripts $(1)/usr/share/openocd
75 endef
76
77 $(eval $(call BuildPackage,openocd))