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
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 +kmod-oprofile +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 \
57 TARGET_CXXFLAGS += -fpermissive
58 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
60 define Package/oprofile-utils/install
61 $(INSTALL_DIR) $(1)/usr/bin
63 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
64 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
65 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
69 define Package/oprofile/install
70 $(INSTALL_DIR) $(1)/usr/bin
72 $(PKG_INSTALL_DIR)/usr/bin/* \
76 $(1)/usr/bin/opannotate \
77 $(1)/usr/bin/oparchive \
80 $(INSTALL_DIR) $(1)/usr/lib/oprofile
82 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
83 $(1)/usr/lib/oprofile/
85 $(INSTALL_DIR) $(1)/usr/share/oprofile
87 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
88 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
89 $(1)/usr/share/oprofile/
92 $(eval $(call BuildPackage,oprofile))
93 $(eval $(call BuildPackage,oprofile-utils))