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
:=00aec1287da2dfffda17a9b1c0a01868
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@openwrt.org
>
20 PKG_BUILD_DEPENDS
:=binutils
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/kernel.mk
29 define Package
/oprofile
32 TITLE
:=OProfile System Profiler
33 URL
:=http
://oprofile.sourceforge.net
34 DEPENDS
:=+libpopt
+kmod-oprofile
+libstdcpp
+objdump @
(!TARGET_uml||BROKEN
)
37 define Package
/oprofile
/description
38 A transparent low-overhead system-wide profiler.
41 define Package
/oprofile-utils
44 TITLE
:=OProfile System Profiler
(extra utilities
)
45 URL
:=http
://oprofile.sourceforge.net
49 define Build
/Configure
50 $(call Build
/Configure
/Default
, \
51 --with-kernel-support \
56 TARGET_CXXFLAGS
+= -fpermissive
57 TARGET_LDFLAGS
:= -L
$(STAGING_DIR
)/usr
/lib
$(TARGET_LDFLAGS
)
59 define Package
/oprofile-utils
/install
60 $(INSTALL_DIR
) $(1)/usr
/bin
62 $(PKG_INSTALL_DIR
)/usr
/bin
/opannotate \
63 $(PKG_INSTALL_DIR
)/usr
/bin
/oparchive \
64 $(PKG_INSTALL_DIR
)/usr
/bin
/opgprof \
68 define Package
/oprofile
/install
69 $(INSTALL_DIR
) $(1)/usr
/bin
71 $(PKG_INSTALL_DIR
)/usr
/bin
/* \
75 $(1)/usr
/bin
/opannotate \
76 $(1)/usr
/bin
/oparchive \
79 $(INSTALL_DIR
) $(1)/usr
/lib
/oprofile
81 $(PKG_INSTALL_DIR
)/usr
/lib
/oprofile
/*.so
* \
82 $(1)/usr
/lib
/oprofile
/
84 $(INSTALL_DIR
) $(1)/usr
/share
/oprofile
86 $(PKG_INSTALL_DIR
)/usr
/share
/oprofile
/stl.pat \
87 $(PKG_INSTALL_DIR
)/usr
/share
/oprofile
/$(patsubst x86
,i386
,$(LINUX_KARCH
)) \
88 $(1)/usr
/share
/oprofile
/
91 $(eval
$(call BuildPackage
,oprofile
))
92 $(eval
$(call BuildPackage
,oprofile-utils
))