2 # Copyright (C) 2009 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:=82b059379895cf125261d7d773465915
18 PKG_BUILD_DEPENDS:=libbfd
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/kernel.mk
23 define KernelPackage/oprofile
24 SUBMENU:=Other modules
25 TITLE:=OProfile profiling support
26 KCONFIG:=CONFIG_OPROFILE @LINUX_2_6
27 FILES:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/oprofile/oprofile.$(LINUX_KMOD_SUFFIX)
28 DEPENDS:=@KERNEL_PROFILING
31 define KernelPackage/oprofile/description
32 Kernel module for support for oprofile system profiling.
35 define Package/oprofile
38 TITLE:=OProfile System Profiler
39 URL:=http://oprofile.sourceforge.net
40 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
43 define Package/oprofile/description
44 A transparent low-overhead system-wide profiler.
47 define Build/Configure
48 $(call Build/Configure/Default, \
49 --with-kernel-support \
54 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
56 define Package/oprofile/install
57 $(INSTALL_DIR) $(1)/usr/bin
59 $(PKG_INSTALL_DIR)/usr/bin/* \
62 $(INSTALL_DIR) $(1)/usr/lib/oprofile
64 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
65 $(1)/usr/lib/oprofile/
67 $(INSTALL_DIR) $(1)/usr/share/oprofile
69 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
70 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \
71 $(1)/usr/share/oprofile/
74 $(eval $(call BuildPackage,oprofile))
75 $(eval $(call KernelPackage,oprofile))