buildrootschalter/package/perf/perf.mk
Thomas Petazzoni d82f5cb94a perf: new package
This patch adds a new package that allows to build the 'perf'
userspace tool that comes in the tools/perf directory of the kernel
sources.

It is an alternative proposal to the one done by Kaiwan Billimoria
<kaiwan.billimoria@gmail.com>, in that it creates the package in
package/perf/. It therefore properly integrates with the Buildroot
package infrastructure.

Of course, the package depends on the Linux kernel to be built by
Buildroot, in order to get Perf sources matching the version of the
kernel that will be executed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-07 21:37:57 +01:00

40 lines
851 B
Makefile

#############################################################
#
# perf
#
#############################################################
# Source taken from the Linux kernel tree
PERF_SOURCE =
PERF_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
PERF_DEPENDENCIES = linux
PERF_MAKE_FLAGS = \
$(LINUX_MAKE_FLAGS) \
NO_LIBELF=1 \
NO_DWARF=1 \
NO_LIBAUDIT=1 \
NO_NEWT=1 \
NO_GTK2=1 \
NO_LIBPERL=1 \
NO_LIBPYTHON=1 \
DESTDIR=$(TARGET_DIR) \
prefix=/usr \
WERROR=0
define PERF_BUILD_CMDS
$(MAKE) -C $(LINUX_DIR)/tools/perf \
$(PERF_MAKE_FLAGS) O=$(@D)
endef
# After installation, we remove the Perl and Python scripts from the
# target.
define PERF_INSTALL_TARGET_CMDS
$(MAKE) -C $(LINUX_DIR)/tools/perf \
$(PERF_MAKE_FLAGS) O=$(@D) install
$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/
endef
$(eval $(generic-package))