a4efd8b7547eed1f609111b223ee4112151cb5e6
[openwrt/svn-archive/archive.git] / devel / oprofile / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=oprofile
11 PKG_VERSION:=0.9.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=82b059379895cf125261d7d773465915
17 PKG_INSTALL:=1
18 PKG_BUILD_DEPENDS:=binutils
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/kernel.mk
22
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
29 endef
30
31 define KernelPackage/oprofile/description
32 Kernel module for support for oprofile system profiling.
33 endef
34
35 define Package/oprofile
36 SECTION:=devel
37 CATEGORY:=Development
38 TITLE:=OProfile System Profiler
39 URL:=http://oprofile.sourceforge.net
40 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
41 endef
42
43 define Package/oprofile/description
44 A transparent low-overhead system-wide profiler.
45 endef
46
47 define Build/Configure
48 $(call Build/Configure/Default, \
49 --with-kernel-support \
50 --without-x \
51 )
52 endef
53
54 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
55
56 define Package/oprofile/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(INSTALL_BIN) \
59 $(PKG_INSTALL_DIR)/usr/bin/* \
60 $(1)/usr/bin
61
62 $(INSTALL_DIR) $(1)/usr/lib/oprofile
63 $(CP) \
64 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
65 $(1)/usr/lib/oprofile/
66
67 $(INSTALL_DIR) $(1)/usr/share/oprofile
68 $(CP) \
69 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
70 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \
71 $(1)/usr/share/oprofile/
72 endef
73
74 $(eval $(call BuildPackage,oprofile))
75 $(eval $(call KernelPackage,oprofile))