Makefile 4.4 KB

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