[backfire/packages] merge r28429
[openwrt/svn-archive/archive.git] / devel / oprofile / Makefile
1 #
2 # Copyright (C) 2009-2010 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:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=82b059379895cf125261d7d773465915
17
18 PKG_BUILD_DEPENDS:=binutils
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/kernel.mk
24
25 define Package/oprofile
26 SECTION:=devel
27 CATEGORY:=Development
28 TITLE:=OProfile System Profiler
29 URL:=http://oprofile.sourceforge.net
30 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
31 endef
32
33 define Package/oprofile/description
34 A transparent low-overhead system-wide profiler.
35 endef
36
37 define Package/oprofile-utils
38 SECTION:=devel
39 CATEGORY:=Development
40 TITLE:=OProfile System Profiler (extra utilities)
41 URL:=http://oprofile.sourceforge.net
42 DEPENDS:=oprofile
43 endef
44
45 define Build/Configure
46 $(call Build/Configure/Default, \
47 --with-kernel-support \
48 --without-x \
49 )
50 endef
51
52 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
53
54 define Package/oprofile-utils/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(INSTALL_BIN) \
57 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
58 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
59 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
60 $(1)/usr/bin
61 endef
62
63 define Package/oprofile/install
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(INSTALL_BIN) \
66 $(PKG_INSTALL_DIR)/usr/bin/* \
67 $(1)/usr/bin
68
69 rm -f \
70 $(1)/usr/bin/opannotate \
71 $(1)/usr/bin/oparchive \
72 $(1)/usr/bin/opgprof
73
74 $(INSTALL_DIR) $(1)/usr/lib/oprofile
75 $(CP) \
76 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
77 $(1)/usr/lib/oprofile/
78
79 $(INSTALL_DIR) $(1)/usr/share/oprofile
80 $(CP) \
81 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
82 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \
83 $(1)/usr/share/oprofile/
84 endef
85
86 $(eval $(call BuildPackage,oprofile))
87 $(eval $(call BuildPackage,oprofile-utils))