Makefile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=valgrind
  9. PKG_VERSION:=3.8.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://valgrind.org/downloads/
  13. PKG_MD5SUM:=ec04dfd1256307432b2a7b520398c526
  14. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  15. PKG_FIXUP = autoreconf
  16. PKG_INSTALL := 1
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/kernel.mk
  19. define Package/valgrind
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. DEPENDS:=@mips||mipsel||i386||powerpc||TARGET_omap4 +libpthread +librt
  23. TITLE:=debugging and profiling tools for Linux
  24. URL:=http://www.valgrind.org
  25. endef
  26. define Package/valgrind/default
  27. $(Package/valgrind)
  28. DEPENDS := valgrind
  29. endef
  30. define Package/valgrind-cachegrind
  31. $(Package/valgrind/default)
  32. TITLE += (cache profiling)
  33. endef
  34. define Package/valgrind-callgrind
  35. $(Package/valgrind/default)
  36. TITLE += (callgraph profiling)
  37. endef
  38. define Package/valgrind-drd
  39. $(Package/valgrind/default)
  40. TITLE += (thread error detection)
  41. endef
  42. define Package/valgrind-massif
  43. $(Package/valgrind/default)
  44. TITLE += (heap profiling)
  45. endef
  46. define Package/valgrind-helgrind
  47. $(Package/valgrind/default)
  48. TITLE += (thread debugging)
  49. endef
  50. define Package/valgrind-vgdb
  51. $(Package/valgrind/default)
  52. TITLE += (GDB interface)
  53. endef
  54. define Package/valgrind/description
  55. Valgrind is an award-winning suite of tools for debugging and
  56. profiling Linux programs. With the tools that come with Valgrind,
  57. you can automatically detect many memory management and threading
  58. bugs, avoiding hours of frustrating bug-hunting, making your
  59. programs more stable. You can also perform detailed profiling,
  60. to speed up and reduce memory use of your programs.
  61. endef
  62. CPU := $(patsubst x86,i386,$(LINUX_KARCH))
  63. CONFIGURE_VARS += \
  64. UNAME_R=$(LINUX_VERSION)
  65. CONFIGURE_ARGS += \
  66. --enable-only32bit \
  67. --enable-tls \
  68. --without-x \
  69. --without-uiout \
  70. --disable-valgrindmi \
  71. --disable-tui \
  72. --disable-valgrindtk \
  73. --without-included-gettext
  74. define Package/valgrind/install
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/valgrind* $(1)/usr/bin/
  77. $(INSTALL_DIR) $(1)/usr/lib/valgrind
  78. $(CP) \
  79. ./files/default.supp \
  80. $(PKG_INSTALL_DIR)/usr/lib/valgrind/none-* \
  81. $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_core*.so \
  82. $(PKG_INSTALL_DIR)/usr/lib/valgrind/$(CPU)-*.xml \
  83. $(PKG_INSTALL_DIR)/usr/lib/valgrind/32bit-core*.xml \
  84. $(PKG_INSTALL_DIR)/usr/lib/valgrind/32bit-linux*.xml \
  85. $(PKG_INSTALL_DIR)/usr/lib/valgrind/memcheck-* \
  86. $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_memcheck*.so \
  87. $(1)/usr/lib/valgrind/
  88. endef
  89. define Package/valgrind-cachegrind/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cg_* $(1)/usr/bin/
  92. $(INSTALL_DIR) $(1)/usr/lib/valgrind
  93. $(CP) \
  94. $(PKG_INSTALL_DIR)/usr/lib/valgrind/cachegrind-* \
  95. $(1)/usr/lib/valgrind/
  96. endef
  97. define Package/valgrind-callgrind/install
  98. $(INSTALL_DIR) $(1)/usr/bin
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/callgrind* $(1)/usr/bin/
  100. $(INSTALL_DIR) $(1)/usr/lib/valgrind
  101. $(CP) \
  102. $(PKG_INSTALL_DIR)/usr/lib/valgrind/callgrind-* \
  103. $(1)/usr/lib/valgrind/
  104. endef
  105. define Package/valgrind-drd/install
  106. $(INSTALL_DIR) $(1)/usr/lib/valgrind
  107. $(CP) \
  108. $(PKG_INSTALL_DIR)/usr/lib/valgrind/drd-* \
  109. $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_drd*.so \
  110. $(1)/usr/lib/valgrind/
  111. endef
  112. define Package/valgrind-massif/install
  113. $(INSTALL_DIR) $(1)/usr/bin
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ms_print $(1)/usr/bin/
  115. $(INSTALL_DIR) $(1)/usr/lib/valgrind
  116. $(CP) \
  117. $(PKG_INSTALL_DIR)/usr/lib/valgrind/massif-* \
  118. $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_massif*.so \
  119. $(1)/usr/lib/valgrind/
  120. endef
  121. define Package/valgrind-helgrind/install
  122. $(INSTALL_DIR) $(1)/usr/lib/valgrind
  123. $(CP) \
  124. $(PKG_INSTALL_DIR)/usr/lib/valgrind/helgrind-* \
  125. $(PKG_INSTALL_DIR)/usr/lib/valgrind/vgpreload_helgrind*.so \
  126. $(1)/usr/lib/valgrind/
  127. endef
  128. define Package/valgrind-vgdb/install
  129. $(INSTALL_DIR) $(1)/usr/bin
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vgdb $(1)/usr/bin/
  131. endef
  132. $(eval $(call BuildPackage,valgrind))
  133. $(eval $(call BuildPackage,valgrind-cachegrind))
  134. $(eval $(call BuildPackage,valgrind-callgrind))
  135. $(eval $(call BuildPackage,valgrind-drd))
  136. $(eval $(call BuildPackage,valgrind-massif))
  137. $(eval $(call BuildPackage,valgrind-helgrind))
  138. $(eval $(call BuildPackage,valgrind-vgdb))