Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / tools / power / x86 / x86_energy_perf_policy / Makefile
blob2447b1bbaacff875d92bb32a4d14f038e48328d8
1 # SPDX-License-Identifier: GPL-2.0
2 CC = $(CROSS_COMPILE)gcc
3 BUILD_OUTPUT := $(CURDIR)
4 PREFIX := /usr
5 DESTDIR :=
7 ifeq ("$(origin O)", "command line")
8 BUILD_OUTPUT := $(O)
9 endif
11 x86_energy_perf_policy : x86_energy_perf_policy.c
12 CFLAGS += -Wall
13 CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
15 %: %.c
16 @mkdir -p $(BUILD_OUTPUT)
17 $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
19 .PHONY : clean
20 clean :
21 @rm -f $(BUILD_OUTPUT)/x86_energy_perf_policy
23 install : x86_energy_perf_policy
24 install -d $(DESTDIR)$(PREFIX)/bin
25 install $(BUILD_OUTPUT)/x86_energy_perf_policy $(DESTDIR)$(PREFIX)/bin/x86_energy_perf_policy
26 install -d $(DESTDIR)$(PREFIX)/share/man/man8
27 install x86_energy_perf_policy.8 $(DESTDIR)$(PREFIX)/share/man/man8