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 include $(INCLUDE_DIR)/package.mk
22 DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils
23 TITLE:=Linux performance monitoring tool
24 VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
25 URL:=http://www.kernel.org
28 define Package/perf/description
29 perf is the Linux performance monitoring tool
32 # Perf's makefile and headers are not relocatable and must be built from the
33 # Linux sources directory
35 $(RM) -r $(PKG_BUILD_DIR)
36 ln -s $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR)
39 # MAKE_FLAGS should be passed again upon cleaning because Perf's makefile
40 # always performs checks before processing any rule
42 -$(MAKE) -C $(PKG_BUILD_DIR) \
49 ARCH="$(LINUX_KARCH)" \
53 CROSS_COMPILE="$(TARGET_CROSS)" \
55 LD="$(TARGET_CROSS)ld" \
56 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
57 LDFLAGS="$(TARGET_LDFLAGS)" \
62 define Package/perf/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(LINUX_DIR)/tools/perf/perf $(1)/usr/bin/
67 $(eval $(call BuildPackage,perf))