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
:=8b5d1d9b65f84420bcc3234777ad3be3
18 PKG_BUILD_DEPENDS
:=binutils
22 include $(INCLUDE_DIR
)/package.mk
23 include $(INCLUDE_DIR
)/kernel.mk
25 define Package
/oprofile
28 TITLE
:=OProfile System Profiler
29 URL
:=http
://oprofile.sourceforge.net
30 DEPENDS
:=+libpopt
+kmod-oprofile
+libstdcpp
+objdump
33 define Package
/oprofile
/description
34 A transparent low-overhead system-wide profiler.
37 define Package
/oprofile-utils
40 TITLE
:=OProfile System Profiler
(extra utilities
)
41 URL
:=http
://oprofile.sourceforge.net
45 define Build
/Configure
46 $(call Build
/Configure
/Default
, \
47 --with-kernel-support \
52 TARGET_CXXFLAGS
+= -fpermissive
53 TARGET_LDFLAGS
:= -L
$(STAGING_DIR
)/usr
/lib
$(TARGET_LDFLAGS
)
55 define Package
/oprofile-utils
/install
56 $(INSTALL_DIR
) $(1)/usr
/bin
58 $(PKG_INSTALL_DIR
)/usr
/bin
/opannotate \
59 $(PKG_INSTALL_DIR
)/usr
/bin
/oparchive \
60 $(PKG_INSTALL_DIR
)/usr
/bin
/opgprof \
64 define Package
/oprofile
/install
65 $(INSTALL_DIR
) $(1)/usr
/bin
67 $(PKG_INSTALL_DIR
)/usr
/bin
/* \
71 $(1)/usr
/bin
/opannotate \
72 $(1)/usr
/bin
/oparchive \
75 $(INSTALL_DIR
) $(1)/usr
/lib
/oprofile
77 $(PKG_INSTALL_DIR
)/usr
/lib
/oprofile
/*.so
* \
78 $(1)/usr
/lib
/oprofile
/
80 $(INSTALL_DIR
) $(1)/usr
/share
/oprofile
82 $(PKG_INSTALL_DIR
)/usr
/share
/oprofile
/stl.pat \
83 $(PKG_INSTALL_DIR
)/usr
/share
/oprofile
/$(patsubst x86
,i386
,$(LINUX_KARCH
)) \
84 $(1)/usr
/share
/oprofile
/
87 $(eval
$(call BuildPackage
,oprofile
))
88 $(eval
$(call BuildPackage
,oprofile-utils
))