source: packages/devel/oprofile/Makefile @ 23734

Last change on this file since 23734 was 23734, checked in by nbd, 6 years ago

oprofile: add a separate package for extra utilities

File size: 2.3 KB
Line 
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.4
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/oprofile/
16PKG_MD5SUM:=82b059379895cf125261d7d773465915
17
18PKG_BUILD_DEPENDS:=binutils
19PKG_FIXUP:=libtool
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23include $(INCLUDE_DIR)/kernel.mk
24
25define KernelPackage/oprofile
26  SUBMENU:=Other modules
27  TITLE:=OProfile profiling support
28  KCONFIG:=CONFIG_OPROFILE @!LINUX_2_4
29  FILES:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/oprofile/oprofile.$(LINUX_KMOD_SUFFIX)
30  DEPENDS:=@KERNEL_PROFILING
31endef
32
33define KernelPackage/oprofile/description
34  Kernel module for support for oprofile system profiling.
35endef
36
37define Package/oprofile
38  SECTION:=devel
39  CATEGORY:=Development
40  TITLE:=OProfile System Profiler
41  URL:=http://oprofile.sourceforge.net
42  DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
43endef
44
45define Package/oprofile/description
46 A transparent low-overhead system-wide profiler.
47endef
48
49define Package/oprofile-utils
50  SECTION:=devel
51  CATEGORY:=Development
52  TITLE:=OProfile System Profiler (extra utilities)
53  URL:=http://oprofile.sourceforge.net
54  DEPENDS:=oprofile
55endef
56
57define Build/Configure
58        $(call Build/Configure/Default, \
59                --with-kernel-support \
60                --without-x \
61        )
62endef
63
64TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
65
66define Package/oprofile-utils/install
67        $(INSTALL_DIR) $(1)/usr/bin
68        $(INSTALL_BIN) \
69                $(PKG_INSTALL_DIR)/usr/bin/opannotate \
70                $(PKG_INSTALL_DIR)/usr/bin/oparchive \
71                $(PKG_INSTALL_DIR)/usr/bin/opgprof \
72                $(1)/usr/bin
73endef
74
75define Package/oprofile/install
76        $(INSTALL_DIR) $(1)/usr/bin
77        $(INSTALL_BIN) \
78                $(PKG_INSTALL_DIR)/usr/bin/* \
79                $(1)/usr/bin
80
81        rm -f \
82                $(1)/usr/bin/opannotate \
83                $(1)/usr/bin/oparchive \
84                $(1)/usr/bin/opgprof
85
86        $(INSTALL_DIR) $(1)/usr/lib/oprofile
87        $(CP) \
88                $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
89                $(1)/usr/lib/oprofile/
90
91        $(INSTALL_DIR) $(1)/usr/share/oprofile
92        $(CP) \
93                $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
94                $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \
95                $(1)/usr/share/oprofile/
96endef
97
98$(eval $(call BuildPackage,oprofile))
99$(eval $(call BuildPackage,oprofile-utils))
100$(eval $(call KernelPackage,oprofile))
Note: See TracBrowser for help on using the repository browser.