Advertisement
Guest User

OpenWRT Makefile for OpenOCD package

a guest
Mar 27th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. #
  2. # Makefile for OpenOCD by Nicolas Le Falher
  3. #
  4. # Contributions by Nathan & Bifferos
  5. #
  6.  
  7. include $(TOPDIR)/rules.mk
  8.  
  9. PKG_NAME:=openocd
  10. PKG_VERSION:=0.5.0
  11. PKG_RELEASE:=1
  12.  
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  14.  
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_SOURCE_URL:=@SF/openocd
  17. PKG_MD5SUM:=42999a8950b669780f27ec7484c86458
  18.  
  19. include $(INCLUDE_DIR)/package.mk
  20.  
  21. define Package/openocd
  22. SECTION:=openocd
  23. CATEGORY:=Utilities
  24. TITLE:=openocd
  25. endef
  26.  
  27. define Package/openocd/description
  28. The Open On-Chip Debugger (OpenOCD) aims to provide debugging,
  29. in-system programming and boundary-scan testing for embedded
  30. target devices.
  31. endef
  32.  
  33. define Build/Configure
  34. (cd $(PKG_BUILD_DIR); \
  35. ./bootstrap; \
  36. $(CP) -rf ./parport.c $(PKG_BUILD_DIR)/src/jtag/drivers/parport.c; \
  37. ./configure --build=i686-pc-linux-gnu --host=$(OPTIMIZE_FOR_CPU)-openwrt-linux-$(TARGET_SUFFIX) --enable-parport --enable-parport_ppdev --disable-doxygen-html\
  38. );
  39. endef
  40.  
  41. define Build/Compile
  42. $(MAKE) -C $(PKG_BUILD_DIR)
  43. endef
  44.  
  45. define Package/openocd/install
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/openocd $(1)/usr/bin/
  48. $(INSTALL_DIR) $(1)/etc/openocd
  49. $(CP) -r $(PKG_BUILD_DIR)/tcl $(1)/etc/openocd
  50. $(RM) -r $(1)/etc/openocd/interface
  51. $(CP) $(PKG_BUILD_DIR)/tcl/interface/parport.cfg $(1)/etc/openocd
  52. $(INSTALL_CONF) ./openocd.cfg $(1)/etc/openocd/openocd.cfg
  53. endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement