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>
21 PKG_LICENSE_FILES:=COPYING
23 PKG_BUILD_DEPENDS:=binutils
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/kernel.mk
32 define Package/oprofile
35 TITLE:=OProfile System Profiler
36 URL:=http://oprofile.sourceforge.net
37 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
40 define Package/oprofile/description
41 A transparent low-overhead system-wide profiler.
44 define Package/oprofile-utils
47 TITLE:=OProfile System Profiler (extra utilities)
48 URL:=http://oprofile.sourceforge.net
52 define Build/Configure
53 $(call Build/Configure/Default, \
54 --with-kernel-support \
59 TARGET_CXXFLAGS += -fpermissive
60 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
62 define Package/oprofile-utils/install
63 $(INSTALL_DIR) $(1)/usr/bin
65 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
66 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
67 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
71 define Package/oprofile/install
72 $(INSTALL_DIR) $(1)/usr/bin
74 $(PKG_INSTALL_DIR)/usr/bin/* \
78 $(1)/usr/bin/opannotate \
79 $(1)/usr/bin/oparchive \
82 $(INSTALL_DIR) $(1)/usr/lib/oprofile
84 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
85 $(1)/usr/lib/oprofile/
87 $(INSTALL_DIR) $(1)/usr/share/oprofile
89 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
90 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
91 $(1)/usr/share/oprofile/
94 $(eval $(call BuildPackage,oprofile))
95 $(eval $(call BuildPackage,oprofile-utils))