2014-11-28 01:29:41 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2011-2013 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=perf
|
|
|
|
PKG_VERSION:=$(LINUX_VERSION)
|
2019-12-22 01:51:47 +00:00
|
|
|
PKG_RELEASE:=3
|
2014-11-28 01:29:41 +00:00
|
|
|
|
|
|
|
PKG_USE_MIPS16:=0
|
2016-01-02 14:47:48 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2016-07-31 10:15:07 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
2014-11-28 01:29:41 +00:00
|
|
|
|
2016-01-02 14:47:42 +00:00
|
|
|
# Perf's makefile and headers are not relocatable and must be built from the
|
|
|
|
# Linux sources directory
|
|
|
|
PKG_BUILD_DIR:=$(LINUX_DIR)/tools/perf-$(TARGET_DIR_NAME)
|
|
|
|
|
2014-11-28 01:29:41 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/perf
|
|
|
|
SECTION:=devel
|
|
|
|
CATEGORY:=Development
|
2019-12-22 01:51:47 +00:00
|
|
|
DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
|
2014-11-28 01:29:41 +00:00
|
|
|
TITLE:=Linux performance monitoring tool
|
|
|
|
VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
|
|
|
|
URL:=http://www.kernel.org
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/perf/description
|
|
|
|
perf is the Linux performance monitoring tool
|
|
|
|
endef
|
|
|
|
|
|
|
|
MAKE_FLAGS = \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
NO_LIBPERL=1 \
|
|
|
|
NO_LIBPYTHON=1 \
|
|
|
|
NO_NEWT=1 \
|
2015-11-02 10:16:28 +00:00
|
|
|
NO_LZMA=1 \
|
2016-01-02 14:47:48 +00:00
|
|
|
NO_BACKTRACE=1 \
|
|
|
|
NO_LIBNUMA=1 \
|
|
|
|
NO_GTK2=1 \
|
|
|
|
NO_LIBAUDIT=1 \
|
2016-05-19 11:38:35 +00:00
|
|
|
NO_LIBCRYPTO=1 \
|
2017-02-11 16:46:46 +00:00
|
|
|
NO_LIBUNWIND=1 \
|
2020-04-14 07:24:50 +00:00
|
|
|
NO_LIBCAP=1 \
|
2014-11-28 01:29:41 +00:00
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
CC="$(TARGET_CC)" \
|
|
|
|
LD="$(TARGET_CROSS)ld" \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2016-01-02 14:47:48 +00:00
|
|
|
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
2015-03-21 21:47:48 +00:00
|
|
|
WERROR=0 \
|
2019-07-16 19:43:08 +00:00
|
|
|
O=$(PKG_BUILD_DIR) \
|
2014-11-28 01:29:41 +00:00
|
|
|
prefix=/usr
|
|
|
|
|
2016-01-02 14:47:48 +00:00
|
|
|
define Build/Compile
|
|
|
|
+$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \
|
2019-07-16 19:43:08 +00:00
|
|
|
--no-print-directory \
|
|
|
|
-C $(LINUX_DIR)/tools/perf
|
2016-01-02 14:47:48 +00:00
|
|
|
endef
|
|
|
|
|
2014-11-28 01:29:41 +00:00
|
|
|
define Package/perf/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2016-01-02 14:47:42 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/perf $(1)/usr/bin/
|
2014-11-28 01:29:41 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,perf))
|