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:=8b5d1d9b65f84420bcc3234777ad3be3
18 PKG_BUILD_DEPENDS:=binutils
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/kernel.mk
26 define Package/oprofile
29 TITLE:=OProfile System Profiler
30 URL:=http://oprofile.sourceforge.net
31 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
34 define Package/oprofile/description
35 A transparent low-overhead system-wide profiler.
38 define Package/oprofile-utils
41 TITLE:=OProfile System Profiler (extra utilities)
42 URL:=http://oprofile.sourceforge.net
46 define Build/Configure
47 $(call Build/Configure/Default, \
48 --with-kernel-support \
53 TARGET_CXXFLAGS += -fpermissive
54 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
56 define Package/oprofile-utils/install
57 $(INSTALL_DIR) $(1)/usr/bin
59 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
60 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
61 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
65 define Package/oprofile/install
66 $(INSTALL_DIR) $(1)/usr/bin
68 $(PKG_INSTALL_DIR)/usr/bin/* \
72 $(1)/usr/bin/opannotate \
73 $(1)/usr/bin/oparchive \
76 $(INSTALL_DIR) $(1)/usr/lib/oprofile
78 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
79 $(1)/usr/lib/oprofile/
81 $(INSTALL_DIR) $(1)/usr/share/oprofile
83 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
84 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
85 $(1)/usr/share/oprofile/
88 $(eval $(call BuildPackage,oprofile))
89 $(eval $(call BuildPackage,oprofile-utils))