2 # Copyright (C) 2011-2013 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
9 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_VERSION
:=$(LINUX_VERSION
)
17 # Perf's makefile and headers are not relocatable and must be built from the
18 # Linux sources directory
19 PKG_BUILD_DIR
:=$(LINUX_DIR
)/tools
/perf-
$(TARGET_DIR_NAME
)
21 include $(INCLUDE_DIR
)/package.mk
26 DEPENDS
:= @USE_GLIBC
+libelf1
+libdw
+libpthread
+librt
+binutils
27 TITLE
:=Linux performance monitoring tool
28 VERSION
:=$(LINUX_VERSION
)-$(PKG_RELEASE
)
29 URL
:=http
://www.kernel.org
32 define Package
/perf
/description
33 perf is the Linux performance monitoring tool
37 $(CP
) $(LINUX_DIR
)/tools
/perf
/* $(PKG_BUILD_DIR
)/
41 ARCH
="$(LINUX_KARCH)" \
46 CROSS_COMPILE
="$(TARGET_CROSS)" \
48 LD
="$(TARGET_CROSS)ld" \
49 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
50 LDFLAGS
="$(TARGET_LDFLAGS)" \
55 define Package
/perf
/install
56 $(INSTALL_DIR
) $(1)/usr
/bin
57 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/perf
$(1)/usr
/bin
/
60 $(eval
$(call BuildPackage
,perf
))