Makefile 2.1 KB

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