summaryrefslogtreecommitdiffstats
path: root/package/perf/perf.mk
blob: eed30a289c1464cf46661a58d0f133b14b3d5d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#############################################################
#
# 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_LIBAUDIT=1 \
	NO_NEWT=1 \
	NO_GTK2=1 \
	NO_LIBPERL=1 \
	NO_LIBPYTHON=1 \
	DESTDIR=$(TARGET_DIR) \
	prefix=/usr \
	WERROR=0

ifeq ($(BR2_PACKAGE_ELFUTILS),y)
	PERF_DEPENDENCIES += elfutils
else
	PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1
endif

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))