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)
|
2020-10-03 00:36:16 +00:00
|
|
|
PKG_RELEASE:=4
|
2014-11-28 01:29:41 +00:00
|
|
|
|
2023-02-02 19:02:25 +00:00
|
|
|
PKG_BUILD_FLAGS:=no-mips16
|
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
|
2020-09-26 21:42:52 +00:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2014-11-28 01:29:41 +00:00
|
|
|
|
|
|
|
define Package/perf
|
|
|
|
SECTION:=devel
|
|
|
|
CATEGORY:=Development
|
2022-01-22 18:57:49 +00:00
|
|
|
DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @KERNEL_PERF_EVENTS \
|
2022-01-08 16:45:29 +00:00
|
|
|
+PACKAGE_libbfd:libbfd +PACKAGE_libopcodes:libopcodes
|
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
|
|
|
|
|
2020-05-12 13:23:01 +00:00
|
|
|
HOST_CFLAGS += -I$(LINUX_DIR)/tools/include
|
|
|
|
|
2020-09-26 21:42:52 +00:00
|
|
|
TARGET_LDFLAGS += $(INTL_LDFLAGS)
|
|
|
|
|
2014-11-28 01:29:41 +00:00
|
|
|
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-10-03 00:36:16 +00:00
|
|
|
NO_LIBZSTD=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" \
|
2020-09-26 21:49:50 +00:00
|
|
|
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
2014-11-28 01:29:41 +00:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2020-05-12 13:23:01 +00:00
|
|
|
KBUILD_HOSTCFLAGS="$(HOST_CFLAGS)" \
|
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))
|