summaryrefslogtreecommitdiffstats
path: root/package/linux-tools/linux-tool-cpupower.mk.in
blob: 2a2d3e01dd5a865bfc88c35736c2b8b8469ff52c (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
################################################################################
#
# cpupower
#
################################################################################

LINUX_TOOLS += cpupower

CPUPOWER_DEPENDENCIES = pciutils $(TARGET_NLS_DEPENDENCIES)

CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \
	CPUFREQ_BENCH=false \
	NLS=false \
	LDFLAGS=$(TARGET_NLS_LIBS) \
	DEBUG=false

define CPUPOWER_BUILD_CMDS
	$(Q)if test ! -f $(LINUX_DIR)/tools/power/cpupower/Makefile ; then \
		echo "Your kernel version is too old and does not have the cpupower tool." ; \
		echo "At least kernel 3.4 must be used." ; \
		exit 1 ; \
	fi

	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
		$(CPUPOWER_MAKE_OPTS) \
		cpupower
endef

define CPUPOWER_INSTALL_STAGING_CMDS
	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
		$(CPUPOWER_MAKE_OPTS) \
		DESTDIR=$(STAGING_DIR) \
		cpupower_install
endef

define CPUPOWER_INSTALL_TARGET_CMDS
	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
		$(CPUPOWER_MAKE_OPTS) \
		DESTDIR=$(TARGET_DIR) \
		cpupower_install
endef
OpenPOWER on IntegriCloud