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:=ebc27a8478068cb986efd295cc4ac877
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
20 PKG_BUILD_DEPENDS:=binutils
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/kernel.mk
30 define Package/oprofile
33 TITLE:=OProfile System Profiler
34 URL:=http://oprofile.sourceforge.net
35 DEPENDS:=+libpopt +libstdcpp +objdump +librt @(!TARGET_uml||BROKEN)
38 define Package/oprofile/description
39 A transparent low-overhead system-wide profiler.
42 define Package/oprofile-utils
45 TITLE:=OProfile System Profiler (extra utilities)
46 URL:=http://oprofile.sourceforge.net
50 define Build/Configure
51 $(call Build/Configure/Default, \
52 --with-kernel-support \
53 --with-kernel=$(LINUX_DIR)/user_headers \
58 TARGET_CXXFLAGS += -fpermissive
59 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
61 define Package/oprofile-utils/install
62 $(INSTALL_DIR) $(1)/usr/bin
64 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
65 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
66 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
70 define Package/oprofile/install
71 $(INSTALL_DIR) $(1)/usr/bin
73 $(PKG_INSTALL_DIR)/usr/bin/* \
77 $(1)/usr/bin/opannotate \
78 $(1)/usr/bin/oparchive \
81 $(INSTALL_DIR) $(1)/usr/lib/oprofile
83 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
84 $(1)/usr/lib/oprofile/
86 $(INSTALL_DIR) $(1)/usr/share/oprofile
88 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
89 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
90 $(1)/usr/share/oprofile/
93 $(eval $(call BuildPackage,oprofile))
94 $(eval $(call BuildPackage,oprofile-utils))