2 # Copyright (C) 2009-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=82b059379895cf125261d7d773465915
18 PKG_BUILD_DEPENDS:=binutils
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/kernel.mk
25 define Package/oprofile
28 TITLE:=OProfile System Profiler
29 URL:=http://oprofile.sourceforge.net
30 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
33 define Package/oprofile/description
34 A transparent low-overhead system-wide profiler.
37 define Package/oprofile-utils
40 TITLE:=OProfile System Profiler (extra utilities)
41 URL:=http://oprofile.sourceforge.net
45 define Build/Configure
46 $(call Build/Configure/Default, \
47 --with-kernel-support \
52 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
54 define Package/oprofile-utils/install
55 $(INSTALL_DIR) $(1)/usr/bin
57 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
58 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
59 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
63 define Package/oprofile/install
64 $(INSTALL_DIR) $(1)/usr/bin
66 $(PKG_INSTALL_DIR)/usr/bin/* \
70 $(1)/usr/bin/opannotate \
71 $(1)/usr/bin/oparchive \
74 $(INSTALL_DIR) $(1)/usr/lib/oprofile
76 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
77 $(1)/usr/lib/oprofile/
79 $(INSTALL_DIR) $(1)/usr/share/oprofile
81 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
82 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \
83 $(1)/usr/share/oprofile/
86 $(eval $(call BuildPackage,oprofile))
87 $(eval $(call BuildPackage,oprofile-utils))