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:=00aec1287da2dfffda17a9b1c0a01868
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
20 PKG_BUILD_DEPENDS:=binutils
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/kernel.mk
28 define Package/oprofile
31 TITLE:=OProfile System Profiler
32 URL:=http://oprofile.sourceforge.net
33 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
36 define Package/oprofile/description
37 A transparent low-overhead system-wide profiler.
40 define Package/oprofile-utils
43 TITLE:=OProfile System Profiler (extra utilities)
44 URL:=http://oprofile.sourceforge.net
48 define Build/Configure
49 $(call Build/Configure/Default, \
50 --with-kernel-support \
55 TARGET_CXXFLAGS += -fpermissive
56 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
58 define Package/oprofile-utils/install
59 $(INSTALL_DIR) $(1)/usr/bin
61 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
62 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
63 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
67 define Package/oprofile/install
68 $(INSTALL_DIR) $(1)/usr/bin
70 $(PKG_INSTALL_DIR)/usr/bin/* \
74 $(1)/usr/bin/opannotate \
75 $(1)/usr/bin/oparchive \
78 $(INSTALL_DIR) $(1)/usr/lib/oprofile
80 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
81 $(1)/usr/lib/oprofile/
83 $(INSTALL_DIR) $(1)/usr/share/oprofile
85 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
86 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
87 $(1)/usr/share/oprofile/
90 $(eval $(call BuildPackage,oprofile))
91 $(eval $(call BuildPackage,oprofile-utils))