2 # Copyright (C) 2009-2010 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
:=binutils
22 include $(INCLUDE_DIR
)/package.mk
23 include $(INCLUDE_DIR
)/kernel.mk
25 define 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
33 define KernelPackage
/oprofile
/description
34 Kernel module for support for oprofile system profiling.
37 define Package
/oprofile
40 TITLE
:=OProfile System Profiler
41 URL
:=http
://oprofile.sourceforge.net
42 DEPENDS
:=+libpopt
+kmod-oprofile
+libstdcpp
+objdump
45 define Package
/oprofile
/description
46 A transparent low-overhead system-wide profiler.
49 define Package
/oprofile-utils
52 TITLE
:=OProfile System Profiler
(extra utilities
)
53 URL
:=http
://oprofile.sourceforge.net
57 define Build
/Configure
58 $(call Build
/Configure
/Default
, \
59 --with-kernel-support \
64 TARGET_LDFLAGS
:= -L
$(STAGING_DIR
)/usr
/lib
$(TARGET_LDFLAGS
)
66 define Package
/oprofile-utils
/install
67 $(INSTALL_DIR
) $(1)/usr
/bin
69 $(PKG_INSTALL_DIR
)/usr
/bin
/opannotate \
70 $(PKG_INSTALL_DIR
)/usr
/bin
/oparchive \
71 $(PKG_INSTALL_DIR
)/usr
/bin
/opgprof \
75 define Package
/oprofile
/install
76 $(INSTALL_DIR
) $(1)/usr
/bin
78 $(PKG_INSTALL_DIR
)/usr
/bin
/* \
82 $(1)/usr
/bin
/opannotate \
83 $(1)/usr
/bin
/oparchive \
86 $(INSTALL_DIR
) $(1)/usr
/lib
/oprofile
88 $(PKG_INSTALL_DIR
)/usr
/lib
/oprofile
/*.so
* \
89 $(1)/usr
/lib
/oprofile
/
91 $(INSTALL_DIR
) $(1)/usr
/share
/oprofile
93 $(PKG_INSTALL_DIR
)/usr
/share
/oprofile
/stl.pat \
94 $(PKG_INSTALL_DIR
)/usr
/share
/oprofile
/$(LINUX_KARCH
) \
95 $(1)/usr
/share
/oprofile
/
98 $(eval
$(call BuildPackage
,oprofile
))
99 $(eval
$(call BuildPackage
,oprofile-utils
))
100 $(eval
$(call KernelPackage
,oprofile
))