Root/package/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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=oprofile
11PKG_VERSION:=0.9.7
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/oprofile/
16PKG_MD5SUM:=8b5d1d9b65f84420bcc3234777ad3be3
17
18PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19
20PKG_BUILD_DEPENDS:=binutils
21PKG_FIXUP:=autoreconf
22PKG_INSTALL:=1
23PKG_BUILD_PARALLEL:=1
24
25include $(INCLUDE_DIR)/package.mk
26include $(INCLUDE_DIR)/kernel.mk
27
28define Package/oprofile
29  SECTION:=devel
30  CATEGORY:=Development
31  TITLE:=OProfile System Profiler
32  URL:=http://oprofile.sourceforge.net
33  DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
34endef
35
36define Package/oprofile/description
37 A transparent low-overhead system-wide profiler.
38endef
39
40define Package/oprofile-utils
41  SECTION:=devel
42  CATEGORY:=Development
43  TITLE:=OProfile System Profiler (extra utilities)
44  URL:=http://oprofile.sourceforge.net
45  DEPENDS:=oprofile
46endef
47
48define Build/Configure
49    $(call Build/Configure/Default, \
50        --with-kernel-support \
51        --without-x \
52    )
53endef
54
55TARGET_CXXFLAGS += -fpermissive
56TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
57
58define Package/oprofile-utils/install
59    $(INSTALL_DIR) $(1)/usr/bin
60    $(INSTALL_BIN) \
61        $(PKG_INSTALL_DIR)/usr/bin/opannotate \
62        $(PKG_INSTALL_DIR)/usr/bin/oparchive \
63        $(PKG_INSTALL_DIR)/usr/bin/opgprof \
64        $(1)/usr/bin
65endef
66
67define Package/oprofile/install
68    $(INSTALL_DIR) $(1)/usr/bin
69    $(INSTALL_BIN) \
70        $(PKG_INSTALL_DIR)/usr/bin/* \
71        $(1)/usr/bin
72
73    rm -f \
74        $(1)/usr/bin/opannotate \
75        $(1)/usr/bin/oparchive \
76        $(1)/usr/bin/opgprof
77
78    $(INSTALL_DIR) $(1)/usr/lib/oprofile
79    $(CP) \
80        $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
81        $(1)/usr/lib/oprofile/
82
83    $(INSTALL_DIR) $(1)/usr/share/oprofile
84    $(CP) \
85        $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
86        $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
87        $(1)/usr/share/oprofile/
88endef
89
90$(eval $(call BuildPackage,oprofile))
91$(eval $(call BuildPackage,oprofile-utils))
92

Archive Download this file



interactive