Merge tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa
[cris-mirror.git] / tools / power / x86 / turbostat / Makefile
bloba9bc914a8fe816983a8f345e80e56ba94490f0ce
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 turbostat : turbostat.c
12 CFLAGS += -Wall
13 CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
14 CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
16 %: %.c
17 @mkdir -p $(BUILD_OUTPUT)
18 $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@
20 .PHONY : clean
21 clean :
22 @rm -f $(BUILD_OUTPUT)/turbostat
24 install : turbostat
25 install -d $(DESTDIR)$(PREFIX)/bin
26 install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat
27 install -d $(DESTDIR)$(PREFIX)/share/man/man8
28 install turbostat.8 $(DESTDIR)$(PREFIX)/share/man/man8