Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # Copyright (C) 2009-2010 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:=oprofile
  9. PKG_VERSION:=0.9.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/oprofile/
  13. PKG_MD5SUM:=8b5d1d9b65f84420bcc3234777ad3be3
  14. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  15. PKG_BUILD_DEPENDS:=binutils
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/kernel.mk
  21. define Package/oprofile
  22. SECTION:=devel
  23. CATEGORY:=Development
  24. TITLE:=OProfile System Profiler
  25. URL:=http://oprofile.sourceforge.net
  26. DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
  27. endef
  28. define Package/oprofile/description
  29. A transparent low-overhead system-wide profiler.
  30. endef
  31. define Package/oprofile-utils
  32. SECTION:=devel
  33. CATEGORY:=Development
  34. TITLE:=OProfile System Profiler (extra utilities)
  35. URL:=http://oprofile.sourceforge.net
  36. DEPENDS:=oprofile
  37. endef
  38. define Build/Configure
  39. $(call Build/Configure/Default, \
  40. --with-kernel-support \
  41. --without-x \
  42. )
  43. endef
  44. TARGET_CXXFLAGS += -fpermissive
  45. TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
  46. define Package/oprofile-utils/install
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) \
  49. $(PKG_INSTALL_DIR)/usr/bin/opannotate \
  50. $(PKG_INSTALL_DIR)/usr/bin/oparchive \
  51. $(PKG_INSTALL_DIR)/usr/bin/opgprof \
  52. $(1)/usr/bin
  53. endef
  54. define Package/oprofile/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_BIN) \
  57. $(PKG_INSTALL_DIR)/usr/bin/* \
  58. $(1)/usr/bin
  59. rm -f \
  60. $(1)/usr/bin/opannotate \
  61. $(1)/usr/bin/oparchive \
  62. $(1)/usr/bin/opgprof
  63. $(INSTALL_DIR) $(1)/usr/lib/oprofile
  64. $(CP) \
  65. $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
  66. $(1)/usr/lib/oprofile/
  67. $(INSTALL_DIR) $(1)/usr/share/oprofile
  68. $(CP) \
  69. $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
  70. $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
  71. $(1)/usr/share/oprofile/
  72. endef
  73. $(eval $(call BuildPackage,oprofile))
  74. $(eval $(call BuildPackage,oprofile-utils))